Fix current fail on excessBlobGas field in block header (#2016)

This commit is contained in:
Kim De Mey 2024-02-09 15:50:37 +01:00 committed by GitHub
parent 9c37e73ff7
commit 3f86986658
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 5 deletions

View File

@ -207,11 +207,14 @@ func validateBlockHeaderBytes*(
let header = ? decodeRlp(bytes, BlockHeader) let header = ? decodeRlp(bytes, BlockHeader)
if header.excessBlobGas.isSome: # Note:
return err("EIP-4844 not yet implemented") # One could do additional quick-checks here such as timestamp vs the optional
# (later forks) added fields. E.g. Shanghai field, Cancun fields,
# TODO: Verify timestamp with Shanghai timestamp to if isSome() # zero ommersHash, etc.
# TODO 2: Verify block number with merge block to check ommerhash # 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): if not (header.blockHash() == hash):
err("Block header hash does not match") err("Block header hash does not match")