Upgrade channel type when splicing#1340
Open
t-bast wants to merge 1 commit into
Open
Conversation
We add a basic mechanism to opportunistically update the `channel_type` when splicing. This uses the same TLV field as open/accept channel and a similar mechanism. We don't explicitly detail every channel type that is allowed, and this will evolve depending on which channel types are supported by multiple implementations. Each implementation should decide on its own policy for which upgraded channel types are available. The frequency at which we ship new channel types to the network is slow enough that we don't need a more complex protocol to thoroughly handle mismatches. The most likely outcome is that implementations will only allow the following transitions: - upgrading to `anchor_outputs` from a pre-anchor channel - upgrading to `simple_taproot` from an anchor or pre-anchor channel - upgrading to `taproot_zero_fee_commitments` from any other channel type
18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We add a basic mechanism to opportunistically update the
channel_typewhen splicing. This uses the same TLV field as open/accept channel and a similar mechanism. We don't explicitly detail every channel type that is allowed, and this will evolve depending on which channel types are supported by multiple implementations.Each implementation should decide on its own policy for which upgraded channel types are available. The frequency at which we ship new channel types to the network is slow enough that we don't need a more complex protocol to thoroughly handle mismatches. The most likely outcome is that implementations will only allow the following transitions:
anchor_outputsfrom a pre-anchor channelsimple_taprootfrom an anchor or pre-anchor channeltaproot_zero_fee_commitmentsfrom any other channel typeThis becomes more interesting once we've also integrated #1324, which adds the nonce fields to
interactive-txthat are necessary for musig2.Note that I opted for an odd TLV without a feature bit. It seems simpler to me to always opportunistically provide a
channel_typeinsplice_initto try upgrading: nodes that don't support it will not send back achannel_typeinsplice_ack, and at that point the initiator can decide to either abort or move forward with the splice anyway without thechannel_typeupgrade (if it was splicing-in or out anyway, which is valuable regardless of thechannel_typechange).One open question that I didn't address is that v3 transactions have stricter limits than v2 transaction:
max_accepted_htlcscannot exceed 114 for example. Do we want to simply implicitly trim those channel parameters on upgrade?