Skip to content

Commit ed464eb

Browse files
jkczyzclaude
andcommitted
Bump LDK to 0.3-rc1
The 0.3-rc1 backports (rust-lightning #4937) include failing queued splice contributions on ChannelManager reload and force-close (rust-lightning #4918), which the upcoming splice tracking relies on: a contribution dropped by a restart now replays SpliceNegotiationFailed and DiscardFunding events instead of dying silently. Adjust for rc1 API changes: HTLCLocator split into inbound and outbound variants, and the async monitor reader dropped its _parallel suffix. bitcoin-payment-instructions pins LDK by rev and must move in lockstep; the previously pinned fork has no rev pinning rc1 yet, so the dependency moves to an equivalent fork rev (the same tree plus the LDK bump). Developed with assistance from Claude Code. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent b812128 commit ed464eb

3 files changed

Lines changed: 32 additions & 20 deletions

File tree

Cargo.toml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,18 @@ uniffi-default = [
8686
#lightning-macros = { version = "0.2.0" }
8787
#lightning-dns-resolver = { version = "0.3.0" }
8888

89-
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb", features = ["std"] }
90-
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb" }
91-
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb", features = ["std"] }
92-
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb" }
93-
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb", features = ["tokio"], optional = true }
94-
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb" }
95-
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb" }
96-
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb", features = ["rest-client", "rpc-client", "tokio"], optional = true }
97-
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb", optional = true }
98-
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb", features = ["std"] }
99-
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb" }
100-
lightning-dns-resolver = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb", optional = true }
89+
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a", features = ["std"] }
90+
lightning-types = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a" }
91+
lightning-invoice = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a", features = ["std"] }
92+
lightning-net-tokio = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a" }
93+
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a", features = ["tokio"], optional = true }
94+
lightning-background-processor = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a" }
95+
lightning-rapid-gossip-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a" }
96+
lightning-block-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a", features = ["rest-client", "rpc-client", "tokio"], optional = true }
97+
lightning-transaction-sync = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a", optional = true }
98+
lightning-liquidity = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a", features = ["std"] }
99+
lightning-macros = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a" }
100+
lightning-dns-resolver = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a", optional = true }
101101

102102
bdk_chain = { version = "0.23.3", default-features = false, features = ["std"] }
103103
bdk_esplora = { version = "0.22.2", default-features = false, features = ["async-https-rustls", "tokio"], optional = true }
@@ -132,14 +132,14 @@ postgres-native-tls = { version = "0.5", default-features = false, features = ["
132132
vss-client = { package = "vss-client-ng", version = "0.6", optional = true }
133133
prost = { version = "0.11.6", default-features = false, optional = true}
134134
#bitcoin-payment-instructions = { version = "0.6" }
135-
bitcoin-payment-instructions = { git = "https://github.com/tnull/bitcoin-payment-instructions", rev = "1d6ffaa8962391ddc84aeef98bd7439e55ccae9d", optional = true }
135+
bitcoin-payment-instructions = { git = "https://github.com/jkczyz/bitcoin-payment-instructions", rev = "c359b125e972ff49b5c2e9f6865afb11500286a0", optional = true }
136136

137137
[target.'cfg(windows)'.dependencies]
138138
winapi = { version = "0.3", features = ["winbase"] }
139139

140140
[dev-dependencies]
141-
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb", features = ["std", "_test_utils"] }
142-
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "9174965af9437196c527a9aa0df36bbcf050c8bb", features = ["tokio"] }
141+
lightning = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a", features = ["std", "_test_utils"] }
142+
lightning-persister = { git = "https://github.com/lightningdevkit/rust-lightning", rev = "4219131b05e44663a1b417e4f6cf09c7740ead2a", features = ["tokio"] }
143143
rand = { version = "0.9.2", default-features = false, features = ["std", "thread_rng", "os_rng"] }
144144
proptest = "1.0.0"
145145
regex = "1.5.6"

src/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1926,7 +1926,7 @@ fn build_with_store_internal(
19261926
let logger_ref = Arc::clone(&logger);
19271927
let (monitor_read_res, network_graph_res) = runtime.block_on(async {
19281928
tokio::join!(
1929-
monitor_reader.read_all_channel_monitors_with_updates_parallel(),
1929+
monitor_reader.read_all_channel_monitors_with_updates(),
19301930
read_network_graph(&*kv_store_ref, logger_ref),
19311931
)
19321932
});

src/event.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ use lightning::events::bump_transaction::BumpTransactionEvent;
1919
#[cfg(not(feature = "uniffi"))]
2020
use lightning::events::PaidBolt12Invoice;
2121
use lightning::events::{
22-
ClosureReason, Event as LdkEvent, FundingInfo, HTLCLocator as LdkHtlcLocator,
23-
PaymentFailureReason, PaymentPurpose, ReplayEvent,
22+
ClosureReason, Event as LdkEvent, FundingInfo, InboundHTLCLocator as LdkInboundHtlcLocator,
23+
OutboundHTLCLocator as LdkOutboundHtlcLocator, PaymentFailureReason, PaymentPurpose,
24+
ReplayEvent,
2425
};
2526
use lightning::ln::channelmanager::{PaymentId, TrustedChannelFeatures};
2627
use lightning::ln::types::ChannelId;
@@ -91,8 +92,19 @@ impl_writeable_tlv_based!(HTLCLocator, {
9192
(7, amount_msat, option),
9293
});
9394

94-
impl From<LdkHtlcLocator> for HTLCLocator {
95-
fn from(value: LdkHtlcLocator) -> Self {
95+
impl From<LdkInboundHtlcLocator> for HTLCLocator {
96+
fn from(value: LdkInboundHtlcLocator) -> Self {
97+
HTLCLocator {
98+
channel_id: value.channel_id,
99+
amount_msat: value.amount_msat,
100+
user_channel_id: value.user_channel_id.map(|u| UserChannelId(u)),
101+
node_id: value.node_id,
102+
}
103+
}
104+
}
105+
106+
impl From<LdkOutboundHtlcLocator> for HTLCLocator {
107+
fn from(value: LdkOutboundHtlcLocator) -> Self {
96108
HTLCLocator {
97109
channel_id: value.channel_id,
98110
amount_msat: value.amount_msat,

0 commit comments

Comments
 (0)