Bitcoin full node and query server

Aug 6, 2024

View in context in the libbitcoin Slack #general mirror.

evoskuil19:46
There is a simple option here to conditionally (based on config) use the custom block allocator. This provides a modest performance advantage but may increase memory contention on smaller machines, haven't tested that yet. But the objective was to take blocks that are downloaded, deserialized, checked, and stored concurrently across channels, and forward them to a common stranded handler for caching. This step cannot reasonably rely on the per-channel single block linear buffer, and expanding that buffer into a circular buffer presents the same ultimate limits and more complexity. However, once a block is deserialized using the custom allocator, all of its many thousands of individual allocations comprise a single contiguous memory block. This means that the block object also can be copied and serialized (e.g. to/from disk) at almost no cost.