From 698213592a2b770b36c0ffad92d6e4d465d9cb44 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Tue, 17 Feb 2026 14:44:46 +0100 Subject: [PATCH] consensus/misc: hardening header verification --- consensus/misc/eip1559/eip1559.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/consensus/misc/eip1559/eip1559.go b/consensus/misc/eip1559/eip1559.go index a90bd744b2..9a4cd320a8 100644 --- a/consensus/misc/eip1559/eip1559.go +++ b/consensus/misc/eip1559/eip1559.go @@ -43,6 +43,10 @@ func VerifyEIP1559Header(config *params.ChainConfig, parent, header *types.Heade if header.BaseFee == nil { return errors.New("header is missing baseFee") } + // Verify the parent header is not malformed + if config.IsLondon(parent.Number) && parent.BaseFee == nil { + return errors.New("parent header is missing baseFee") + } // Verify the baseFee is correct based on the parent header. expectedBaseFee := CalcBaseFee(config, parent) if header.BaseFee.Cmp(expectedBaseFee) != 0 {