Skip to content

Bump rust-lightning to include trampoline changes#825

Draft
carlaKC wants to merge 2 commits intolightningdevkit:mainfrom
carlaKC:trampoline-deps
Draft

Bump rust-lightning to include trampoline changes#825
carlaKC wants to merge 2 commits intolightningdevkit:mainfrom
carlaKC:trampoline-deps

Conversation

@carlaKC
Copy link

@carlaKC carlaKC commented Mar 13, 2026

Depends on #824.

Also needs the following patch on top of 2026-02-ldk-node-base in bitcoin-payment-instructions.

diff --git a/Cargo.toml b/Cargo.toml
index de128db..811cd36 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -21,8 +21,8 @@ default = ["std"]
 [dependencies]
 #lightning-invoice = { version = "0.34", default-features = false }
 #lightning = { version = "0.2.0", default-features = false, features = ["dnssec"] }
-lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204", default-features = false }
-lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204", default-features = false, features = ["dnssec"] }
+lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "128ead25e8d62b0262b71711631220983c48756a", default-features = false }
+lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "128ead25e8d62b0262b71711631220983c48756a", default-features = false, features = ["dnssec"] }
 bitcoin = { version = "0.32", default-features = false }
 getrandom = { version = "0.3", default-features = false, optional = true }
 dnssec-prover = { version = "0.6", default-features = false, optional = true, features = ["validation", "std", "tokio"] }
@@ -34,5 +34,5 @@ serde_json = { version = "1.0", default-features = false, optional = true, featu
 tokio = { version = "1.0", default-features = false, features = ["rt", "macros"] }
 #lightning = { version = "0.2.0", features = ["std"] }
 #lightning-net-tokio = { version = "0.2.0", default-features = false }
-lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204", features = ["std"] }
-lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98393b3de3d8aec897e9ab783cb2418da504e204", default-features = false }
+lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "128ead25e8d62b0262b71711631220983c48756a", features = ["std"] }
+lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "128ead25e8d62b0262b71711631220983c48756a", default-features = false }```

In the event of a quiescence tie-breaker, the losing side may contribute
as the splice acceptor. A min and max feerate allows us to determine
whether to contribute. We use 150% of the min feerate for the max
feerate to allow for RBFs in upcoming changes.
@ldk-reviews-bot
Copy link

👋 Hi! I see this is a draft PR.
I'll wait to assign reviewers until you mark it as ready for review.
Just convert it out of draft status when you're ready for review!

src/event.rs Outdated
/// A set of multiple htlcs all associated with same forward.
#[derive(Debug, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "uniffi", derive(uniffi::Record))]
pub struct HTLCSet(Vec<HTLCLocator>);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interested in some feedback here 🙏

To use default_value to fill in legacy fields when the new field isn't present, we need to implement Readable/Writeable for Vec<HTLCLocator>. We can't do this because we don't own the trait or the type (orphan rule).

The solution I've gone with here is to use a wrapper struct and pull in the code we have in impl_for_vec in LDK.

Alternatives would be:

  • Don't use default_value, and write manual Readable/Writeable impls for Event so that we can manually fill the legacy values (I can't find a way to do it within macros).
  • Just use required_vec and don't fill legacy values (seems bad).

Comment on lines +379 to +380
// For backwards compatibility, write the first prev/next_htlc to our legacy fields. This
// allows use to downgrade with some information loss about the remaining htlcs.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what the project's philosophy is for backwards compatibility, so just gone with what I would have done in LDK - happy to do something else if it's preferred!

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