-
Notifications
You must be signed in to change notification settings - Fork 358
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
Fix various issues found in full_stack_target
fuzzing
#2808
Fix various issues found in full_stack_target
fuzzing
#2808
Commits on Dec 24, 2023
-
Fix
Feature
eq + hash to ignore excess zero bytesIf we get a `Feature` object which has excess zero bytes, we shouldn't consider it a different `Feature` from another with the same bits set, but no excess zero bytes. Here we fix both the `Hash` and `PartialEq` implementation for `Features` to ignore excess zero bytes.
Configuration menu - View commit details
-
Copy full SHA for df1f981 - Browse repository at this point
Copy the full SHA df1f981View commit details
Commits on Dec 29, 2023
-
Stop including dust values in feerate affordability checks
When we or our counterparty are updating the fees on the channel, we currently check that the resulting balance is sufficient not only to meet the reserve threshold, but also not push it below dust. This isn't required in the BOLTs and may lead to spurious force-closures (which would be a bit safer, but reserve should always exceed the dust threshold). Worse, the current logic is broken - it compares the output value in *billionths of satoshis* to the dust limit in satoshis. Thus, the code is borderline dead anyway, but can overflow for channels with several million Bitcoin, causing the fuzzer to get mad (and lead to spurious force-closures for few-billion-dollar channels).
Configuration menu - View commit details
-
Copy full SHA for ddb54fc - Browse repository at this point
Copy the full SHA ddb54fcView commit details -
Fix
REVOKEABLE_REDEEMSCRIPT_MAX_LENGTH
for contest delays >0x7fffWhen contest delays are >= 0x8000, script pushes require an extra byte to avoid being interpreted as a negative int. Thus, for channels with CSV delays longer than ~7.5 months we may generate transactions with slightly too little fee. This isn't really a huge deal, but we should prefer to be conservative here, and slightly too high fee in the general case is better than slightly too little fee in other cases.
Configuration menu - View commit details
-
Copy full SHA for c946edb - Browse repository at this point
Copy the full SHA c946edbView commit details -
Fix debug assertion on opening a channel with a disconnected peer
If we try to open a channel with a peer that is disconnected (but with which we have some other channels), we'll end up with an unfunded channel which will lead to a panic when the peer reconnects. Here we drop this debug assertion without bother to add a new test, given this behavior will change in a PR very soon.
Configuration menu - View commit details
-
Copy full SHA for 5d8cd5a - Browse repository at this point
Copy the full SHA 5d8cd5aView commit details -
Fix dust buffer feerate calculation overflow
If a peer provides a feerate which nears `u32::MAX`, we may overflow calculating the dust buffer feerate, leading to spuriously keeping non-anchor channels open when they should be force-closed.
Configuration menu - View commit details
-
Copy full SHA for 3b6a361 - Browse repository at this point
Copy the full SHA 3b6a361View commit details
Commits on Jan 8, 2024
-
Fix reachable unwrap on non-channel_type manual channel acceptance
If we receive an `OpenChannel` message without a `channel_type` with `manually_accept_inbound_channels` set, we will `unwrap()` `None`. This is uncommon these days as most nodes support `channel_type`, but sadly is rather trivial for a peer to hit for those with manual channel acceptance enabled. Reported in and fixes lightningdevkit#2804. Luckily, the updated `full_stack_target` has no issue reaching this issue quickly.
Configuration menu - View commit details
-
Copy full SHA for 7f24e83 - Browse repository at this point
Copy the full SHA 7f24e83View commit details