Skip to content

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

Open
ByteYue wants to merge 1 commit intomainfrom
add_one_hardfork_framework
Open

feat: add hardfork testing framework (trait + generic helpers)#307
ByteYue wants to merge 1 commit intomainfrom
add_one_hardfork_framework

Conversation

@ByteYue
Copy link
Contributor

@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.

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.
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.

1 participant