Skip to content

fix: deflake //rs/dogecoin/ckdoge/minter:integration_tests#10336

Open
mraszyk wants to merge 1 commit into
masterfrom
mraszyk/deflake-dogecoin-integration-test
Open

fix: deflake //rs/dogecoin/ckdoge/minter:integration_tests#10336
mraszyk wants to merge 1 commit into
masterfrom
mraszyk/deflake-dogecoin-integration-test

Conversation

@mraszyk
Copy link
Copy Markdown
Contributor

@mraszyk mraszyk commented May 28, 2026

This PR attempts to deflake the test //rs/dogecoin/ckdoge/minter:integration_tests.

PLEASE REVIEW EXTRA CAREFULLY since this PR has been fully Claude-generated.

Now I understand the root cause completely:

  1. last_median_fee_per_vbyte is initialized to FeeRate::from_millis_per_byte(1) in the minter state
  2. It only updates when estimate_fee_per_vbyte successfully calls the Dogecoin canister
  3. During setup, RefreshFeePercentiles fires while the Dogecoin canister is still syncing blocks → fails → last_median_fee_per_vbyte stays at 1
  4. estimate_withdrawal_fee (called before the transaction is built) uses the stale 1 value
  5. Later, ProcessLogic fires after the Dogecoin canister is synced → succeeds → updates last_median_fee_per_vbyte to DEFAULT_REGTEST_FEE → transaction built with dogecoin_fee:
    227000000

The fix: use fee_estimator.estimate_median_fee(&s.last_fee_per_vbyte) instead of s.last_median_fee_per_vbyte. For Regtest, estimate_nth_fee ignores fee percentiles and always returns
DEFAULT_REGTEST_FEE, so this correctly uses DEFAULT_REGTEST_FEE even before the first successful fee refresh.

@github-actions github-actions Bot added the fix label May 28, 2026
@mraszyk mraszyk marked this pull request as ready for review May 28, 2026 13:40
@mraszyk mraszyk requested a review from a team as a code owner May 28, 2026 13:40
@github-actions github-actions Bot added the @defi label May 28, 2026
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.

1 participant