chore(deps): integrate greth v2.3.0 for main (companion e2e; greth via #803 @ 53a9df97) - #802
Conversation
- 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
There was a problem hiding this comment.
💡 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".
| // 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(); |
There was a problem hiding this comment.
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 👍 / 👎.
| Commands::Prune(command) => { | ||
| runner.run_command_until_exit(|ctx| command.execute::<EthereumNode>(ctx)) | ||
| } |
There was a problem hiding this comment.
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 👍 / 👎.
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
There was a problem hiding this comment.
💡 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".
| 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" } |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
💡 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) |
There was a problem hiding this comment.
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 👍 / 👎.
## 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`)
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
mainvia #803 — greth53a9df97(=bc817c64+ greth#416 + #417)betaTime, stop wait for process exit (RocksDB LOCK),apply_node_defaultsSo 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 matchesmain(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)
Companion fixes in this PR (vs current
main)prague e2e —
betaTimebetaTime→ lockdown forever → SetCode receipt timeouts.betaTime = pragueTimeingravity_e2e/cluster_test_cases/prague/genesis.toml.stop / restart — wait for real process exit
cluster/stop.sh+ deploy-generated per-node stop wait until process is gone;Node.stop()captures PID and waits.node log defaults
cli.rs:apply_node_defaults()so node-subcommand file logging is installed.Out of scope
bridge_cross_epochjwk[-2:]oracle (brittle assert; mint path OK)Test plan
betaTimetest_batch_execution+test_batch_exec_restartpassed after stop waitcargo metadata --lockedafter merge with main