The Ethereum Yellow Paper specifies several block requirements. Section 4.3.2 focuses on six block header hashes. Holistic validity is the property of these six hashes being correct. I will elaborate on all of this.

Basics

All hashes are Keccak 256 hashes. Before Keccak 256 hashes of data structures can be calculated, they must be converted to bit strings using Recursive Length Prefix (RLP) encoding. To calculate “roots” of sets of key value pairs, the pairs must be placed in Merkle Patricia tries. Roots are the hashes of the RLP encodings of the top nodes of these tries. This is admittedly a lot of preliminary material. Click on the links for more information.

Hashes

Here is a description of each of holistic validity hash:

Hr of the Parent

This denotes the final state root of the parent block header. This must correspond to the initial state used in calculating the final state for the block. The key value pairs used in calculating this hash contain account address hashes and RLP encodings of the account nonces, balances, storage roots and code hashes in that order.

To verify the correct parent is considered, its header hash can be compared to the parent header hash value of the block header. Also, its block number can be checked.

Hr

This denotes the final state root of the block header. This must correspond to the final state after all the transactions in the block have been executed on the state denoted by the Hr of the parent. The key value pairs used in calculating this hash are like those used in calculating the Hr of the parent.

Ho

This denotes the uncle block header list hash of the block header. This must equal the uncle block list hash for the block.

Ht

This denotes the transaction list root of the block header. This must equal the transaction list root for the block. The key value pairs used in calculating this hash contain RLP encodings of transaction indices and RLP encodings of transactions.

He

This denotes the receipt list root of the block header. This must equal the root of the receipt list generated when the transactions are executed. The key value pairs used in calculating this hash contain RLP encodings of transaction indices and RLP encodings of receipts.

Hb

This denotes the Bloom filter of the block header. This must equal the logical OR of the all transaction log Bloom filters in all the receipts generated when the transactions are executed.

Conclusion

Holistic validity requires six block header hashes having specific values. Completely understanding this property requires first understanding several related concepts elaborated upon in the aforementioned links.

Feedback

Feel free to leave any comments or questions below. You can also contact me by email at cs@etcplanet.org or by clicking any of these icons:

Acknowledgements

I would like to thank IOHK (Input Output Hong Kong) for funding this effort.

License

This work is licensed under the Creative Commons Attribution ShareAlike 4.0

International License.