-
Notifications
You must be signed in to change notification settings - Fork 416
Comparing changes
Open a pull request
base repository: lightningdevkit/rust-lightning
base: main
head repository: optout21/rust-lightning
compare: main
- 10 commits
- 14 files changed
- 2 contributors
Commits on Apr 8, 2024
-
Fix unknown handling in
impl_writeable_tlv_based_enum_upgradable
`impl_writeable_tlv_based_enum_upgradable` professed to supporting upgrades by returning `None` from `MaybeReadable` when unknown variants written by newer versions of LDK were read. However, it generally didn't support this as it didn't discard bytes for unknown types, resulting in corrupt reading. This is fixed here for enum variants written as a TLV stream, however we don't have a length prefix for tuple enum variants, so the documentation on the macro is updated to mention that downgrades are not supported for tuple variants.
Configuration menu - View commit details
-
Copy full SHA for 499ca93 - Browse repository at this point
Copy the full SHA 499ca93View commit details -
Ensure we read the full TLV stream length when maybe-reading
None
If we are reading an object that is `MaybeReadable` in a TLV stream using `upgradable_required`, it may return early with `Ok(None)`. In this case, it will not read any further TLVs from the TLV stream. This is fine, except that we generally expect `MaybeReadable` always consume the correct number of bytes for the full object, even if it doesn't understand it. This could pose a problem, for example, in cases where we're reading a TLV-stream `MaybeReadable` object inside another TLV-stream object. In that case, the `MaybeReadable` object may return `Ok(None)` and not consume all the available bytes, causing the outer TLV read to fail as the TLV length does not match.
Configuration menu - View commit details
-
Copy full SHA for bdf5a6f - Browse repository at this point
Copy the full SHA bdf5a6fView commit details -
Allow
MaybeReadable
to not fully read inupgradable_option
Whils this is generally not supported, issues in our `MaybeReadable` implementations may occur, and we should try to be robust against them.
Configuration menu - View commit details
-
Copy full SHA for f8b0800 - Browse repository at this point
Copy the full SHA f8b0800View commit details
Commits on Apr 9, 2024
-
Fix blinded path serialization in
Route
`Route`'s blinded_path serialization logic writes a blinded path `Option` per path hop, however on read we (correctly) only read one blinded path `Option` per path. This causes serialization of `Route`s with blinded paths to fail to round-trip. Here we fix this by writing blinded paths per path.
Configuration menu - View commit details
-
Copy full SHA for d429065 - Browse repository at this point
Copy the full SHA d429065View commit details -
Fix
Route
serialization round-tripWhen the `max_total_routing_fee_msat` parameter was added to `RouteParameters`, the serialization used `map` to get the max fee, accidentally writing an `Option<Option<u64>>`, but then read it as an `Option<u64>`. Thus, any `Route`s with a `route_params` written will fail to be read back. Luckily, this is an incredibly rarely-used bit of code, so only one user managed to hit it.
Configuration menu - View commit details
-
Copy full SHA for 72c4eb8 - Browse repository at this point
Copy the full SHA 72c4eb8View commit details -
Avoid writing
ChannelManager
when hitting lnd bug 6039When we hit lnd bug 6039, we end up sending error messages to peers in a loop. This should be fine, but because we used the generic `PersistenceNotifierGuard::notify_on_drop` lock above the specific handling, we end up writing `ChannelManager` every time we manage a round-trip to our peer. This can add up quite quickly, and isn't actually changing, so we really need to avoid writing the `ChannelManager` in this case.
Configuration menu - View commit details
-
Copy full SHA for 271103d - Browse repository at this point
Copy the full SHA 271103dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 84bc535 - Browse repository at this point
Copy the full SHA 84bc535View commit details -
Configuration menu - View commit details
-
Copy full SHA for bcea4fa - Browse repository at this point
Copy the full SHA bcea4faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 66ebe7e - Browse repository at this point
Copy the full SHA 66ebe7eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 27e5519 - Browse repository at this point
Copy the full SHA 27e5519View 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...main