Skip to content

qa: use CommitmentFinalized for USDC balance check - #3542

Merged
snormore merged 1 commit into
mainfrom
snor/qa-usdc-balance-finalized
Apr 16, 2026
Merged

qa: use CommitmentFinalized for USDC balance check#3542
snormore merged 1 commit into
mainfrom
snor/qa-usdc-balance-finalized

Conversation

@snormore

Copy link
Copy Markdown
Contributor

Summary of Changes

  • Change GetTokenAccountBalance commitment level from CommitmentConfirmed to CommitmentFinalized when checking USDC balances in the QA settlement test

Testing Verification

@snormore
snormore merged commit ed91a8a into main Apr 16, 2026
33 of 34 checks passed
@snormore
snormore deleted the snor/qa-usdc-balance-finalized branch April 16, 2026 21:38
packethog added a commit that referenced this pull request Apr 16, 2026
…3543)

## Summary of Changes
* Poll the USDC balance with `require.Eventually` in
`validate_balance_after_pay` and `validate_balance_after_withdraw`
instead of a single read, with a 30s timeout and 5s interval.
* Fixes a race between `FeedSeatPay`/`FeedSeatWithdraw` (which return
after tx **confirmation**) and `GetUSDCBalance` at `CommitmentFinalized`
— mainnet finalization lags confirmation by ~13s, so a one-shot
finalized read can still see the pre-debit balance.
* PR #3542 (commitment bump alone) was insufficient: the failure
reproduced immediately at [run
24534512863](https://github.com/malbeclabs/infra/actions/runs/24534512863/job/71732161416),
with before/after balance identical because the finalized-slot view
predated the pay tx.
* 5s poll interval chosen to avoid RPC rate limiting.

## Testing Verification
* `go build -tags=qa ./e2e/...` and `go vet -tags=qa ./e2e/...` pass.
* Run failure signature reproduced: `balanceBeforePay=1008431000`,
`balanceAfterPay=1008431000`, debit=0, polled one ~115ms after
`FeedSeatPay` returned. With polling, the assertion has up to 30s for
the finalized slot to advance past the pay tx.
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