ACINQ / eclair

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

Extensible Liquidity Ads #2848

Closed t-bast closed 1 month ago

t-bast commented 6 months ago

The initiator of open_channel2, tx_init_rbf and splice_init can request funding from the remote node. The non-initiator node will:

Liquidity ads are included in the node_announcement message, which lets buyers compare sellers and connect to sellers that provide rates they are comfortable with. They are also included in the init message which allows providing different rates to specific peers.

This implements https://github.com/lightning/bolts/pull/1153. We currently use the temporary tlv tag 1339 while we're waiting for feedback on the spec proposal.

codecov-commenter commented 2 months ago

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

Codecov Report

Attention: Patch coverage is 93.81443% with 24 lines in your changes missing coverage. Please review.

Project coverage is 86.06%. Comparing base (14a4ea4) to head (c77ff37). Report is 11 commits behind head on master.

Files with missing lines Patch % Lines
...re/src/main/scala/fr/acinq/eclair/NodeParams.scala 50.00% 9 Missing :warning:
...inq/eclair/channel/fsm/ChannelOpenDualFunded.scala 90.00% 5 Missing :warning:
...a/fr/acinq/eclair/wire/protocol/LiquidityAds.scala 92.18% 5 Missing :warning:
.../main/scala/fr/acinq/eclair/db/DualDatabases.scala 0.00% 4 Missing :warning:
...main/scala/fr/acinq/eclair/db/DbEventHandler.scala 50.00% 1 Missing :warning:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2848 +/- ## ========================================== + Coverage 85.98% 86.06% +0.08% ========================================== Files 219 220 +1 Lines 18538 19015 +477 Branches 786 818 +32 ========================================== + Hits 15939 16365 +426 - Misses 2599 2650 +51 ``` | [Files with missing lines](https://app.codecov.io/gh/ACINQ/eclair/pull/2848?dropdown=coverage&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/2848?src=pr&el=tree&filepath=eclair-core%2Fsrc%2Fmain%2Fscala%2Ffr%2Facinq%2Feclair%2FEclair.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL0VjbGFpci5zY2FsYQ==) | `56.61% <100.00%> (+0.18%)` | :arrow_up: | | [.../src/main/scala/fr/acinq/eclair/PluginParams.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2848?src=pr&el=tree&filepath=eclair-core%2Fsrc%2Fmain%2Fscala%2Ffr%2Facinq%2Feclair%2FPluginParams.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL1BsdWdpblBhcmFtcy5zY2FsYQ==) | `66.66% <ø> (ø)` | | | [...in/scala/fr/acinq/eclair/channel/ChannelData.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2848?src=pr&el=tree&filepath=eclair-core%2Fsrc%2Fmain%2Fscala%2Ffr%2Facinq%2Feclair%2Fchannel%2FChannelData.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2NoYW5uZWwvQ2hhbm5lbERhdGEuc2NhbGE=) | `100.00% <ø> (ø)` | | | [.../scala/fr/acinq/eclair/channel/ChannelEvents.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2848?src=pr&el=tree&filepath=eclair-core%2Fsrc%2Fmain%2Fscala%2Ffr%2Facinq%2Feclair%2Fchannel%2FChannelEvents.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2NoYW5uZWwvQ2hhbm5lbEV2ZW50cy5zY2FsYQ==) | `100.00% <100.00%> (ø)` | | | [...c/main/scala/fr/acinq/eclair/channel/Helpers.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2848?src=pr&el=tree&filepath=eclair-core%2Fsrc%2Fmain%2Fscala%2Ffr%2Facinq%2Feclair%2Fchannel%2FHelpers.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2NoYW5uZWwvSGVscGVycy5zY2FsYQ==) | `94.20% <100.00%> (-0.12%)` | :arrow_down: | | [...in/scala/fr/acinq/eclair/channel/fsm/Channel.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2848?src=pr&el=tree&filepath=eclair-core%2Fsrc%2Fmain%2Fscala%2Ffr%2Facinq%2Feclair%2Fchannel%2Ffsm%2FChannel.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2NoYW5uZWwvZnNtL0NoYW5uZWwuc2NhbGE=) | `85.40% <100.00%> (+0.20%)` | :arrow_up: | | [...inq/eclair/channel/fund/InteractiveTxBuilder.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2848?src=pr&el=tree&filepath=eclair-core%2Fsrc%2Fmain%2Fscala%2Ffr%2Facinq%2Feclair%2Fchannel%2Ffund%2FInteractiveTxBuilder.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2NoYW5uZWwvZnVuZC9JbnRlcmFjdGl2ZVR4QnVpbGRlci5zY2FsYQ==) | `92.18% <100.00%> (+0.51%)` | :arrow_up: | | [...cinq/eclair/channel/fund/InteractiveTxFunder.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2848?src=pr&el=tree&filepath=eclair-core%2Fsrc%2Fmain%2Fscala%2Ffr%2Facinq%2Feclair%2Fchannel%2Ffund%2FInteractiveTxFunder.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2NoYW5uZWwvZnVuZC9JbnRlcmFjdGl2ZVR4RnVuZGVyLnNjYWxh) | `92.90% <100.00%> (+0.42%)` | :arrow_up: | | [...c/main/scala/fr/acinq/eclair/db/pg/PgAuditDb.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2848?src=pr&el=tree&filepath=eclair-core%2Fsrc%2Fmain%2Fscala%2Ffr%2Facinq%2Feclair%2Fdb%2Fpg%2FPgAuditDb.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2RiL3BnL1BnQXVkaXREYi5zY2FsYQ==) | `99.73% <100.00%> (+0.04%)` | :arrow_up: | | [...cala/fr/acinq/eclair/db/sqlite/SqliteAuditDb.scala](https://app.codecov.io/gh/ACINQ/eclair/pull/2848?src=pr&el=tree&filepath=eclair-core%2Fsrc%2Fmain%2Fscala%2Ffr%2Facinq%2Feclair%2Fdb%2Fsqlite%2FSqliteAuditDb.scala&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ#diff-ZWNsYWlyLWNvcmUvc3JjL21haW4vc2NhbGEvZnIvYWNpbnEvZWNsYWlyL2RiL3NxbGl0ZS9TcWxpdGVBdWRpdERiLnNjYWxh) | `99.71% <100.00%> (+0.04%)` | :arrow_up: | | ... and [19 more](https://app.codecov.io/gh/ACINQ/eclair/pull/2848?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ) | | ... and [5 files with indirect coverage changes](https://app.codecov.io/gh/ACINQ/eclair/pull/2848/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ACINQ)