Skip to content

Deflake sequential proxy swap GIGA test#3485

Merged
masih merged 6 commits into
mainfrom
masih/giga-defke-test-it
May 22, 2026
Merged

Deflake sequential proxy swap GIGA test#3485
masih merged 6 commits into
mainfrom
masih/giga-defke-test-it

Conversation

@masih
Copy link
Copy Markdown
Collaborator

@masih masih commented May 21, 2026

The Autobahn EVM GIGA integration job intermittently failed with "incorrect account sequence" on tokenA.approve inside a loop that issued approve+swap pairs back-to-back on the shared owner signer.

Approve once up front (matching the other multi-swap test in this file) and wait between swaps so the live docker cluster's account sequence stays aligned with ethers' nonce tracking. This removes the extra per-iteration approve that widened the CheckTx race window without changing what the test exercises (two sequential multi-hop
proxy swaps).

Flaked in unrelated changes.

The Autobahn EVM GIGA integration job intermittently failed with
"incorrect account sequence" on tokenA.approve inside a loop that
issued approve+swap pairs back-to-back on the shared owner signer.

Approve once up front (matching the other multi-swap test in this
file) and wait between swaps so the live docker cluster's account
sequence stays aligned with ethers' nonce tracking. This removes
the extra per-iteration approve that widened the CheckTx race window
without changing what the test exercises (two sequential multi-hop
proxy swaps).
@masih masih marked this pull request as ready for review May 21, 2026 14:30
@cursor
Copy link
Copy Markdown

cursor Bot commented May 21, 2026

PR Summary

Low Risk
Low risk since changes are isolated to integration test logic, but the added delay() calls can increase test runtime and may mask genuine sequencing issues if overused.

Overview
Deflakes the sequential proxy swap portions of EVMGigaTest.js by approving tokenA once up-front for the total amount (instead of per-iteration approvals) and inserting a delay() between back-to-back swaps.

This reduces intermittent "incorrect account sequence" failures in environments where nonce/sequence updates can lag when submitting consecutive transactions from the same signer.

Reviewed by Cursor Bugbot for commit e8cb3e9. Bugbot is set up for automated code reviews on this repo. Configure here.

@masih masih requested review from arajasek and wen-coding May 21, 2026 14:31
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMay 22, 2026, 1:15 PM

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 395de04. Configure here.

Comment thread contracts/test/EVMGigaTest.js
@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.13%. Comparing base (cb72147) to head (e8cb3e9).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3485      +/-   ##
==========================================
+ Coverage   59.11%   59.13%   +0.01%     
==========================================
  Files        2187     2187              
  Lines      182237   181998     -239     
==========================================
- Hits       107723   107618     -105     
+ Misses      64852    64719     -133     
+ Partials     9662     9661       -1     
Flag Coverage Δ
sei-db 70.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 44 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

const receipt = await tx.wait();
expect(receipt.status).to.equal(1);
if (i < 1) {
await delay();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I think delay() is fine, we could also check the sequence number like in #3486

But we can see whether delay just fixes the problem

@masih masih enabled auto-merge May 22, 2026 14:54
@masih masih added this pull request to the merge queue May 22, 2026
Merged via the queue into main with commit 7c901cc May 22, 2026
49 checks passed
@masih masih deleted the masih/giga-defke-test-it branch May 22, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants