Skip to content

chore(deps): integrate greth v2.3.0 for main (companion e2e; greth via #803 @ 53a9df97) - #802

Merged
nekomoto911 merged 4 commits into
Galxe:mainfrom
nekomoto911:chore/integrate-greth-v2.3.0
Aug 3, 2026
Merged

chore(deps): integrate greth v2.3.0 for main (companion e2e; greth via #803 @ 53a9df97)#802
nekomoto911 merged 4 commits into
Galxe:mainfrom
nekomoto911:chore/integrate-greth-v2.3.0

Conversation

@nekomoto911

@nekomoto911 nekomoto911 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Same intent as #804 (v1.9): land gravity-reth v2.3.0 on this release line and ship the SDK-side companions so e2e/CI work under the new greth behavior (EIP-7702 Beta lockdown, stop/restart LOCK, log defaults).

How this relates to #803 / main

Piece Where it lands on main
greth pin + alloy/tokio + reth CLI / oracle relayer wiring Already on main via #803 — greth 53a9df97 (= bc817c64 + greth#416 + #417)
prague betaTime, stop wait for process exit (RocksDB LOCK), apply_node_defaults This PR (#802)

So after merge with main, the remaining diff of this PR is the companion e2e/runtime fixes, not a second greth re-pin. The greth pin on this branch matches main (53a9df97); we do not regress to an older rev.

For v1.9 (no #803), the full package (pin bc817c64 + companions, without #803 oracle/relayer) is #804.

Greth ancestry (no regression)

b49b4864 (pre-v2.3 main)
  … → bc817c64  (#414 block-gas last gate @ Beta; includes #412/#413)
       → c6542785 (#416 oracle relayer split)
       → 53a9df97 (#417 alloy-trie ≥0.9.5)   ← main + this PR

Companion fixes in this PR (vs current main)

  1. prague e2e — betaTime

    • greth#412 fail-closes type-4 packing until Gravity Beta; missing betaTime → lockdown forever → SetCode receipt timeouts.
    • Set betaTime = pragueTime in gravity_e2e/cluster_test_cases/prague/genesis.toml.
  2. stop / restart — wait for real process exit

    • greth v2.3+ can hold RocksDB LOCK after SIGTERM while flushing.
    • Fix: cluster/stop.sh + deploy-generated per-node stop wait until process is gone; Node.stop() captures PID and waits.
  3. node log defaults

    • cli.rs: apply_node_defaults() so node-subcommand file logging is installed.

Out of scope

Test plan

  • Local prague suite 13 passed with betaTime
  • Local test_batch_execution + test_batch_exec_restart passed after stop wait
  • cargo metadata --locked after merge with main
  • CI e2e-docker after approval

- pin greth + reth-primitives-traits patch to Galxe/gravity-reth@bc817c64
  (PR Galxe#414 block-gas last gate at Beta; includes Galxe#413/Galxe#412/Galxe#410)
- align gravity_node alloy to greth v2.3.0 (alloy-primitives 1.6.0, alloy-* 2.0.5)
- enable tokio taskdump (SDK builds with --cfg tokio_unstable)
- adapt cli/reth_cli to reth v2.3.0 command signatures and TracingGuards
- apply greth node log defaults so file logging stays on

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e1c011974

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bin/gravity_node/src/cli.rs Outdated
// reth v2.3.0: init/init-state execute() now take a Runtime; db/prune
// execute() take a CliContext supplied via the *_command_until_exit runner
// methods (see gravity-reth crates/ethereum/cli/src/app.rs).
let rt = runner.runtime();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Honor greth engine thread settings

In gravity_node::cli::Cli::run -> Commands::Node -> command.execute, the runner has already been created with CliRunner::try_default_runtime() before this v2.3.0 adaptation, so the node subcommand accepts flags like --engine.storage-worker-count, --engine.account-worker-count, --engine.prewarming-threads, and --engine.reserved-cpu-cores but never builds the RuntimeConfig::default().with_rayon(...) from command.engine as greth v2.3.0's app does. Operators tuning proof/prewarming worker pools will silently get default sizing; a minimal validation is to start gravity_node node --engine.storage-worker-count 1 and observe the blocking proof pool is still default-sized.

Useful? React with 👍 / 👎.

Comment on lines +195 to +197
Commands::Prune(command) => {
runner.run_command_until_exit(|ctx| command.execute::<EthereumNode>(ctx))
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Dispatch the new snapshot-manifest command

This greth v2.3.0 bump exposes a new Commands::SnapshotManifest subcommand, but gravity_node::cli::Cli::run still leaves it to the catch-all _ => todo!("not implemented") arm after the updated command-signature branches. As a result, gravity_node snapshot-manifest ... parses as a valid CLI command and then panics instead of running command.execute(), unlike the greth v2.3.0 app; this is a compatibility regression introduced by the dependency update.

Useful? React with 👍 / 👎.

ByteYue
ByteYue previously approved these changes Aug 3, 2026
greth Galxe#412 fail-closes type-4 packing until Gravity Beta. Without
betaTime the prague suite's SetCode txs never mine (receipt timeout).
Align betaTime with pragueTime so protocol enable and lockdown release
happen on the same wall-clock for this suite.
greth v2.3+ can keep RocksDB LOCK held for several seconds after SIGTERM
while flushing. Generated per-node stop.sh and cluster/stop.sh used to
delete the pid file and return immediately (or after a short wait that
still did not cover kill -9 reaping), so e2e restart raced the lock and
died with "Resource temporarily unavailable" (single_node BATCH_COMMIT
and pfn_chain blackhole phase).

- stop.sh: wait until kill -0 fails after SIGTERM (~30s) and after SIGKILL
- deploy.sh: same wait loop in all three per-node stop templates
- node.stop: capture PID before stop.sh, wait for real process exit

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9ca363da5c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bin/gravity_node/Cargo.toml Outdated
anyhow = "1.0.87"
greth = { git = "https://github.com/Galxe/gravity-reth", rev = "b49b4864aeaa3c35c6871a77d7133bb9486edbf1" }
# greth main @ PR #414 (block-gas last gate at Beta; includes #413/#412/#410)
greth = { git = "https://github.com/Galxe/gravity-reth", rev = "bc817c642c9c3816cc4e22754e13e3c9633419dd" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add Beta hardfork timing for mainnet

By bumping greth to PR #414/#412 here, gravity_node node --chain genesis/mainnet/genesis.json now goes through GravityChainSpecParser::parse -> apply_overrides, but that path only hardcodes prague_time/alphaTime while the bundled mainnet genesis has pragueTime and no betaTime. This diff itself documents that missing betaTime leaves the new EIP-7702/type-4 transaction lockdown enabled forever, so mainnet nodes using this genesis will keep rejecting those transactions after Prague instead of releasing the fail-closed gate. Please add a beta_time override or config.betaTime for Gravity-owned chains; a minimal validation is to build the chain spec for chain id 127001 and assert GravityHardfork::Beta is timestamp-active.

AGENTS.md reference: AGENTS.md:L8-L9

Useful? React with 👍 / 👎.

…th-v2.3.0

Resolve conflicts with Galxe#803 (generic oracle relayer + greth 53a9df97):

- Keep main's greth pin 53a9df97 (bc817c64 + Galxe#416/Galxe#417) and EthTransactionPool
  / alloy / tokio pins from main
- Keep PR unique work: apply_node_defaults, prague betaTime, stop LOCK wait
- Cargo.lock: take main's lock (same greth rev)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84fa2434c2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

deadline = time.monotonic() + timeout
while time.monotonic() < deadline:
try:
os.kill(pid, 0)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Treat zombie node PIDs as stopped

In Docker e2e runs, gravity_e2e/run_docker.sh:42 starts the suite under a plain bash -c PID 1, and the generated start.sh backgrounds gravity_node before exiting, so after Node.restart -> stop -> _wait_for_pid_exit sends SIGTERM the child can remain as a defunct process reparented to PID 1. os.kill(pid, 0) still succeeds for zombies, so this new wait can burn the full timeout and report stop() failure even though the node has exited and released RocksDB; the generated shell waits have the same predicate. Please treat Z/defunct as exited or use a reaper/child wait instead.

Useful? React with 👍 / 👎.

@nekomoto911 nekomoto911 changed the title chore(deps): integrate greth v2.3.0 (pin bc817c64) fix(e2e): prague betaTime + stop wait for greth v2.3.0 (main greth 53a9df97) Aug 3, 2026
nekomoto911 added a commit that referenced this pull request Aug 3, 2026
## Summary

Port of [#802](#802) onto
**`branch-v1.9`**.

- **Base:** `branch-v1.9` (not `main`)
- **Explicitly excludes
[#803](#803 (`feat(oracle):
wire generic relayer runtime`), which was merged to `main` but must not
land on v1.9. That PR rewires the oracle relayer + pins different
greth/gaptos revs (`53a9df97` / `a64f8adc`).
- Cherry-picked the three #802 commits cleanly onto
`upstream/branch-v1.9` @ `6c233dfc` (same merge-base as the original
#802 head).

### Greth pin

- `greth` / workspace `reth-primitives-traits` patch →
[`bc817c642c9c3816cc4e22754e13e3c9633419dd`](Galxe/gravity-reth@bc817c6)
(Galxe/gravity-reth#414 — block-gas last gate at Beta; includes
#413/#412/#410)
- `gaptos` remains the v1.9 pin (`b1f68dc…`), **not** the #803 Aptos rev

### Key changes (same as #802)

1. **Deps:** greth v2.3.0 pin + lockfile; alloy pins aligned
(`alloy-primitives` 1.6.0, `alloy-*` 2.0.5); tokio `taskdump` enabled
for `gravity_node`
2. **CLI:** `cli.rs` / `reth_cli.rs` adapted to reth v2.3.0 command
signatures (`Runtime` / `CliContext`) and greth node log defaults /
`TracingGuards`
3. **Prague e2e:** set `betaTime` with `pragueTime` so greth #412
EIP-7702 lockdown is released for SetCode txs
4. **Stop LOCK race:** wait for real process exit in `cluster/stop.sh`,
`cluster/deploy.sh` stop templates, and `node.py` so greth v2.3+ RocksDB
LOCK flush after SIGTERM does not race e2e restart

### Out of scope (same as #802)

- No `gravity_e2e` storage_v2 baseline/upgrade/fresh_sync work
- No #803 oracle relayer rewrite

## Test plan

- [ ] File set matches #802: `Cargo.toml`, `Cargo.lock`,
`bin/gravity_node/Cargo.toml`, `cli.rs`, `reth_cli.rs`,
`cluster/deploy.sh`, `cluster/stop.sh`, prague `genesis.toml`, `node.py`
- [ ] Greth rev is `bc817c64…`; no `53a9df97` / `a64f8adc` (#803) pins;
`relayer.rs` unchanged vs `branch-v1.9`
- [ ] `RUSTFLAGS="--cfg tokio_unstable" cargo check -p gravity_node`
- [ ] Smoke: node starts and writes log files with default node log
settings
- [ ] Local e2e batch stop / restart no longer hits RocksDB LOCK
`Resource temporarily unavailable`
- [ ] CI e2e (incl. prague suite with `betaTime`)
@nekomoto911
nekomoto911 merged commit ccc1eb7 into Galxe:main Aug 3, 2026
8 checks passed
@nekomoto911 nekomoto911 changed the title fix(e2e): prague betaTime + stop wait for greth v2.3.0 (main greth 53a9df97) chore(deps): integrate greth v2.3.0 for main (companion e2e; greth via #803 @ 53a9df97) Aug 3, 2026
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