From fea011ab263b8272fe1251f38ed0f23356090835 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Sun, 19 May 2024 23:18:23 -0700 Subject: [PATCH] Clarify which EIPs added block header fields The logic is unchanged, but more accurate EIPs are commented for future reference. --- index.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 9e9651e..68d2455 100644 --- a/index.html +++ b/index.html @@ -160,7 +160,7 @@ } // Shapella hard fork - // https://eips.ethereum.org/EIPS/eip-6465#execution-block-header-changes + // https://eips.ethereum.org/EIPS/eip-4895#new-field-in-the-execution-payload-header-withdrawals-root if (block?.withdrawalsRoot) { header.push(block.withdrawalsRoot); } @@ -170,11 +170,16 @@ if (block?.blobGasUsed) { header.push( BigInt(block.blobGasUsed), - BigInt(block.excessBlobGas), - block.parentBeaconBlockRoot + BigInt(block.excessBlobGas) ); } + // Dencun hard fork + // https://eips.ethereum.org/EIPS/eip-4788#block-structure-and-validity + if (block?.parentBeaconBlockRoot) { + header.push(block.parentBeaconBlockRoot); + } + const rlp = RLP.encode(header); const hash = keccak256(rlp); -- 2.47.3