Repository navigation
signer: Enforce per-payment and on-chain fee budgets - #760
Open
ihordiachenko wants to merge 2 commits into
Open
ihordiachenko wants to merge 2 commits into
ihordiachenko wants to merge 2 commits into
Conversation
ihordiachenko
marked this pull request as ready for review
October 29, 2026 18:14
Restore routing-balance enforcement with the larger of a fixed fee allowance and a percentage of the payment amount. Keep VLS payment accounting through a validator wrapper, avoiding a VLS fork. Enforce absolute commitment, local HTLC, and mutual-close fee caps outside filterable policies and permissive authentication. Keep stored commitments signable for force-close and retain the existing sweep feerate ceiling. Check requested payment fee limits before offering HTLCs, align SDK fee limits, and register invoice-backed sendpay payments synchronously. Handle amountless retries and return negative preapproval replies on signer errors so declined payments do not block the node. Document limits and defaults.
ihordiachenko
force-pushed
the
fix/re-enable-fee-routing-rules
branch
2 times, most recently
from
October 29, 2026 20:07
59fef56 to
44bfc34
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #925.
Routing-balance checks were disabled for amountless invoices, leaving routing fees unenforced. A flat 1,000-sat cap also rejects large trampoline payments because their 0.5% surcharge exceeds it. This change restores enforcement with configurable fee budgets instead of raising
max_feerate_per_kw.A validator wrapper supplies an amount-dependent allowance while VLS accounts for each payment across channels and HTLC parts. This avoids a VLS fork, at the cost of delegation code that must be checked on upgrades. We intend to move this logic into VLS.
Defaults, configurable through
SignerConfig::fee_budget_limitsand signer CLI flags:On-chain caps apply independently of policy filters and permissive mode; fee-rate policies remain warnings. Stored commitments remain signable for force-close, with an over-budget warning. Sweeps and withdrawals retain the 150,000 sat/kW ceiling.
Minor related fixes that were blocking testing/implementation:
sendpaypayments synchronously;xpaypay, direct-invoicexpay, and trampoline;