How are Bitcoin blocks structured?

Bitcoin blockchain is made of individual blocks. I am wondering how do these blocks actually look like. Which different data types are part of them? What is each part of the block used for, what is its meaning and what are the possible values that can those values take?

I would also like to, assuming I am looking at a block’s HEX blob, be able to decode it/determine various parts of it.

Submit an answer See answers Share on Twitter Share on Facebook
Answers
Accepted Answer

Accepted: A series of transaction hashes and a header. Not the whole transactions!!!!!

The blocks themselves are simply an ordered list of transaction hashes and a header plus some other information. The transactions themselves are not included when the block is propagated. It is assumed that all miners will have the transactions cached and validated, making the block validation and propagation very fast. The block includes the following: 1: The magic number that defines this as a Bitcoin block on the network it has been mined for 2: The block size in bytes including the full size of all transactions (This is not what is propagated) 3: The block header which contains: a: The block version number b: A reference to the previous block which this block builds upon c: The Merkle root which is the top of a hash tree of all of the transactions in that block d: A timestamp of when the block was found e: Difficulty required to have a valid block hash f: A nonce which when hashed with the information in the header creates a block hash with the right difficulty 4: The qty of transactions in the block 5: The list of all the transaction hashes in the block

Test Answer

Test answer.

You are creating this answer as an anonymous user. If you log in we will be able to store the draft as you write it.

Submit an Answer

By swiping I acknowledge that the answer will be immutably stored on the Bitcoin SV blockchain forever and that I take full responsibility for any legal or other consequences that might be related to that.
Made with in Slovenia.