Gravity Testnet v1.3.0
Contracts Release: gravity-testnet-v1.3.0
Full Changelog:
- gravity-reth: gravity-testnet-v1.2.0...gravity-testnet-v1.3.0
- gravity_chain_core_contracts: gravity-testnet-v1.2.0...gravity-testnet-v1.3.0
Breaking Changes
Unified Hardfork Framework
This release introduces a unified hardfork dispatch framework based on the new HardforkUpgrades trait, replacing the ad-hoc per-hardfork glue established in v1.1.1 / v1.2.0. All four Gravity-native hardforks (Alpha, Beta, Gamma, Delta) are now expressed as HardforkUpgrades implementations and dispatched through a single apply_hardfork_upgrades() entry point in parallel_execute.rs (#307, #309, #312, #318).
Key changes:
GravityHardforkenum (Alpha/Beta/Gamma/Delta) added to chainspec, exposed via newEthChainSpectrait methods ({alpha,beta,gamma,delta}_transitions_at_block()andis_{alpha,beta,gamma,delta}_active_at_block_number()).- Genesis JSON now parses
alphaBlock,betaBlock,gammaBlock,deltaBlockfromextra_fieldsintoChainSpec.gravity_hardforks. HardforkUpgradestrait standardizes the interface forsystem_upgrades(),extra_upgrades(),storage_patches(), and the newbatch_storage_patches()(a(&[Address], B256, U256)form needed for Gamma'sReentrancyGuardinitialization across allStakePoolinstances).- Dispatch ordering: Alpha/Beta are applied before balance increments; Gamma/Delta are applied after.
- Test framework: a new generic
hardfork_test_helpersmodule (verify_bytecodes_at_block(),verify_bytecodes_old_before_block(),verify_storage_patches()) is added so each hardfork can be validated with the same harness — seeHARDFORK_TESTING.md.
Delta Hardfork
This release ships the Delta hardfork together with the corresponding gravity_chain_core_contracts v1.3.0 release. Delta upgrades 4 system contracts (StakingConfig, ValidatorManagement, Governance, NativeOracle) and applies the storage migration required by the removal of minimumProposalStake from StakingConfig (packed _initialized bit at slot 1, clearing of stale slots 2/3/6/7). Activation is configured via genesis config.deltaBlock.
What's Changed
Features
- feat: add hardfork testing framework (trait + generic helpers) by @ByteYue in #307
- feat(chainspec): add GravityHardfork enum + EthChainSpec hardfork methods by @ByteYue in #309
- feat(hardfork): add batch_storage_patches to HardforkUpgrades trait by @ByteYue in #318
Bug Fixes
- fix(view): replace block_hash with block_id in block_hash_ref by @AshinGau in #302
- fix: Use BTreeMap for Deterministic Event Ordering Causes Consensus Split by @ByteYue in #304
- Replaces a non-deterministic
HashMapevent-iteration order that could produce divergent block outputs across nodes and trigger a consensus split.
- Replaces a non-deterministic
- fix: Fix coacker audit by @nekomoto911 in #311
- fix(relayer): persist state to disk before updating in-memory by @ByteYue in #314
OracleRelayerManager::update_and_save_statepreviously advanced the in-memory nonce before the disk write, so a crash mid-save()would restart from stale on-disk state and re-deliver already-processed events. The state is now cloned, persisted first, and only committed to live in-memory state after the disk write succeeds.
- fix(unwind): commit view and set prune distance for execution unwind by @AshinGau in #313
- Enforces
MINIMUM_PRUNING_DISTANCEinget_next_block_range()so the pruner retains enough historical blocks for unwind. - Inserts
commit_view()calls between write/read steps during unwind because RocksDB'sWriteBatch(unlike MDBX) does not provide immediate read-after-write visibility, so explicit flushes are required before state root recalculation and state removal. - Also moves
nested_hashtoreth-trie-dbfor reuse and skipsinit_genesison already-initialized databases.
- Enforces
Security Audit Fixes
- fix: Fix coacker audit by @nekomoto911 in #311
- fix: Use BTreeMap for Deterministic Event Ordering Causes Consensus Split by @ByteYue in #304
- fix(relayer): persist state to disk before updating in-memory by @ByteYue in #314