Skip to content

Conversation

rustyrussell
Copy link
Collaborator

We use the same "encrypted blob inside onion" trick as blinded paths, but using TLV 1, so it's ignored for backward compatibility. In this case, we need to tell the trampoline the payment_secret (and optional payment_metadata) to put in the onion, which gives it the possibility of probing, or even underpaying amountless invoices. However, if the final hop does support TLV 1, it can detect interference and refuse attempts to pay that same invoice (since there's a dishonest trampoline), providing some honesty incentive.

@rustyrussell rustyrussell requested a review from t-bast September 22, 2025 14:40
We use the same "encrypted blob inside onion" trick as blinded paths, but using TLV 1, so it's ignored for backward compatibility.  In this case, we need to tell the trampoline the `payment_secret` (and optional `payment_metadata`) to put in the onion, which gives it the possibility of probing, or even underpaying amountless invoices.  However, if the final hop *does* support TLV 1, it can detect interference and refuse attempts to pay that same invoice (since there's a dishonest trampoline), providing *some* honesty incentive.

Signed-off-by: Rusty Russell <[email protected]>
…itramp field.

We use the trick that the payload `payment_secret` we tell the final trampoline is actually
the hash of the real payment secret.  This means the final node (if it understands minitramp)
*knows* that minitramp is being used, and can penalize that case too.

Signed-off-by: Rusty Russell <[email protected]>
It doesn't seem anyone actually uses this, so specify it more simply.

Signed-off-by: Rusty Russell <[email protected]>
And steal @t-bast's trampoline error codes.

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell
Copy link
Collaborator Author

There's still an issue with errors being visible to the trampolines. One option is to have forwarding trampolines double-encrypt their error returns (using a key in metadata). But needs to be done carefully: it can be used to determine if a node supports trampoline, which allows a malicious trampoline to cheat safely if it knows the final recipient does not support trampoline. Though a node maybe could support trampoline for payments, but not for forwarding?

@t-bast
Copy link
Collaborator

t-bast commented Sep 24, 2025

However, if the final hop does support TLV 1

Since this requires a change in the recipient's software, isn't it just simpler if that change adds support for decrypting a trampoline onion? The "official" trampoline encryption is very simple to implement since it directly re-uses the existing onion encryption scheme without any tweaks, compared to this proposal...

To be honest I don't understand why we'd want something that can be rushed slightly faster than trampoline (and I'm not even sure this would be quicker to rollout since trampoline is already implemented in eclair and almost fully implemented in LDK), rather than starting to rollout the full trampoline feature, which will take whatever time is needed (it's been more than 5 years since it was proposed, which shows we're not in a rush to get it deployed in the next 6 months)?

@t-bast
Copy link
Collaborator

t-bast commented Sep 24, 2025

For reference, the temporary way to route trampoline payments to non-trampoline recipients is specified here: lightning/blips#60

@rustyrussell
Copy link
Collaborator Author

I think this is much simpler, though? But I'll know more once I've implemented it...

@t-bast
Copy link
Collaborator

t-bast commented Oct 2, 2025

I'm honestly not sure it is, or just marginally simpler, trampoline is much simpler to implement than people who haven't tried it usually think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants