Bitcoin Forum
October 16, 2018, 10:11:08 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Sending large blocks  (Read 826 times)
Offline Offline

Activity: 1190
Merit: 1001

View Profile
November 09, 2014, 12:38:31 AM

In the bitcoin network protocol, messages are limited to 32MB.  The entire message is stored in RAM before processing, in order to compute the CRC.

If the block size is increased past 32MB, then one block won't be able to fit into message anymore.

This means that blocks need to be partitioned over multiple messages and ideally, the receiving node should be able to check each sub-block is valid before receiving the next sub-block.  This prevents sending a node a huge block and then at the end it turns out that it was a difficulty 1 block.

The merkleblock message already achieves this.  The reference client would just need to be able to combine multiple merkle blocks together to make one block.

Extra fields could be added to the merkle block to help manage the process.

Field SizeDescriptionData typeComments
?block_sizevar_intThe size of the block in bytes
?sub_block_positionvar_intThe position of the first transaction in the block
?sub_block_indexvar_intThe index of the sub block
?sub_block_countvar_intThe number of the sub blocks for the block

If all the fields are set to zero, then it means that it is an independent merkle block.  Otherwise, a block is being broken down into pieces. 

When sending partitioned blocks, the rule would be that the transactions have to be in sequence.  The recipient could create a large array and would know where to copy the transactions. 

This would allow out of order merkleblocks.

Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!