Skip to content

Change RBF feerate bump rule to ensure BIP125 relay conformance#1327

Open
jkczyz wants to merge 1 commit intolightning:masterfrom
jkczyz:2026-03-rbf-feerate
Open

Change RBF feerate bump rule to ensure BIP125 relay conformance#1327
jkczyz wants to merge 1 commit intolightning:masterfrom
jkczyz:2026-03-rbf-feerate

Conversation

@jkczyz
Copy link
Copy Markdown
Contributor

@jkczyz jkczyz commented Mar 19, 2026

The 25/24 multiplicative feerate bump for tx_init_rbf can produce increments too small for Bitcoin Core to relay the replacement transaction under BIP125's minimum relay fee policy (default incrementalRelayFee of 0.1 sat/vB since Bitcoin Core v30.0). Add a minimum additive increment of 25 sat/kw alongside the existing multiplicative rule, using whichever produces a higher feerate.

@jkczyz
Copy link
Copy Markdown
Contributor Author

jkczyz commented Mar 19, 2026

Alternatively, we could do the max of 25/24 and +25 sat/kwu?

@t-bast
Copy link
Copy Markdown
Collaborator

t-bast commented Mar 19, 2026

Alternatively, we could do the max of 25/24 and +25 sat/kwu?

I like that, it's too cheap to only bump by 0.1 sat/vB if the previous feerate wasn't negligible (e.g. 10 sat/vB). We want those transactions to confirm quickly, otherwise we're not benefiting from the channel capacity changes.

Copy link
Copy Markdown
Collaborator

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should do max of the two. I missed that 25 perkw is "0.1 sat per vbyte" on my original read.

@jkczyz
Copy link
Copy Markdown
Contributor Author

jkczyz commented Apr 6, 2026

Great, I'll update the PR and clarify. For the math, if you start with a fee rate of 25 sat / kwu, using the minimum RBF needed would at first double (100%) to 50 sat / kwu. Then, for each additional RBF round, the percentage increase would fall until reaching 25/24 (4.167%) at the 24th round, which would be going from 600 to 625 sat / kwu. Then going forward the 25/24 multiplicative dominates leading to a fixed 4.167% increase for each successive round instead of the fixed 25 sat / kwu increase.

This assumes using the minimum needed increase each round. If a larger amount is used, the switchover would happen sooner.

The 25/24 multiplicative feerate bump for `tx_init_rbf` can produce
increments too small for Bitcoin Core to relay the replacement
transaction under BIP125's minimum relay fee policy (default
`incrementalRelayFee` of 0.1 sat/vB since Bitcoin Core v30.0). Add a
minimum additive increment of 25 sat/kw alongside the existing
multiplicative rule, using whichever produces a higher feerate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jkczyz jkczyz force-pushed the 2026-03-rbf-feerate branch from d273336 to 0cc0554 Compare April 8, 2026 19:09
@jkczyz
Copy link
Copy Markdown
Contributor Author

jkczyz commented Apr 8, 2026

@t-bast @rustyrussell I've updated the PR to use the maximum of the previous requirement and the new requirement. PTAL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants