From ba1c9bcf9365d657eb95443f9e3f81c261697ef8 Mon Sep 17 00:00:00 2001 From: syntrust Date: Wed, 29 Oct 2025 15:55:48 +0800 Subject: [PATCH 1/3] fix ci: op-program-compat --- consensus/misc/eip4844/eip4844.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/consensus/misc/eip4844/eip4844.go b/consensus/misc/eip4844/eip4844.go index b8720f1ba7..2d5b6a9da8 100644 --- a/consensus/misc/eip4844/eip4844.go +++ b/consensus/misc/eip4844/eip4844.go @@ -141,6 +141,9 @@ func CalcExcessBlobGas(config *params.ChainConfig, parent *types.Header, headTim isOsaka := config.IsOsaka(config.LondonBlock, headTimestamp) bcfg := latestBlobConfig(config, headTimestamp) + if bcfg == nil { + return 0 + } return calcExcessBlobGas(isOsaka, bcfg, parent) } @@ -191,7 +194,7 @@ func CalcBlobFee(config *params.ChainConfig, header *types.Header) *big.Int { blobConfig := latestBlobConfig(config, header.Time) if blobConfig == nil { - panic("calculating blob fee on unsupported fork") + return minBlobGasPrice } return blobConfig.blobBaseFee(*header.ExcessBlobGas) } From ddef8eb3cc6837adb6b63f3efe54fd9dcbc7f0b3 Mon Sep 17 00:00:00 2001 From: syntrust Date: Thu, 30 Oct 2025 14:27:22 +0800 Subject: [PATCH 2/3] check BlobScheduleConfig for L2Blob --- consensus/misc/eip4844/eip4844.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/consensus/misc/eip4844/eip4844.go b/consensus/misc/eip4844/eip4844.go index 2d5b6a9da8..737559a6ae 100644 --- a/consensus/misc/eip4844/eip4844.go +++ b/consensus/misc/eip4844/eip4844.go @@ -55,6 +55,9 @@ func (bc *BlobConfig) blobPrice(excessBlobGas uint64) *big.Int { func latestBlobConfig(cfg *params.ChainConfig, time uint64) *BlobConfig { if cfg.BlobScheduleConfig == nil { + if cfg.IsL2Blob(cfg.LondonBlock, time) { + panic("blob schedule missing for L2Blob") + } return nil } var ( From 618414c5e551ecf96f1f690819c174c308dccd70 Mon Sep 17 00:00:00 2001 From: syntrust Date: Thu, 30 Oct 2025 18:38:24 +0800 Subject: [PATCH 3/3] fix comment --- consensus/misc/eip4844/eip4844.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/consensus/misc/eip4844/eip4844.go b/consensus/misc/eip4844/eip4844.go index 737559a6ae..875eec7a91 100644 --- a/consensus/misc/eip4844/eip4844.go +++ b/consensus/misc/eip4844/eip4844.go @@ -55,9 +55,6 @@ func (bc *BlobConfig) blobPrice(excessBlobGas uint64) *big.Int { func latestBlobConfig(cfg *params.ChainConfig, time uint64) *BlobConfig { if cfg.BlobScheduleConfig == nil { - if cfg.IsL2Blob(cfg.LondonBlock, time) { - panic("blob schedule missing for L2Blob") - } return nil } var ( @@ -145,6 +142,9 @@ func CalcExcessBlobGas(config *params.ChainConfig, parent *types.Header, headTim isOsaka := config.IsOsaka(config.LondonBlock, headTimestamp) bcfg := latestBlobConfig(config, headTimestamp) if bcfg == nil { + if config.IsL2Blob(config.LondonBlock, headTimestamp) { + panic("failed to load blob config for L2Blob") + } return 0 } return calcExcessBlobGas(isOsaka, bcfg, parent) @@ -197,6 +197,9 @@ func CalcBlobFee(config *params.ChainConfig, header *types.Header) *big.Int { blobConfig := latestBlobConfig(config, header.Time) if blobConfig == nil { + if config.IsL2Blob(config.LondonBlock, header.Time) { + panic("failed to load blob config for L2Blob") + } return minBlobGasPrice } return blobConfig.blobBaseFee(*header.ExcessBlobGas)