lightningdevkit / rust-lightning

A highly modular Bitcoin Lightning library written in Rust. It's rust-lightning, not Rusty's Lightning!
Other
1.17k stars 368 forks source link

`MIN_RELAY_FEE_SAT_PER_1000_WEIGHT` is inflated 16x #3438

Open morehouse opened 18 hours ago

morehouse commented 18 hours ago

MIN_RELAY_FEE_SAT_PER_1000_WEIGHT is used to enforce a minimum fee bump for transaction RBFs. Per Bitcoin Core policy, this should be 1 sat/vB. Instead, we're using 16 sat/vB:

https://github.com/lightningdevkit/rust-lightning/blob/1386bef048eb6082165a3c1e6967c6bb14e1f3e1/lightning/src/chain/chaininterface.rs#L178-L179

This causes RBFs to be much larger than needed in some cases.

We should be using 250 sat/kw, or maybe 253 sat/kw if we need to worry about rounding for the incremental relay feerate.

TheBlueMatt commented 18 hours ago

Oof good catch.