Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion consensus/misc/eip4844/eip4844.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ func CalcExcessBlobGas(config *params.ChainConfig, parent *types.Header, headTim

isOsaka := config.IsOsaka(config.LondonBlock, headTimestamp)
bcfg := latestBlobConfig(config, headTimestamp)
if bcfg == nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to distinguish whether L2Blob is enabled. If enabled, bcfg must be non-nil.

if config.IsL2Blob(config.LondonBlock, headTimestamp) {
panic("failed to load blob config for L2Blob")
}
return 0
}
return calcExcessBlobGas(isOsaka, bcfg, parent)
}

Expand Down Expand Up @@ -191,7 +197,10 @@ 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")
if config.IsL2Blob(config.LondonBlock, header.Time) {
panic("failed to load blob config for L2Blob")
}
return minBlobGasPrice
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to distinguish whether L2Blob is enabled. If enabled, we should panic here.

Copy link
Collaborator

@blockchaindevsh blockchaindevsh Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's worth checking here that L2 blob is not enabled. We don't necessarily need to modify latestBlobConfig above. Just ensure that these hardcoded values only works for compatibility with upstream, but we don't actually use these hardcoded values.

}
return blobConfig.blobBaseFee(*header.ExcessBlobGas)
}
Expand Down