Commit 29628d5
committed
Announce public splice transactions
We now support splicing on public channels: once the splice transaction
is confirmed and locked on both sides, nodes will exchange announcement
signatures that allows them to create a `channel_announcement` that they
then broadcast to the network.
This requires reworking the data model to include the announcement and
the real `short_channel_id` in each commitment, which lets us cleanly
distinguish real `short_channel_id`s from aliases (which are set at the
channel level regardless of the current commitments).
The flow now becomes:
- when the funding transaction of a commitment confirms, we set the
corresponding real `short_channel_id` in that commitment
- if the channel is public and we've received `channel_ready` or
`splice_locked`, we send our `announcement_signatures`
- if we receive `announcement_signatures` for a commitment for which
the funding transaction is unconfirmed, we stash it and replay it
when the transaction confirms
- if we receive `announcement_signatures` for a confirmed commitment,
and we don't have a more recently announced commitment, we generate
a `channel_announcement`, store it with the commitment and update
our router data
When creating a `channel_update` for a public channel, we always use
the `short_channel_id` that matches the latest announcement we created.
This is very important to guarantee that nodes receiving our updates
will not discard them because they cannot match it to a channel.
For private channels, we stop allowing usage of the `short_channel_id`
for routing: `scid_alias` MUST be used, which ensures that the channel
utxo isn't revealed.
Note that when migrating to taproot channels, `splice_locked` will be
used to transmit nonces for the announcement signatures, which will be
compatible with the existing flow (and similarly, `channel_ready` will
be used for the initial funding transaction). They are retransmitted
on reconnection to ensure that the announcements can be generated.1 parent 8c4f001 commit 29628d5
File tree
77 files changed
+1923
-617
lines changed- eclair-core/src
- main/scala/fr/acinq/eclair
- channel
- fsm
- json
- payment/relay
- router
- wire
- internal/channel
- version0
- version1
- version2
- version3
- version4
- protocol
- test
- resources/nonreg/codecs
- 000003-DATA_NORMAL
- fundee
- funder
- 020002-DATA_NORMAL/funder
- 03000a-DATA_WAIT_FOR_CHANNEL_READY/funder
- 03000c-DATA_WAIT_FOR_DUAL_FUNDING_READY/funder
- 04000b-DATA_WAIT_FOR_CHANNEL_READY
- fundee
- funder
- 04000d-DATA_WAIT_FOR_DUAL_FUNDING_READY
- fundee
- funder
- 04000e-DATA_NORMAL
- announced
- splicing-private
- scala/fr/acinq/eclair
- channel
- states
- c
- e
- f
- g
- h
- db
- integration
- basic
- channel
- fixtures
- payment
- zeroconf
- io
- json
- payment
- relay
- router
- wire/internal/channel
- version3
- eclair-node/src/test
- resources/api
- scala/fr/acinq/eclair/api
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
77 files changed
+1923
-617
lines changedLines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
| 420 | + | |
421 | 421 | | |
422 | | - | |
423 | 422 | | |
424 | 423 | | |
425 | 424 | | |
426 | 425 | | |
427 | 426 | | |
428 | 427 | | |
429 | | - | |
| 428 | + | |
430 | 429 | | |
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
434 | 433 | | |
435 | 434 | | |
436 | 435 | | |
| 436 | + | |
| 437 | + | |
437 | 438 | | |
438 | 439 | | |
439 | 440 | | |
| |||
449 | 450 | | |
450 | 451 | | |
451 | 452 | | |
| 453 | + | |
452 | 454 | | |
453 | 455 | | |
454 | 456 | | |
455 | 457 | | |
| 458 | + | |
456 | 459 | | |
457 | 460 | | |
458 | 461 | | |
| 462 | + | |
459 | 463 | | |
460 | | - | |
| 464 | + | |
461 | 465 | | |
462 | 466 | | |
463 | 467 | | |
| |||
589 | 593 | | |
590 | 594 | | |
591 | 595 | | |
592 | | - | |
| 596 | + | |
593 | 597 | | |
594 | 598 | | |
595 | 599 | | |
| |||
622 | 626 | | |
623 | 627 | | |
624 | 628 | | |
625 | | - | |
| 629 | + | |
626 | 630 | | |
627 | 631 | | |
628 | | - | |
629 | | - | |
| 632 | + | |
630 | 633 | | |
631 | 634 | | |
632 | 635 | | |
633 | 636 | | |
634 | 637 | | |
| 638 | + | |
| 639 | + | |
635 | 640 | | |
636 | 641 | | |
637 | 642 | | |
| |||
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| |||
Lines changed: 75 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
281 | 288 | | |
282 | 289 | | |
283 | 290 | | |
| |||
367 | 374 | | |
368 | 375 | | |
369 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
370 | 405 | | |
371 | 406 | | |
372 | 407 | | |
| |||
732 | 767 | | |
733 | 768 | | |
734 | 769 | | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
735 | 777 | | |
736 | 778 | | |
737 | 779 | | |
| |||
740 | 782 | | |
741 | 783 | | |
742 | 784 | | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
743 | 789 | | |
744 | 790 | | |
745 | 791 | | |
| |||
810 | 856 | | |
811 | 857 | | |
812 | 858 | | |
| 859 | + | |
| 860 | + | |
813 | 861 | | |
814 | 862 | | |
815 | | - | |
816 | | - | |
| 863 | + | |
817 | 864 | | |
818 | 865 | | |
819 | 866 | | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
820 | 872 | | |
821 | 873 | | |
822 | 874 | | |
| |||
1155 | 1207 | | |
1156 | 1208 | | |
1157 | 1209 | | |
1158 | | - | |
| 1210 | + | |
1159 | 1211 | | |
1160 | 1212 | | |
1161 | 1213 | | |
| |||
1248 | 1300 | | |
1249 | 1301 | | |
1250 | 1302 | | |
1251 | | - | |
1252 | 1303 | | |
1253 | 1304 | | |
1254 | | - | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
1255 | 1316 | | |
1256 | 1317 | | |
1257 | 1318 | | |
| |||
1267 | 1328 | | |
1268 | 1329 | | |
1269 | 1330 | | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
1270 | 1339 | | |
1271 | 1340 | | |
1272 | 1341 | | |
| |||
0 commit comments