Skip to content

feat: add hardfork testing framework (trait + generic helpers)#307

Merged
nekomoto911 merged 2 commits intomainfrom
add_one_hardfork_framework
Mar 25, 2026
Merged

feat: add hardfork testing framework (trait + generic helpers)#307
nekomoto911 merged 2 commits intomainfrom
add_one_hardfork_framework

Conversation

@ByteYue
Copy link
Copy Markdown
Collaborator

@ByteYue ByteYue commented Mar 21, 2026

Add the hardfork testing framework to main without any hardfork-specific code (alpha/beta/gamma modules live on release branches only):

  • hardfork/common.rs: HardforkUpgrades trait defining system_upgrades(), extra_upgrades(), and storage_patches() interface
  • hardfork/mod.rs: Module root (only pub mod common)
  • hardfork_test_helpers.rs: Generic verification functions for any hardfork:
    • verify_bytecodes_at_block()
    • verify_bytecodes_old_before_block()
    • verify_storage_patches()
  • HARDFORK_TESTING.md: Guide for adding new hardfork tests

Release branches should add their hardfork-specific modules (e.g. gamma.rs with GammaHardfork implementing HardforkUpgrades) and use the generic helpers from this framework.

@ByteYue ByteYue force-pushed the add_one_hardfork_framework branch from 26f5dd0 to 14050f5 Compare March 25, 2026 08:09
Add the hardfork testing framework to main without any hardfork-specific
code (alpha/beta/gamma modules live on release branches only):

- hardfork/common.rs: HardforkUpgrades trait defining system_upgrades(),
  extra_upgrades(), and storage_patches() interface
- hardfork/mod.rs: Module root (only pub mod common)
- hardfork_test_helpers.rs: Generic verification functions for any hardfork:
  - verify_bytecodes_at_block()
  - verify_bytecodes_old_before_block()
  - verify_storage_patches()
- HARDFORK_TESTING.md: Guide for adding new hardfork tests

Release branches should add their hardfork-specific modules (e.g.
gamma.rs with GammaHardfork implementing HardforkUpgrades) and
use the generic helpers from this framework.
@ByteYue ByteYue force-pushed the add_one_hardfork_framework branch from 14050f5 to bade512 Compare March 25, 2026 08:11
@nekomoto911 nekomoto911 merged commit 144fb1e into main Mar 25, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants