Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
6d2c780
Make get_latest_mon_update_id a helper on TestChainMonitor
wpaulino Feb 6, 2026
9e2af0c
Hold in-flight monitor updates until background event processing
wpaulino Feb 4, 2026
9bb4043
Rustfmt ChannelManager::process_background_events
wpaulino Feb 5, 2026
508577a
Add missing ` to ChannelManager::send_payment docs.
TheBlueMatt Feb 1, 2026
231c076
Add a `custom` TLV read/write variant
TheBlueMatt Feb 1, 2026
b748a6e
Validate the `Router` is meeting MPP and max-fee limitations given
TheBlueMatt Feb 1, 2026
2ddf57b
f move validation into `Route`, also addressing other feedback
TheBlueMatt Feb 6, 2026
c5b213a
Include MPP payment amount in `RecipientOnionFields`
TheBlueMatt Feb 1, 2026
b910614
f rebase
TheBlueMatt Feb 6, 2026
07bf955
Replace existing MPP-total args with `RecipientOnionFields`
TheBlueMatt Feb 2, 2026
b9bd252
Add total-MPP-value storage in pending payments
TheBlueMatt Feb 2, 2026
c199e41
Allow BOLT 11 payments to be a part of a larger MPP payment
TheBlueMatt Feb 2, 2026
e108413
Use HTLC CLTV instead of onion CLTV values for payment claim timer
TheBlueMatt Feb 8, 2026
63ecd07
Fix trampoline onion encoding to match doc-declared CLTV rules
TheBlueMatt Feb 8, 2026
840ea7d
Clarify CLTV value selection in the first blinded hop marginally
TheBlueMatt Feb 9, 2026
3fbf67d
Add a `Path::total_cltv_expiry_delta` accessor
TheBlueMatt Feb 9, 2026
b050382
Validate CLTV somewhat in `Route::debug_assert_route_meets_params`
TheBlueMatt Feb 9, 2026
5a8e0f1
f rename var
TheBlueMatt Feb 10, 2026
4f2fb15
f correct trampoline tail to included blinded path excess cltv
TheBlueMatt Feb 10, 2026
3356ad8
f fix broken test
TheBlueMatt Feb 10, 2026
3213545
Rename `starting_htlc_offset` `cur_block_height` in onion building
TheBlueMatt Feb 10, 2026
c81d35b
[deleteme]: remove failing assertion in test (from upstream)
carlaKC Feb 12, 2026
f910000
ln/events: multiple htlcs in/out for trampoline PaymentForwarded
carlaKC Dec 16, 2025
27a4a3d
ln: make event optional in EmitEventAndFreeOtherChannel
carlaKC Dec 16, 2025
9b59d1a
ln/refactor: rename EmitEventAndFreeOtherChannel to note optional event
carlaKC Jan 7, 2026
889f321
ln+events: allow multiple prev_channel_id in HTLCHandlingFailed
carlaKC Jan 7, 2026
8b472a2
events: add TrampolineForward variant to HTLCHandlingFailureType
carlaKC Jan 6, 2026
1467973
ln: add TrampolineForward SendHTLCId variant
carlaKC Dec 2, 2025
e759031
ln: add TrampolineForward variant to HTLCSource enum
a-mpch Aug 22, 2025
5508b50
ln: add failure_type helper to HTLCSource for HTLCHandlingFailureType
carlaKC Feb 11, 2026
68a6bc5
ln/refactor: add claim funds for htlc forward helper
carlaKC Dec 16, 2025
63b6592
ln/refactor: pass closure to create PaymentForwarded event
carlaKC Jan 6, 2026
e417a71
ln: add trampoline routing payment claiming
carlaKC Jan 6, 2026
8e4491f
ln/refactor: add blinded forwarding failure helper function
carlaKC Nov 20, 2025
0ba0cfb
ln: add trampoline routing failure handling
carlaKC Dec 1, 2025
04b48e8
ln/refactor: extract channelmonitor recovery to external helper
carlaKC Feb 9, 2026
d3a8f7b
ln: add channel monitor recovery for trampoline forwards
carlaKC Feb 9, 2026
b4a5793
ln/refactor: move outgoing payment replay code into helper function
carlaKC Jan 15, 2026
74ef293
ln: handle trampoline claims on restart
carlaKC Jan 16, 2026
3277d3e
ln: store incoming mpp data in PendingHTLCRouting
carlaKC Jan 27, 2026
0ce88d9
ln: store next trampoline amount and cltv in PendingHTLCRouting
carlaKC Feb 10, 2026
2e40b54
ln: use outer onion cltv values in PendingHTLCInfo for trampoline
carlaKC Feb 10, 2026
7da3191
ln: use outer onion values for trampoline NextPacketDetails
carlaKC Feb 12, 2026
5f80287
ln: use total_msat to calculate the amount for our next trampoline
carlaKC Feb 17, 2026
e6c8c84
ln: add trampoline forward info to PendingOutboundPayment::Retryable
carlaKC Jan 16, 2026
6e037ba
ln: thread trampoline routing information through payment methods
carlaKC Feb 10, 2026
fd4da12
ln: add blinding point to new_trampoline_entry
carlaKC Feb 10, 2026
4a6817c
ln function to build trampoline forwarding onions
carlaKC Jan 28, 2026
8825170
ln: support trampoline in send_payment_along_path
carlaKC Feb 11, 2026
a14ddb6
ln: add send trampoline payment functionality
carlaKC Jan 16, 2026
c5743c1
ln/refactor: surface error data in DecodedOnionData for Trampolines
carlaKC Feb 12, 2026
11479fb
[wip] ln: add trampoline htlc failure logic to outbound payments
carlaKC Feb 9, 2026
c8e9036
ln: add claim_trampoline_forward to mark trampoline complete
carlaKC Feb 18, 2026
04e48da
ln: handle trampoline payments in finalize_claims
carlaKC Feb 18, 2026
3bf6a4b
ln/refactor: move mpp timeout check into helper function
carlaKC Feb 10, 2026
7b27414
ln/refactor: move on chain timeout check into claimable htlc
carlaKC Jan 22, 2026
790711c
[wip]: add Trampoline variant to OnionPayload
carlaKC Jan 23, 2026
2ac1652
[wip]: add awaiting_trampoline_forwards to accumulate inbound MPP
carlaKC Jan 22, 2026
73b1190
ln/refactor: move checks on incoming mpp accumulation into method
carlaKC Feb 11, 2026
b0d6498
ln: handle claimable htlcs for payments in dedicated method
carlaKC Jan 23, 2026
5fc1e3e
ln: move receive-specific failures into fail_htlc macro
carlaKC Feb 12, 2026
4af63a9
[wip]: handling function for trampoline dispatch
carlaKC Feb 12, 2026
a9b2f42
ln: only fail trampoline payments backwards when payment state ready
carlaKC Feb 12, 2026
3301841
ln: claim trampoline payment on completion
carlaKC Feb 18, 2026
773913e
ln/refactor: pass minimum delta into check_incoming_htlc_cltv
carlaKC Feb 12, 2026
597d667
ln: process added trampoline htlcs with CLTV validation
carlaKC Jan 16, 2026
da82e69
ln: use correct blinding point for trampoline payload decodes
carlaKC Feb 2, 2026
4709888
ln/test: only use replacement onion in trampoline tests when needed
carlaKC Feb 10, 2026
5e78eea
[deleteme]: remove assertion that fails on unblinded test
carlaKC Feb 3, 2026
0bfc08a
ln/test: add coverage for blinded and unblinded trampoline forwarding
carlaKC Feb 10, 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: 2 additions & 2 deletions fuzz/src/chanmon_consistency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ fn send_payment(
}],
route_params: Some(route_params.clone()),
};
let onion = RecipientOnionFields::secret_only(payment_secret);
let onion = RecipientOnionFields::secret_only(payment_secret, amt);
let res = source.send_payment_with_route(route, payment_hash, onion, payment_id);
match res {
Err(err) => {
Expand Down Expand Up @@ -642,7 +642,7 @@ fn send_hop_payment(
}],
route_params: Some(route_params.clone()),
};
let onion = RecipientOnionFields::secret_only(payment_secret);
let onion = RecipientOnionFields::secret_only(payment_secret, amt);
let res = source.send_payment_with_route(route, payment_hash, onion, payment_id);
match res {
Err(err) => {
Expand Down
4 changes: 2 additions & 2 deletions fuzz/src/full_stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ pub fn do_test(mut data: &[u8], logger: &Arc<dyn Logger>) {
payments_sent += 1;
let _ = channelmanager.send_payment(
payment_hash,
RecipientOnionFields::spontaneous_empty(),
RecipientOnionFields::spontaneous_empty(final_value_msat),
PaymentId(payment_hash.0),
params,
Retry::Attempts(2),
Expand All @@ -763,7 +763,7 @@ pub fn do_test(mut data: &[u8], logger: &Arc<dyn Logger>) {
payments_sent += 1;
let _ = channelmanager.send_payment(
payment_hash,
RecipientOnionFields::secret_only(payment_secret),
RecipientOnionFields::secret_only(payment_secret, final_value_msat),
PaymentId(payment_hash.0),
params,
Retry::Attempts(2),
Expand Down
8 changes: 4 additions & 4 deletions lightning-liquidity/tests/lsps2_integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1332,14 +1332,14 @@ fn client_trusts_lsp_end_to_end_test() {

let total_fee_msat = match service_events[0].clone() {
Event::PaymentForwarded {
prev_node_id,
next_node_id,
ref prev_htlcs,
ref next_htlcs,
skimmed_fee_msat,
total_fee_earned_msat,
..
} => {
assert_eq!(prev_node_id, Some(payer_node_id));
assert_eq!(next_node_id, Some(client_node_id));
assert_eq!(prev_htlcs[0].node_id, Some(payer_node_id));
assert_eq!(next_htlcs[0].node_id, Some(client_node_id));
service_handler.payment_forwarded(channel_id, skimmed_fee_msat.unwrap_or(0)).unwrap();
Some(total_fee_earned_msat.unwrap() - skimmed_fee_msat.unwrap())
},
Expand Down
6 changes: 3 additions & 3 deletions lightning-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ fn process_fields(group: Group) -> proc_macro::TokenStream {
if let TokenTree::Group(group) = ty_info {
let first_group_tok = group.stream().into_iter().next().unwrap();
if let TokenTree::Ident(ident) = first_group_tok {
if ident.to_string() == "legacy" {
if ident.to_string() == "legacy" || ident.to_string() == "custom" {
continue;
}
}
Expand All @@ -155,13 +155,13 @@ fn process_fields(group: Group) -> proc_macro::TokenStream {
computed_fields
}

/// Scans a match statement for legacy fields which should be skipped.
/// Scans a match statement for legacy or custom fields which should be skipped.
///
/// This is used internally in LDK's TLV serialization logic and is not expected to be used by
/// other crates.
///
/// Wraps a `match self {..}` statement and scans the fields in the match patterns (in the form
/// `ref $field_name: $field_ty`) for types marked `legacy`, skipping those fields.
/// `ref $field_name: $field_ty`) for types marked `legacy` or `custom`, skipping those fields.
///
/// Specifically, it expects input like the following, simply dropping `field3` and the
/// `: $field_ty` after each field name.
Expand Down
4 changes: 3 additions & 1 deletion lightning/src/chain/channelmonitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2794,6 +2794,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitorImpl<Signer> {
let outbound_payment = match source {
None => panic!("Outbound HTLCs should have a source"),
Some(&HTLCSource::PreviousHopData(_)) => false,
Some(&HTLCSource::TrampolineForward { .. }) => false,
Some(&HTLCSource::OutboundRoute { .. }) => true,
};
return Some(Balance::MaybeTimeoutClaimableHTLC {
Expand Down Expand Up @@ -3006,6 +3007,7 @@ impl<Signer: EcdsaChannelSigner> ChannelMonitor<Signer> {
let outbound_payment = match source {
None => panic!("Outbound HTLCs should have a source"),
Some(HTLCSource::PreviousHopData(_)) => false,
Some(HTLCSource::TrampolineForward { .. }) => false,
Some(HTLCSource::OutboundRoute { .. }) => true,
};
if outbound_payment {
Expand Down Expand Up @@ -6845,7 +6847,7 @@ mod tests {
// the update through to the ChannelMonitor which will refuse it (as the channel is closed).
let (route, payment_hash, _, payment_secret) = get_route_and_payment_hash!(nodes[1], nodes[0], 100_000);
nodes[1].node.send_payment_with_route(route, payment_hash,
RecipientOnionFields::secret_only(payment_secret), PaymentId(payment_hash.0)
RecipientOnionFields::secret_only(payment_secret, 100_000), PaymentId(payment_hash.0)
).unwrap();
check_added_monitors(&nodes[1], 1);

Expand Down
Loading