multi: enforce the commitment fee rate floor #11373
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.50) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 563 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.379
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #11373"
general
weight: 0.35
gijswijs
Change Description
An inbound
open_channelcould establish a channel with a commitment fee rate belowchainfee.FeePerKwFloor(253 sat/kw), including zero. Later commitment updates already reject those rates, so the channel could not carry HTLCs until its initiator raised the fee. BOLT 2 requires failing the channel for afeerate_per_kwthat's too small, so reject these proposals before consulting the channel acceptor or creating a reservation, with an error that tells the peer the minimum rate. Proposals at or above the floor are used unchanged.Outgoing proposals now meet the floor too:
--max-commit-fee-rate-anchors=1, the lowest accepted value, which converts to 250 sat/kw. The setting remains accepted, but lnd logs a startup warning, and the option's description says the floor is used instead.update_feethatSignNextCommitmentrefused to sign, and the link failed. The link now uses the floor as the min relay fee if the estimator reports a lower one. Channels we opened below the floor, e.g. with an older lnd and--max-commit-fee-rate-anchors=1, are now raised to at least the floor regardless of the relay fee.This changes behavior for peers running an older lnd with
--max-commit-fee-rate-anchors=1: they propose anchor and taproot channels below the floor, which an upgraded node now rejects until they raise that setting or upgrade. Previously, such a channel opened but couldn't carry HTLCs until the opener raised its fee rate.Note:
zero_fee_commitmentschannel type requiresfeerate_per_kwto be 0 and forbidsupdate_fee. lnd doesn't support it yet, and peers shouldn't propose it to a node that doesn't advertise it, so the floor holds for every channel type lnd negotiates today. Supporting it will need exceptions to the inbound and outboundopen_channelfloors added here, as well as to the existing floor invalidateCommitmentSanity. The inbound check runs beforenegotiateCommitmentType, so it will also have to move after it to see the type. Until then, lnd rejects a peer that proposes that type anyway for its fee rate rather than for its channel type.Steps to Test
Regression tests cover inbound rejection boundaries, outbound fee capping and flooring, the rate persisted in both commitments on each side of the channel, and a link fee update with a fee estimate and min relay fee below the floor. The funding test fixtures use the production default anchor cap; their previous implicit zero cap let tests open channels at zero fee.
Pull Request Checklist
Testing
Code Style and Documentation
docs/release-notes/unreleased/<PR number>.md, or theno-changeloglabel is applied for changes that do not need one.📝 Please see our Contribution Guidelines for further guidance.