channeld: Code to implement splicing

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.
This commit is contained in:
Dusty Daemon
2023-07-27 14:37:52 -07:00
committed by Rusty Russell
parent ebd0a3fd69
commit 4628e3ace8
88 changed files with 4560 additions and 644 deletions

View File

@@ -104,14 +104,14 @@ routehint_candidates(const tal_t *ctx,
continue;
}
/* Check channel is in CHANNELD_NORMAL */
/* Check channel is in CHANNELD_NORMAL or CHANNELD_AWAITING_SPLICE */
candidate.c = find_channel_by_scid(peer, &r->short_channel_id);
/* Try seeing if we should be using a remote alias
* instead. The `listpeers` result may have returned
* the REMOTE alias, because it is the only scid we
* have, and it is mandatory once the channel is in
* CHANNELD_NORMAL. */
* CHANNELD_NORMAL or CHANNELD_AWAITING_SPLICE. */
if (!candidate.c)
candidate.c = find_channel_by_alias(peer, &r->short_channel_id, REMOTE);
@@ -126,7 +126,8 @@ routehint_candidates(const tal_t *ctx,
continue;
}
if (candidate.c->state != CHANNELD_NORMAL) {
if (candidate.c->state != CHANNELD_NORMAL
&& candidate.c->state != CHANNELD_AWAITING_SPLICE) {
log_debug(ld->log, "%s: abnormal channel",
type_to_string(tmpctx,
struct short_channel_id,