mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
4628e3ace8
Update the lightningd <-> channeld interface with lots of new commands to needed to facilitate spicing. Implement the channeld splicing protocol leveraging the interactivetx protocol. Implement lightningd’s channel_control to support channeld in its splicing efforts. Changelog-Added: Added the features to enable splicing & resizing of active channels.
16 KiB
16 KiB
1 | #include <bitcoin/psbt.h> |
---|---|
2 | #include <bitcoin/tx.h> |
3 | #include <channeld/inflight.h> |
4 | #include <common/bip32.h> |
5 | #include <common/blockheight_states.h> |
6 | #include <common/cryptomsg.h> |
7 | #include <common/channel_config.h> |
8 | #include <common/channel_id.h> |
9 | #include <common/channel_type.h> |
10 | #include <common/derive_basepoints.h> |
11 | #include <common/features.h> |
12 | #include <common/fee_states.h> |
13 | # Begin! (passes gossipd-client fd) |
14 | # master->channeld funding hit new depth(funding locked if >= lock depth) |
15 | # alias != NULL if zeroconf and short_channel_id == NULL |
16 | # short_channel_id != NULL once we have 3+ confirmations |
17 | # Tell channel to offer this htlc |
18 | # Reply; synchronous since IDs have to increment. |
19 | # Empty failure message means success. |
20 | # Main daemon found out the preimage for an HTLC |
21 | #include <bitcoin/preimage.h> |
22 | # Main daemon says HTLC failed |
23 | # When we receive channel_ready. |
24 | # When we receive funding_locked. |
25 | #include <common/penalty_base.h> |
26 | # RCVD_ADD_COMMIT: we're now committed to their new offered HTLCs. |
27 | # RCVD_REMOVE_COMMIT: we're now no longer committed to these HTLCs. |
28 | # Inflight splice commitments |
29 | #include <common/htlc_wire.h> |
30 | #include <wally_bip32.h> |
31 | # master->channeld: Update an active splice |
32 | # channeld->master: Splice update complete |
33 | # channeld->master: Lookup a transaction |
34 | # master->channeld: Retrieved transaction |
35 | # master->channeld: User has signed psbt and it's ready to complete |
36 | # channeld->master: Signed psbt is completed |
37 | # channeld->master: A feerate error has occured |
38 | # channeld->master: Add an inflight to the DB |
39 | # master->channeld: Inflight saved successfully |
40 | # channeld->master: Update inflight with sigs |
41 | # channeld->master: A funding error has occured |
42 | # channeld->master: A splice state error has occured |
43 | # Tell peer to shut down channel. |
44 | # Peer told us that channel is shutting down |
45 | # Re-enable commit timer. |
46 | # master -> channeld: do you have a memleak? |
47 | # Peer presented proof it was from the future. |
48 | # This is NULL if option_static_remotekey. |
49 | # Handle a channel-specific configuration change |
50 | # When we receive announcement_signatures for channel announce |
51 | # Ask channeld to send a error message. Used in forgetting channel case. |
52 | # Tell master channeld has sent the error message. |
53 | # Tell channeld about the latest channel_update |
54 | # Tell lightningd we used the latest channel_update for an error. |
55 | # Channeld: tell gossipd to make this channel_update. |
56 | # Channeld: tell gossipd about our channel_announcement |
57 | # Channeld: tell gossipd about this (as-yet) unannounced channel |
58 | # Ask channeld to quiesce. |
59 | # Tell master we're upgrading the commitment tx. |
60 | # Tell peer about our latest and greatest blockheight. |