Skip to content

fix: fix merge-1.2.0#56

Merged
nekomoto911 merged 1 commit intoGalxe:mainfrom
nekomoto911:fix-merge-1.2.0
Mar 8, 2025
Merged

fix: fix merge-1.2.0#56
nekomoto911 merged 1 commit intoGalxe:mainfrom
nekomoto911:fix-merge-1.2.0

Conversation

@nekomoto911
Copy link
Copy Markdown
Collaborator

fix compile error introduced by #55

@nekomoto911 nekomoto911 merged commit 6e8a17a into Galxe:main Mar 8, 2025
Richard1048576 pushed a commit that referenced this pull request Feb 26, 2026
ByteYue added a commit that referenced this pull request Apr 13, 2026
Mirrors the Delta pattern (commit 35f4e02 / 6ad34e3) for the v1.3 → v1.4
contract upgrade landed in gravity_chain_core_contracts PR #71. Replaces
4 contract bytecodes; no storage patches needed (the contract-side fix in
PR #71 keeps every storage byte at the same slot across the upgrade).

Contracts replaced:
- ValidatorManagement (PR #56): D3-2 underbonded eviction (Phase 1) and
  percentage-based Phase 2 performance threshold, skip-epoch-1 rule
- Reconfiguration (PR #63): evictUnderperformingValidators() call site moved
  out of _applyReconfiguration and into checkAndStartTransition /
  governanceReconfigure, fixing the DKG synchronization halt
- ValidatorConfig (PR #63): new autoEvictThresholdPct uint64 field, declared
  between autoEvictEnabled and __deprecated_autoEvictThreshold so it packs
  with autoEvictEnabled in slot 4 — keeps storage layout byte-identical to
  v1.3 (PendingConfig stays at 6 slots; _initialized stays at slot 12)
- GBridgeReceiver (PR #66): _processedNonces mapping replaced with a
  __deprecated_processedNonces gap; isProcessed() removed. This hardfork is
  also the first time GBridgeReceiver is upgraded since v1.0, so it adds the
  trustedSourceId immutable that didn't exist on the originally-deployed
  receiver.

Wiring touchpoints (mirror Delta exactly):
- crates/chainspec/src/gravity.rs: add Epsilon variant to GravityHardfork
- crates/chainspec/src/spec.rs: parse epsilonBlock from genesis extra_fields
- crates/ethereum/evm/src/hardfork/mod.rs: pub mod epsilon
- crates/ethereum/evm/src/hardfork/epsilon.rs: HardforkUpgrades impl with
  3 system_upgrades and 1 extra_upgrade for GBridgeReceiver. Modeled on
  delta.rs but with no storage_patches.
- crates/ethereum/evm/src/parallel_execute.rs: dispatch alongside Gamma/Delta
  in the post-balance-increment block

Bytecodes embedded via include_bytes! from
bytecodes/epsilon/{ValidatorManagement,Reconfiguration,ValidatorConfig,
GBridgeReceiver}.bin. Generated by the new
scripts/build_epsilon_bytecodes.sh in the contracts repo, which extracts
deployedBytecode from forge artifacts and patches the GBridgeReceiver
immutables with the testnet values:
  trustedBridge    = 0x79226649b3A20231e6b468a9E1AbBD23d3DFbbC6
  trustedSourceId  = 11155111  (Sepolia)
Both values were obtained by reading the live testnet at 34.186.189.129:8545
(trustedBridge() getter on the existing receiver; getLatestNonce(0,11155111)
on NativeOracle to confirm the relayer source). The AST id ordering of the
patch script is verified by EpsilonGBridgeReceiverPatchSanity in the
contracts repo.

Test wiring:
- crates/pipe-exec-layer-ext-v2/execute/gravity_hardfork.json: add
  epsilonBlock=30
- crates/pipe-exec-layer-ext-v2/execute/tests/gravity_hardfork_test.rs: add
  EPSILON_BLOCK constant and the same 2-assertion transitions_at_block
  pattern Delta uses. Also drops a stale unused
  `use reth_ethereum_forks::Hardforks;` import that was preventing the test
  from even compiling on the v1.4 branch (the trait method is reached via
  the inherent ChainHardforks impl).

Verification:
- cargo build -p reth-chainspec -p reth-evm-ethereum: clean
- cargo test -p reth-pipe-exec-layer-ext-v2 --test gravity_hardfork_test:
  test_gamma_hardfork passes; the test pushes blocks past EPSILON_BLOCK so
  apply_hardfork_upgrades(&EpsilonHardfork, state) runs end-to-end without
  panicking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
nekomoto911 pushed a commit that referenced this pull request Apr 13, 2026
…327)

* feat(hardfork): implement Epsilon hardfork with 4 contract bytecodes

Mirrors the Delta pattern (commit 35f4e02 / 6ad34e3) for the v1.3 → v1.4
contract upgrade landed in gravity_chain_core_contracts PR #71. Replaces
4 contract bytecodes; no storage patches needed (the contract-side fix in
PR #71 keeps every storage byte at the same slot across the upgrade).

Contracts replaced:
- ValidatorManagement (PR #56): D3-2 underbonded eviction (Phase 1) and
  percentage-based Phase 2 performance threshold, skip-epoch-1 rule
- Reconfiguration (PR #63): evictUnderperformingValidators() call site moved
  out of _applyReconfiguration and into checkAndStartTransition /
  governanceReconfigure, fixing the DKG synchronization halt
- ValidatorConfig (PR #63): new autoEvictThresholdPct uint64 field, declared
  between autoEvictEnabled and __deprecated_autoEvictThreshold so it packs
  with autoEvictEnabled in slot 4 — keeps storage layout byte-identical to
  v1.3 (PendingConfig stays at 6 slots; _initialized stays at slot 12)
- GBridgeReceiver (PR #66): _processedNonces mapping replaced with a
  __deprecated_processedNonces gap; isProcessed() removed. This hardfork is
  also the first time GBridgeReceiver is upgraded since v1.0, so it adds the
  trustedSourceId immutable that didn't exist on the originally-deployed
  receiver.

Wiring touchpoints (mirror Delta exactly):
- crates/chainspec/src/gravity.rs: add Epsilon variant to GravityHardfork
- crates/chainspec/src/spec.rs: parse epsilonBlock from genesis extra_fields
- crates/ethereum/evm/src/hardfork/mod.rs: pub mod epsilon
- crates/ethereum/evm/src/hardfork/epsilon.rs: HardforkUpgrades impl with
  3 system_upgrades and 1 extra_upgrade for GBridgeReceiver. Modeled on
  delta.rs but with no storage_patches.
- crates/ethereum/evm/src/parallel_execute.rs: dispatch alongside Gamma/Delta
  in the post-balance-increment block

Bytecodes embedded via include_bytes! from
bytecodes/epsilon/{ValidatorManagement,Reconfiguration,ValidatorConfig,
GBridgeReceiver}.bin. Generated by the new
scripts/build_epsilon_bytecodes.sh in the contracts repo, which extracts
deployedBytecode from forge artifacts and patches the GBridgeReceiver
immutables with the testnet values:
  trustedBridge    = 0x79226649b3A20231e6b468a9E1AbBD23d3DFbbC6
  trustedSourceId  = 11155111  (Sepolia)
Both values were obtained by reading the live testnet at 34.186.189.129:8545
(trustedBridge() getter on the existing receiver; getLatestNonce(0,11155111)
on NativeOracle to confirm the relayer source). The AST id ordering of the
patch script is verified by EpsilonGBridgeReceiverPatchSanity in the
contracts repo.

Test wiring:
- crates/pipe-exec-layer-ext-v2/execute/gravity_hardfork.json: add
  epsilonBlock=30
- crates/pipe-exec-layer-ext-v2/execute/tests/gravity_hardfork_test.rs: add
  EPSILON_BLOCK constant and the same 2-assertion transitions_at_block
  pattern Delta uses. Also drops a stale unused
  `use reth_ethereum_forks::Hardforks;` import that was preventing the test
  from even compiling on the v1.4 branch (the trait method is reached via
  the inherent ChainHardforks impl).

Verification:
- cargo build -p reth-chainspec -p reth-evm-ethereum: clean
- cargo test -p reth-pipe-exec-layer-ext-v2 --test gravity_hardfork_test:
  test_gamma_hardfork passes; the test pushes blocks past EPSILON_BLOCK so
  apply_hardfork_upgrades(&EpsilonHardfork, state) runs end-to-end without
  panicking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style(hardfork): apply cargo fmt + clippy doc-markdown fixes from CI

- epsilon.rs / parallel_execute.rs: apply fmt diffs from CI (line wrapping)
- epsilon.rs / alpha.rs / beta.rs / gamma.rs: add backticks to bare type
  names in doc comments (clippy::doc-markdown). Pre-existing on alpha/beta/
  gamma but only surfaced now because v1.4 is the first branch to push a PR
  that triggers full clippy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ByteYue added a commit that referenced this pull request Apr 23, 2026
…327)

* feat(hardfork): implement Epsilon hardfork with 4 contract bytecodes

Mirrors the Delta pattern (commit 35f4e02 / 6ad34e3) for the v1.3 → v1.4
contract upgrade landed in gravity_chain_core_contracts PR #71. Replaces
4 contract bytecodes; no storage patches needed (the contract-side fix in
PR #71 keeps every storage byte at the same slot across the upgrade).

Contracts replaced:
- ValidatorManagement (PR #56): D3-2 underbonded eviction (Phase 1) and
  percentage-based Phase 2 performance threshold, skip-epoch-1 rule
- Reconfiguration (PR #63): evictUnderperformingValidators() call site moved
  out of _applyReconfiguration and into checkAndStartTransition /
  governanceReconfigure, fixing the DKG synchronization halt
- ValidatorConfig (PR #63): new autoEvictThresholdPct uint64 field, declared
  between autoEvictEnabled and __deprecated_autoEvictThreshold so it packs
  with autoEvictEnabled in slot 4 — keeps storage layout byte-identical to
  v1.3 (PendingConfig stays at 6 slots; _initialized stays at slot 12)
- GBridgeReceiver (PR #66): _processedNonces mapping replaced with a
  __deprecated_processedNonces gap; isProcessed() removed. This hardfork is
  also the first time GBridgeReceiver is upgraded since v1.0, so it adds the
  trustedSourceId immutable that didn't exist on the originally-deployed
  receiver.

Wiring touchpoints (mirror Delta exactly):
- crates/chainspec/src/gravity.rs: add Epsilon variant to GravityHardfork
- crates/chainspec/src/spec.rs: parse epsilonBlock from genesis extra_fields
- crates/ethereum/evm/src/hardfork/mod.rs: pub mod epsilon
- crates/ethereum/evm/src/hardfork/epsilon.rs: HardforkUpgrades impl with
  3 system_upgrades and 1 extra_upgrade for GBridgeReceiver. Modeled on
  delta.rs but with no storage_patches.
- crates/ethereum/evm/src/parallel_execute.rs: dispatch alongside Gamma/Delta
  in the post-balance-increment block

Bytecodes embedded via include_bytes! from
bytecodes/epsilon/{ValidatorManagement,Reconfiguration,ValidatorConfig,
GBridgeReceiver}.bin. Generated by the new
scripts/build_epsilon_bytecodes.sh in the contracts repo, which extracts
deployedBytecode from forge artifacts and patches the GBridgeReceiver
immutables with the testnet values:
  trustedBridge    = 0x79226649b3A20231e6b468a9E1AbBD23d3DFbbC6
  trustedSourceId  = 11155111  (Sepolia)
Both values were obtained by reading the live testnet at 34.186.189.129:8545
(trustedBridge() getter on the existing receiver; getLatestNonce(0,11155111)
on NativeOracle to confirm the relayer source). The AST id ordering of the
patch script is verified by EpsilonGBridgeReceiverPatchSanity in the
contracts repo.

Test wiring:
- crates/pipe-exec-layer-ext-v2/execute/gravity_hardfork.json: add
  epsilonBlock=30
- crates/pipe-exec-layer-ext-v2/execute/tests/gravity_hardfork_test.rs: add
  EPSILON_BLOCK constant and the same 2-assertion transitions_at_block
  pattern Delta uses. Also drops a stale unused
  `use reth_ethereum_forks::Hardforks;` import that was preventing the test
  from even compiling on the v1.4 branch (the trait method is reached via
  the inherent ChainHardforks impl).

Verification:
- cargo build -p reth-chainspec -p reth-evm-ethereum: clean
- cargo test -p reth-pipe-exec-layer-ext-v2 --test gravity_hardfork_test:
  test_gamma_hardfork passes; the test pushes blocks past EPSILON_BLOCK so
  apply_hardfork_upgrades(&EpsilonHardfork, state) runs end-to-end without
  panicking.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style(hardfork): apply cargo fmt + clippy doc-markdown fixes from CI

- epsilon.rs / parallel_execute.rs: apply fmt diffs from CI (line wrapping)
- epsilon.rs / alpha.rs / beta.rs / gamma.rs: add backticks to bare type
  names in doc comments (clippy::doc-markdown). Pre-existing on alpha/beta/
  gamma but only surfaced now because v1.4 is the first branch to push a PR
  that triggers full clippy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
(cherry picked from commit 15e07d9)
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