Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
5a2bc9c
Simplify calculation of the biggest HTLC value that can be sent next
tankyleo Aug 24, 2025
19c152a
Introduce `TxBuilder::get_onchain_stats`
tankyleo Feb 3, 2026
c5d92c0
Delete `TxBuilder::commit_tx_fee_sat`
tankyleo Feb 3, 2026
cfce930
f: Remove debug assert on `addl_nondust_htlc_count`
tankyleo Feb 18, 2026
208f521
Delete `TxBuilder::subtract_non_htlc_outputs`
tankyleo Feb 3, 2026
39b3dcd
Create `ChannelConstraints` to hold parameters for balance calculations
tankyleo Aug 24, 2025
6e10dc0
Extract dust exposure calculation in `tx_builder` to its own function
tankyleo Feb 3, 2026
c517d9b
Rewrite `get_available_balances_for_scope` using `tx_builder` functions
tankyleo Feb 3, 2026
cbe6b90
Move `ChannelContext::get_available_balances_for_scope` to `tx_builder`
tankyleo Feb 3, 2026
568fe87
Format `tx_builder::get_available_balances`
tankyleo Feb 4, 2026
1d8e026
f: Explain why we take remote's view of pending HTLCs on `get_availab…
tankyleo Feb 18, 2026
9b7cc2b
Multiply the feerate by the spike multiple in `can_accept_incoming_htlc`
tankyleo Feb 3, 2026
da72591
Erase `get_pending_htlc_stats`, `next_*_commit_tx_fee_msat` in `channel`
tankyleo Feb 3, 2026
9ae2af9
Return `AvailableBalances` in `get_onchain_stats`
tankyleo Feb 3, 2026
c00a548
Unwrap `get_available_balances` with no counterparty unknown HTLCs
tankyleo Feb 16, 2026
06be5c2
fixup: Add a fallback in release mode
tankyleo Feb 18, 2026
cc9de95
Add inbound and outbound checks for zero reserve channels
tankyleo Feb 19, 2026
1104cb2
Use `accept_inbound_channel_from_trusted_peer` to accept 0 reserve chans
tankyleo Feb 12, 2026
1789a29
Add `create_channel_to_trusted_peer` to create outbound 0 reserves chans
tankyleo Feb 19, 2026
3ffd1e0
Define zero reserve feature
tankyleo Feb 12, 2026
b8e7a46
Signal zero reserve
tankyleo Feb 12, 2026
ffa1657
Shakedown zero reserve channels
tankyleo Feb 8, 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
4 changes: 3 additions & 1 deletion lightning-liquidity/tests/lsps2_integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1514,10 +1514,12 @@ fn create_channel_with_manual_broadcast(
Event::OpenChannelRequest { temporary_channel_id, .. } => {
client_node
.node
.accept_inbound_channel_from_trusted_peer_0conf(
.accept_inbound_channel_from_trusted_peer(
&temporary_channel_id,
&service_node_id,
user_channel_id,
true,
false,
None,
)
.unwrap();
Expand Down
17 changes: 15 additions & 2 deletions lightning-types/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ mod sealed {
// Byte 7
Trampoline | SimpleClose | SpliceProduction,
// Byte 8 - 16
,,,,,,,,,
ZeroReserve,
,,,,,,,,
// Byte 17
AnchorZeroFeeCommitmentsStaging,
// Byte 18
Expand Down Expand Up @@ -197,7 +198,8 @@ mod sealed {
// Byte 7
Trampoline | SimpleClose | SpliceProduction,
// Byte 8 - 16
,,,,,,,,,
ZeroReserve,
,,,,,,,,
// Byte 17
AnchorZeroFeeCommitmentsStaging,
// Byte 18
Expand Down Expand Up @@ -696,6 +698,17 @@ mod sealed {
supports_splicing_production,
requires_splicing_production
);
define_feature!(
65,
ZeroReserve,
[InitContext, NodeContext],
"Feature flags for zero reserve.",
set_zero_reserve_optional,
set_zero_reserve_required,
clear_zero_reserve,
supports_zero_reserve,
requires_zero_reserve
);
// By default, allocate enough bytes to cover up to Splice. Update this as new features are
// added which we expect to appear commonly across contexts.
pub(super) const MIN_FEATURES_ALLOCATION_BYTES: usize = 63_usize.div_ceil(8);
Expand Down
2 changes: 1 addition & 1 deletion lightning/src/events/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1657,7 +1657,7 @@ pub enum Event {
/// Furthermore, note that if [`ChannelTypeFeatures::supports_zero_conf`] returns true on this type,
/// the resulting [`ChannelManager`] will not be readable by versions of LDK prior to
/// 0.0.107. Channels setting this type also need to get manually accepted via
/// [`crate::ln::channelmanager::ChannelManager::accept_inbound_channel_from_trusted_peer_0conf`],
/// [`crate::ln::channelmanager::ChannelManager::accept_inbound_channel_from_trusted_peer`],
/// or will be rejected otherwise.
///
/// [`ChannelManager`]: crate::ln::channelmanager::ChannelManager
Expand Down
8 changes: 6 additions & 2 deletions lightning/src/ln/async_signer_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ fn do_test_open_channel(zero_conf: bool) {
Event::OpenChannelRequest { temporary_channel_id, .. } => {
nodes[1]
.node
.accept_inbound_channel_from_trusted_peer_0conf(
.accept_inbound_channel_from_trusted_peer(
temporary_channel_id,
&node_a_id,
0,
true,
false,
None,
)
.expect("Unable to accept inbound zero-conf channel");
Expand Down Expand Up @@ -387,10 +389,12 @@ fn do_test_funding_signed_0conf(signer_ops: Vec<SignerOp>) {
Event::OpenChannelRequest { temporary_channel_id, .. } => {
nodes[1]
.node
.accept_inbound_channel_from_trusted_peer_0conf(
.accept_inbound_channel_from_trusted_peer(
temporary_channel_id,
&node_a_id,
0,
true,
false,
None,
)
.expect("Unable to accept inbound zero-conf channel");
Expand Down
8 changes: 6 additions & 2 deletions lightning/src/ln/chanmon_update_fail_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3243,7 +3243,9 @@ fn do_test_outbound_reload_without_init_mon(use_0conf: bool) {
if use_0conf {
nodes[1]
.node
.accept_inbound_channel_from_trusted_peer_0conf(&chan_id, &node_a_id, 0, None)
.accept_inbound_channel_from_trusted_peer(
&chan_id, &node_a_id, 0, true, false, None,
)
.unwrap();
} else {
nodes[1].node.accept_inbound_channel(&chan_id, &node_a_id, 0, None).unwrap();
Expand Down Expand Up @@ -3353,7 +3355,9 @@ fn do_test_inbound_reload_without_init_mon(use_0conf: bool, lock_commitment: boo
if use_0conf {
nodes[1]
.node
.accept_inbound_channel_from_trusted_peer_0conf(&chan_id, &node_a_id, 0, None)
.accept_inbound_channel_from_trusted_peer(
&chan_id, &node_a_id, 0, true, false, None,
)
.unwrap();
} else {
nodes[1].node.accept_inbound_channel(&chan_id, &node_a_id, 0, None).unwrap();
Expand Down
Loading