fix: deflake //rs/tests/ckbtc:ckbtc_minter_checker#8990
Open
basvandijk wants to merge 4 commits intomasterfrom
Open
fix: deflake //rs/tests/ckbtc:ckbtc_minter_checker#8990basvandijk wants to merge 4 commits intomasterfrom
basvandijk wants to merge 4 commits intomasterfrom
Conversation
Root cause: The RpcClient::send() method used ALL UTXOs from the sender address as transaction inputs, creating oversized transactions. After mining 101+ blocks to the wallet address, dozens of mature coinbase UTXOs were included, resulting in transactions whose minimum relay fee exceeded the hardcoded BITCOIN_NETWORK_TRANSFER_FEE of 1410 satoshis. This caused three types of flaky failures: 1. 'min relay fee not met, 1410 < 5628' (RPC error -26): The fee was too low for the large transaction size. 2. 'ProcessNewBlock, block not accepted' (RPC error -32603): Downstream effect of transaction pool issues. 3. Test timeout: Time wasted on failed operations. Fix: - Modified RpcClient::send() to select only the minimum UTXOs needed to cover amount + fee, keeping transactions small and fees adequate. - Added retry logic (5 attempts with 2s delay) to send_to_btc_address() and generate_blocks() in test utils for transient RPC errors. See .claude/skills/fix-flaky-tests/SKILL.md
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.
//rs/tests/ckbtc:ckbtc_minter_checkerhas been slightly flaky in the last week:Failing due to, what on first sight seems to be, different reasons:
Claude Opus 4.6 made the following root cause analysis and accompanying fix:
Root Cause
The
RpcClient::send()method used ALL UTXOs from the sender address as transaction inputs, creating oversized transactions. After mining 101+ blocks to the wallet address, dozens of mature coinbase UTXOs were included, resulting in transactions whose minimum relay fee exceeded the hardcodedBITCOIN_NETWORK_TRANSFER_FEEof 1410 satoshis.This caused three types of flaky failures:
min relay fee not met, 1410 < 5628(RPC error -26): The fee was too low for the large transaction size.ProcessNewBlock, block not accepted(RPC error -32603): Downstream effect of transaction pool issues.Fix
RpcClient::send()to select only the minimum UTXOs needed to coveramount + fee, keeping transactions small and fees adequate.send_to_btc_address()andgenerate_blocks()in test utils for transient RPC errors & made the functions idempotent.See
.claude/skills/fix-flaky-tests/SKILL.md.