Skip to content
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

WIP: Decrypt inbound Trampoline onions #3585

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

arik-so
Copy link
Contributor

@arik-so arik-so commented Feb 3, 2025

This is a WIP that depends on #3386 and #3579.

@arik-so arik-so force-pushed the arik/trampoline/inbound-parsing branch 2 times, most recently from 098ccea to 8127bc5 Compare February 10, 2025 08:39
In a subsequent commit, we will be storing `TrampolineOnionPacket`s
within `PendingHTLCRouting`, requiring that they be serialized for
storage. To do so, `RequiredWrapper`'s requirements must be loosened to
only require `LengthReadable` instead of `Readable`.
Forwarding Trampoline packets requires storing their shared secrets on
top of the outer onion's shared secrets, as well as referencing the
next hop by its node ID as opposed to by an SCID. We modify
PendingHTLCRouting to adequately represent this information.
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 12.06897% with 153 lines in your changes missing coverage. Please review.

Project coverage is 88.41%. Comparing base (ca40276) to head (63608c2).

Files with missing lines Patch % Lines
lightning/src/ln/msgs.rs 1.96% 99 Missing and 1 partial ⚠️
lightning/src/ln/onion_payment.rs 11.76% 30 Missing ⚠️
lightning/src/ln/onion_utils.rs 0.00% 18 Missing ⚠️
lightning/src/ln/channelmanager.rs 72.22% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3585      +/-   ##
==========================================
- Coverage   88.56%   88.41%   -0.15%     
==========================================
  Files         149      149              
  Lines      115770   115925     +155     
  Branches   115770   115925     +155     
==========================================
- Hits       102530   102499      -31     
- Misses      10737    10912     +175     
- Partials     2503     2514      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

In order to move the Trampoline-specific data from the onion decryption
layer to the PendingHTLCRouting enum, we need to make the
NextPacketDetails more descriptive, which we do here by virtue of
converting the outbound_scid field into an enum than is more expressive
in its Trampoline variant.
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