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

Merge bitcoin/bitcoin#29278: Wallet: Add `maxfeerate` wallet startup option

Public commit record

What the developer wrote

Authored by Ava Chow

91/100 · Strong
Merge bitcoin/bitcoin#29278: Wallet: Add `maxfeerate` wallet startup option

f69e56bc1c43ca2bebd4d733bce1afc8de8f58b9 [doc]: add release notes (ismaelsadeeq)
40ab7aa90de5a6382fe6f8946cde735e05308a20 [wallet]: warn when `-maxtxfee` conflicts with `-minrelaytxfee` (ismaelsadeeq)
df1feeb487dc54dc44ac8eff96650319bb3a2584 [wallet]: enforce `-maxfeerate` on wallet transactions (ismaelsadeeq)
d2c832e9e79d0f8691e64f25bcfe198ae34805d5 [util]: add a new transaction error type (ismaelsadeeq)
633c08d3f7af95953a818c645a4ad4c90f0bbdb0 [node]: update `BroadcastTransaction` to check fee rate limit (ismaelsadeeq)
7bfce65801bf5a7ae45f5f75a627e6cd03d9c8c0 [wallet]: add `maxfeerate` wallet startup option (ismaelsadeeq)
607568f2b00260ac54fd4c2c904002be17edebfd [wallet]: update `max_fee` to `max_tx_fee` (ismaelsadeeq)
6b913b6224bdafac6b83328441a347a00d7d4d06 doc: add missing verb to make sentence readable (ismaelsadeeq)
a9c39696f4be2ffe02cd78d152f4e5960692c833 scripted-diff: rename `m_default_max_tx_fee` to `m_max_tx_fee` (ismaelsadeeq)

Pull request description:

This PR fixes #29220

- The PR adds a wallet `-maxfeerate` startup option, as the upper limit of wallet transactions fee rate.

- This fixes the ambiguity of using `maxtxfee` value to check the upper limit of transactions fee rate.

- Wallet will not create a transaction with fee rate above `maxfeerate` value.

- This PR adds a functional test that ensure the behavior is enforced.

ACKs for top commit:
achow101:
ACK f69e56bc1c43ca2bebd4d733bce1afc8de8f58b9
polespinasa:
ACK f69e56bc1c43ca2bebd4d733bce1afc8de8f58b9

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

What changed, and why it matters

This commit adds a new Bitcoin Core wallet startup option called -maxfeerate. It lets users set a maximum fee rate (fee per unit of transaction size) that the wallet will allow when creating or broadcasting transactions. Previously, the wallet only had -maxtxfee, which limits the total absolute fee. The change also makes the error messages clearer so users can tell whether a transaction was rejected because of the total fee or the fee rate. It is a defensive feature, not a fix for an active vulnerability, and it helps prevent users from accidentally paying extremely high per-byte fees.

Recommended action

No urgent action is required. Operators and developers should review the new -maxfeerate default and consider whether it matches their risk tolerance. Wallet users who previously relied on -maxtxfee alone should understand that transactions can now also be rejected based on fee rate. Review downstream integrations that call BroadcastTransaction or wallet RPCs to ensure they handle the new MAX_FEE_RATE_EXCEEDED error correctly.

Security signals we found

01

New wallet startup option -maxfeerate to cap transaction fee rate

02

New transaction error type MAX_FEE_RATE_EXCEEDED

03

BroadcastTransaction now checks both max absolute fee and max fee rate

04

Wallet creation, fee bumping, and sendall paths enforce the new limit

05

Default cap of 10,000 sat/vB prevents accidental overpayment

06

Functional tests added to verify enforcement and edge cases

Risk score

Why this scored 28/100

Our methodology →
Potential impact 5/30
Exploitability 3/25
Stealth signal 3/15
Affected reach 5/15
Confidence 8/10
Evidence quality 4/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.