AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Informational 15 Bitcoin

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

Public commit record

What the developer wrote

Authored by merge-script

96/100 · Strong
Merge bitcoin/bitcoin#36408: test: allow 3 bytes of fee overestimate in assert_fee_amount

050409b2c5522eff0dc37c00a6d1225a8a437e17 test: allow 3 bytes of fee overestimate in assert_fee_amount (Ferdinando Ametrano)

Pull request description:

The wallet sizes a transaction assuming a 71-byte low-R ECDSA signature. A signature whose r or s has leading zero bytes is shorter, so the fee can cover a few bytes more than the signed transaction needs. In #36394 the wallet estimated 219 bytes and paid 438 sat at 2 sat/vB, but the signed transaction was 216 bytes: the signature was 3 bytes short. That happens about once in 4 million signatures. `assert_fee_amount` allows only 2 bytes of overestimate, so the test failed.

I raise the allowance to 3 bytes, which makes the failure about 200 times rarer. The check that the fee is not too low is unchanged. maflcko suggested 3 bytes in #24151 and #25164.

Fixes #36394.

*Made with my usual tools: a computer, the Internet and an LLM. The mistakes, as usual, are all mine.*

ACKs for top commit:
Ayoazeez26:
tACK 050409b2c5522eff0dc37c00a6d1225a8a437e17
ismaelsadeeq:
ACK 050409b2c5522eff0dc37c00a6d1225a8a437e17
sedited:
ACK 050409b2c5522eff0dc37c00a6d1225a8a437e17

Tree-SHA512: d75ddf117a87a4e2e7e6d85e3c63c1ef2c9e5c12cf50b51f2016392da0c4c4172e1333d9a287f6c28f171f49b99a88505093083c2928391a760c552812f9e45e
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This is a tiny change to a Bitcoin Core test helper that makes fee-checking tests slightly more tolerant. It is not a security fix and does not affect production wallet code or consensus rules. It simply reduces how often an extremely rare random test failure occurs.

Recommended action

No security action needed. Treat as a routine test-maintenance merge.

Security signals we found

No strong security signals were identified.

Risk score

Why this scored 15/100

Our methodology →
Potential impact 0/30
Exploitability 0/25
Stealth signal 0/15
Affected reach 0/15
Confidence 10/10
Evidence quality 5/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.