Skip to content

feat: Add Rex hardfork support - #50

Merged
flyq merged 2 commits into
mainfrom
liquan/support_rex_spec
Dec 4, 2025
Merged

feat: Add Rex hardfork support#50
flyq merged 2 commits into
mainfrom
liquan/support_rex_spec

Conversation

@flyq

@flyq flyq commented Dec 3, 2025

Copy link
Copy Markdown
Member

Summary

This PR introduces support for the Rex hardfork (the second MegaETH hardfork) in the stateless validator and updates the test data to reflect the new chain configuration.

Changes

Rex Hardfork Implementation (validator-core/src/chain_spec.rs)

  • Added new Rex variant to the MegaethHardfork enum
  • Implemented is_rex_active_at_timestamp() method in the MegaethHardforks trait
  • Added rex_time field to MegaethGenesisHardforks for genesis configuration
  • Updated spec_id_at_timestamp() to return SpecId::REX when the Rex hardfork is active
  • Updated MEGA_MAINNET_HARDFORKS static config to include Rex hardfork (activated at timestamp 0)
  • Added Debug derive to ChainSpec struct for improved debugging

Test Data Updates

  • Updated genesis/genesis-6342.json with Rex hardfork configuration
  • Replaced old block test data with new blocks (269-290) that include Rex hardfork support
  • Updated witness files (.mpt and .salt) for the new test blocks
  • Updated test_data/contracts.txt with new contract code hash

Hardfork Priority

The hardfork activation now follows this priority order:

  1. Rex (newest) → SpecId::REX
  2. MiniRexSpecId::MINI_REX
  3. Equivalence (default) → SpecId::EQUIVALENCE

@flyq
flyq force-pushed the liquan/support_rex_spec branch from f74eda4 to bb22ad0 Compare December 4, 2025 03:25
@flyq
flyq requested a review from Troublor December 4, 2025 03:26
@flyq
flyq force-pushed the liquan/support_rex_spec branch from 9abbe31 to cc18dca Compare December 4, 2025 06:06
@flyq
flyq merged commit f5762f4 into main Dec 4, 2025
4 checks passed
@flyq
flyq deleted the liquan/support_rex_spec branch December 4, 2025 06:23
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.

3 participants