Skip to content

test(oracle): add Binance-only live soak suite - #807

Merged
ByteYue merged 13 commits into
mainfrom
codex/oracle-live-soak-wave7
Aug 13, 2026
Merged

test(oracle): add Binance-only live soak suite#807
ByteYue merged 13 commits into
mainfrom
codex/oracle-live-soak-wave7

Conversation

@ByteYue

@ByteYue ByteYue commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Add one opt-in, non-gating Wave 7 live soak suite for the initial Gravity Oracle launch profile:

  • four equal-power validators;
  • three live Binance Futures testnet closed index-price kline feeds: NVDAUSDT (feed ID 1001), BTCUSDT (1002), and ETHUSDT (1003), all sourceType=3;
  • governance activation, epoch-boundary observer startup, validator JWK votes, quorum, NativeOracle execution, PriceFeedResolver state, callback counts, and restart catch-up;
  • periodic JSONL heartbeats and one machine-readable final report.

The suite is excluded from the runner default test set and must be named explicitly.

Packed Price Feed V1 compatibility

This branch is rebased onto current SDK main and pins the exact candidate revisions from:

The E2E assertions now consume the packed resolver getter (uint32 roundId, uint48 resolvedAtMs, uint96 price). A shared golden vector checks the exact 32-byte Price Feed V1 body and the exact 192-byte NativeOracle callback wrapper, down from the previous 320-byte wrapper.

Binance-only release profile

This PR implements the release boundary in Galxe/gravity-audit#1093:

  • suite genesis enables Oracle source types [1, 3], not source type 6;
  • pre_deploy writes exactly three gravity://3/... Binance URI mappings;
  • no Gamma or Polygon request is made;
  • no Polymarket resolver is deployed or registered;
  • no source type 6 task or callback is created;
  • no Polygon credential or endpoint is required.

The merged deterministic Polymarket transport suite remains separate regression coverage. This PR does not revert generic source type 6 contracts or runtime code; it keeps that transport dormant through configuration absence.

Architecture exercised

  1. pre_deploy selects one common closed-minute anchor for all three Binance pairs.
  2. Four validators start with identical Binance-only source capability and validator-local endpoint mappings.
  3. Governance registers the three price tasks during epoch E and sets the PriceFeedResolver default callback.
  4. The test proves all price observers are absent in E, appear in E+1, and at least three validators certify each issuer.
  5. Agreed packed bytes execute through NativeOracle into the feed-ID-namespaced PriceFeedResolver.
  6. Every heartbeat compares one common confirmed block hash across all four RPC replicas.
  7. EIP-1898 canonical reads plus a progress/resolver/progress seqlock reject persistent divergence while tolerating bounded execution-view transitions.
  8. Scheduled node4 restarts must recover RPC, block height, and all three relayer checkpoints.

Generated mappings and metadata are removed on teardown, including copies deployed into node config directories.

Acceptance checks

  • independent monotonic delivery nonce, source position, and resolver round for every feed;
  • exact onchain close for each requested one-minute Binance index bucket;
  • four-replica state convergence at one canonical block hash;
  • chain and per-feed stall budgets;
  • at least three relayers checkpoint every committed feed nonce;
  • each feed callback count equals its final delivery nonce;
  • every configured restart runs and catches up without nonce regression;
  • release-profile assertions prove only source types 1/3 and only gravity://3/... mappings are active.

Validation

Build and focused tests

  • make MODE=quick-release gravity_node gravity_cli: PASS;
  • nightly Rust formatting: PASS;
  • Python compilation and soak settings tests: PASS;
  • packed inner/wrapper golden vector plus four-validator deterministic E2E: 2 passed;
  • git diff --check: PASS;
  • privacy scan: no local absolute path, username, or credential in the diff.

Live Binance smoke

  • configured/actual monitored duration: 240s / 244.072s;
  • full suite result: 11 passed;
  • heartbeat samples: 16;
  • every pair: nonce 2 -> 6, four advances (minimum two);
  • callbacks: NVDA 6, BTC 6, ETH 6;
  • relayer checkpoints: 4/4 for all feeds.

Two-hour packed V1 gate

  • status: PASS;
  • configured/actual monitored duration: 7200s / 7204.568s;
  • full suite result: 11 passed;
  • heartbeat samples: 473;
  • every pair: nonce 2 -> 122, 120 advances (minimum 96);
  • observed price changes: NVDA 107, BTC 120, ETH 120;
  • maximum observed feed gap: 76.090s;
  • midpoint node4 restart: completed once, 16.186s recovery, no epoch-guard deferral;
  • final relayer checkpoints: 4/4 for all feeds;
  • callback counts: NVDA 122, BTC 122, ETH 122, exactly matching final delivery nonces;
  • final Gravity block: 31387, with all four replicas converged.

Reproduce the two-hour gate

make MODE=quick-release gravity_node gravity_cli
export PATH="$HOME/.foundry/bin:$PWD/target/quick-release:$PATH"

ORACLE_SOAK_DURATION_SECONDS=7200 \
ORACLE_SOAK_POLL_SECONDS=15 \
ORACLE_SOAK_STALL_TIMEOUT_SECONDS=900 \
ORACLE_SOAK_MIN_ADVANCES=96 \
ORACLE_SOAK_RESTART_AFTER_SECONDS=3600 \
  ./gravity_e2e/run_test.sh \
    oracle_live_soak \
    --force-init \
    --log-cli-level=INFO

The Binance Futures testnet indexPriceKlines endpoint is public and does not require an API key. Binance values are testnet index data and must be labeled that way in demos. Runtime evidence stays in the ignored suite artifacts directory. The runner performs global local gravity_node cleanup, so it must not run beside another local Gravity cluster.

Tracks Galxe/gravity-audit#1038, Galxe/gravity-audit#1092, and Galxe/gravity-audit#1093.

@ByteYue

ByteYue commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Wave 7 live validation update:

  • The first formal 24-hour attempt failed after 6,111 seconds, before validator restart.
  • Oracle data remained healthy through the last heartbeat: Binance nonce reached 104, all four relayers had checkpointed it, and the Polymarket settlement remained exactly once at nonce 1.
  • The chain stopped at the epoch 103 -> 104 boundary. Two validators timed out for 30 seconds while resetting the prior epoch BufferManager and never started epoch 104, leaving only 2/4 voting power. This was consensus reconfiguration churn, not a Binance, Polygon, JWK quorum, or callback failure.
  • The suite originally used a 60-second epoch throughout, which would impose 1,440 reconfigurations during a 24-hour Oracle soak. The same governance proposal now activates the dynamic Oracle tasks and changes the next epoch interval to two hours. The suite asserts the pending and applied EpochConfig states before starting the timer.
  • Failure diagnostics now identify the lagging RPC and retain the last heartbeat.

Post-fix live smoke PASS:

  • configured/actual duration: 300s / 301.016s
  • Binance nonce: 1 -> 7 (6 advances)
  • relayer checkpoint coverage: 4/4
  • callback events: Binance 7, Polymarket 1
  • applied soak epoch interval: 7,200s
  • final Gravity block: 1,618

The PR remains draft until a fresh 24-hour run passes.

@ByteYue

ByteYue commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Wave 7 soak update (second formal-run diagnosis and harness fix):

  • The post-epoch-fix 24-hour attempt kept the four-validator chain healthy for about 5h36m (last common height 89043, Binance nonce 339, relayers 4/4, Polymarket nonce 1).
  • It failed because the harness read latest twice while that exposed block state was still being committed; node1 therefore appeared to disagree with itself by one Binance nonce. This was a snapshot race in the test, not an Oracle/consensus failure.
  • Commit 582e7950cd now samples min(latest node heights) - 16, requires all four RPCs to return the same block hash there, and compares NativeOracle/resolver state only at that common historical block. The initial sample waits for the confirmation window to fill. It also fixes the validator-restart block-wait call and records the snapshot hash in heartbeat/summary evidence.

Live regression proof using Binance Futures testnet plus finalized Polygon data:

  • configured/actual duration: 300s / 301.041s
  • Binance nonce: 1 -> 7 (6 advances; required 3)
  • relayer quorum: 4/4 throughout
  • node4 forced restart: PASS, recovery 11.164s
  • callbacks: Binance 7, Polymarket 1
  • common final snapshot block/hash: 1568 / 0x83a745fa191e38d402e935a4beb624a7779f055591e5cf5cacc5dd256b94091c

A fresh formal 24-hour run is starting from this commit. The PR remains draft until that run completes successfully.

@ByteYue

ByteYue commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Wave 7 burn-in update

The previous formal soak stopped after 4,615 seconds when numeric historical `eth_call` requests returned different state snapshots even though every replica first reported the same block hash. The suite now binds every NativeOracle/resolver read to the exact canonical hash with EIP-1898 (`blockHash` plus `requireCanonical`) in commit `c079007a4e`.

Validation after the fix:

  • 300-second high-frequency regression: PASS, 135 samples, 7 Binance advances, forced node4 restart recovered in 13.174 seconds.
  • Required 30-minute burn-in: PASS, 1,801.352 seconds, 119 samples.
  • Binance testnet nonce: 1 -> 33 (32 advances; minimum 24).
  • Maximum observed price-update gap: 60.768 seconds.
  • Relayer quorum: 4/4 replicas on every sample.
  • Callback events: Binance 33, Polymarket 1.
  • Static checks: compileall, pytest collect-only, diff check, secret/path scan all PASS.

The PR remains draft while the fresh 24-hour run is pending.

@ByteYue

ByteYue commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Multi-feed update pushed in `d259517172`. The live suite now runs independent NVDAUSDT (1001), BTCUSDT (1002), and ETHUSDT (1003) index-kline tasks through the same feedId-namespaced resolver.

The prior single-feed 24-hour attempt was intentionally stopped after 8,349.273 healthy seconds to add this requested coverage. Post-change gates are PASS: a 305.971s high-frequency run with node4 restart (all feeds 6 advances; BTC/ETH 6 observed price changes each; recovery 11.136s), followed by a 1,803.466s burn-in (all feeds 31 advances; BTC/ETH 31 changes each; 4/4 relayer quorum; callback counts 33/33/33 and Polymarket 1).

The first smoke exposed a cross-contract RPC view transition after restart. The final implementation preserves the strict nonce-to-bucket invariant and uses a progress/resolver/progress seqlock around EIP-1898 hash-bound calls. The rerun and burn-in both passed. A fresh three-feed 24-hour run is starting; the PR remains draft.

@ByteYue

ByteYue commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Three-feed 24h attempt: 12h epoch/restart collision found

The first formal three-feed run stayed healthy for 43,185.741 seconds (about 12h):

  • NVDAUSDT, BTCUSDT, ETHUSDT all reached nonce 722;
  • all three feeds remained 4/4 replica-consistent and 4/4 relayer-checkpointed;
  • observed price changes were NVDA 696, BTC 719, ETH 719;
  • Polymarket remained terminal at nonce 1.

The run then failed at the scheduled node4 restart because the restart was aligned to the two-hour epoch boundary. This was not an Oracle-value divergence. During the epoch-8 reconfiguration, node3 timed out and received execution responses out of order: it learned the suffix-block timestamp before the actual reconfiguration-block timestamp, then panicked in BlockInfo::change_timestamp (allow_timestamp_change). The restarted node4 encountered the related reconfiguration-suffix invariant while catching up.

Commit 5c56e1fe77 keeps the restart test but adds a chain-derived five-minute guard around epoch boundaries. Once the configured restart time is reached, the runner defers only the restart; feed, quorum, replica, callback, and stall assertions continue on every heartbeat. This separates the Wave 7 Oracle recovery check from a simultaneous Aptos epoch-reconfiguration stress case. The PR remains draft and the formal 24h run must be repeated.

@ByteYue

ByteYue commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Epoch-guard live regression: PASS

Commit 5c56e1fe77 was exercised against the real Binance Futures testnet and Polygon path:

  • configured/actual duration: 420s / 422.694s;
  • restart eligible at 60s, deferred for 43 five-second polls, executed at about 300.9s outside the epoch guard;
  • node4 full restart recovery: 13.173s;
  • NVDAUSDT, BTCUSDT, ETHUSDT each advanced nonce 1 -> 9 (8 advances, minimum 4);
  • each pair observed 8 live price changes;
  • every heartbeat retained 4/4 replica and relayer agreement;
  • callback counts: NVDA 9, BTC 9, ETH 9, Polymarket 1;
  • result: PASS.

The repeated formal 24-hour run can now start from this head. The PR remains draft pending that gate.

@ByteYue

ByteYue commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Wave 7 soak update:

  • The formal run reached 23h19m after three successful node4 restart exercises (two coordinated manual restarts plus the guarded 12h restart).
  • It then caught one transient cross-replica EIP-1898 view lag: node1 returned BTC progress 1401 while node2 briefly returned 1400 for the selected confirmed canonical snapshot. All nodes remained live and continued advancing.
  • Commit 0225813 retries the entire canonical replica snapshot for a bounded five-second window. Persistent block-hash, progress, price, or settlement divergence still fails with first/last diagnostics; business invariants are unchanged.
  • Synthetic regression: transient mismatch converges on retry; persistent mismatch hard-fails.
  • Focused live burn-in PASS: 1202.738s, 79 samples, NVDA/BTC/ETH nonce 1->22, node4 restart recovery 11.164s, final 4/4 replica state, price callbacks 22/22/22, Polymarket callback 1.

The PR remains draft while a clean 24-hour rerun is in progress.

@ByteYue

ByteYue commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Wave 7 restart validation update

The second formal soak reached the 12-hour restart point with all Oracle invariants healthy. During the restart, the harness hit its generic 30-second RPC startup timeout even though node4 was still alive; its persisted database recovery reached config load at 46 seconds. This was a test-harness timeout, not an Oracle consensus or chain liveness failure.

Fix pushed in 0e42add87c:

  • Node.start() / Node.restart() accept an optional RPC timeout while preserving the existing 30-second default.
  • The manual live soak uses a bounded 180-second restart recovery window.
  • The configured timeout is recorded in the JSON evidence.
  • A live 8-minute regression exercises epoch-guard deferral, a real node4 stop/start, RPC recovery, block catch-up, and all three relayer lanes.

Regression result:

  • PASS in 483.895 seconds, 31 samples.
  • node4 restart recovery: 12.153 seconds.
  • epoch guard deferrals before restart: 14.
  • NVDAUSDT/BTCUSDT/ETHUSDT: nonce 3 -> 11, 8 advances each.
  • Final relayer quorum: 4/4 for every feed.
  • Price callbacks: 11/11/11; Polymarket callback: 1.
  • Final Gravity block: 2396.
  • Full cluster teardown completed normally.

The earlier 12-hour run also exercised the bounded canonical snapshot retry once: an execution-view transition converged on the second attempt instead of producing a false failure.

The PR remains draft. A fresh 24-hour run with the built-in 12-hour restart is the final acceptance gate.

@ByteYue

ByteYue commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Formal soak update: restart passed, independent Aptos liveness blocker reproduced

The formal 24-hour run reached and successfully completed its built-in coordinated node4 restart:

  • restart was deferred for 19 polls until the epoch guard opened
  • node4 RPC recovered in approximately 10 seconds
  • the first recovery heartbeat showed all three feeds at 4/4 source progress and node4 only 19 blocks behind
  • all validator heights converged approximately 15 seconds later
  • feed nonces continued from 727 to 729
  • no chain pause, panic, or suite teardown occurred

This is in addition to the earlier 20-minute burn-in and 8-minute targeted restart regression, where node4 recovered in 11.164 seconds and 12.153 seconds respectively.

The run later failed near hour 15 for an independent, already tracked Aptos JWK issue, so it is intentionally not recorded as a 24-hour PASS:

  • all four validators fetched BTCUSDT and ETHUSDT nonce 901 while execution remained at nonce 900
  • duplicate observations repeatedly restarted certification at voting power 2 instead of allowing aggregation to reach threshold 6
  • NVDAUSDT continued to nonce 906 and the chain remained healthy
  • the suite detected the stalled feed after 367 seconds

This reproduces Galxe/gravity-audit#910. Galxe/gravity-aptos#78 has now been rebased onto the current aptos-node base, reduced to the two-file JWK manager fix plus tests, and marked ready for review. The full aptos-jwk-consensus package test passes 2/2.

This PR remains Draft. After #78 merges, this branch will pin the merged Aptos revision, run a short multi-restart regression, and then restart the formal 24-hour soak from a clean environment.

@ByteYue

ByteYue commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Wave 7 focused multi-restart live regression: PASS.

Test topology and data:

Results:

  • Actual monitored duration: 1,204.657s; 77 heartbeat samples
  • Restart recovery: 13.169s / 13.171s / 13.168s
  • Price nonce advances: NVDA 21, BTC 22, ETH 21 (minimum required: 15 each)
  • Price callback counts matched final nonce exactly: 23 / 23 / 23
  • Polymarket callback count: exactly 1
  • All three price feeds returned to 4/4 relayer quorum after every restart
  • No restart-time panic, nonce rollback, duplicate callback, or oracle stall was observed

Residual observation: after all assertions passed, the final whole-cluster teardown stopped node4 last and exposed an existing graceful-shutdown panic in consensus_mempool_handler (futures select with all inputs completed and no complete handler). This did not occur during any coordinated node4 restart and does not invalidate the restart recovery result, but should be fixed separately.

Release ordering remains: merge gravity-aptos #78, update the gravity-reth Aptos pin, then replace the SDK test-only coordinated pins with merged commits before the formal 24-hour run.

@ByteYue

ByteYue commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Formal Wave 7 candidate 24-hour soak started at 2026-08-07 10:48:13 Asia/Shanghai.

Configuration:

Initial evidence at 305 seconds: all four nodes at height 1654; all three price feeds at nonce 8 with six observed price changes and 4/4 relayer quorum; Polymarket nonce 1; no fatal/panic matches. Expected completion is approximately 2026-08-08 10:48 Asia/Shanghai. The PR remains draft until the final 24-hour assertions pass.

@ByteYue

ByteYue commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Repeated validator restart stress: PASS

A focused live regression completed successfully against the current Wave 7 candidate:

  • 4 validators
  • real Binance Futures testnet index klines for NVDAUSDT, BTCUSDT, and ETHUSDT
  • one finalized Polygon/Polymarket settlement
  • 30-minute monitored window, 115 canonical snapshots
  • five scheduled node4 process restarts at 360/600/840/1080/1320 seconds

Measured restart recovery times:

Restart Recovery
1 11.163s
2 12.167s
3 13.171s
4 13.162s
5 11.160s

After every restart, the old PID was confirmed stopped, RPC returned, the node caught up to the target block, all three relayer checkpoints caught up, and the next canonical snapshot retained 4/4 relayer quorum.

Final assertions:

  • 9 passed, process exit code 0
  • each price feed advanced 31 nonces and emitted 33 callback events
  • Polymarket settlement nonce/callback count: 1/1
  • no nonce regression, duplicate delivery, canonical replica divergence, panic/fatal, or RocksDB lock failure
  • no epoch-guard deferrals in this focused run

The second full 24-hour run has now started with the default 12-hour guarded restart retained. Its per-feed stall window is 900 seconds because the first run demonstrated a Binance testnet NVDA bucket being published/backfilled more than six minutes late; the full-day minimum advance requirement remains 80% of expected one-minute buckets.

@ByteYue

ByteYue commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

24-hour live soak result

Operational target: PASS.

  • Ran for the full 24-hour window with 4 validators.
  • Used real Binance testnet index klines for NVDAUSDT, BTCUSDT, and ETHUSDT.
  • Each feed advanced exactly 1,440 one-minute rounds, above the configured minimum of 1,152.
  • Final relayer quorum was 4/4 for all three feeds.
  • The finalized Polygon/Polymarket settlement lane remained present with delivery nonce 1.
  • The scheduled midpoint node4 restart completed after the epoch guard; node4 caught up to the target height, and the cluster then continued for roughly another 12 hours with 4/4 quorum.

The final pytest process reported 1 failed, 8 passed only because the end-of-run callback report issued one eth_getLogs query spanning more than the RPC limit of 100,000 blocks. Runtime oracle delivery, consensus, chain progress, and restart recovery had already completed successfully. Commit 11058697a1 fixes this report-only defect by scanning logs in inclusive 100,000-block chunks and snapshotting latest once. The focused settings/log-scan test set now passes (10 passed), along with compile and diff checks.

No additional 24-hour rerun is required for the accepted operational objective; the pagination change is isolated to final evidence collection.

@ByteYue ByteYue changed the title test(oracle): add manual live soak suite test(oracle): add Binance-only live soak suite Aug 9, 2026
@ByteYue
ByteYue force-pushed the codex/oracle-live-soak-wave7 branch 2 times, most recently from c576307 to 3b6e17b Compare August 11, 2026 13:34
@ByteYue
ByteYue marked this pull request as ready for review August 11, 2026 15:19

@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: 3b6e17b6fb

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +914 to +918
if nonce > last_nonces[pair]:
max_price_gaps[pair] = max(
max_price_gaps[pair], now - last_price_advances[pair]
)
last_price_advances[pair] = now

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 Check elapsed gaps before resetting stall clocks

When a feed resumes after exceeding ORACLE_SOAK_STALL_TIMEOUT_SECONDS, _run_soak records the oversized gap but immediately resets last_price_advances[pair] before the assertion, so the asserted elapsed time is zero and the release soak can pass despite violating its stall budget. This is especially reproducible when _restart_validator blocks heartbeat sampling: pause deliveries longer than the configured budget, allow one delivery before the next replicated snapshot, and the nonce-advance path masks the outage; the node-height loop below has the same reset-before-check behavior. Validate the elapsed gap before updating either timestamp so a recovery cannot erase a prolonged stall.

AGENTS.md reference: AGENTS.md:L5-L6

Useful? React with 👍 / 👎.

@ByteYue

ByteYue commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Wave 7 manual live soak result: PASS

Tested PR head: 3b6e17b6fb729bce91b8aaefde80da1a12e9dcee

A 4-validator Gravity devnet completed the Binance-only live oracle soak against real Binance testnet data.

Result

  • Pytest: 11 passed, 0 failed (2:01:27 total suite time)
  • Configured soak duration: 7,200s
  • Actual monitored duration: 7,204.308s
  • Samples: 473
  • Final Gravity block: 31,595
  • Oracle activation epoch: 3
  • Epoch-guard restart deferrals: 0

Live price feeds

Feed Initial nonce Final nonce Advances Required Price changes Max observed gap Callback events
NVDAUSDT 2 123 121 96 121 76.055s 123
BTCUSDT 2 123 121 96 121 76.074s 123
ETHUSDT 2 123 121 96 121 76.082s 123

All three feeds repeatedly reached the required relayer quorum across all four validators and continued advancing after the restart.

Coordinated restart coverage

  • Restarted node4 once at the one-hour midpoint.
  • Scheduled restart point: 3,600s
  • Actual restart point: 3,615.647s
  • RPC/height/feed recovery: 14.174s
  • node4 caught up with the other validators, and all three feed nonces resumed at 4/4 quorum.

No panic, chain divergence, relayer stall, nonce regression, or feed timeout was observed. The 8 emitted warnings were existing Python requests/urllib3 dependency warnings and were unrelated to the oracle flow.

Verdict: PASS. The PR head completed the intended two-hour real-data, multi-validator live soak including the coordinated validator restart and post-restart recovery.

ByteYue added 11 commits August 12, 2026 10:26
Add one opt-in four-validator suite that discovers live Binance Futures testnet index-price buckets and a finalized Polygon Polymarket settlement before deployment, activates both tasks through governance at an epoch boundary, and verifies JWK quorum through execution-layer callbacks.

The suite monitors replica convergence, monotonic source progress, exact Binance closed-bucket prices, relayer quorum, immutable Polymarket settlement, callback counts, and node4 restart recovery. Generated source mappings and metadata are ignored and removed on teardown, including deployed relayer configs.

Validated with:
- 3-minute live smoke: 5 bucket advances, 6 price callbacks, 1 settlement callback
- 30-minute burn-in: 1,802.6s, 119 samples, 32 advances (24 required), 76.11s max price gap, 33 price callbacks, 1 settlement callback
- 3-minute restart probe: node4 recovered in 11.17s, 4 bucket advances, 5 price callbacks, 1 settlement callback

The documented 24-hour run restarts node4 halfway and requires at least 80% of expected minute advances.
Pin gravity-reth to the merged PR #423 commit and the Binance E2E genesis inputs to the merged contracts PR #116 commit. Regenerate Cargo.lock from the updated reth revision.\n\nValidated with:\n- CARGO_BUILD_JOBS=2 RUSTFLAGS='--cfg tokio_unstable' cargo check -p gravity_node --locked -j 2\n- oracle_live_soak helper tests (10 passed)
@ByteYue
ByteYue force-pushed the codex/oracle-live-soak-wave7 branch from 3b6e17b to 779085f Compare August 12, 2026 02:27

@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: 779085f323

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +149 to +150
(base_dir / node["id"] / "config" / "relayer_config.json").unlink(
missing_ok=True

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 Preserve relayer configs when leaving a failed cluster running

When this suite fails under runner.py oracle_live_soak --no-cleanup, run_test_suite deliberately leaves the nodes running but still invokes post_stop; this unlink then removes each live node's relayer configuration (and lines 138-139 remove the metadata needed by --resume). A subsequent validator restart loads an empty relayer config and can no longer fetch any gravity://3/... task, defeating both post-failure debugging and resume validation. Reproduce by forcing a pytest assertion, running with --no-cleanup, inspecting the deleted config, and restarting one validator; cleanup should only remove these files after the cluster is actually stopped.

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

Useful? React with 👍 / 👎.

Comment on lines +1244 to +1245
try:
summary = await _run_soak(

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 Cover final validations with the failure-report handler

The failure-reporting try starts only around _run_soak and ends before callback-event validation, so a callback-count mismatch at the final gate raises without writing oracle_live_soak_summary.json; setup and activation failures before this line have the same behavior. Because pre_deploy removes any previous summary, consumers expecting the documented machine-readable final report receive no artifact for these important failure modes. Expand the reporting scope so the setup and post-soak assertions also produce a failed summary.

Useful? React with 👍 / 👎.

@ByteYue
ByteYue merged commit 90c78af into main Aug 13, 2026
31 checks passed
@ByteYue
ByteYue deleted the codex/oracle-live-soak-wave7 branch August 13, 2026 08:11
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