-
Notifications
You must be signed in to change notification settings - Fork 405
Drop non-anchor channel fee upper bound limit entirely #2696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop non-anchor channel fee upper bound limit entirely #2696
Conversation
We kept it but increased it from 2x to 10x (see d3af49e). Do you recall why the bump was done then? I agree that it is redundant. |
I think we just didn't think it through at the time, or maybe as a sanity check? |
LGTM but CI is failing |
c332a79
to
c60947b
Compare
Fixed. |
The fuzz build failed now:
|
c60947b
to
40953be
Compare
Grrrrr, fixed. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2696 +/- ##
==========================================
+ Coverage 88.79% 89.83% +1.04%
==========================================
Files 112 113 +1
Lines 88502 94464 +5962
Branches 88502 94464 +5962
==========================================
+ Hits 78581 84862 +6281
+ Misses 7690 7377 -313
+ Partials 2231 2225 -6
☔ View full report in Codecov by Sentry. |
Quite a while ago we added checks for the total current dust exposure on a channel to explicitly limit dust inflation attacks. When we did this, we kept the existing upper bound on the channel's feerate in place. However, these two things are redundant - the point of the feerate upper bound is to prevent dust inflation, and it does so in a crude way that can cause spurious force-closures. Here we simply drop the upper bound entirely, relying on the dust inflation limit to prevent dust inflation instead.
40953be
to
d30d599
Compare
Fix new warnings $ git diff-tree -U1 40953beb d30d599a
diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs
index 81a4cb9f4..3606b04e6 100644
--- a/lightning/src/ln/channel.rs
+++ b/lightning/src/ln/channel.rs
@@ -7669,3 +7669,3 @@ mod tests {
use crate::ln::channel::InitFeatures;
- use crate::ln::channel::{Channel, ChannelState, InboundHTLCOutput, OutboundV1Channel, InboundV1Channel, OutboundHTLCOutput, InboundHTLCState, OutboundHTLCState, HTLCCandidate, HTLCInitiator, commit_tx_fee_msat};
+ use crate::ln::channel::{ChannelState, InboundHTLCOutput, OutboundV1Channel, InboundV1Channel, OutboundHTLCOutput, InboundHTLCState, OutboundHTLCState, HTLCCandidate, HTLCInitiator, commit_tx_fee_msat};
use crate::ln::channel::{MAX_FUNDING_SATOSHIS_NO_WUMBO, TOTAL_BITCOIN_SUPPLY_SATOSHIS, MIN_THEIR_CHAN_RESERVE_SATOSHIS};
diff --git a/lightning/src/util/test_utils.rs b/lightning/src/util/test_utils.rs
index 3ca26d529..337dfc063 100644
--- a/lightning/src/util/test_utils.rs
+++ b/lightning/src/util/test_utils.rs
@@ -96,3 +96,3 @@ pub struct TestFeeEstimator {
impl chaininterface::FeeEstimator for TestFeeEstimator {
- fn get_est_sat_per_1000_weight(&self, confirmation_target: ConfirmationTarget) -> u32 {
+ fn get_est_sat_per_1000_weight(&self, _confirmation_target: ConfirmationTarget) -> u32 {
*self.sat_per_kw.lock().unwrap()
$ |
Quite a while ago we added checks for the total current dust exposure on a channel to explicitly limit dust inflation attacks. When we did this, we kept the existing upper bound on the channel's feerate in place. However, these two things are redundant - the point of the feerate upper bound is to prevent dust inflation, and it does so in a crude way that can cause spurious force-closures.
Here we simply drop the upper bound entirely, relying on the dust inflation limit to prevent dust inflation instead.