Skip to content

Relay onion messages to compact node id#2821

Merged
thomash-acinq merged 5 commits into
masterfrom
relay-message-to-compact-nodeid
Feb 19, 2024
Merged

Relay onion messages to compact node id#2821
thomash-acinq merged 5 commits into
masterfrom
relay-message-to-compact-nodeid

Conversation

@thomash-acinq
Copy link
Copy Markdown
Contributor

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.

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.
@thomash-acinq thomash-acinq force-pushed the relay-message-to-compact-nodeid branch from bcd5357 to 4e9d597 Compare February 12, 2024 19:12
Comment thread eclair-core/src/main/scala/fr/acinq/eclair/EncodedNodeId.scala
Comment thread eclair-core/src/main/scala/fr/acinq/eclair/io/MessageRelay.scala Outdated
Comment thread eclair-core/src/main/scala/fr/acinq/eclair/message/OnionMessages.scala Outdated
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 15, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 83.33333% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.95%. Comparing base (e66e6d2) to head (3476289).
⚠️ Report is 330 commits behind head on master.

Files with missing lines Patch % Lines
...c/main/scala/fr/acinq/eclair/io/MessageRelay.scala 80.76% 5 Missing ⚠️
...src/main/scala/fr/acinq/eclair/EncodedNodeId.scala 66.66% 1 Missing ⚠️
.../scala/fr/acinq/eclair/message/OnionMessages.scala 66.66% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            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 with missing lines Coverage Δ
...ir-core/src/main/scala/fr/acinq/eclair/Setup.scala 75.14% <100.00%> (ø)
...-core/src/main/scala/fr/acinq/eclair/io/Peer.scala 87.71% <100.00%> (ø)
...rc/main/scala/fr/acinq/eclair/io/Switchboard.scala 85.71% <100.00%> (ø)
...c/main/scala/fr/acinq/eclair/message/Postman.scala 93.33% <100.00%> (ø)
...cinq/eclair/payment/receive/MultiPartHandler.scala 93.33% <ø> (ø)
...a/fr/acinq/eclair/wire/protocol/MessageOnion.scala 92.50% <ø> (ø)
...la/fr/acinq/eclair/wire/protocol/OfferCodecs.scala 100.00% <100.00%> (ø)
...ala/fr/acinq/eclair/wire/protocol/OfferTypes.scala 96.36% <ø> (ø)
.../fr/acinq/eclair/wire/protocol/RouteBlinding.scala 97.72% <100.00%> (+0.05%) ⬆️
...src/main/scala/fr/acinq/eclair/EncodedNodeId.scala 66.66% <66.66%> (ø)
... and 2 more

... and 25 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good

Comment thread eclair-core/src/main/scala/fr/acinq/eclair/io/MessageRelay.scala Outdated
Comment thread eclair-core/src/main/scala/fr/acinq/eclair/message/OnionMessages.scala Outdated
@thomash-acinq
Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Member

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thomash-acinq thomash-acinq merged commit 86c4837 into master Feb 19, 2024
@thomash-acinq thomash-acinq deleted the relay-message-to-compact-nodeid branch February 19, 2024 15:25
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.

3 participants