ACINQ / eclair

A scala implementation of the Lightning Network.
Apache License 2.0
1.24k stars 266 forks source link

Relay onion messages to compact node id #2821

Closed thomash-acinq closed 8 months ago

thomash-acinq commented 8 months ago

To save space, blinded routes may use a compact node id (scid + direction instead of public key) as an introduction node. When using such a compact route, the sender must use it's knowledge of the network to convert that to a public key, however trampoline users don't have that knowledge, they must transmit the compact route to the trempoline provider. We extend the spec to allow compact node ids in the next_node_id field.

codecov-commenter commented 8 months ago

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (e66e6d2) 85.86% compared to head (3476289) 85.95%. Report is 7 commits behind head on master.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2821 +/- ## ========================================== + Coverage 85.86% 85.95% +0.08% ========================================== Files 216 219 +3 Lines 18228 18429 +201 Branches 772 772 ========================================== + Hits 15652 15840 +188 - Misses 2576 2589 +13 ``` | [Files](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ) | Coverage Δ | | |---|---|---| | [...ir-core/src/main/scala/fr/acinq/eclair/Setup.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL1NldHVwLnNjYWxh) | `75.14% <100.00%> (ø)` | | | [...-core/src/main/scala/fr/acinq/eclair/io/Peer.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2lvL1BlZXIuc2NhbGE=) | `87.71% <100.00%> (ø)` | | | [...rc/main/scala/fr/acinq/eclair/io/Switchboard.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2lvL1N3aXRjaGJvYXJkLnNjYWxh) | `85.71% <100.00%> (ø)` | | | [...c/main/scala/fr/acinq/eclair/message/Postman.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL21lc3NhZ2UvUG9zdG1hbi5zY2FsYQ==) | `93.33% <100.00%> (ø)` | | | [...cinq/eclair/payment/receive/MultiPartHandler.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL3BheW1lbnQvcmVjZWl2ZS9NdWx0aVBhcnRIYW5kbGVyLnNjYWxh) | `93.33% <ø> (ø)` | | | [...a/fr/acinq/eclair/wire/protocol/MessageOnion.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL3dpcmUvcHJvdG9jb2wvTWVzc2FnZU9uaW9uLnNjYWxh) | `92.50% <ø> (ø)` | | | [...la/fr/acinq/eclair/wire/protocol/OfferCodecs.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL3dpcmUvcHJvdG9jb2wvT2ZmZXJDb2RlY3Muc2NhbGE=) | `100.00% <100.00%> (ø)` | | | [...ala/fr/acinq/eclair/wire/protocol/OfferTypes.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL3dpcmUvcHJvdG9jb2wvT2ZmZXJUeXBlcy5zY2FsYQ==) | `96.36% <ø> (ø)` | | | [.../fr/acinq/eclair/wire/protocol/RouteBlinding.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL3dpcmUvcHJvdG9jb2wvUm91dGVCbGluZGluZy5zY2FsYQ==) | `97.72% <100.00%> (+0.05%)` | :arrow_up: | | [...src/main/scala/fr/acinq/eclair/EncodedNodeId.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL0VuY29kZWROb2RlSWQuc2NhbGE=) | `66.66% <66.66%> (ø)` | | | ... and [2 more](https://app.codecov.io/gh/ACINQ/eclair/pull/2821?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ) | | ... and [25 files with indirect coverage changes](https://app.codecov.io/gh/ACINQ/eclair/pull/2821/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ)
thomash-acinq commented 8 months ago

Merged #2826 and added some TODO to correctly forward messages to ourself.