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

@@ -91,6 +91,7 @@ def listpeers_peers_channels_inflight2py(m):
"feerate": m.feerate, # PrimitiveField in generate_composite
"total_funding_msat": amount2msat(m.total_funding_msat), # PrimitiveField in generate_composite
"our_funding_msat": amount2msat(m.our_funding_msat), # PrimitiveField in generate_composite
"splice_amount": m.splice_amount, # PrimitiveField in generate_composite
"scratch_txid": hexlify(m.scratch_txid), # PrimitiveField in generate_composite
})
@@ -749,6 +750,7 @@ def listpeerchannels_channels_inflight2py(m):
"funding_outnum": m.funding_outnum, # PrimitiveField in generate_composite
"feerate": m.feerate, # PrimitiveField in generate_composite
"total_funding_msat": amount2msat(m.total_funding_msat), # PrimitiveField in generate_composite
"splice_amount": m.splice_amount, # PrimitiveField in generate_composite
"our_funding_msat": amount2msat(m.our_funding_msat), # PrimitiveField in generate_composite
"scratch_txid": hexlify(m.scratch_txid), # PrimitiveField in generate_composite
})

View File

@@ -80,6 +80,7 @@ SLOW_MACHINE = env("SLOW_MACHINE", "0") == "1"
DEPRECATED_APIS = env("DEPRECATED_APIS", "0") == "1"
TIMEOUT = int(env("TIMEOUT", 180 if SLOW_MACHINE else 60))
EXPERIMENTAL_DUAL_FUND = env("EXPERIMENTAL_DUAL_FUND", "0") == "1"
EXPERIMENTAL_SPLICING = env("EXPERIMENTAL_SPLICING", "0") == "1"
def wait_for(success, timeout=TIMEOUT):
@@ -787,6 +788,8 @@ class LightningNode(object):
self.daemon.opts["dev-no-reconnect"] = None
if EXPERIMENTAL_DUAL_FUND:
self.daemon.opts["experimental-dual-fund"] = None
if EXPERIMENTAL_SPLICING:
self.daemon.opts["experimental-splicing"] = None
if options is not None:
self.daemon.opts.update(options)