Skip to content

feat: add hardfork E2E test framework and gamma test suite#622

Open
ByteYue wants to merge 1 commit intomainfrom
add_one_hardfork_framework
Open

feat: add hardfork E2E test framework and gamma test suite#622
ByteYue wants to merge 1 commit intomainfrom
add_one_hardfork_framework

Conversation

@ByteYue
Copy link
Copy Markdown
Contributor

@ByteYue ByteYue commented Mar 21, 2026

Add a complete hardfork E2E testing setup:

Framework (reusable across hardforks):

  • hardfork_framework.py: Generic 6-phase lifecycle test runner (liveness → snapshot → transition → bytecode verify → epoch → restart)
  • system_contracts.py: Per-hardfork contract address registry
  • hardfork_utils.py: Shared utilities (wait_for_block, snapshot, compare)
  • hooks.py: Pre-start genesis patching for hardfork config injection

Gamma hardfork tests:

  • test_gamma.py: Framework-based gamma test (config + one-liner)
  • test_hardfork.py: Standalone gamma lifecycle test (6 phases)
  • test_hardfork_bridge.py: Bridge functionality across hardfork

Config:

  • cluster.toml, genesis.toml, conftest.py: Cluster test configuration

Adding a new hardfork test requires only:

  1. Register contracts in system_contracts.py
  2. Create test_.py with HardforkTestConfig
  3. Call run_hardfork_lifecycle_test(cluster, config)

Description

Issue Number: closes #xxx

How Has This Been Tested?

Key Areas to Review

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Consensus
  • EVM Runtime
  • Gravity SDK Core
  • CLI Tools
  • E2E Tests
  • Documentation
  • Other (specify)

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Add a complete hardfork E2E testing setup:

Framework (reusable across hardforks):
- hardfork_framework.py: Generic 6-phase lifecycle test runner
  (liveness → snapshot → transition → bytecode verify → epoch → restart)
- system_contracts.py: Per-hardfork contract address registry
- hardfork_utils.py: Shared utilities (wait_for_block, snapshot, compare)
- hooks.py: Pre-start genesis patching for hardfork config injection

Gamma hardfork tests:
- test_gamma.py: Framework-based gamma test (config + one-liner)
- test_hardfork.py: Standalone gamma lifecycle test (6 phases)
- test_hardfork_bridge.py: Bridge functionality across hardfork

Config:
- cluster.toml, genesis.toml, conftest.py: Cluster test configuration

Adding a new hardfork test requires only:
1. Register contracts in system_contracts.py
2. Create test_<name>.py with HardforkTestConfig
3. Call run_hardfork_lifecycle_test(cluster, config)
@ByteYue
Copy link
Copy Markdown
Contributor Author

ByteYue commented Mar 23, 2026

@khalidbalosh211-ux Could you please stop spaming? You're keeping making piece of noises for this project. Please stop.

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