Bitcoin Forum
July 19, 2018, 08:48:38 AM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Sending large blocks  (Read 821 times)
TierNolan
Legendary
*
Offline Offline

Activity: 1190
Merit: 1001


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

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.

1LxbG5cKXzTwZg9mjL3gaRE835uNQEteWF
Pages: [1]
  Print  
 
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!