Sunday, December 22, 2024

blockchain – In Bitcoin Core, are blocks despatched in parallel or in collection?

Blocks are downloaded in collection from a given peer, however a node can obtain blocks from a number of friends on the identical time, successfully downloading blocks in parallel. This parallel downloading just isn’t about downloading completely different elements of the identical block from completely different friends, however relatively downloading completely different blocks from completely different friends.

This design permits a node to obtain the blockchain extra rapidly, as it isn’t restricted by the add velocity of a single peer. It additionally provides a layer of redundancy.

Regardless of the parallel downloading of blocks, they should be processed serially. That is important for the node to keep up correct details about the prevailing unspent transaction outputs (UTXOs) and to confirm the validity of transactions.

The precise implementation of this course of in Bitcoin Core is sort of complicated and entails numerous points like dealing with timeouts, validating blocks, and so forth. You’ll be able to assessment the precise code within the Bitcoin Core GitHub repository to get a deeper understanding.

You might also examine the P2P Community a part of Bitcoin Developer website – see the reason for Block, GetBlocks, GetData, GetHeaders messages, which can be concerned when blocks are despatched between nodes.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles