Skip to content

Update trampoline to use the official spec version - #688

Draft
t-bast wants to merge 5 commits into
masterfrom
trampoline-spec-version
Draft

Update trampoline to use the official spec version#688
t-bast wants to merge 5 commits into
masterfrom
trampoline-spec-version

Conversation

@t-bast

@t-bast t-bast commented Jul 16, 2024

Copy link
Copy Markdown
Member

We update our trampoline code to use the official values from the BOLTs. Note that we don't maintain backwards-compatibility with the experimental trampoline feature bit and types, which means that:

  • when paying to nodes that use the experimental version, we won't use trampoline and will fallback to trampoline-to-legacy
  • nodes that use the experimental version will not understand the official feature bit, so they will pay us with trampoline-to-legacy

I think this is a good trade-off to avoid the technical debt and risks associated with maintaining two versions of trampoline in parallel.

Note that ACINQ/eclair#2819 must be deployed on the ACINQ node before merging this PR.

@t-bast
t-bast force-pushed the trampoline-spec-version branch from c7a69c3 to 3e8b0dc Compare July 18, 2024 13:52
@t-bast
t-bast force-pushed the trampoline-spec-version branch from 3e8b0dc to a5e3e16 Compare August 9, 2024 10:02
@t-bast
t-bast force-pushed the trampoline-spec-version branch from 2a1e84d to b5764b0 Compare September 18, 2024 21:02
@t-bast
t-bast force-pushed the trampoline-spec-version branch 2 times, most recently from 6aeb170 to c43d447 Compare October 23, 2024 05:34
@t-bast
t-bast force-pushed the trampoline-spec-version branch 2 times, most recently from 627c493 to 8ccb161 Compare December 6, 2024 13:17
@t-bast
t-bast force-pushed the trampoline-spec-version branch from 8ccb161 to 94974e7 Compare March 3, 2025 09:53
@t-bast
t-bast force-pushed the trampoline-spec-version branch from 94974e7 to d6887f4 Compare April 2, 2025 09:32
t-bast added 5 commits August 28, 2026 12:55
We update the trampoline feature to match the official specification
from lightning/bolts#836.

We remove support for the previous version of trampoline, which means
that when paying nodes that use the experimental version, we will use
the trampoline-to-non-trampoline flow instead. Similarly, when older
nodes pay updated nodes, they won't understand the new trampoline
feature bit and will use the trampoline-to-non-trampoline flow.

We update the trampoline-to-non-trampoline flow to remove the unused
trampoline payload in the onion, which saves some space. Note that we
don't want to officially specify this scenario, as it leaks some data
about the recipient to the trampoline node. We rather wait for nodes
to either support trampoline or blinded paths, which fixes this issue.
We update our trampoline payments to blinded paths to match the official
specification from lightning/bolts#836.

The blinded paths and recipient features are included in the trampoline
onion, which potentially allows using multiple trampoline hops.

That was already what we were doing with experimental TLVs, so we simply
update the TLV values to match the spec values.
We add the ability to pay recipients that support trampoline *and*
blinded paths. We include the blinded path data in the trampoline
payloads for each node inside the blinded path. This doesn't reveal
unnecessary information to the trampoline node: this is specified in
details in lightning/bolts#836.
Add support for the trampoline failure messages added to the BOLTs.
We also add support for encrypting failures e2e using the trampoline
shared secrets on top of the outer onion shared secrets.
When the recipient supports blinded trampoline payments and uses the
same introduction node as our trampoline node, we mustn't add a hop
from our trampoline node to itself: we can directly use them as the
blinded path's trampoline introduction node.

This is what payments between mobile wallets using the same trampoline
node will look like.
@t-bast
t-bast force-pushed the trampoline-spec-version branch from d6887f4 to 89ca3af Compare August 28, 2026 13:01
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.

1 participant