After the merge, the block hash computation has a different formula. Before that, the following data were used to compute the hash via feeding the list of hex values to an RLP encoder and hashing the encoding with Keccak.
What new headers are added to this formula?
Are the nonce and difficulty removed since they have no relevance?
block_header = [
parent_hash, # parentHash
uncles_hash, # ommersHash
coinbase_lower, #beneficiary
state_root, # stateRoot
transactions_root, # transactionsRoot
receipts_root, # receiptsRoot
bloom, #logsBloom
difficulty_hex, # difficulty
number_hex, # number
gas_limit_hex, # gasLimit
gas_used_hex, # gasUsed
timestamp_hex, # timestamp
extra_data, # extraData
mix_hash, # mixHash
nonce, # nonce
base_fee_per_gas,
]
rlp_encoded = rlp.encode(block_header)
block_hash = web3.keccak(rlp_encoded).hex()
Best Answer
According to EIP-3675, with the transition to Proof of Stake:
ommersHash
0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347
= Keccak256(RLP([]))
difficulty
0
mixHash
0x0000000000000000000000000000000000000000000000000000000000000000
nonce
0x0000000000000000
difficulty
should be represented as0x
when fed into the RLP encoder.The EIP does not specify any new block (header) fields.