mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
params: mark amsterdam blob-schedule entry as optional
Mark `amsterdam` as `optional` in the blob-schedule fork-validation table
so that a chain config setting `amsterdamTime` no longer requires a
corresponding `blobSchedule.amsterdam` entry to be present.
Why: hive's `clients/<el>/mapper.jq` removed the `amsterdam` block from
the generated `blobSchedule` in ethereum/hive#1387 ("named forks should
not have hard-coded blob defaults"). With strict validation in place,
every hive simulator that activates Amsterdam — including
`eels/consume-engine` against bal-devnet-4 — now fails immediately at
`geth init` with:
Fatal: Failed to write genesis block: invalid chain configuration:
missing entry for fork "amsterdam" in blobSchedule
The bal-devnet-3 branch carried a similar relaxation (commit 265d74b75)
by commenting out the check entirely. This change is narrower: it only
makes `amsterdam` optional, leaving every other fork's strict check
intact, and matches the pattern already used in the fork-ordering table
just above (where `amsterdam` and the BPO entries are also marked
optional).
The `cur.config.validate()` call still runs for any caller that *does*
provide a blob schedule entry, so misconfigured Amsterdam blob params
remain rejected; only the missing-entry case is relaxed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e04fb788c3
commit
49a69870cc
1 changed files with 3 additions and 2 deletions
|
|
@ -999,6 +999,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
|
||||||
name string
|
name string
|
||||||
timestamp *uint64
|
timestamp *uint64
|
||||||
config *BlobConfig
|
config *BlobConfig
|
||||||
|
optional bool
|
||||||
}{
|
}{
|
||||||
{name: "cancun", timestamp: c.CancunTime, config: bsc.Cancun},
|
{name: "cancun", timestamp: c.CancunTime, config: bsc.Cancun},
|
||||||
{name: "prague", timestamp: c.PragueTime, config: bsc.Prague},
|
{name: "prague", timestamp: c.PragueTime, config: bsc.Prague},
|
||||||
|
|
@ -1008,14 +1009,14 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
|
||||||
{name: "bpo3", timestamp: c.BPO3Time, config: bsc.BPO3},
|
{name: "bpo3", timestamp: c.BPO3Time, config: bsc.BPO3},
|
||||||
{name: "bpo4", timestamp: c.BPO4Time, config: bsc.BPO4},
|
{name: "bpo4", timestamp: c.BPO4Time, config: bsc.BPO4},
|
||||||
{name: "bpo5", timestamp: c.BPO5Time, config: bsc.BPO5},
|
{name: "bpo5", timestamp: c.BPO5Time, config: bsc.BPO5},
|
||||||
{name: "amsterdam", timestamp: c.AmsterdamTime, config: bsc.Amsterdam},
|
{name: "amsterdam", timestamp: c.AmsterdamTime, config: bsc.Amsterdam, optional: true},
|
||||||
} {
|
} {
|
||||||
if cur.config != nil {
|
if cur.config != nil {
|
||||||
if err := cur.config.validate(); err != nil {
|
if err := cur.config.validate(); err != nil {
|
||||||
return fmt.Errorf("invalid chain configuration in blobSchedule for fork %q: %v", cur.name, err)
|
return fmt.Errorf("invalid chain configuration in blobSchedule for fork %q: %v", cur.name, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if cur.timestamp != nil {
|
if cur.timestamp != nil && !cur.optional {
|
||||||
// If the fork is configured, a blob schedule must be defined for it.
|
// If the fork is configured, a blob schedule must be defined for it.
|
||||||
if cur.config == nil {
|
if cur.config == nil {
|
||||||
return fmt.Errorf("invalid chain configuration: missing entry for fork %q in blobSchedule", cur.name)
|
return fmt.Errorf("invalid chain configuration: missing entry for fork %q in blobSchedule", cur.name)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue