Skip to content

qa: poll USDC balance for finalization in multicast settlement test#3543

Merged
packethog merged 2 commits intomainfrom
ss/suspicious-herschel-354af0
Apr 16, 2026
Merged

qa: poll USDC balance for finalization in multicast settlement test#3543
packethog merged 2 commits intomainfrom
ss/suspicious-herschel-354af0

Conversation

@packethog
Copy link
Copy Markdown
Contributor

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 qa: use CommitmentFinalized for USDC balance check #3542 (commitment bump alone) was insufficient: the failure reproduced immediately at run 24534512863, 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.

@packethog packethog marked this pull request as ready for review April 16, 2026 22:25
@packethog packethog self-assigned this Apr 16, 2026
Copy link
Copy Markdown
Contributor

@karl-dz karl-dz left a comment

Choose a reason for hiding this comment

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

We should investigate this closer once we get QA working

@packethog packethog enabled auto-merge (squash) April 16, 2026 22:38
@packethog packethog disabled auto-merge April 16, 2026 22:38
@packethog packethog enabled auto-merge (squash) April 16, 2026 22:42
@packethog packethog force-pushed the ss/suspicious-herschel-354af0 branch from 3bbe7ad to 532fd2a Compare April 16, 2026 22:44
@packethog packethog merged commit fe0e21a into main Apr 16, 2026
48 of 51 checks passed
@packethog packethog deleted the ss/suspicious-herschel-354af0 branch April 16, 2026 23:26
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.

2 participants