ACINQ / eclair

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

Add support for sciddir_or_pubkey #2752

Closed thomash-acinq closed 10 months ago

thomash-acinq commented 11 months ago

Offers (https://github.com/lightning/bolts/pull/798) allow nodes to be identified using either the public key or a pair channel id and direction. The goal is to save bytes as channel id and direction only use 9 bytes instead of 33 for a public key.

codecov-commenter commented 11 months ago

Codecov Report

Merging #2752 (0500259) into master (12adf87) will increase coverage by 0.03%. Report is 6 commits behind head on master. The diff coverage is 90.66%.

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2752 +/- ## ========================================== + Coverage 85.82% 85.85% +0.03% ========================================== Files 216 216 Lines 18126 18158 +32 Branches 771 760 -11 ========================================== + Hits 15556 15590 +34 + Misses 2570 2568 -2 ``` | [Files](https://app.codecov.io/gh/ACINQ/eclair/pull/2752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ) | Coverage Δ | | |---|---|---| | [...r-core/src/main/scala/fr/acinq/eclair/Eclair.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL0VjbGFpci5zY2FsYQ==) | `55.69% <100.00%> (ø)` | | | [...n/scala/fr/acinq/eclair/json/JsonSerializers.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2pzb24vSnNvblNlcmlhbGl6ZXJzLnNjYWxh) | `96.42% <ø> (ø)` | | | [.../scala/fr/acinq/eclair/message/OnionMessages.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL21lc3NhZ2UvT25pb25NZXNzYWdlcy5zY2FsYQ==) | `80.00% <100.00%> (+0.28%)` | :arrow_up: | | [.../scala/fr/acinq/eclair/payment/Bolt12Invoice.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL3BheW1lbnQvQm9sdDEySW52b2ljZS5zY2FsYQ==) | `97.50% <100.00%> (ø)` | | | [...a/fr/acinq/eclair/payment/offer/OfferManager.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL3BheW1lbnQvb2ZmZXIvT2ZmZXJNYW5hZ2VyLnNjYWxh) | `92.59% <100.00%> (ø)` | | | [...cinq/eclair/payment/receive/MultiPartHandler.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL3BheW1lbnQvcmVjZWl2ZS9NdWx0aVBhcnRIYW5kbGVyLnNjYWxh) | `93.33% <ø> (ø)` | | | [...scala/fr/acinq/eclair/payment/send/Recipient.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL3BheW1lbnQvc2VuZC9SZWNpcGllbnQuc2NhbGE=) | `98.52% <100.00%> (ø)` | | | [...src/main/scala/fr/acinq/eclair/router/Router.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL3JvdXRlci9Sb3V0ZXIuc2NhbGE=) | `94.39% <100.00%> (-0.39%)` | :arrow_down: | | [...la/fr/acinq/eclair/wire/protocol/OfferCodecs.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2752?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/2752?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL3dpcmUvcHJvdG9jb2wvT2ZmZXJUeXBlcy5zY2FsYQ==) | `96.36% <100.00%> (ø)` | | | ... and [4 more](https://app.codecov.io/gh/ACINQ/eclair/pull/2752?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ) | | ... and [12 files with indirect coverage changes](https://app.codecov.io/gh/ACINQ/eclair/pull/2752/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ)
t-bast commented 10 months ago

Can you rebase this PR before I start reviewing it?

thomash-acinq commented 10 months ago

Rebased

thomash-acinq commented 10 months ago

I've added your commits, I've just changed two comments which I thought could be misleading.