4

Does anyone understand what each element of a block header represents? I have an example block header represented here:

[

cd7bd64fba4cc782fe5474d3640882afece5887180591e72f80ce6916cf73526,

1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347,

f927a40c8b7f6e07c5af7fa2155b4864a4112b13,

30430d24554454b251003be3d027dea94397bf45cd34c6a06abcfec662242046,

56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421,

56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421,

00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,

3b32b8463f,

1780,

1388,

"",

55ba9f2d,

"Geth/v1.0.0/linux/go1.4.2",

437fa41b15c73334a947241ec885423a487d4401a0c3ec7c30550c1e039bccd7,

c5317acb884dfc49,

]

What do each of these elements represent? Is there an official source that also definitively says what each of these values mean?

2
  • 1
    Possible duplicate of : ethereum.stackexchange.com/questions/268/… Nov 22, 2017 at 1:49
  • Thanks @Andromelus, I believe this article is useful, but I don't believe I can derive what each of these values are from this post. I was hoping for a little more clarity about what each of these values represent. This article provides a pool of values that might apply to each of these but I do not know which order or which calculations to perform on them such as the date to get these values: Prev Hash, Nonce, Timestamp, Uncles Hash, Beneficiary, Logs Bloom, Difficulty, Extra data, Block Num, Gas Limit, Gas Used, MIx Hash, State Root, Transaction Root, Receipt Root.
    – Fortune
    Nov 22, 2017 at 2:02

2 Answers 2

1

From here

  • Parent hash: This is the Keccak 256-bit hash of the parent (previous) block's header.

• Ommers hash: This is the Keccak 256-bit hash of the list of ommers (or uncles) blocks included in the block.

• The beneficiary: The beneficiary field contains the 160-bit address of the recipient that will receive the mining reward once the block is successfully mined.

• State root: The state root field contains the Keccak 256-bit hash of the root node of the state trie. It is calculated once all transactions have been processed and finalized.

• Transactions root: The transaction root is the Keccak 256-bit hash of the root node of the transaction trie. The transaction trie represents the list of transactions included in the block.

• Receipts root: The receipts root is the Keccak 256-bit hash of the root node of the transaction receipt trie. This trie is composed of receipts of all transactions included in the block. Transaction receipts are generated after each transaction is processed and contain useful post-transaction information. More details on transaction receipts are provided in the next section.

• Logs bloom: The logs bloom is a bloom filter that is composed of the logger address and log topics from the log entry of each transaction receipt of the included transaction list in the block. Logging is explained in detail in the next section.

  • Logs bloom: The logs bloom is a bloom filter that is composed of the logger address and log topics from the log entry of each transaction receipt of the included transaction list in the block. Logging is explained in detail in the next section.

• Difficulty: The difficulty level of the current block.

• Number: The total number of all previous blocks; the genesis block is block zero.

• Gas limit: This field contains the value that represents the limit set on the gas consumption per block.

• Gas used: This field contains the total gas consumed by the transactions included in the block.

• Timestamp: The timestamp is the epoch Unix time of the time of block initialization.

  • Extra data: The extra data field can be used to store arbitrary data related to the block. Only up to 32 bytes are allowed in this field.

• Mixhash: The mixhash field contains a 256-bit hash that, once combined with the nonce, is used to prove that adequate computational effort (Proof of Work, or PoW) has been spent in order to create this block.

• Nonce: Nonce is a 64-bit hash (a number) that is used to prove, in combination with the mixhash field, that adequate computational effort (PoW) has been spent in order to create this block.

enter image description here

4

You can find the block header's structure in the Yellow paper, 4.4 (page 5).

I don't have time to go through eveyrthing, but if I do not make any mistake, for example, you could bind the following:

cd7bd64fba4cc782fe5474d3640882afece5887180591e72f80ce6916cf73526 --> Parent hash

1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347 --> ommersHash

f927a40c8b7f6e07c5af7fa2155b4864a4112b13 --> beneficiary

30430d24554454b251003be3d027dea94397bf45cd34c6a06abcfec662242046 --> stateRoot

56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421 --> transactionsRoot

56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421 --> receiptsRoot

00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 --> logsBloom

3b32b8463f --> difficulty

1780 --> Number of ancestor blocks

1388 --> gasLimit

"" --> gasUsed

55ba9f2d --> timestamp

"Geth/v1.0.0/linux/go1.4.2" --> ExtraData

437fa41b15c73334a947241ec885423a487d4401a0c3ec7c30550c1e039bccd7 --> mixHash

c5317acb884dfc49 --> nonce

From what I read of your example, this matches pretty well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.