-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update trampoline to use official spec values #2819
Draft
t-bast
wants to merge
3
commits into
master
Choose a base branch
from
trampoline-spec-version
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #2819 +/- ##
==========================================
+ Coverage 85.86% 85.96% +0.09%
==========================================
Files 216 217 +1
Lines 18228 18256 +28
Branches 772 778 +6
==========================================
+ Hits 15652 15694 +42
+ Misses 2576 2562 -14
|
t-bast
force-pushed
the
trampoline-spec-version
branch
from
March 12, 2024 08:52
ee178c7
to
bd76a24
Compare
t-bast
force-pushed
the
trampoline-spec-version
branch
from
July 11, 2024 15:56
bd76a24
to
d33f661
Compare
t-bast
force-pushed
the
trampoline-spec-version
branch
2 times, most recently
from
November 27, 2024 15:13
cd8e468
to
3f459d3
Compare
t-bast
force-pushed
the
trampoline-spec-version
branch
from
November 29, 2024 16:44
b781e95
to
3d5a8fe
Compare
t-bast
force-pushed
the
trampoline-spec-version
branch
4 times, most recently
from
December 5, 2024 14:45
0291b8e
to
f8b65bb
Compare
We add support for the official version of trampoline payments, as specified in lightning/bolts#836. We keep supporting trampoline payments that use the legacy protocol to allow a smooth transition. We hardcode the legacy feature bit 149 in a few places to make this work, which is a bit hacky but simple and should be removed 6 months after releasing the official version. We also keep supporting payments from trampoline wallets to nodes that don't support trampoline: this is bad from a privacy standpoint, but will be fixed when recipients start supporting Bolt 12.
We add support for trampoline payments to blinded recipients, where each node of the blinded path is used as trampoline node. This is particularly useful to include custom TLVs from the payer to the recipient.
t-bast
force-pushed
the
trampoline-spec-version
branch
from
December 5, 2024 15:07
f8b65bb
to
90fb0c1
Compare
When returning trampoline failures for the payer (the creator of the trampoline onion), they must be encrypted using the sphinx shared secret of the trampoline onion. When relaying a trampoline payment, we re-wrap the (peeled) trampoline onion inside a payment onion: if we receive a failure for the outgoing payment, it can be either coming from before the next trampoline node or after them. If it's coming from before, we can decrypt that error using the shared secrets we created for the payment onion: depending on the error, we can then return our own error to the payer. If it's coming from after the next trampoline onion, it will be encrypted for the payer, so we cannot decrypt it. We must peel the shared secrets of our payment onion, and then re-encrypted with the shared secret of the incoming trampoline onion. This way only the payer will be able to decrypt the failure, which is relayed back through each intermediate trampoline node.
t-bast
force-pushed
the
trampoline-spec-version
branch
from
December 6, 2024 13:18
90fb0c1
to
c333cd4
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use the feature bit and tlvs defined in the official spec PR (lightning/bolts#836) and add support for:
We also add the official spec test vectors.
We keep backwards-compatibility for current wallet users relying on the legacy trampoline protocol, but will likely drop support at some point. We should notify the Electrum folks and give them enough time to migrate to the new protocol before dropping support for the legacy one.