feat: add Gamma hardfork infrastructure and integration test#290
Draft
feat: add Gamma hardfork infrastructure and integration test#290
Conversation
dd3ef0f to
e868acd
Compare
## Hardfork Infrastructure - Add GravityHardfork enum (Alpha/Beta/Gamma) via reth hardfork!() macro - Parse gravityHardforks.gammaBlock from genesis JSON config - Add gamma_transitions_at_block() to EthChainSpec trait ## Gamma Bytecodes & Upgrade Logic - Add gamma.rs with 11 system contract bytecodes from current HEAD - Add StakePool bytecode + ReentrancyGuard storage constants - Implement apply_gamma() in parallel_execute.rs: - Replace bytecodes for all system contracts at gammaBlock - Replace bytecodes for StakePool instances - Initialize ReentrancyGuard storage slot to NOT_ENTERED(1) ## Integration Test - Generate v1.0.0 genesis via generate_genesis_single.sh with old bytecodes - Inject gammaBlock=20 into genesis config - Boot single reth node, push 50 blocks via MockConsensus - Verify pre-hardfork: old bytecodes at block 19 - Verify at-hardfork: new bytecodes + ReentrancyGuard at block 20 - Verify post-hardfork: 30 additional blocks execute normally - Add HARDFORK_TESTING.md documentation with pitfalls and guide
e868acd to
3599442
Compare
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.
Hardfork Infrastructure
Gamma Bytecodes & Upgrade Logic
Integration Test