lightningnetwork / lightning-onion

Onion Routed Micropayments for the Lightning Network
MIT License
396 stars 125 forks source link

multi: Route blinding #57

Closed ellemouton closed 11 months ago

ellemouton commented 2 years ago

This PR adds the changes that higher layers will need in order to take advantage of route blinding as defined in the spec proposal

Note that callers of this code will need to know how to extract the next_blinding_point (if the caller is the introduction node in the route) and next_blinding_override points from the onion packet payloads.

carlaKC commented 2 years ago

Also a meta thing that I noticed while using this PR. When this is merged I think that it would make sense to make two tags: one on the blinded route commit, and one on the final merge/full PR.

Reason being that code that imports this change and lnd requires lnd to be upgraded to use the new arg in ProcessOnionPacket (which requires lnd to update its dependency as well). Adding an extra tag to easily allow code to just point to the blinded paths stuff could be useful in avoiding modhell/ requiring lnd to update its dep prematurely. Just a note for future-selves.

ellemouton commented 1 year ago

making a note here for myself to update the PR to point to the latest state of the spec PR & its test vectors

ellemouton commented 1 year ago

ah ok, looks like the updated test vectors still pass with the existing code. I think the main changes were related to the tlv fields/types which does not affect this pr since pr assumes the tlvs are already encoded. Will double check this later though

lightninglabs-deploy commented 1 year ago

@ellemouton, remember to re-request review from reviewers when ready

ellemouton commented 1 year ago

!lightninglabs-deploy mute

carlaKC commented 1 year ago

Just needs rebase on ca23184 - when I import this to LND now some tests fail.

Rebase-beg when you have a minute!

ellemouton commented 1 year ago

done! cc @carlaKC