fix: derive BlobParams from chain spec instead of hardcoding#254
Merged
fix: derive BlobParams from chain spec instead of hardcoding#254
Conversation
Resolve BlobParams dynamically via EthChainSpec::blob_params_at_timestamp() rather than hardcoding a specific hardfork variant. The hardcoded value caused the builder to compute astronomically wrong max_fee_per_blob_gas when the network moved to a different hardfork (e.g. Prague params on a BPO2 network), due to mismatched target gas and update fraction values feeding into the exponential blob pricing formula. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dylanlott
approved these changes
Mar 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes ENG-2110
Summary
populate_initial_gashardcodedBlobParams::prague()when computingmax_fee_per_blob_gasfor host chain blob transactions. When the network moved to BPO2, the exponential blob pricing formula amplified the parameter mismatch into an astronomically wrong blob fee.Concretely, the mismatch affects both inputs to the blob fee exponential:
With ~187M excess_blob_gas on the network (reachable in ~60 min of sustained blob demand, where the real blob fee is only ~9M wei per blob gas), the builder computes an exponent of 37.5 instead of the correct 15.3, producing a
max_fee_per_blob_gasof ~20 quadrillion wei — 2.1 billion times higher than reality. This causedeth_estimateGasto report a required balance of ~2,618 ETH for a single blob transaction, failing with-32003: insufficient funds.Fix
Replace the hardcoded
BlobParams::prague()with dynamic resolution viaEthChainSpec::blob_params_at_timestamp(), using the same chain spec thatSignetCfgEnv::spec_id()already uses. This handles the full Cancun -> Prague -> Osaka -> BPO1 -> BPO2 schedule automatically, so the builder will always use the correct blob parameters for the current hardfork.Test plan
make clippypasses with-D warningsmake test— all tests passGenerated with Claude Code