chore(ci): poll XBTC balance after transfer to avoid solo block race - #1317
Merged
Conversation
send rgbx transfer only puts the tx into the main-chain mempool; solo block production + exec takes time. Querying balances immediately after send races the block landing and intermittently fails ci_rgbx. Compute the expected balances, poll wait_xbtc_balance_not_less_than until user B receives the amount (atomic tx: B receiving implies A debited), then assert. Test-only change: no version release. Co-authored-by: Claude <noreply@anthropic.com>
bysomeone
force-pushed
the
fix/rgbx-ci-transfer-flake
branch
from
September 2, 2026 06:27
9d45621 to
8e7dc9c
Compare
33cn
approved these changes
Sep 3, 2026
Owner
|
🎉 This PR is included in version 1.72.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ci_rgbxintermittently fails (same head sometimes red, sometimes green — e.g. run 33594327164 failed while 33594329896 on the same commit passed) inscenario_user_transfer_crosschain_asset.send rgbx transferonly puts the tx into the main-chain mempool; solo block production + execution takes time. The test then queried both balances once, immediately and asserted exact equality. On a slow/loaded CI runner the ~1s between send and the query is not always enough for the block to land, so the assertion trips (fail log: user A balance still 0.2000, expected 0.1950, ~0.2s short of the passing case). The# tx_waitthat would have handled this was commented out from the start.Fix
In
scenario_user_transfer_crosschain_asset, aftersend:wait_xbtc_balance_not_less_thanuntil user B actually receives the amount (the tx is atomic, so B receiving implies A was debited),This matches the polling pattern already used by the deposit/withdraw scenarios in the same file. Test-only change; no product logic.
Verification
bash -npasses.ci_rgbxshould no longer flake on the transfer step.