test(evm): migrate evm_rpc_tests.sh off -b block (CON-256)#3486
Conversation
evm_rpc_tests.sh seeds the chain with three txs (an associate-address, a deploy of minimal_contract.hex, a deploy of reverter_contract.hex) before invoking the .io/.iox spec-conformance tests. All three submissions used -b block. Under Autobahn the cosmos KV indexer that -b block polls isn't populated, so each call hung to its 60s timeout before the trailing || true papered over the failure. The script "passed" only because the .io/.iox fixtures that referenced the unset SEI_EVM_IO_SEED_BLOCK / SEI_EVM_IO_REVERTER_ADDRESS env vars were silently skipped — three minutes wasted per Autobahn RPC run for degraded coverage. Switch the three sites to -b sync. The CLI returns the tx response JSON (including txhash) immediately; the existing downstream eth_getTransactionReceipt polling loop already handles inclusion confirmation, so no other changes are needed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
PR SummaryLow Risk Overview Adds sender sequence tracking ( Reviewed by Cursor Bugbot for commit 317f546. Bugbot is set up for automated code reviews on this repo. Configure here. |
c16dd01 to
0405190
Compare
33dc047 to
1056a71
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default mode and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1056a71. Configure here.
…ions
cursor-bugbot flagged two races the -b sync swap introduced: after a
tx is accepted by CheckTx, the next CLI on the same key reads the
account sequence via gRPC q-account against app state. If the prior
tx hasn't committed yet, the read returns the pre-tx sequence, the
next CLI signs with the same sequence the mempool already has tracked
for the prior tx, and CheckTx rejects with "incorrect account
sequence":
- associate-address → send: send has no `|| true`, so under set -e
a rejection crashes the script.
- send → deploy minimal: deploy has `|| true`, but silent rejection
leaves SEI_EVM_IO_SEED_BLOCK unset and silently skips the
__SEED__ spec fixtures this PR intends to enable.
Add wait_from_seq_advance between both pairs: capture the sender's
sequence before each tx and poll (up to 5s) until it advances before
submitting the next. Sender's sequence is the direct causal signal
that the previous tx committed.
A previous attempt had top-level `FROM_ADDR=$(docker exec ...)` which
under set -e exited the script when the substitution returned non-zero
(no output visible — the failure mode that broke CI earlier). Guards
added:
- `FROM_ADDR=$(...) || FROM_ADDR=` on the resolution line
- `get_from_seq` always returns 0; outputs empty on error
- `wait_from_seq_advance` no-ops if FROM_ADDR is empty
- Numeric regex check before integer comparison
Worst case (FROM_ADDR resolution fails for some reason): polling is
skipped, script behaves like the original commit without protection —
same risk profile as the unprotected version, no worse.
The reverter deploy further down doesn't need a separate guard: when
the minimal deploy succeeds, its receipt-poll loop already waits for
inclusion before reverter; when it fails, reverter racing is no worse
than the (already-tolerated) minimal failure.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1056a71 to
317f546
Compare

Summary
`evm_rpc_tests.sh` (run by the `Autobahn RPC .io/.iox (spec fixtures)` CI job) seeded the chain with three cosmos txs via `-b block`: an `associate-address`, a minimal-contract deploy, and a reverter-contract deploy. Each output a tx hash and contract address used by downstream `.io`/`.iox` spec fixtures.
Under Autobahn the KV indexer that `-b block` polls isn't populated, so each of these three calls hung up to its 60s timeout before the trailing `|| true` swallowed the failure. The job didn't error out — but the env vars (`SEI_EVM_IO_SEED_BLOCK`, `SEI_EVM_IO_DEPLOY_TX_HASH`, `SEI_EVM_IO_REVERTER_ADDRESS`) were never set, so any spec fixture that referenced the deployed contracts was silently skipped.
Fix
Switch the three submissions to `-b sync`. The CLI returns the tx response JSON (including txhash) immediately; the existing downstream `eth_getTransactionReceipt` polling loop already handles inclusion confirmation, so no other changes are needed.
Poll the sender's cosmos account sequence between consecutive `-b sync` submissions (`wait_from_seq_advance`, 5s timeout). Required because the next CLI's pre-flight `q account` reads from app state (committed view) — if the previous tx hasn't committed yet, the next sign reuses the same sequence and CheckTx rejects with "incorrect account sequence", fatal under `set -e` on the `send` line which has no `|| true`. cursor-bugbot flagged this race; the polling closes it.
Timing
Net: ~50s faster per Autobahn RPC run and the previously-skipped `SEED` / `REVERTER` spec fixtures now actually execute.
Test plan