Skip to content
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

Update fee hysteresis #6833

Merged

Conversation

endothermicdev
Copy link
Collaborator

This gets the channel opener to propose a higher feerate than what they would actually prefer to use (the minimum realistic fee.) This may address some feerate disagreements which lead to disconnects with peers due to non-exactly matching feerates as described in #6756. This may be due to differing mempool configuration, or fee estimation. Either way, some additional tolerance set by opener by default should improve the situation.

I'm not sure if we want this option exposed, but it seemed appropriate. The default is 5, which only covers rounding errors, but there are reports of CLN<->CLN fee disagreements by just 1sat per kw difference. Additional data may be useful to adjust this default.

Changelog-Added: Added option --commit-fee-offset to potentially reduce feerate update disagreements

Adding a fee offset as the channel opener reduces the likelihood of a
disconnect by the peer do to slight variation in feerate calculation
between nodes.

Changelog-Fixed: Some peer disconnects due to update_fee disagreements are avoided.
Changelog-Added: Added option --commit-fee-offset to potentially reduce feerate update disagreements
@endothermicdev
Copy link
Collaborator Author

Corrected docs formatting and added a test.

@endothermicdev
Copy link
Collaborator Author

Looking at more logs and perhaps it would be better to apply this as a minimum offset above the min feerate rather than a constant offset from the nominal feerate. I would think times like this are where we run into issues:

2023-10-23T09:51:47.548Z DEBUG lightningd: update_feerates: feerate = 529, min=529, max=30740, penalty=529

However, that only seems to occur with certain mempool conditions. Later the same day, there's plenty of margin between the nominal feerate and the minimum acceptable:

2023-10-23T17:32:46.927Z DEBUG lightningd: update_feerates: feerate = 1791, min=557, max=24130, penalty=562

I have about 12 hours of time in the feerate == min regime over three weeks of data. I wonder if this is primarily when the feerate disconnect issues are occurring. If so, a minimum margin above the min acceptable feerate could be more appropriate.

@rustyrussell rustyrussell merged commit 10bac49 into ElementsProject:master Nov 1, 2023
37 of 38 checks passed
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