From 3f869866583dc96d44c622463fa773c0d5cce983 Mon Sep 17 00:00:00 2001 From: Kim De Mey Date: Fri, 9 Feb 2024 15:50:37 +0100 Subject: [PATCH] Fix current fail on excessBlobGas field in block header (#2016) --- fluffy/network/history/history_network.nim | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/fluffy/network/history/history_network.nim b/fluffy/network/history/history_network.nim index 9aa5a9cd3..49b3243f7 100644 --- a/fluffy/network/history/history_network.nim +++ b/fluffy/network/history/history_network.nim @@ -207,11 +207,14 @@ func validateBlockHeaderBytes*( let header = ? decodeRlp(bytes, BlockHeader) - if header.excessBlobGas.isSome: - return err("EIP-4844 not yet implemented") - - # TODO: Verify timestamp with Shanghai timestamp to if isSome() - # TODO 2: Verify block number with merge block to check ommerhash + # Note: + # One could do additional quick-checks here such as timestamp vs the optional + # (later forks) added fields. E.g. Shanghai field, Cancun fields, + # zero ommersHash, etc. + # However, the block hash comparison will obviously catch these and it is + # pretty trivial to provide a non-canonical valid header. + # It might be somewhat more useful if just done (temporarily) for the headers + # post-merge which are currently provided without proof. if not (header.blockHash() == hash): err("Block header hash does not match")