Skip to content

Commit c570e77

Browse files
committed
Bump LDK dependency for Bolt11Invoice serialization
Switch all `lightning*` dependencies to `tnull/rust-lightning` branch `2025-11-lsps1-refactor` which adds `Writeable`/`Readable` impls for `Bolt11Invoice`, `Offer`, and `Refund`. Also adapt to `LiquidityManager` API changes: the `ChainSource` generic parameter was removed and `LiquidityServiceConfig` gained an `lsps1_service_config` field. Generated with the help of AI (Claude Code). Co-Authored-By: HAL 9000
1 parent 7ad0d63 commit c570e77

4 files changed

Lines changed: 32 additions & 34 deletions

File tree

Cargo.toml

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ default = []
3939
#lightning-liquidity = { version = "0.2.0", features = ["std"] }
4040
#lightning-macros = { version = "0.2.0" }
4141

42-
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245", features = ["std"] }
43-
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245" }
44-
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245", features = ["std"] }
45-
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245" }
46-
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245", features = ["tokio"] }
47-
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245" }
48-
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245" }
49-
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245", features = ["rest-client", "rpc-client", "tokio"] }
50-
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
51-
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245", features = ["std"] }
52-
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245" }
42+
lightning = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor", features = ["std"] }
43+
lightning-types = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
44+
lightning-invoice = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor", features = ["std"] }
45+
lightning-net-tokio = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
46+
lightning-persister = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor", features = ["tokio"] }
47+
lightning-background-processor = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
48+
lightning-rapid-gossip-sync = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
49+
lightning-block-sync = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor", features = ["rest-client", "rpc-client", "tokio"] }
50+
lightning-transaction-sync = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor", features = ["esplora-async-https", "time", "electrum-rustls-ring"] }
51+
lightning-liquidity = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor", features = ["std"] }
52+
lightning-macros = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
5353

5454
bdk_chain = { version = "0.23.0", default-features = false, features = ["std"] }
5555
bdk_esplora = { version = "0.22.0", default-features = false, features = ["async-https-rustls", "tokio"]}
@@ -84,7 +84,7 @@ bitcoin-payment-instructions = { git = "https://github.com/jkczyz/bitcoin-paymen
8484
winapi = { version = "0.3", features = ["winbase"] }
8585

8686
[dev-dependencies]
87-
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "98501d6e5134228c41460dcf786ab53337e41245", features = ["std", "_test_utils"] }
87+
lightning = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor", features = ["std", "_test_utils"] }
8888
rand = { version = "0.9.2", default-features = false, features = ["std", "thread_rng", "os_rng"] }
8989
proptest = "1.0.0"
9090
regex = "1.5.6"
@@ -170,15 +170,16 @@ harness = false
170170
#vss-client-ng = { path = "../vss-client" }
171171
#vss-client-ng = { git = "https://github.com/lightningdevkit/vss-client", branch = "main" }
172172
#
173-
#[patch."https://github.com/lightningdevkit/rust-lightning"]
174-
#lightning = { path = "../rust-lightning/lightning" }
175-
#lightning-types = { path = "../rust-lightning/lightning-types" }
176-
#lightning-invoice = { path = "../rust-lightning/lightning-invoice" }
177-
#lightning-net-tokio = { path = "../rust-lightning/lightning-net-tokio" }
178-
#lightning-persister = { path = "../rust-lightning/lightning-persister" }
179-
#lightning-background-processor = { path = "../rust-lightning/lightning-background-processor" }
180-
#lightning-rapid-gossip-sync = { path = "../rust-lightning/lightning-rapid-gossip-sync" }
181-
#lightning-block-sync = { path = "../rust-lightning/lightning-block-sync" }
182-
#lightning-transaction-sync = { path = "../rust-lightning/lightning-transaction-sync" }
183-
#lightning-liquidity = { path = "../rust-lightning/lightning-liquidity" }
184-
#lightning-macros = { path = "../rust-lightning/lightning-macros" }
173+
[patch."https://github.com/lightningdevkit/rust-lightning"]
174+
lightning = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
175+
lightning-types = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
176+
lightning-invoice = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
177+
lightning-net-tokio = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
178+
lightning-persister = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
179+
lightning-background-processor = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
180+
lightning-rapid-gossip-sync = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
181+
lightning-block-sync = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
182+
lightning-transaction-sync = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
183+
lightning-liquidity = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
184+
lightning-macros = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }
185+
possiblyrandom = { git = "https://github.com/tnull/rust-lightning", branch = "2025-11-lsps1-refactor" }

src/builder.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1619,7 +1619,6 @@ fn build_with_store_internal(
16191619
Arc::clone(&wallet),
16201620
Arc::clone(&channel_manager),
16211621
Arc::clone(&keys_manager),
1622-
Arc::clone(&chain_source),
16231622
Arc::clone(&tx_broadcaster),
16241623
Arc::clone(&kv_store),
16251624
Arc::clone(&config),

src/liquidity.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ use lightning_types::payment::PaymentHash;
3939
use tokio::sync::oneshot;
4040

4141
use crate::builder::BuildError;
42-
use crate::chain::ChainSource;
4342
use crate::connection::ConnectionManager;
4443
use crate::logger::{log_debug, log_error, log_info, LdkLogger, Logger};
4544
use crate::runtime::Runtime;
@@ -154,7 +153,6 @@ where
154153
wallet: Arc<Wallet>,
155154
channel_manager: Arc<ChannelManager>,
156155
keys_manager: Arc<KeysManager>,
157-
chain_source: Arc<ChainSource>,
158156
tx_broadcaster: Arc<Broadcaster>,
159157
kv_store: Arc<DynStore>,
160158
config: Arc<Config>,
@@ -167,8 +165,7 @@ where
167165
{
168166
pub(crate) fn new(
169167
wallet: Arc<Wallet>, channel_manager: Arc<ChannelManager>, keys_manager: Arc<KeysManager>,
170-
chain_source: Arc<ChainSource>, tx_broadcaster: Arc<Broadcaster>, kv_store: Arc<DynStore>,
171-
config: Arc<Config>, logger: L,
168+
tx_broadcaster: Arc<Broadcaster>, kv_store: Arc<DynStore>, config: Arc<Config>, logger: L,
172169
) -> Self {
173170
let lsps1_client = None;
174171
let lsps2_client = None;
@@ -180,7 +177,6 @@ where
180177
wallet,
181178
channel_manager,
182179
keys_manager,
183-
chain_source,
184180
tx_broadcaster,
185181
kv_store,
186182
config,
@@ -238,7 +234,12 @@ where
238234
let lsps2_service_config = Some(s.ldk_service_config.clone());
239235
let lsps5_service_config = None;
240236
let advertise_service = s.service_config.advertise_service;
241-
LiquidityServiceConfig { lsps2_service_config, lsps5_service_config, advertise_service }
237+
LiquidityServiceConfig {
238+
lsps1_service_config: None,
239+
lsps2_service_config,
240+
lsps5_service_config,
241+
advertise_service,
242+
}
242243
});
243244

244245
let lsps1_client_config = self.lsps1_client.as_ref().map(|s| s.ldk_client_config.clone());
@@ -255,8 +256,6 @@ where
255256
Arc::clone(&self.keys_manager),
256257
Arc::clone(&self.keys_manager),
257258
Arc::clone(&self.channel_manager),
258-
Some(Arc::clone(&self.chain_source)),
259-
None,
260259
Arc::clone(&self.kv_store),
261260
Arc::clone(&self.tx_broadcaster),
262261
liquidity_service_config,

src/types.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ pub(crate) type LiquidityManager = lightning_liquidity::LiquidityManager<
231231
Arc<KeysManager>,
232232
Arc<KeysManager>,
233233
Arc<ChannelManager>,
234-
Arc<ChainSource>,
235234
Arc<DynStore>,
236235
DefaultTimeProvider,
237236
Arc<Broadcaster>,

0 commit comments

Comments
 (0)