Skip to content

Gravity Testnet v1.1.1

Choose a tag to compare

@Lchangliang Lchangliang released this 12 Mar 08:36
· 110 commits to main since this release

Release: gravity-testnet-v1.1.1

Full Changelog: gravity-testnet-v1.1.0...gravity-testnet-v1.1.1

Related Release: gravity-reth gravity-testnet-v1.1.1


Breaking Changes

Alpha + Beta Hardforks — System Contract Bytecode Upgrade

This release introduces two hardforks (Alpha and Beta) that perform hot-swap upgrades of system contract runtime bytecode at specified block heights. This supersedes the withdrawn v1.1.0 and includes a critical fix for the StakePool immutable variable issue.

Alpha Hardfork (System Contract Upgrade)

  • Staking Contract: Upgraded runtime bytecode to the latest version (10,867 bytes) from gravity_chain_core_contracts.
  • StakePool Contracts: Upgraded runtime bytecode of all 4 existing StakePool contracts (6,824 bytes each).
  • Block Reward Minting: Disabled during the PoW phase at the consensus layer.

Beta Hardfork (StakePool Immutable Fix)

  • Fix: Resolves the FACTORY immutable variable zeroing issue introduced in Alpha. The forge build output used in v1.1.0 did not include initialized immutable constants, causing all onlyFactory permission checks in StakePool to revert.
  • Solution: Beta re-injects the correct runtime bytecode extracted from the live chain via cast code, preserving all immutable variable values.

Node Upgrade Guide

⚠️ Upgrade Priority: HIGH

All node operators must upgrade to this version to maintain consensus compatibility.

Step 1: Configuration

Add alphaBlock and betaBlock activation heights to your genesis.json:

{
  "config": {
    "alphaBlock": 8287964,
    "betaBlock": 8344249
  }
}

Step 2: Build & Run

If building from source, ensure the greth dependency in Cargo.toml points to the new release tag:

greth = { git = "https://github.com/Galxe/gravity-reth", tag = "gravity-testnet-v1.1.1" }

Then rebuild with cargo build --release and restart the node binary.

Note: No database wipe is required. The execution layer seamlessly injects the upgraded contracts at the specified block heights.

Step 3: Verification Checklist

After the node restarts and passes the configured activation heights:

  • Node starts successfully and processes blocks through both Alpha and Beta activation heights
  • Epoch transitions are triggered and completed normally
  • Execution layer logs show "System transaction" events during epoch switches

What's Changed

Features

  • feat: implement Alpha hardfork with system contract bytecode hot-swap
  • feat: implement Beta hardfork to fix StakePool FACTORY immutable zeroing
  • feat: add Staking contract upgrade (10,867 bytes) at Alpha activation block
  • feat: add StakePool contract upgrade for 4 known addresses (6,824 bytes each)
  • feat: re-inject correct StakePool bytecode with cast code at Beta activation block
  • feat: disable block reward minting during PoW phase

Bug Fixes

  • fix: resolve StakePool FACTORY immutable variable being set to address(0) when using forge build bytecode

Infrastructure

  • chore: bump gravity testnet v1.1.1