From 86be309281fac93d9832f9fa1688de8149d376d6 Mon Sep 17 00:00:00 2001 From: lightclient Date: Mon, 3 Feb 2025 15:22:46 -0700 Subject: [PATCH] params: require non-zero blob update fraction --- params/config.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/params/config.go b/params/config.go index 1ff5928e23..6130417e95 100644 --- a/params/config.go +++ b/params/config.go @@ -773,8 +773,14 @@ func (c *ChainConfig) CheckConfigForkOrder() error { {name: "prague", timestamp: c.PragueTime, config: bsc.Prague}, {name: "verkle", timestamp: c.VerkleTime, config: bsc.Verkle}, } { - if cur.timestamp != nil && cur.config == nil { - return fmt.Errorf("unsupported fork configuration: missing blob configuration entry for %v in schedule", cur.name) + if cur.timestamp != nil { + // If the fork is configured, verify the blob schedule is valid. + if cur.config == nil { + return fmt.Errorf("unsupported fork configuration: missing blob configuration entry for %v in schedule", cur.name) + } + if cur.config.UpdateFraction == 0 { + return fmt.Errorf("unsupported fork configuration: %v update fraction must be defined and non-zero", cur.name) + } } }