Add Prague/Osaka fork precompile gating#171
Merged
Merged
Conversation
Comment on lines
96
to
+113
| @@ -113,8 +105,16 @@ var PrecompiledContractsBLS = map[common.Address]PrecompiledContract{ | |||
| common.BytesToAddress([]byte{0x11}): &bls12381MapG2{}, | |||
| } | |||
|
|
|||
| // PrecompiledContractsOsaka contains the set of pre-compiled Ethereum | |||
| // contracts activated in the Osaka fork. | |||
| var PrecompiledContractsOsaka = map[common.Address]PrecompiledContract{ | |||
| common.BytesToAddress([]byte{0x01, 0x00}): &p256Verify{}, | |||
| } | |||
|
|
|||
Member
There was a problem hiding this comment.
[imo]
It would be better to include all active PrecompiledContracts from 0x01 for this hardfork, if the name is based on the hardfork.
| } | ||
| } | ||
| return p, ok | ||
| } |
Member
There was a problem hiding this comment.
[nits] It may be clearer to handle the full precompile set in the switch case for each hardfork, rather than looking up Prague and Osaka precompiles separately after the switch.
purplesmoke05
approved these changes
Jul 8, 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.
This pull request introduces support for two new Ethereum hard forks, Prague and Osaka, by updating the chain configuration, fork activation logic, precompiled contract sets, and related tests. The changes ensure that the new forks are correctly ordered after Berlin, add their activation checks, and extend the precompile contract logic to include new contracts for these forks.
Fork support and configuration:
PragueBlockandOsakaBlockfields to theChainConfigstruct, along with corresponding activation checks (IsPrague,IsOsaka) and fork ordering validation inCheckConfigForkOrder. Also updated the string representation and compatibility checks to include these new forks.Precompiled contracts and fork activation:
PrecompiledContractsPragueandPrecompiledContractsOsakafor the new forks. Updated the logic for active precompiles and EVM precompile lookup to include Prague and Osaka contracts when their forks are active.Chain config presets: