-
Notifications
You must be signed in to change notification settings - Fork 21.5k
params: EIP-7892 - Blob Parameter Only Hardforks #32193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds support for five new "BPO" hardfork timestamps (BPO1–BPO5) and integrates them into chain configuration and blob gas scheduling.
- Introduce
BPO1Time–BPO5TimeinChainConfig, update display banner, fork-order validation, and compatibility checks. - Extend
BlobScheduleConfigwith BPO entries and refactor blob fee and blob scheduling functions to use a newlatestBlobConfighelper. - Replace legacy switch on
LatestForkineip4844.gowith unified logic that accounts for BPO forks.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| params/config.go | Add BPO1–BPO5 time fields, IsBPO methods, integrate into Description, fork ordering, and compatibility checks |
| consensus/misc/eip4844/eip4844.go | Refactor blob fee and capacity functions to use latestBlobConfig with BPO support; remove direct fork switch |
Comments suppressed due to low confidence (4)
params/config.go:782
- [nitpick] The
namefield uses "bpo1" which is inconsistent with other entries like "pragueTime"; consider using "bpo1Time" to match the JSON key and improve clarity.
{name: "bpo1", timestamp: c.BPO1Time, optional: true},
params/config.go:414
- New fork fields like
BPO1TimethroughBPO5Timeintroduce behavior that should be covered by unit tests (e.g.,IsBPOmethods and fork ordering) to prevent regressions.
BPO1Time *uint64 `json:"bpo1Time,omitempty"` // BPO1 switch time (nil = no fork, 0 = already on bpo1)
params/config.go:684
- Using
c.IsLondonfor BPO forks may prematurely activate forks before the intended predecessor (e.g., Cancun) is reached; consider usingc.IsCancunor the appropriate previous fork condition.
return c.IsLondon(num) && isTimestampForked(c.BPO1Time, time)
consensus/misc/eip4844/eip4844.go:123
- Using
cfg.LondonBlockas the block number when determining blob config may ignore the actual block height for later forks; consider passing the real block number instead of a fixed London threshold.
london = cfg.LondonBlock
| // IsBPO1 returns whether time is either equal to the BPO1 fork time or greater. | ||
| func (c *ChainConfig) IsBPO1(num *big.Int, time uint64) bool { | ||
| return c.IsLondon(num) && isTimestampForked(c.BPO1Time, time) | ||
| } | ||
|
|
||
| // IsBPO2 returns whether time is either equal to the BPO2 fork time or greater. | ||
| func (c *ChainConfig) IsBPO2(num *big.Int, time uint64) bool { | ||
| return c.IsLondon(num) && isTimestampForked(c.BPO2Time, time) | ||
| } | ||
|
|
||
| // IsBPO3 returns whether time is either equal to the BPO3 fork time or greater. | ||
| func (c *ChainConfig) IsBPO3(num *big.Int, time uint64) bool { | ||
| return c.IsLondon(num) && isTimestampForked(c.BPO3Time, time) |
Copilot
AI
Jul 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The IsBPO1 through IsBPO5 methods are nearly identical; consider refactoring into a helper or loop to reduce code duplication and ease future additions.
| // IsBPO1 returns whether time is either equal to the BPO1 fork time or greater. | |
| func (c *ChainConfig) IsBPO1(num *big.Int, time uint64) bool { | |
| return c.IsLondon(num) && isTimestampForked(c.BPO1Time, time) | |
| } | |
| // IsBPO2 returns whether time is either equal to the BPO2 fork time or greater. | |
| func (c *ChainConfig) IsBPO2(num *big.Int, time uint64) bool { | |
| return c.IsLondon(num) && isTimestampForked(c.BPO2Time, time) | |
| } | |
| // IsBPO3 returns whether time is either equal to the BPO3 fork time or greater. | |
| func (c *ChainConfig) IsBPO3(num *big.Int, time uint64) bool { | |
| return c.IsLondon(num) && isTimestampForked(c.BPO3Time, time) | |
| // IsForked returns whether time is either equal to the specified fork time or greater. | |
| func (c *ChainConfig) IsForked(num *big.Int, time uint64, forkTime uint64) bool { | |
| return c.IsLondon(num) && isTimestampForked(forkTime, time) | |
| } | |
| // IsBPO1 returns whether time is either equal to the BPO1 fork time or greater. | |
| func (c *ChainConfig) IsBPO1(num *big.Int, time uint64) bool { | |
| return c.IsForked(num, time, c.BPO1Time) | |
| } | |
| // IsBPO2 returns whether time is either equal to the BPO2 fork time or greater. | |
| func (c *ChainConfig) IsBPO2(num *big.Int, time uint64) bool { | |
| return c.IsForked(num, time, c.BPO2Time) | |
| } | |
| // IsBPO3 returns whether time is either equal to the BPO3 fork time or greater. | |
| func (c *ChainConfig) IsBPO3(num *big.Int, time uint64) bool { | |
| return c.IsForked(num, time, c.BPO3Time) |
MariusVanDerWijden
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This is a resubmit of ethereum#31820 against the `master` branch. --------- Co-authored-by: Marius van der Wijden <[email protected]> Co-authored-by: Gary Rong <[email protected]>
This is a resubmit of ethereum#31820 against the `master` branch. --------- Co-authored-by: Marius van der Wijden <[email protected]> Co-authored-by: Gary Rong <[email protected]>
This is a resubmit of #31820 against the
masterbranch.