Skip to content

chore(deps): bump gravity-reth to 1aec7b75 (audit-715 wipe+recreate state root)#754

Merged
nekomoto911 merged 1 commit into
Galxe:mainfrom
nekomoto911:chore/bump-greth-1aec7b75
Jun 18, 2026
Merged

chore(deps): bump gravity-reth to 1aec7b75 (audit-715 wipe+recreate state root)#754
nekomoto911 merged 1 commit into
Galxe:mainfrom
nekomoto911:chore/bump-greth-1aec7b75

Conversation

@nekomoto911

Copy link
Copy Markdown
Contributor

Summary

  • Bumps greth from 408ef602 to 1aec7b75 (fix(state_root): nested-trie wipe+recreate drops recreated storage gravity-reth#356), which fixes a CRITICAL nested-trie bug surfaced by the internal audit (Galxe/gravity-audit#715): when an account is selfdestructed and recreated in the same block (revm emits DestroyedChanged with HashedStorage { wiped: true, storage: { new slots } }), the prior wiped branch in crates/trie/db/src/nested_hash.rs returned EMPTY_ROOT_HASH and continued without ever applying the recreated slots. The new slots were silently dropped from both the computed state root and the persisted StoragesTrieV2 table.
  • Cluster-level impact: a homogeneous gravity cluster would have agreed on the wrong state root (no self-halt) but forked from geth / upstream reth with permanent on-disk storage loss — a funds-safety / consensus-divergence issue.
  • Fix in greth: when wiped is true, build a fresh storage trie from an empty base, insert the recreated non-zero slots, take the real storage root, and only emit EMPTY_ROOT_HASH when the post-wipe storage map is genuinely empty. Old on-disk nodes are still delete-marked.

Test plan

  • RUSTFLAGS="--cfg tokio_unstable" cargo update -p greth — Cargo.lock regenerated cleanly
  • RUSTFLAGS="--cfg tokio_unstable" cargo check -p gravity_node — passes
  • (Upstream coverage) The fix ships with wipe_recreate_e2e.rs + mainnet_replay.rs + a repro_nested_hash_wiped_recreate_storage_root differential test in fix(state_root): nested-trie wipe+recreate drops recreated storage gravity-reth#356; no SDK-side wiring needed here.

…tate root)

Bumps `greth` from `408ef602` to `1aec7b75` (Galxe/gravity-reth#356),
which fixes a CRITICAL nested-trie bug: when an account is
selfdestructed and recreated in the same block (revm emits
`DestroyedChanged` with `HashedStorage { wiped: true, storage: { new
slots } }`), the prior `wiped` branch returned `EMPTY_ROOT_HASH` and
`continue`d without applying the recreated slots — silently dropping
the new storage from both the computed state root and the persisted
`StoragesTrieV2` table. A homogeneous gravity cluster would have
agreed on the wrong root and forked from geth / upstream reth.

The fix builds a fresh storage trie from an empty base, inserts the
recreated non-zero slots, and only emits `EMPTY_ROOT_HASH` when the
post-wipe storage map is genuinely empty. Closes
Galxe/gravity-audit#715.
@nekomoto911 nekomoto911 merged commit f7a8e01 into Galxe:main Jun 18, 2026
8 checks passed
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