#36408 test: allow 3 bytes of fee overestimate in assert_fee_amount

ReviewabilityReviewsAgreementSize
#36408 fametrano test: allow 3 bytes of fee overestimate in assert_fee_amountReady1Strong0 + 3 tests
  • Prevent intermittent CI failures in wallet functional tests
  • Avoid false test failures when rare short signatures cause three bytes of fee overestimation
  • Ready for review
  • Strong support with no open objections
  • Verified by artificially forcing a three-byte overestimate to confirm tests pass (Ayoazeez26)
  • 0 lines added or modified outside tests
  • 3 lines added or modified in tests
  • 2 lines removed in total
  • 1 files, 1 commits
Test infrastructure#3 of 54
P2 · bug fix
  • P2 because it fixes a recurring source of intermittent CI test failures
  • Resolves false-positive failures in wallet tests without weakening assertions beyond rare signature variance
Reviewability: ReadyStalePaused
Agreement: StrongPositivePositive w/ caveatsNeutralMildDisputedBlockedCrickets
Reviews: current code-review ACKs, then (+stale ACKs) and -NACKs; greener = more ACKs.
Size: lines added or modified outside tests, then in tests; greener = smaller.

Goal

Increases the allowed fee overestimate in the functional test assertion helper `assert_fee_amount` from 2 bytes to 3 bytes. This accounts for rare cases where low-R ECDSA signatures have leading zero bytes in their r or s components and are shorter than the 71 bytes assumed during wallet fee estimation.

Problem: Functional tests checking exact fee calculations, such as `wallet_send.py`, intermittently fail in CI when an ECDSA signature is three bytes shorter than the wallet's default 71-byte estimate. The test helper asserted on at most a two-byte overestimate, causing rare false-positive CI failures.

Evidence of importance:

  • Issue #36394 reported a concrete intermittent CI failure in wallet_send.py: 'AssertionError: Fee of 0.00000438 BTC too high! (Should be 0.00000432 BTC)'
  • Earlier closed issues #24151 and #25164 document the recurrence of 'fee too high' intermittent failures in wallet_send.py.

Risk of a mistake: low (tests). A mistake only affects functional test fee assertion tolerances in the test framework.

Changed since the previous assessment: No changes to the patch or commit; previous description had no patch attached.

Reviewability

Ready

Nothing known that would invalidate a review now.

Waiting on (from the thread read):

  • nothing: no pending requests or questions

Agreement

Strong

substantive support, no open objection (Ayoazeez26)

Thread notes: Author clarified that the test_maxfeerate failure in testing was due to the synthetic reproduction method rather than the PR; no new claims were raised.

Objections, suggestions, and questions: none recorded.

Support:

  • Ayoazeez26 (none) (Tested ACK, 2026-10-04) [tested]: Verified that raising the allowance to 3 bytes resolves the failure by artificially forcing a 3-byte overestimate

Participants:

  • Ayoazeez26 (none, support, 1 statements 2026-10-04 to 2026-10-04): Tested ACK with synthetic reproduction

Files

5 lines under test/bench/ci.

  • test/functional/test_framework/util.py +3/-2

Card

The short text the ranking pass compares across PRs.

Raises the fee overestimate tolerance in the functional test helper assert_fee_amount from 2 bytes to 3 bytes. The wallet estimates fee sizes assuming 71-byte low-R ECDSA signatures, but rare signatures can be up to 3 bytes shorter due to leading zeroes, causing false-positive test failures when asserting exact fees. This eliminates intermittent CI test failures in wallet_send.py demonstrated in issue #36394.

Data

dossier JSON · extract JSON · model ledger, generated 2026-11-02T01:11, confidence high, input hash 785e688853b2d4b9
thread read through 2026-11-01 (2 statements), head 050409b2c5
labels: Tests

Categories

Test infrastructure

P2 · bug fix

Fixes a recurring source of intermittent CI failures in the functional test framework assertion helper. According to issue #36394 and past issues (#24151, #25164), `wallet_send.py` fails when rare low-R ECDSA signatures are three bytes shorter than the default estimate, triggering false-positive test failures.

Membership: Matches the 'Tests' label and modifies `test/functional/test_framework/util.py` to fix intermittent test failures.

Factors: security/stability 0, bug 1, performance 0, user value 0, leverage 1