feat: add BPO1 and BPO2 hardfork support#9
Merged
Gabriel-Trintinalia merged 3 commits intoConsensys:mainfrom Mar 16, 2026
Merged
feat: add BPO1 and BPO2 hardfork support#9Gabriel-Trintinalia merged 3 commits intoConsensys:mainfrom
Gabriel-Trintinalia merged 3 commits intoConsensys:mainfrom
Conversation
Add BPO1 (Blob Parameter Only fork 1, EIP-7892) and BPO2 SpecId variants between Osaka and Amsterdam, with corresponding blob fraction and max blob count constants. - Add `bpo1` and `bpo2` to `SpecId` enum (between osaka and amsterdam) - Add `HardforkName.BPO1`/`BPO2` string constants - Add `specIdFromString`/`specIdToString` mappings for BPO1/BPO2 - Add `BLOB_BASE_FEE_UPDATE_FRACTION_BPO1` (8346193) and `_BPO2` (11684671) - Add `MAX_BLOB_NUMBER_PER_BLOCK_BPO1` (15) and `_BPO2` (21) - Add `BLOB_BASE_FEE_UPDATE_FRACTION_CANCUN` alias for clarity - Map bpo1/bpo2 to Osaka precompile set in `PrecompileSpecId` Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The new bpo1/bpo2 SpecId variants were added but blobBaseFeeUpdateFraction only checked for Prague, returning 3,338,477 for all post-Prague forks instead of the correct values. Cascade the spec check to return the correct fraction per fork: - BPO2+: 11,684,671 (BLOB_BASE_FEE_UPDATE_FRACTION_BPO2) - BPO1+: 8,346,193 (BLOB_BASE_FEE_UPDATE_FRACTION_BPO1) - Osaka+: 5,007,716 (BLOB_BASE_FEE_UPDATE_FRACTION_OSAKA, EIP-7691) - Cancun+: 3,338,477 (BLOB_BASE_FEE_UPDATE_FRACTION_CANCUN) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
garyschulte
requested changes
Mar 16, 2026
Collaborator
garyschulte
left a comment
There was a problem hiding this comment.
Just the one error on Blob base fee update fraction - presuming I am interpreting https://eips.ethereum.org/EIPS/eip-7892 correctly
BLOB_BASE_FEE_UPDATE_FRACTION_OSAKA (5007716) is renamed to BLOB_BASE_FEE_UPDATE_FRACTION_PRAGUE since EIP-7691 activates at Prague, not Osaka. The redundant Prague alias for the Cancun fraction (3338477) is removed. blobBaseFeeUpdateFraction now branches on .prague instead of .osaka. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Summary
bpo1andbpo2to theSpecIdenum (positioned betweenosakaandamsterdam)HardforkName.BPO1/BPO2string constants and wire them intospecIdFromString/specIdToStringBLOB_BASE_FEE_UPDATE_FRACTION_BPO1= 8346193 (EIP-7892)BLOB_BASE_FEE_UPDATE_FRACTION_BPO2= 11684671MAX_BLOB_NUMBER_PER_BLOCK_BPO1= 15MAX_BLOB_NUMBER_PER_BLOCK_BPO2= 21BLOB_BASE_FEE_UPDATE_FRACTION_CANCUNalias for claritybpo1/bpo2to the Osaka precompile set inPrecompileSpecIdTest plan
zig build test)specIdFromString("BPO1")/specIdFromString("BPO2")resolve correctlyspecIdToString(.bpo1)/specIdToString(.bpo2)return"BPO1"/"BPO2"isEnabledInordering: osaka < bpo1 < bpo2 < amsterdam🤖 Generated with Claude Code
Note
Medium Risk
Introduces new
SpecIdvariants and updates default blob-parameter selection based on hardfork ordering, which can affect fee calculation behavior across forks if the spec mapping is incorrect. Changes are localized but touch consensus-sensitive constants and fork gating logic.Overview
Adds support for the new blob-parameter-only hardforks
bpo1andbpo2by extendingSpecIdplus string parsing/formatting (specIdFromString/specIdToString).Updates blob-related constants (new BPO1/BPO2 base fee update fractions and max-blobs-per-block values, plus a clarified Cancun constant) and changes
CfgEnv.blobBaseFeeUpdateFraction()to derive the default fraction viabpo2/bpo1/prague/cancunprecedence when the config override is unset.Treats
bpo1andbpo2as using the Osaka precompile set by mapping them toPrecompileSpecId.OsakainPrecompileSpecId.fromSpec().Written by Cursor Bugbot for commit 5b439ff. This will update automatically on new commits. Configure here.