Skip to content

Benchmark stress phase stalls at 0 TPS on main — distributed reproduction case (fixed by #50) #51

Description

@keanji-x

Summary

When reproducing the Gravity benchmark with gravity_bench built from main, funding completes but the stress phase never makes progress — the Monitor sits at Progress 0/N, TPS 0.0, In Progress 1, Processing 0 indefinitely (observed >15 min with no advance, no error in the log). The chain is healthy and producing blocks the whole time.

Root cause is the connection leak + faucet U256 underflow fixed in #50 (fix/connection-leak-and-faucet-underflow). main already carries the fee fixes (#46/#48, 50 Gwei min-base-fee alignment) but not #50, and #50 is the one that unblocks the stress phase. Building the bench from the #50 branch is required to get a TPS number.

Environment / topology (distributed)

Run on the gravity-internal-test gcloud nodes, as the gravity user:

  • Cluster machine gravity-test-node-1 (internal 10.128.0.51): 3 genesis validators on 8545/8546/8547, single-machine deployment, RPC bound 0.0.0.0, txpool_max_account_slots = 1024.
  • Bench machine gravity-test-node-2 (internal 10.128.0.50): gravity_bench only, bench_config nodeshttp://10.128.0.51:8545|8546|8547 (chain_id 1337).

"Distributed" = the load generator is on its own box; the validator cluster itself stays single-machine.

Reproduction

  1. Cluster (node1) — build gravity_node and gravity_cli (MODE=quick-release), then bring up the 3-validator cluster with txpool_max_account_slots = 1024 and 0.0.0.0 RPC. Verify all three RPCs advance, and that node2 can reach http://10.128.0.51:8545.
  2. Bench (node2)git clone --branch fix/connection-leak-and-faucet-underflow … gravity_bench; bash setup.sh (Uniswap repos + npm @openzeppelin + python venv — deploy.py compiles the Uniswap sources even with enable_swap_token=false); cargo build --release.
  3. bench_config.toml: nodes = node1 internal IP :8545/8546/8547, target_tps=9000, num_accounts=10000 (or 100000), num_senders=600, duration_secs=120, enable_swap_token=false.
  4. rm -f deploy.json snapshot.json accounts.txt; source venv/bin/activate; cargo run --release -- --config bench_config.toml.
  5. Read sustained TPS from the TPS cell in ./log.<ts>.log once Progress advances.

Expected vs actual

main #50 branch
funding (Ready Accounts) reaches target reaches target
stress Progress stuck 0/N advances
TPS 0.0 (stall) sustained throughput

Other gotchas hit while reproducing (cluster-side, not gravity_bench bugs)

  • reth default txpool.max-account-slots=16 throttles 100k-account funding to ~100 min → set 1024.
  • cluster/init.sh needs gravity_cli built (not just gravity_node).
  • cluster/deploy.sh prompts interactively if a data dir exists → wipe before deploy in non-interactive runs.

Ask

Merge #50 (or cut a release/tag off it) so a from-main benchmark run reaches the stress phase. A short "distributed reproduction" note in the README/docs would also help the next person.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions