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

Implement latest route blinding spec updates #2408

Merged
merged 4 commits into from Sep 12, 2022

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Sep 2, 2022

This is best reviewed commit-by-commit: each commit contains a detailed description of what it achieves. This is a pre-requisite for #2395 and #2401, since it introduces a new total_amount_msat tlv which lets us get rid of the payment_data field.

The first and third commits deserve more tests, but they cannot be added now since we're lacking the utilities to send to a blinded route. We will add those tests in a future PR, once all the components for blinded payments are available.

This implements the changes to lightning/bolts#765 after commit lightning/bolts@485c2b1 (included).

@codecov-commenter
Copy link

Codecov Report

Merging #2408 (de20da9) into master (40b83a7) will decrease coverage by 0.02%.
The diff coverage is 86.35%.

@@            Coverage Diff             @@
##           master    #2408      +/-   ##
==========================================
- Coverage   84.79%   84.76%   -0.03%     
==========================================
  Files         199      199              
  Lines       15614    15643      +29     
  Branches      656      645      -11     
==========================================
+ Hits        13240    13260      +20     
- Misses       2374     2383       +9     
Impacted Files Coverage Δ
...in/scala/fr/acinq/eclair/channel/ChannelData.scala 98.11% <ø> (ø)
...n/scala/fr/acinq/eclair/json/JsonSerializers.scala 95.12% <ø> (ø)
...r/acinq/eclair/payment/send/PaymentLifecycle.scala 86.93% <ø> (ø)
.../fr/acinq/eclair/wire/internal/CommandCodecs.scala 100.00% <ø> (ø)
...la/fr/acinq/eclair/wire/protocol/OfferCodecs.scala 100.00% <ø> (+3.17%) ⬆️
...a/fr/acinq/eclair/wire/protocol/OnionRouting.scala 66.66% <0.00%> (-8.34%) ⬇️
...fr/acinq/eclair/wire/protocol/FailureMessage.scala 82.85% <50.00%> (-2.44%) ⬇️
.../scala/fr/acinq/eclair/payment/PaymentPacket.scala 70.32% <63.07%> (-3.54%) ⬇️
.../scala/fr/acinq/eclair/message/OnionMessages.scala 76.36% <73.52%> (-2.81%) ⬇️
.../scala/fr/acinq/eclair/payment/relay/Relayer.scala 89.13% <75.00%> (-1.78%) ⬇️
... and 23 more

And translate downstream errors when we're inside a blinded route, with
a random delay when we're the introduction point.
Add more restrictions to the tlvs that can be used inside blinded payloads.
And reject blinded payments when the feature is disabled.
@t-bast t-bast merged commit 09f1940 into master Sep 12, 2022
@t-bast t-bast deleted the relay-blinded-payment-update branch September 12, 2022 15:47
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.

None yet

3 participants