Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
9f6aafb
Persist splice intents until the splice locks
jkczyz Oct 2, 2026
ec594a2
f - Persist splice intents until the splice locks
jkczyz Oct 26, 2026
6697fe0
f - Match a signed round's record in concerns_channel
jkczyz Oct 29, 2026
d8d6fca
f - Drop a redundant payment record removal
jkczyz Oct 29, 2026
a524fad
f - Name the lock-time intent check after what it classifies
jkczyz Oct 30, 2026
e5c83e6
f - Name the lock-time intent check after the splice lock
jkczyz Oct 30, 2026
3e0d899
Abort a splice when funding signing fails
jkczyz Sep 30, 2026
ed8a7ba
Add reason and splice parameters to splice failure events
jkczyz Sep 30, 2026
e516fdf
f - Document that a force-close failure has no splice parameters
jkczyz Oct 29, 2026
b956539
Unlock lost splice inputs at startup
jkczyz Sep 30, 2026
3c84d05
f - Unlock lost splice inputs at startup
jkczyz Oct 26, 2026
3155c91
f - Say why reconcile skips an intent the settle pass re-anchored
jkczyz Oct 29, 2026
739ba2e
f - Name the startup splice check after the question it answers
jkczyz Oct 30, 2026
95523e0
f - Say plainly why reconcile skips a channel's other stale intents
jkczyz Oct 30, 2026
95361b3
f - Say a splice locked where startup docs said the funding moved
jkczyz Oct 30, 2026
5889636
Test splice failure surfacing and recovery
jkczyz Sep 30, 2026
0a29a79
Refuse to sign a round this node cannot measure
tnull Sep 30, 2026
b29c554
Take back a splice intent its payment left behind
tnull Sep 29, 2026
4a08a3f
Let the funding output alone identify a funding
tnull Sep 29, 2026
957275d
Drop the DataStore::mutate_async wrapper
jkczyz Oct 26, 2026
9d1b809
Use placeholders in the builder's PostgreSQL connection string examples
jkczyz Oct 23, 2026
e0391a4
Track outbound channel opens from initiation
jkczyz Oct 23, 2026
d4568c7
f - Track outbound channel opens from initiation
jkczyz Oct 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,23 @@
`Config::manually_handle_unknown_bolt11_payments` to `true`. Otherwise
matching inbound HTLCs will be failed back instead of emitting
`Event::PaymentClaimable`.
- The funding payment of a channel opened through a `Node::open_channel` variant is now
recorded under the `PaymentId` returned in the `ChannelOpen` result, rather than under an id
derived from the funding transaction's txid. Channels opened before upgrading, and channels
this node opens as an LSPS2 service, keep the txid-derived id. Applications that derived the
payment id from the funding txid should use the returned id instead.
- An outbound channel open that is still in flight at shutdown may be reported through
`Event::ChannelClosed` at the next startup, with the `user_channel_id` of the open and the
`ClosureReason::DisconnectedPeer` reason. Such an event may be emitted more than once for the
same open. Applications should handle a `ChannelClosed` event for a `user_channel_id` they do
not hold a channel for.

## Feature and API updates
- `Node::splice_out_max` withdraws the maximum available channel balance to an on-chain address.
- All `Node::open_channel` variants now return a `ChannelOpen` holding the `user_channel_id`
of the channel and the `PaymentId` the funding payment is recorded under. Once a variant
returns `Ok`, the open is tracked across restarts: an open the node loses while shut down is
reported through `Event::ChannelClosed` rather than disappearing silently.
- All `Node::open_channel` variants now take an optional `FeeRate` (after
`push_to_counterparty_msat`) that, when set, is used for the channel's funding transaction instead of the internal fee estimation. For the
`_with_all` variants it also determines the rate at which the maximum funding amount is
Expand Down
14 changes: 8 additions & 6 deletions bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,17 @@ interface Node {
[Throws=NodeError]
void disconnect(PublicKey node_id);
[Throws=NodeError]
UserChannelId open_channel(PublicKey node_id, SocketAddress address, u64 channel_amount_sats, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
ChannelOpen open_channel(PublicKey node_id, SocketAddress address, u64 channel_amount_sats, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
[Throws=NodeError]
UserChannelId open_announced_channel(PublicKey node_id, SocketAddress address, u64 channel_amount_sats, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
ChannelOpen open_announced_channel(PublicKey node_id, SocketAddress address, u64 channel_amount_sats, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
[Throws=NodeError]
UserChannelId open_channel_with_all(PublicKey node_id, SocketAddress address, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
ChannelOpen open_channel_with_all(PublicKey node_id, SocketAddress address, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
[Throws=NodeError]
UserChannelId open_announced_channel_with_all(PublicKey node_id, SocketAddress address, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
ChannelOpen open_announced_channel_with_all(PublicKey node_id, SocketAddress address, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
[Throws=NodeError]
UserChannelId open_0reserve_channel(PublicKey node_id, SocketAddress address, u64 channel_amount_sats, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
ChannelOpen open_0reserve_channel(PublicKey node_id, SocketAddress address, u64 channel_amount_sats, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
[Throws=NodeError]
UserChannelId open_0reserve_channel_with_all(PublicKey node_id, SocketAddress address, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
ChannelOpen open_0reserve_channel_with_all(PublicKey node_id, SocketAddress address, u64? push_to_counterparty_msat, FeeRate? fee_rate, ChannelConfig? channel_config);
[Throws=NodeError]
void splice_in([ByRef]UserChannelId user_channel_id, PublicKey counterparty_node_id, u64 splice_amount_sats, FeeRate? min_fee_rate);
[Throws=NodeError]
Expand Down Expand Up @@ -392,6 +392,8 @@ typedef string ChannelId;
[Custom]
typedef string UserChannelId;

typedef dictionary ChannelOpen;

typedef interface Mnemonic;

[Remote]
Expand Down
16 changes: 14 additions & 2 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ use lightning_dns_resolver::OMDomainResolver;
use vss_client::headers::VssHeaderProvider;

use crate::chain::ChainSource;
use crate::channel::{OpenChannelTracker, SpliceTracker};
#[cfg(feature = "chain-bitcoind")]
use crate::config::BitcoindRestClientConfig;
use crate::config::{
Expand Down Expand Up @@ -731,7 +732,7 @@ impl NodeBuilder {
/// previously configured.
///
/// Connects to the PostgreSQL database at the given `connection_string`, e.g.,
/// `"postgres://user:password@localhost/ldk_db"`.
/// `"postgres://<user>:<password>@localhost/ldk_db"`.
///
/// The given `db_name` will be used or default to
/// [`DEFAULT_DB_NAME`](io::postgres_store::DEFAULT_DB_NAME). The `connection_string` must
Expand Down Expand Up @@ -1334,7 +1335,7 @@ impl Builder {
/// previously configured.
///
/// Connects to the PostgreSQL database at the given `connection_string`, e.g.,
/// `"postgres://user:password@localhost/ldk_db"`.
/// `"postgres://<user>:<password>@localhost/ldk_db"`.
///
/// The given `db_name` will be used or default to
/// [`DEFAULT_DB_NAME`](io::postgres_store::DEFAULT_DB_NAME). The `connection_string` must
Expand Down Expand Up @@ -2565,6 +2566,15 @@ fn build_with_store_internal(
})
});

let splice_tracker = Arc::new(SpliceTracker::new(
Arc::clone(&channel_manager),
Arc::clone(&wallet),
Arc::clone(&pending_payment_store),
Arc::clone(&logger),
));
let open_channel_tracker =
Arc::new(OpenChannelTracker::new(Arc::clone(&pending_payment_store), Arc::clone(&logger)));

#[cfg(cycle_tests)]
let mut _leak_checker = crate::LeakChecker(Vec::new());
#[cfg(cycle_tests)]
Expand Down Expand Up @@ -2616,6 +2626,8 @@ fn build_with_store_internal(
payment_store,
forwarding_store,
forwarded_payment_aggregation_retention_secs,
splice_tracker,
open_channel_tracker,
lnurl_auth,
is_running,
node_metrics,
Expand Down
Loading
Loading