-
Notifications
You must be signed in to change notification settings - Fork 418
Comparing changes
Open a pull request
base repository: lightningdevkit/rust-lightning
base: main
head repository: lightningdevkit/rust-lightning
compare: 0.0.125
- 8 commits
- 13 files changed
- 3 contributors
Commits on Oct 14, 2024
-
Set
holder_commitment_point
toAvailable
on upgradeWhen we upgrade from LDK 0.0.123 or prior, we need to intialize `holder_commitment_point` with commitment point(s). In 1f7f3a3 we changed the point(s) which we fetch from both the current and next per-commitment-point (setting the value to `HolderCommitmentPoint::Available` on upgrade) to only fetching the current per-commitment-point (setting the value to `HolderCommitmentPoint::PendingNext` on upgrade). In `commitment_signed` handling, we expect the next per-commitment-point to be available (allowing us to `advance()` the `holder_commitment_point`), as it was included in the `revoke_and_ack` we most recently sent to our peer, so must've been available at that time. Sadly, these two interact negatively with each other - on upgrade, assuming the channel is at a steady state and there are no pending updates, we'll not make the next per-commitment-point available but if we receive a `commitment_signed` from our peer we'll assume it is. As a result, in debug mode, we'll hit an assertion failure, and in production mode we'll force-close the channel. Instead, here, we fix the upgrade logic to always upgrade directly to `HolderCommitmentPoint::Available`, making the next per-commitment-point available immediately. We also attempt to resolve the next per-commitment-point in `get_channel_reestablish`, allowing any channels which were upgraded to LDK 0.0.124 and are in this broken state to avoid the force-closure, as long as they don't receive a `commitment_signed` in the interim.
Configuration menu - View commit details
-
Copy full SHA for 68d27bc - Browse repository at this point
Copy the full SHA 68d27bcView commit details -
Don't bump the
next_node_counter
when using a removed counterIf we manage to pull a `node_counter` from `removed_node_counters` for reuse, `add_channel_between_nodes` would `unwrap_or` with the `next_node_counter`-incremented value. This visually looks right, except `unwrap_or` is always called, causing us to always increment `next_node_counter` even if we don't use it. This will result in the `node_counter`s always growing any time we add a new node to our graph, leading to somewhat larger memory usage when routing and a debug assertion failure in `test_node_counter_consistency`. The fix is trivial, this is what `unwrap_or_else` is for.
Configuration menu - View commit details
-
Copy full SHA for acfc6d9 - Browse repository at this point
Copy the full SHA acfc6d9View commit details -
Fix
synchronize_listeners
calling default implementationPreviously, the `ChainListenerSet` `Listen` implementation wouldn't forward to the listeners `block_connected` implementation outside of tests. This would result in the default implementation of `Listen::block_connected` being used and the listeners implementation never being called.
Configuration menu - View commit details
-
Copy full SHA for a675d48 - Browse repository at this point
Copy the full SHA a675d48View commit details -
Don't interpret decayed data as we've failed to send tiny values
When we're calculating the success probability for min-/max-bucket pairs and are looking at the 0th' min-bucket, we only look at the highest max-bucket to decide the success probability. We ignore max-buckets which have a value below `BUCKET_FIXED_POINT_ONE` to only consider values which aren't substantially decayed. However, if all of our data is substantially decayed, this filter causes us to conclude that the highest max-bucket is bucket zero even though we really should then be looking at any bucket. We make this change here, looking at the highest non-zero max-bucket if no max-buckets have a value above `BUCKET_FIXED_POINT_ONE`.
Configuration menu - View commit details
-
Copy full SHA for e48074a - Browse repository at this point
Copy the full SHA e48074aView commit details -
Configuration menu - View commit details
-
Copy full SHA for a6834eb - Browse repository at this point
Copy the full SHA a6834ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for f0f1b22 - Browse repository at this point
Copy the full SHA f0f1b22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2028c78 - Browse repository at this point
Copy the full SHA 2028c78View commit details -
Merge pull request #3362 from TheBlueMatt/2024-10-0.0.125
Cut 0.0.125 with a few bugfixes
Configuration menu - View commit details
-
Copy full SHA for e80d632 - Browse repository at this point
Copy the full SHA e80d632View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main...0.0.125