Research/Bitcoin Dev Archive / lightning-dev list
Dynamic Commitments: Upgrading Channels Without On-Chain Transactions
9 messages, Jul 21 to Aug 23, 2020. Started by Olaoluwa Osuntokun.
Olaoluwa Osuntokun (4), ZmnSCPxj (2), Bastien TEINTURIER, Antoine Riard, Rusty Russell
Hi y'all,
In this post, I'd like to share an early version of an extension to the spec and channel state machine that would allow for on-the-fly commitment _format/type_ changes. Notably, this would allow for us to _upgrade_ commitment types without any on-chain activity, executed in a de-synchronized and distributed manner. The core realization these proposal is based on the fact that the funding output is the _only_ component of a channel that's actually set in stone (requires an on-chain transaction to modify).
# Motivation
(you can skip this section if you already know why something like this is important)
First, some motivation. As y'all are likely aware, the current deployed commitment format has changed once so far: to introduce the `static_remote_key` variant which makes channels safer by sending the funds of the party that was force closed on to a plain pubkey w/o any extra tweaks or derivation. This makes channel recovery safer, as the party that may have lost data (or can't continue the channel), no longer needs to learn of a secret value sent to them by the other party to be able to claim their funds. However, as this new format was introduced sometime after the initial bootstrapping phase of the network, most channels in the wild today _are not_ using this safer format. Transitioning _all_ the existing channels to this new format as is, would require closing them _all_, generating tens of thousands of on-chain transactions (to close, then re-open), not to mention chain fees.
With dynamic commitments, users will be able to upgrade their _existing_ channels to new safer types, without any new on-chain transactions!
Anchor output based commitments represent another step forward in making channels safer as they allow users/software to no longer have to predict chain fees ahead of time, and also bump up the fee of a commitment/2nd-level-htlc-transaction, which is extremely important when it comes to timely on-chain resolution of HTLC contracts. This upgrade process (as touched on below) can either be manually triggered, or automatically triggered once the software updates and finds a new preferable default commitment format is available.
As many of us are aware, the addition of schnorr and taproot to the Bitcoin protocol dramatically increases the design space for channels as a whole. It may take some time to explore this design space, particularly as entirely new channel/commitment formats [1] continue to be discovered. The roll out of dynamic commitments allows us to defer the concrete design of the future commitment formats, yet still benefit from the immediate improvement that comes with morphing the funding output to be a single-key (non-p2wsh, though the line starts to blur w/ taproot) output. With this new funding output format in place, users/software will then be able to update to the latest and greatest commitment format that starts to utilize all the new tools available (scriptless script based htlcs, etc) at a later date.
Finally, the ability to update the commitment format itself will also allow us to re-parametrize portions of the channels which are currently set in stone. As an example, right now the # of max allowed outstanding HTLCs is set in stone once the channel has opened. With the ability to also swap out commitment _parameters_, we can start to experiment with flow-control like ideas such as limiting a new channel peer to only a handful of HTLC slots, which is then progressively increased based on "good behavior" (or the other way around as well). Beyond just updating the channel parameters, it's also possible to "change the rules" of a channel on the fly. An example of this variant would be creating a new psuedo-type that implements a fee policy other than "the initiator pays all fees".
# Protocol Changes
With the motivation/background set up, let's dig into some potential ways the protocol can be modified to support this new meta-feature. As this change is more of a meta-change, AFAICT, the amount of protocol changes doesn't appear to be _too_ invasive ;). Most of the heavy lifting is done by the wondrous TLV message field extensions.
## Explicit Channel Type Negotiation
Right now in the protocol, as new channel types are introduced (static key, and now anchors) we add a new feature bit. If both nodes have the feature bit set, then that new channel type is to be used. Notice how this is an _implicit_ upgrade: there's no explicit signalling during the _funding_ process that a new channel type is to be used. This works OK, if there's one major accepted "official" channel type, but not as new types are introduced for specific use cases or applications. The implicit negotiation also makes things a bit ambiguous at times. As an example, if both nodes have the `static_remote_key` _and_ anchor outputs feature bit set, which channel type should they open?
To resolve this existing ambiguity in the channel type negotiation, we'll need to make the channel type used for funding _explicit_. Thankfully, we recently modified the message format to be forwarding looking in order to allow _TLV extensions_ to be added for all existing message types. A new `channel_type` (type #???) TLV would be added which makes the channel type used in funding explicit, with the existing feature bit advertisement system being kept in place.
A draft of the changes in this area would be something like:
* `open_channel` and `accept_channel` gain a new `channel_type` TLV field.
* retroactively the OG commitment format is numbered as `channel_type=0`,
`static_remote_key`, as `channel_type=1`, and anchors as
`channel_type=2`
* if one receives an `open_channel`, or `accept_channel` message with an
unknown `channel_type`, they're to fail the funding flow
* nodes MUST NOT send an `open_channel` or `accept_channel` message with a
`channel_type` that isn't covered by their existing advertise feature
bits
* a mapping between feature bits and expected `channel_type` values would
then be added
* during funding negotiation, the _commitment_ type itself is parametrized
based on the `channel_type` value
* as we've all implemented `static_remote_key` commitments at this
point, I assume the necessary code-level abstractions are already
in-place
## Commitment State Machine Changes
With the changes described in the above section, we're now able to explicitly identify _which_ channel type we want to enter a funding flow for. As we add more types, there may not be a "default" type, so making this process explicit is important to future exploration and extensibility. In this section, we'll introduce a series of small changes to the `commit_sig`, and `revoke_and_ack` messages which'll allow us to implement the "dynamic" portion of this proposal.
Relying once again on the wondrous power of TLV message extensions we'll carry over the `channel_type` TLV (just the name, # may be diff since this is a diff message context) to the `commit_sig`, and `revoke_and_ack` messages. The following guidelines on inclusion and interpretation would then be applied:
* the `channel_type` specified on a given `commit_sig` message should be
the `channel_type` of the _new_ commitment being _created_
* when receiving a `commit_sig` with a `channel_type` that differs from
the `channel_type` of one's on revoked commitment:
* if the `channel_type` is unknown (or the `channel_type` transition
isn't allowed or defined), then the _p2p_ connection should be
aborted
* otherwise, using the `channel_type` as a parameter for commitment
transaction construction, a new commitment adhering to the rules of
the `channel_type` should be constructed
* the `channel_type` sent in the `revoke_and_ack` message should be the
`channel_type` of the commitment that's being _revoked_
With the above new rules, let's say Alice and Bob upgrade to new versions of their LN software that support a new channel type `1`, while they're on channel type `0`. Either triggered automatically, or manually (by either side), the commitment flow would look something like:
1. sig_c_1 -> 2. <- revoke_c_0 3. <- sig_c_1 4. revoke_c_0 ->
By exchanging 4 messages, both sides are able to upgrade to a new commitment format. However, one issue with the above flow is that it currently isn't allowed by the spec, since we disallow sending a `commit_sig` message that doesn't cover any updates. If we end up going with this route, then we'd have to relax that constraint to something like:
* an empty `commit_sig` message (one that covers no updates) is
disallowed, unless the `commit_sig` has a `channel_type`, `c_n` that
differs from the channel type of the prior commitment, `c_n-1`.
It would then be up to _new protocol extension documents_ to define _how_ to construct those new channel types, and also any changes to the on-chain handling that are required by those channel types. Also certain transitions may be disallowed. As an example, implementations may want to prevent a user from going back to the non-static remote key channels from the `static_remote_key` format.
In order to prepare for these changes, implementations need to be able to handle "holding" unrevoked commitments of heterogeneous types, as if either of them hit the chain, they'll need to be able to resolve all contracts properly.
An alternative to attaching the `channel_type` message to the `commit_sig` and having _that_ kick off the commitment upgrade, we could instead possibly add a _new_ update message (like `update_fee`) to make the process more explicit. In either case, we may want to restrict things a bit by only allowing the initiator to trigger a commitment format update.
## Further Channel Type Parameterization
With the above protocol sketch, we're able to handle "simple" upgrades, where some/all of the parameters of the channel are hard coded and/or have been negotiated out of band. More complex channel types may require the exchange of additional keys or parameters which need to be known in order to reconstruct the _new_ commitment format and verify the new signature. This additional information can possibly be piggy-backed on the `commit_sig` message in the form of a _nested TLV_ type:
* a msg-local TLV type `channel_params` is added
* the value of this TLV type is a nested TLV blob, that contains all the
necessary fields and values needed to properly handle the channel switch
over
Returning to the flow control example earlier in this post, the new limits for `max_allowed_htlcs`, can be included in this blob. More complex channel types could send information such as new keys to be used, or other parameters that govern how a commitment is to be constructed (like the size of the anchor outputs).
# Conclusion
Summarizing, in this post we've proposed a series of protocol modifications (with TLV fields doing most of the heavy lifting) that allows LN nodes to upgrade their commitments _without any on-chain_ transactions. Depending on the architecture of a node, new types may even be added/removed without actual downtime.
The ability to upgrade commitments after the fact lessens the pressure of newer possibly experimental channel types to get all the details (and explore the rather large design space) correct up front. Once Taproot rolls around, we can simply update the funding output, roll that out, then continue to hash out the details on the possibly new channel type(s) that take advantage of all the new tools.
Allowing channel types to be upgraded on the fly let's us update the network to the new _safer_ channel types in a de-synchronized, distributed manner that doesn't require any on-chain transactions! Dynamic commitments as a whole also creates another point of extensibility in the protocol so we can start to explore all the variants on channels as we know them that exist.
I'm keen to gather feedback, as internally for `lnd` we've committed to exploring this direction so we can start to upgrade _all_ the existing lnd-involved channels to the new anchor commitment format, which is the safest format yet.
[1]: https://eprint.iacr.org/2020/476
-- Laolu
Thanks for sharing this, I think it's the right time to start experimenting with that kind of feature (especially in the light of Taproot and the package relay work / pinning transactions issue).
Quoted text (5 lines)
we can start to experiment with flow-control like > ideas such as limiting a new channel peer to only a handful of HTLC slots, > which is then progressively increased based on "good behavior" (or the > other > way around as well)
Note that this is already possible today, a node can unilaterally decide its internal rules for accepting channels/HTLCs. But it's true that it would be nicer to communicate these rules with your peer to reduce inefficiencies (e.g. proposing HTLCs that we know will be rejected).
Quoted text (4 lines)
* `open_channel` and `accept_channel` gain a new `channel_type` TLV field. > * retroactively the OG commitment format is numbered as `channel_type=0`, > `static_remote_key`, as `channel_type=1`, and anchors as > `channel_type=2`
ACK! Internally eclair (and I believe lnd as well) has exactly that field in its DB, with exactly those values.
Quoted text (3 lines)
* an empty `commit_sig` message (one that covers no updates) is > disallowed, unless the `commit_sig` has a `channel_type`, `c_n` that > differs from the channel type of the prior commitment, `c_n-1`.
That sounds reasonable, as changing the `channel_type` is actually an update (it results in changes in the commit tx and/or htlc txs).
Quoted text (6 lines)
An alternative to attaching the `channel_type` message to the `commit_sig` > and having _that_ kick off the commitment upgrade, we could instead > possibly > add a _new_ update message (like `update_fee`) to make the process more > explicit. In either case, we may want to restrict things a bit by only > allowing the initiator to trigger a commitment format update.
I prefer that alternative. I think it's better to explicitly signal that we want to pause the channel while we upgrade the commitment format (and stop accepting HTLCs while we're updating, like we do once we've exchanged the `shutdown` message). Otherwise the asynchronocity of the protocol is likely to create months (years?) of tracking unwanted force-closes because of races between `commig_sig`s with the new and old commitment format.
Updating the commitment format should be a rare enough operation that we can afford to synchronize with a two-way `update_commitment_format` handshake, then temporarily freeze the channel.
The tricky part will be how we handle "dangling" operations that were sent by the remote peer *after* we sent our `update_commitment_format` but *before* they received it. The simplest choice is probably to have the initiator just ignore these messages, and the non-initiator enqueue these un-acked messages and replay them after the commitment format update completes (or just drop them and cancel corresponding upstream HTLCs if needed).
Regarding initiating the commitment format update, how do you see this happen? The funder activates a new feature on his (e.g. `option_anchor_outputs`), and broadcasts it in `init` and `node_announcement`, then waits until the remote also activates it in its `init` message and then reacts to this by triggering the update process?
Thanks, Bastien
Le mar. 21 juil. 2020 à 03:18, Olaoluwa Osuntokun <laolu32 at gmail.com> a écrit :
Quoted text (263 lines)
> Hi y'all, > > In this post, I'd like to share an early version of an extension to the > spec > and channel state machine that would allow for on-the-fly commitment > _format/type_ changes. Notably, this would allow for us to _upgrade_ > commitment types without any on-chain activity, executed in a > de-synchronized and distributed manner. The core realization these proposal > is based on the fact that the funding output is the _only_ component of a > channel that's actually set in stone (requires an on-chain transaction to > modify). > > > # Motivation > > (you can skip this section if you already know why something like this is > important) > > First, some motivation. As y'all are likely aware, the current deployed > commitment format has changed once so far: to introduce the > `static_remote_key` variant which makes channels safer by sending the funds > of the party that was force closed on to a plain pubkey w/o any extra > tweaks > or derivation. This makes channel recovery safer, as the party that may > have > lost data (or can't continue the channel), no longer needs to learn of a > secret value sent to them by the other party to be able to claim their > funds. However, as this new format was introduced sometime after the > initial > bootstrapping phase of the network, most channels in the wild today _are > not_ using this safer format. Transitioning _all_ the existing channels to > this new format as is, would require closing them _all_, generating tens of > thousands of on-chain transactions (to close, then re-open), not to mention > chain fees. > > With dynamic commitments, users will be able to upgrade their _existing_ > channels to new safer types, without any new on-chain transactions! > > Anchor output based commitments represent another step forward in making > channels safer as they allow users/software to no longer have to predict > chain fees ahead of time, and also bump up the fee of a > commitment/2nd-level-htlc-transaction, which is extremely important when it > comes to timely on-chain resolution of HTLC contracts. This upgrade process > (as touched on below) can either be manually triggered, or automatically > triggered once the software updates and finds a new preferable default > commitment format is available. > > As many of us are aware, the addition of schnorr and taproot to the Bitcoin > protocol dramatically increases the design space for channels as a whole. > It > may take some time to explore this design space, particularly as entirely > new channel/commitment formats [1] continue to be discovered. The roll out > of dynamic commitments allows us to defer the concrete design of the future > commitment formats, yet still benefit from the immediate improvement that > comes with morphing the funding output to be a single-key (non-p2wsh, > though > the line starts to blur w/ taproot) output. With this new funding output > format in place, users/software will then be able to update to the latest > and greatest commitment format that starts to utilize all the new tools > available (scriptless script based htlcs, etc) at a later date. > > Finally, the ability to update the commitment format itself will also allow > us to re-parametrize portions of the channels which are currently set in > stone. As an example, right now the # of max allowed outstanding HTLCs is > set in stone once the channel has opened. With the ability to also swap out > commitment _parameters_, we can start to experiment with flow-control like > ideas such as limiting a new channel peer to only a handful of HTLC slots, > which is then progressively increased based on "good behavior" (or the > other > way around as well). Beyond just updating the channel parameters, it's also > possible to "change the rules" of a channel on the fly. An example of this > variant would be creating a new psuedo-type that implements a fee policy > other than "the initiator pays all fees". > > > # Protocol Changes > > With the motivation/background set up, let's dig into some potential ways > the protocol can be modified to support this new meta-feature. As this > change is more of a meta-change, AFAICT, the amount of protocol changes > doesn't appear to be _too_ invasive ;). Most of the heavy lifting is done > by > the wondrous TLV message field extensions. > > ## Explicit Channel Type Negotiation > > Right now in the protocol, as new channel types are introduced (static key, > and now anchors) we add a new feature bit. If both nodes have the feature > bit set, then that new channel type is to be used. Notice how this is an > _implicit_ upgrade: there's no explicit signalling during the _funding_ > process that a new channel type is to be used. This works OK, if there's > one > major accepted "official" channel type, but not as new types are introduced > for specific use cases or applications. The implicit negotiation also makes > things a bit ambiguous at times. As an example, if both nodes have the > `static_remote_key` _and_ anchor outputs feature bit set, which channel > type > should they open? > > To resolve this existing ambiguity in the channel type negotiation, we'll > need to make the channel type used for funding _explicit_. Thankfully, we > recently modified the message format to be forwarding looking in order to > allow _TLV extensions_ to be added for all existing message types. A new > `channel_type` (type #???) TLV would be added which makes the channel type > used in funding explicit, with the existing feature bit advertisement > system > being kept in place. > > A draft of the changes in this area would be something like: > > * `open_channel` and `accept_channel` gain a new `channel_type` TLV > field. > * retroactively the OG commitment format is numbered as `channel_type=0`, > `static_remote_key`, as `channel_type=1`, and anchors as > `channel_type=2` > * if one receives an `open_channel`, or `accept_channel` message with an > unknown `channel_type`, they're to fail the funding flow > * nodes MUST NOT send an `open_channel` or `accept_channel` message with > a > `channel_type` that isn't covered by their existing advertise feature > bits > * a mapping between feature bits and expected `channel_type` values would > then be added > * during funding negotiation, the _commitment_ type itself is > parametrized > based on the `channel_type` value > * as we've all implemented `static_remote_key` commitments at this > point, I assume the necessary code-level abstractions are already > in-place > > ## Commitment State Machine Changes > > With the changes described in the above section, we're now able to > explicitly identify _which_ channel type we want to enter a funding flow > for. As we add more types, there may not be a "default" type, so making > this > process explicit is important to future exploration and extensibility. In > this section, we'll introduce a series of small changes to the > `commit_sig`, > and `revoke_and_ack` messages which'll allow us to implement the "dynamic" > portion of this proposal. > > Relying once again on the wondrous power of TLV message extensions we'll > carry over the `channel_type` TLV (just the name, # may be diff since this > is a diff message context) to the `commit_sig`, and `revoke_and_ack` > messages. The following guidelines on inclusion and interpretation would > then be applied: > > * the `channel_type` specified on a given `commit_sig` message should be > the `channel_type` of the _new_ commitment being _created_ > * when receiving a `commit_sig` with a `channel_type` that differs from > the `channel_type` of one's on revoked commitment: > * if the `channel_type` is unknown (or the `channel_type` transition > isn't allowed or defined), then the _p2p_ connection should be > aborted > * otherwise, using the `channel_type` as a parameter for commitment > transaction construction, a new commitment adhering to the rules of > the `channel_type` should be constructed > * the `channel_type` sent in the `revoke_and_ack` message should be the > `channel_type` of the commitment that's being _revoked_ > > With the above new rules, let's say Alice and Bob upgrade to new versions > of > their LN software that support a new channel type `1`, while they're on > channel type `0`. Either triggered automatically, or manually (by either > side), the commitment flow would look something like: > > 1. sig_c_1 -> > 2. <- revoke_c_0 > 3. <- sig_c_1 > 4. revoke_c_0 -> > > By exchanging 4 messages, both sides are able to upgrade to a new > commitment > format. However, one issue with the above flow is that it currently isn't > allowed by the spec, since we disallow sending a `commit_sig` message that > doesn't cover any updates. If we end up going with this route, then we'd > have to relax that constraint to something like: > > * an empty `commit_sig` message (one that covers no updates) is > disallowed, unless the `commit_sig` has a `channel_type`, `c_n` that > differs from the channel type of the prior commitment, `c_n-1`. > > It would then be up to _new protocol extension documents_ to define _how_ > to > construct those new channel types, and also any changes to the on-chain > handling that are required by those channel types. Also certain transitions > may be disallowed. As an example, implementations may want to prevent a > user > from going back to the non-static remote key channels from the > `static_remote_key` format. > > In order to prepare for these changes, implementations need to be able to > handle "holding" unrevoked commitments of heterogeneous types, as if either > of them hit the chain, they'll need to be able to resolve all contracts > properly. > > An alternative to attaching the `channel_type` message to the `commit_sig` > and having _that_ kick off the commitment upgrade, we could instead > possibly > add a _new_ update message (like `update_fee`) to make the process more > explicit. In either case, we may want to restrict things a bit by only > allowing the initiator to trigger a commitment format update. > > ## Further Channel Type Parameterization > > With the above protocol sketch, we're able to handle "simple" upgrades, > where some/all of the parameters of the channel are hard coded and/or have > been negotiated out of band. More complex channel types may require the > exchange of additional keys or parameters which need to be known in order > to > reconstruct the _new_ commitment format and verify the new signature. This > additional information can possibly be piggy-backed on the `commit_sig` > message in the form of a _nested TLV_ type: > > * a msg-local TLV type `channel_params` is added > * the value of this TLV type is a nested TLV blob, that contains all the > necessary fields and values needed to properly handle the channel > switch > over > > Returning to the flow control example earlier in this post, the new limits > for `max_allowed_htlcs`, can be included in this blob. More complex channel > types could send information such as new keys to be used, or other > parameters > that govern how a commitment is to be constructed (like the size of the > anchor outputs). > > # Conclusion > > Summarizing, in this post we've proposed a series of protocol modifications > (with TLV fields doing most of the heavy lifting) that allows LN nodes to > upgrade their commitments _without any on-chain_ transactions. Depending on > the architecture of a node, new types may even be added/removed without > actual downtime. > > The ability to upgrade commitments after the fact lessens the pressure of > newer possibly experimental channel types to get all the details (and > explore the rather large design space) correct up front. Once Taproot rolls > around, we can simply update the funding output, roll that out, then > continue to hash out the details on the possibly new channel type(s) that > take advantage of all the new tools. > > Allowing channel types to be upgraded on the fly let's us update the > network > to the new _safer_ channel types in a de-synchronized, distributed manner > that doesn't require any on-chain transactions! Dynamic commitments as a > whole also creates another point of extensibility in the protocol so we can > start to explore all the variants on channels as we know them that exist. > > I'm keen to gather feedback, as internally for `lnd` we've committed to > exploring this direction so we can start to upgrade _all_ the existing > lnd-involved channels to the new anchor commitment format, which is the > safest format yet. > > [1]: https://eprint.iacr.org/2020/476 > > -- Laolu > _______________________________________________ > Lightning-dev mailing list > Lightning-dev at lists.linuxfoundation.org > https://www.learnbitcoin.com/archive/lists/lightning-dev >
Good morning Laolu, and list,
Probably arguably off-topic, but this post triggered me into thinking about an insane idea: offchain update from existing Poon-Dryja to newer Decker-Russell-Osuntokun ("eltoo") mechanism.
Due to the way `SIGHASH_ANYPREVOUT` will be deployed --- requires a new pubkey type and works only inside the Taproot construction --- we cannot seamlessly upgrade from a Poon-Dryja channel to a Decker-Russell-Osuntokun. The funding outpoint itself has to be changed.
We can create an upgrade transaction that is a cut-through of a mutual close of the Poon-Dryja, and a funding open of a Decker-Russell-Osuntokun. This transaction spends the funding outpoint of an existing Poon-Dryja channel, and creates a Decker-Russell-Osuntokun funding outpoint.
However, once such an upgrade transaction has been created and signed by both parties (after the necessary initial state is signed in the Decker-Russell-Osuntokun mechanism), nothing prevents the participants from, say, just keeping the upgrade transaction offchain as well.
The participants can simply, after the upgrade transaction has been signed, revoke the latest Poon-Dryja state (which has been copied into the initial Decker-Russell-Osuntokun state). Then they can keep the upgrade transaction offchain, and treat the funding outpoint of the upgrade transaction as the "internal funding outpoint" for future Decker-Russell-Osuntokun updates.
Now, of course, since the onchain funding outpoint remains a Poon-Dryja, it can still be spent using a revoked state. Thus, we do not gain anything much, since the entire HTLC history of the Poon-Dryja channel needs to be retained as protection against theft attempts.
However:
* Future HTLCs in the Decker-Russell-Osuntokun domain need not be recorded permanently, thus at least bounding the information liability of the upgraded channel. * The channel retains its short-channel-id, which may be useful, since a provably-long-lived channel implies both channel participants have high reliability (else one or the other would have closed the channel at some point), and a pathfinding algorithm may bias towards such long-lived channels.
Of note, is that if the channel is later mutually closed, the upgrade transaction, being offchain, never need appear onchain, so this potentially saves blockchain space.
Regards, ZmnSCPxj
After getting some feedback from the Lightning Labs squad, we're thinking that it may be better to make the initial switch over double-opt-in, similar to the current `shutdown` message flow. So with this variant, we'd add two new messages: `commit_switch` and `commit_switch_reply` (placeholder names). We may want to retain the "initiator" only etiquette for simplicity, but if we want to allow both sides to initiate then we'll need to handle collisions (with a randomized back off possibly).
The `commit_switch` message would contain the new target `channel_type` and the opaque TLV blob of the re-negotiation parameters. The `commit_switch_reply` message would then give the receiver the ability to _reject_ the switch (say it doesn't want to increase `max_allowed_htlcs`), or accept it, and specify its own set of parameters. Similar to the `shutdown` message, both parties can only proceed with the switch over _once all HTLCs_ have been cleared. As a result, they should reject any HTLC forwarding attempts through the target channel once they receive the initial message. From there, they'd carry out the modified commitment dance outlined in my prior mail.
Thoughts?
-- Laolu
-- Laolu
On Mon, Jul 20, 2020 at 6:18 PM Olaoluwa Osuntokun <laolu32 at gmail.com> wrote:
Quoted text (259 lines)
> Hi y'all, > > In this post, I'd like to share an early version of an extension to the > spec > and channel state machine that would allow for on-the-fly commitment > _format/type_ changes. Notably, this would allow for us to _upgrade_ > commitment types without any on-chain activity, executed in a > de-synchronized and distributed manner. The core realization these proposal > is based on the fact that the funding output is the _only_ component of a > channel that's actually set in stone (requires an on-chain transaction to > modify). > > > # Motivation > > (you can skip this section if you already know why something like this is > important) > > First, some motivation. As y'all are likely aware, the current deployed > commitment format has changed once so far: to introduce the > `static_remote_key` variant which makes channels safer by sending the funds > of the party that was force closed on to a plain pubkey w/o any extra > tweaks > or derivation. This makes channel recovery safer, as the party that may > have > lost data (or can't continue the channel), no longer needs to learn of a > secret value sent to them by the other party to be able to claim their > funds. However, as this new format was introduced sometime after the > initial > bootstrapping phase of the network, most channels in the wild today _are > not_ using this safer format. Transitioning _all_ the existing channels to > this new format as is, would require closing them _all_, generating tens of > thousands of on-chain transactions (to close, then re-open), not to mention > chain fees. > > With dynamic commitments, users will be able to upgrade their _existing_ > channels to new safer types, without any new on-chain transactions! > > Anchor output based commitments represent another step forward in making > channels safer as they allow users/software to no longer have to predict > chain fees ahead of time, and also bump up the fee of a > commitment/2nd-level-htlc-transaction, which is extremely important when it > comes to timely on-chain resolution of HTLC contracts. This upgrade process > (as touched on below) can either be manually triggered, or automatically > triggered once the software updates and finds a new preferable default > commitment format is available. > > As many of us are aware, the addition of schnorr and taproot to the Bitcoin > protocol dramatically increases the design space for channels as a whole. > It > may take some time to explore this design space, particularly as entirely > new channel/commitment formats [1] continue to be discovered. The roll out > of dynamic commitments allows us to defer the concrete design of the future > commitment formats, yet still benefit from the immediate improvement that > comes with morphing the funding output to be a single-key (non-p2wsh, > though > the line starts to blur w/ taproot) output. With this new funding output > format in place, users/software will then be able to update to the latest > and greatest commitment format that starts to utilize all the new tools > available (scriptless script based htlcs, etc) at a later date. > > Finally, the ability to update the commitment format itself will also allow > us to re-parametrize portions of the channels which are currently set in > stone. As an example, right now the # of max allowed outstanding HTLCs is > set in stone once the channel has opened. With the ability to also swap out > commitment _parameters_, we can start to experiment with flow-control like > ideas such as limiting a new channel peer to only a handful of HTLC slots, > which is then progressively increased based on "good behavior" (or the > other > way around as well). Beyond just updating the channel parameters, it's also > possible to "change the rules" of a channel on the fly. An example of this > variant would be creating a new psuedo-type that implements a fee policy > other than "the initiator pays all fees". > > > # Protocol Changes > > With the motivation/background set up, let's dig into some potential ways > the protocol can be modified to support this new meta-feature. As this > change is more of a meta-change, AFAICT, the amount of protocol changes > doesn't appear to be _too_ invasive ;). Most of the heavy lifting is done > by > the wondrous TLV message field extensions. > > ## Explicit Channel Type Negotiation > > Right now in the protocol, as new channel types are introduced (static key, > and now anchors) we add a new feature bit. If both nodes have the feature > bit set, then that new channel type is to be used. Notice how this is an > _implicit_ upgrade: there's no explicit signalling during the _funding_ > process that a new channel type is to be used. This works OK, if there's > one > major accepted "official" channel type, but not as new types are introduced > for specific use cases or applications. The implicit negotiation also makes > things a bit ambiguous at times. As an example, if both nodes have the > `static_remote_key` _and_ anchor outputs feature bit set, which channel > type > should they open? > > To resolve this existing ambiguity in the channel type negotiation, we'll > need to make the channel type used for funding _explicit_. Thankfully, we > recently modified the message format to be forwarding looking in order to > allow _TLV extensions_ to be added for all existing message types. A new > `channel_type` (type #???) TLV would be added which makes the channel type > used in funding explicit, with the existing feature bit advertisement > system > being kept in place. > > A draft of the changes in this area would be something like: > > * `open_channel` and `accept_channel` gain a new `channel_type` TLV > field. > * retroactively the OG commitment format is numbered as `channel_type=0`, > `static_remote_key`, as `channel_type=1`, and anchors as > `channel_type=2` > * if one receives an `open_channel`, or `accept_channel` message with an > unknown `channel_type`, they're to fail the funding flow > * nodes MUST NOT send an `open_channel` or `accept_channel` message with > a > `channel_type` that isn't covered by their existing advertise feature > bits > * a mapping between feature bits and expected `channel_type` values would > then be added > * during funding negotiation, the _commitment_ type itself is > parametrized > based on the `channel_type` value > * as we've all implemented `static_remote_key` commitments at this > point, I assume the necessary code-level abstractions are already > in-place > > ## Commitment State Machine Changes > > With the changes described in the above section, we're now able to > explicitly identify _which_ channel type we want to enter a funding flow > for. As we add more types, there may not be a "default" type, so making > this > process explicit is important to future exploration and extensibility. In > this section, we'll introduce a series of small changes to the > `commit_sig`, > and `revoke_and_ack` messages which'll allow us to implement the "dynamic" > portion of this proposal. > > Relying once again on the wondrous power of TLV message extensions we'll > carry over the `channel_type` TLV (just the name, # may be diff since this > is a diff message context) to the `commit_sig`, and `revoke_and_ack` > messages. The following guidelines on inclusion and interpretation would > then be applied: > > * the `channel_type` specified on a given `commit_sig` message should be > the `channel_type` of the _new_ commitment being _created_ > * when receiving a `commit_sig` with a `channel_type` that differs from > the `channel_type` of one's on revoked commitment: > * if the `channel_type` is unknown (or the `channel_type` transition > isn't allowed or defined), then the _p2p_ connection should be > aborted > * otherwise, using the `channel_type` as a parameter for commitment > transaction construction, a new commitment adhering to the rules of > the `channel_type` should be constructed > * the `channel_type` sent in the `revoke_and_ack` message should be the > `channel_type` of the commitment that's being _revoked_ > > With the above new rules, let's say Alice and Bob upgrade to new versions > of > their LN software that support a new channel type `1`, while they're on > channel type `0`. Either triggered automatically, or manually (by either > side), the commitment flow would look something like: > > 1. sig_c_1 -> > 2. <- revoke_c_0 > 3. <- sig_c_1 > 4. revoke_c_0 -> > > By exchanging 4 messages, both sides are able to upgrade to a new > commitment > format. However, one issue with the above flow is that it currently isn't > allowed by the spec, since we disallow sending a `commit_sig` message that > doesn't cover any updates. If we end up going with this route, then we'd > have to relax that constraint to something like: > > * an empty `commit_sig` message (one that covers no updates) is > disallowed, unless the `commit_sig` has a `channel_type`, `c_n` that > differs from the channel type of the prior commitment, `c_n-1`. > > It would then be up to _new protocol extension documents_ to define _how_ > to > construct those new channel types, and also any changes to the on-chain > handling that are required by those channel types. Also certain transitions > may be disallowed. As an example, implementations may want to prevent a > user > from going back to the non-static remote key channels from the > `static_remote_key` format. > > In order to prepare for these changes, implementations need to be able to > handle "holding" unrevoked commitments of heterogeneous types, as if either > of them hit the chain, they'll need to be able to resolve all contracts > properly. > > An alternative to attaching the `channel_type` message to the `commit_sig` > and having _that_ kick off the commitment upgrade, we could instead > possibly > add a _new_ update message (like `update_fee`) to make the process more > explicit. In either case, we may want to restrict things a bit by only > allowing the initiator to trigger a commitment format update. > > ## Further Channel Type Parameterization > > With the above protocol sketch, we're able to handle "simple" upgrades, > where some/all of the parameters of the channel are hard coded and/or have > been negotiated out of band. More complex channel types may require the > exchange of additional keys or parameters which need to be known in order > to > reconstruct the _new_ commitment format and verify the new signature. This > additional information can possibly be piggy-backed on the `commit_sig` > message in the form of a _nested TLV_ type: > > * a msg-local TLV type `channel_params` is added > * the value of this TLV type is a nested TLV blob, that contains all the > necessary fields and values needed to properly handle the channel > switch > over > > Returning to the flow control example earlier in this post, the new limits > for `max_allowed_htlcs`, can be included in this blob. More complex channel > types could send information such as new keys to be used, or other > parameters > that govern how a commitment is to be constructed (like the size of the > anchor outputs). > > # Conclusion > > Summarizing, in this post we've proposed a series of protocol modifications > (with TLV fields doing most of the heavy lifting) that allows LN nodes to > upgrade their commitments _without any on-chain_ transactions. Depending on > the architecture of a node, new types may even be added/removed without > actual downtime. > > The ability to upgrade commitments after the fact lessens the pressure of > newer possibly experimental channel types to get all the details (and > explore the rather large design space) correct up front. Once Taproot rolls > around, we can simply update the funding output, roll that out, then > continue to hash out the details on the possibly new channel type(s) that > take advantage of all the new tools. > > Allowing channel types to be upgraded on the fly let's us update the > network > to the new _safer_ channel types in a de-synchronized, distributed manner > that doesn't require any on-chain transactions! Dynamic commitments as a > whole also creates another point of extensibility in the protocol so we can > start to explore all the variants on channels as we know them that exist. > > I'm keen to gather feedback, as internally for `lnd` we've committed to > exploring this direction so we can start to upgrade _all_ the existing > lnd-involved channels to the new anchor commitment format, which is the > safest format yet. > > [1]: https://eprint.iacr.org/2020/476 > > -- Laolu >
Quoted text (3 lines)
> Note that this is already possible today, a node can unilaterally decide its internal rules for accepting channels/HTLCs.
Mhmm, it's possible today but would generate extra failures vs knowing what all the limits are ahead of time.
Quoted text (4 lines)
> I prefer that alternative. I think it's better to explicitly signal that > we want to pause the channel while we upgrade the commitment format (and > stop accepting HTLCs while we're updating, like we do once we've exchanged > the `shutdown` message).
You totally read my mind! Check out this variant I posted just now: https://www.learnbitcoin.com/archive/lists/lightning-dev/t/2020/dynamic-commitments-upgrading-channels-without-on-chain-transactions#m-6ab50d2f
Quoted text (3 lines)
> Otherwise the asynchronocity of the protocol is likely to create months > (years?) of tracking unwanted force-closes because of races between > `commig_sig`s with the new and old commitment format.
Agreed, it seems easier to just side-step any possible edge cases (that're likely looming) and move the re-negotiation up a "level". I also like the "no active HTLCs" constraints, as there are likely some weird edge cases with fees that would pop up. Like since the taproot output scripts are slightly bigger, one could imagine that a switch over w/ active HTLCs could trigger a scenario where the initiator isn't able to pay for the fees of all the active HTLCs any longer.....
At this point in the game, I've learned to never underestimate the hidden complexity and edge cases of anything that involves fees for Bitcoin contracts.... :p
("yep, we're _still_ talking about fees!" -- Adelaide 2018)
Quoted text (3 lines)
> The tricky part will be how we handle "dangling" operations that were sent > by the remote peer *after* we sent our `update_commitment_format` but > *before* they received it
Is this still an issue if we go with a `shutdown` like message flow described in my linked message above? If they're update messages due to settling or failing a direct HTLC, then the responder should be able to let those clear _then_ send the `commit_switch_reply` message. For forwarded updates, as you suggest, the responder would queue those up to send once the commitment switch over has completed.
Quoted text (2 lines)
> Regarding initiating the commitment format update, how do you see this > happen?
I left one detail out of my initial message: there'd be a new feature bit to signal "I know how to update commitments". Aside from that yeah that's how I envisioned things would flow. The first of your channels to update would be with those node operators that are the quickest to update. Ofc there'll be laggards though, and possibly some channels that just never get updated due to the node operator never updating their software. In that case though, it's likely best to close out that channel since their lack of timely updates of their software shows a degree of apathy all together.
-- Laolu
On Tue, Jul 21, 2020 at 1:46 AM Bastien TEINTURIER <bastien at acinq.fr> wrote:
Quoted text (375 lines)
> Thanks for sharing this, I think it's the right time to start > experimenting with > that kind of feature (especially in the light of Taproot and the package > relay > work / pinning transactions issue). > > we can start to experiment with flow-control like >> ideas such as limiting a new channel peer to only a handful of HTLC slots, >> which is then progressively increased based on "good behavior" (or the >> other >> way around as well) > > > Note that this is already possible today, a node can unilaterally decide > its > internal rules for accepting channels/HTLCs. But it's true that it would be > nicer to communicate these rules with your peer to reduce inefficiencies > (e.g. proposing HTLCs that we know will be rejected). > > * `open_channel` and `accept_channel` gain a new `channel_type` TLV field. >> * retroactively the OG commitment format is numbered as `channel_type=0`, >> `static_remote_key`, as `channel_type=1`, and anchors as >> `channel_type=2` > > > ACK! Internally eclair (and I believe lnd as well) has exactly that field > in > its DB, with exactly those values. > > * an empty `commit_sig` message (one that covers no updates) is >> disallowed, unless the `commit_sig` has a `channel_type`, `c_n` that >> differs from the channel type of the prior commitment, `c_n-1`. > > > That sounds reasonable, as changing the `channel_type` is actually an > update > (it results in changes in the commit tx and/or htlc txs). > > An alternative to attaching the `channel_type` message to the `commit_sig` >> and having _that_ kick off the commitment upgrade, we could instead >> possibly >> add a _new_ update message (like `update_fee`) to make the process more >> explicit. In either case, we may want to restrict things a bit by only >> allowing the initiator to trigger a commitment format update. > > > I prefer that alternative. I think it's better to explicitly signal that we > want to pause the channel while we upgrade the commitment format (and stop > accepting HTLCs while we're updating, like we do once we've exchanged the > `shutdown` message). Otherwise the asynchronocity of the protocol is > likely to > create months (years?) of tracking unwanted force-closes because of races > between `commig_sig`s with the new and old commitment format. > > Updating the commitment format should be a rare enough operation that we > can > afford to synchronize with a two-way `update_commitment_format` handshake, > then > temporarily freeze the channel. > > The tricky part will be how we handle "dangling" operations that were sent > by > the remote peer *after* we sent our `update_commitment_format` but *before* > they received it. The simplest choice is probably to have the initiator > just > ignore these messages, and the non-initiator enqueue these un-acked > messages > and replay them after the commitment format update completes (or just drop > them > and cancel corresponding upstream HTLCs if needed). > > Regarding initiating the commitment format update, how do you see this > happen? > The funder activates a new feature on his (e.g. `option_anchor_outputs`), > and > broadcasts it in `init` and `node_announcement`, then waits until the > remote > also activates it in its `init` message and then reacts to this by > triggering > the update process? > > Thanks, > Bastien > > Le mar. 21 juil. 2020 à 03:18, Olaoluwa Osuntokun <laolu32 at gmail.com> a > écrit : > >> Hi y'all, >> >> In this post, I'd like to share an early version of an extension to the >> spec >> and channel state machine that would allow for on-the-fly commitment >> _format/type_ changes. Notably, this would allow for us to _upgrade_ >> commitment types without any on-chain activity, executed in a >> de-synchronized and distributed manner. The core realization these >> proposal >> is based on the fact that the funding output is the _only_ component of a >> channel that's actually set in stone (requires an on-chain transaction to >> modify). >> >> >> # Motivation >> >> (you can skip this section if you already know why something like this is >> important) >> >> First, some motivation. As y'all are likely aware, the current deployed >> commitment format has changed once so far: to introduce the >> `static_remote_key` variant which makes channels safer by sending the >> funds >> of the party that was force closed on to a plain pubkey w/o any extra >> tweaks >> or derivation. This makes channel recovery safer, as the party that may >> have >> lost data (or can't continue the channel), no longer needs to learn of a >> secret value sent to them by the other party to be able to claim their >> funds. However, as this new format was introduced sometime after the >> initial >> bootstrapping phase of the network, most channels in the wild today _are >> not_ using this safer format. Transitioning _all_ the existing channels >> to >> this new format as is, would require closing them _all_, generating tens >> of >> thousands of on-chain transactions (to close, then re-open), not to >> mention >> chain fees. >> >> With dynamic commitments, users will be able to upgrade their _existing_ >> channels to new safer types, without any new on-chain transactions! >> >> Anchor output based commitments represent another step forward in making >> channels safer as they allow users/software to no longer have to predict >> chain fees ahead of time, and also bump up the fee of a >> commitment/2nd-level-htlc-transaction, which is extremely important when >> it >> comes to timely on-chain resolution of HTLC contracts. This upgrade >> process >> (as touched on below) can either be manually triggered, or automatically >> triggered once the software updates and finds a new preferable default >> commitment format is available. >> >> As many of us are aware, the addition of schnorr and taproot to the >> Bitcoin >> protocol dramatically increases the design space for channels as a whole. >> It >> may take some time to explore this design space, particularly as entirely >> new channel/commitment formats [1] continue to be discovered. The roll out >> of dynamic commitments allows us to defer the concrete design of the >> future >> commitment formats, yet still benefit from the immediate improvement that >> comes with morphing the funding output to be a single-key (non-p2wsh, >> though >> the line starts to blur w/ taproot) output. With this new funding output >> format in place, users/software will then be able to update to the latest >> and greatest commitment format that starts to utilize all the new tools >> available (scriptless script based htlcs, etc) at a later date. >> >> Finally, the ability to update the commitment format itself will also >> allow >> us to re-parametrize portions of the channels which are currently set in >> stone. As an example, right now the # of max allowed outstanding HTLCs is >> set in stone once the channel has opened. With the ability to also swap >> out >> commitment _parameters_, we can start to experiment with flow-control like >> ideas such as limiting a new channel peer to only a handful of HTLC slots, >> which is then progressively increased based on "good behavior" (or the >> other >> way around as well). Beyond just updating the channel parameters, it's >> also >> possible to "change the rules" of a channel on the fly. An example of this >> variant would be creating a new psuedo-type that implements a fee policy >> other than "the initiator pays all fees". >> >> >> # Protocol Changes >> >> With the motivation/background set up, let's dig into some potential ways >> the protocol can be modified to support this new meta-feature. As this >> change is more of a meta-change, AFAICT, the amount of protocol changes >> doesn't appear to be _too_ invasive ;). Most of the heavy lifting is done >> by >> the wondrous TLV message field extensions. >> >> ## Explicit Channel Type Negotiation >> >> Right now in the protocol, as new channel types are introduced (static >> key, >> and now anchors) we add a new feature bit. If both nodes have the feature >> bit set, then that new channel type is to be used. Notice how this is an >> _implicit_ upgrade: there's no explicit signalling during the _funding_ >> process that a new channel type is to be used. This works OK, if there's >> one >> major accepted "official" channel type, but not as new types are >> introduced >> for specific use cases or applications. The implicit negotiation also >> makes >> things a bit ambiguous at times. As an example, if both nodes have the >> `static_remote_key` _and_ anchor outputs feature bit set, which channel >> type >> should they open? >> >> To resolve this existing ambiguity in the channel type negotiation, we'll >> need to make the channel type used for funding _explicit_. Thankfully, we >> recently modified the message format to be forwarding looking in order to >> allow _TLV extensions_ to be added for all existing message types. A new >> `channel_type` (type #???) TLV would be added which makes the channel type >> used in funding explicit, with the existing feature bit advertisement >> system >> being kept in place. >> >> A draft of the changes in this area would be something like: >> >> * `open_channel` and `accept_channel` gain a new `channel_type` TLV >> field. >> * retroactively the OG commitment format is numbered as >> `channel_type=0`, >> `static_remote_key`, as `channel_type=1`, and anchors as >> `channel_type=2` >> * if one receives an `open_channel`, or `accept_channel` message with an >> unknown `channel_type`, they're to fail the funding flow >> * nodes MUST NOT send an `open_channel` or `accept_channel` message >> with a >> `channel_type` that isn't covered by their existing advertise feature >> bits >> * a mapping between feature bits and expected `channel_type` values >> would >> then be added >> * during funding negotiation, the _commitment_ type itself is >> parametrized >> based on the `channel_type` value >> * as we've all implemented `static_remote_key` commitments at this >> point, I assume the necessary code-level abstractions are already >> in-place >> >> ## Commitment State Machine Changes >> >> With the changes described in the above section, we're now able to >> explicitly identify _which_ channel type we want to enter a funding flow >> for. As we add more types, there may not be a "default" type, so making >> this >> process explicit is important to future exploration and extensibility. In >> this section, we'll introduce a series of small changes to the >> `commit_sig`, >> and `revoke_and_ack` messages which'll allow us to implement the "dynamic" >> portion of this proposal. >> >> Relying once again on the wondrous power of TLV message extensions we'll >> carry over the `channel_type` TLV (just the name, # may be diff since this >> is a diff message context) to the `commit_sig`, and `revoke_and_ack` >> messages. The following guidelines on inclusion and interpretation would >> then be applied: >> >> * the `channel_type` specified on a given `commit_sig` message should be >> the `channel_type` of the _new_ commitment being _created_ >> * when receiving a `commit_sig` with a `channel_type` that differs from >> the `channel_type` of one's on revoked commitment: >> * if the `channel_type` is unknown (or the `channel_type` transition >> isn't allowed or defined), then the _p2p_ connection should be >> aborted >> * otherwise, using the `channel_type` as a parameter for commitment >> transaction construction, a new commitment adhering to the rules of >> the `channel_type` should be constructed >> * the `channel_type` sent in the `revoke_and_ack` message should be the >> `channel_type` of the commitment that's being _revoked_ >> >> With the above new rules, let's say Alice and Bob upgrade to new versions >> of >> their LN software that support a new channel type `1`, while they're on >> channel type `0`. Either triggered automatically, or manually (by either >> side), the commitment flow would look something like: >> >> 1. sig_c_1 -> >> 2. <- revoke_c_0 >> 3. <- sig_c_1 >> 4. revoke_c_0 -> >> >> By exchanging 4 messages, both sides are able to upgrade to a new >> commitment >> format. However, one issue with the above flow is that it currently isn't >> allowed by the spec, since we disallow sending a `commit_sig` message that >> doesn't cover any updates. If we end up going with this route, then we'd >> have to relax that constraint to something like: >> >> * an empty `commit_sig` message (one that covers no updates) is >> disallowed, unless the `commit_sig` has a `channel_type`, `c_n` that >> differs from the channel type of the prior commitment, `c_n-1`. >> >> It would then be up to _new protocol extension documents_ to define _how_ >> to >> construct those new channel types, and also any changes to the on-chain >> handling that are required by those channel types. Also certain >> transitions >> may be disallowed. As an example, implementations may want to prevent a >> user >> from going back to the non-static remote key channels from the >> `static_remote_key` format. >> >> In order to prepare for these changes, implementations need to be able to >> handle "holding" unrevoked commitments of heterogeneous types, as if >> either >> of them hit the chain, they'll need to be able to resolve all contracts >> properly. >> >> An alternative to attaching the `channel_type` message to the `commit_sig` >> and having _that_ kick off the commitment upgrade, we could instead >> possibly >> add a _new_ update message (like `update_fee`) to make the process more >> explicit. In either case, we may want to restrict things a bit by only >> allowing the initiator to trigger a commitment format update. >> >> ## Further Channel Type Parameterization >> >> With the above protocol sketch, we're able to handle "simple" upgrades, >> where some/all of the parameters of the channel are hard coded and/or have >> been negotiated out of band. More complex channel types may require the >> exchange of additional keys or parameters which need to be known in order >> to >> reconstruct the _new_ commitment format and verify the new signature. This >> additional information can possibly be piggy-backed on the `commit_sig` >> message in the form of a _nested TLV_ type: >> >> * a msg-local TLV type `channel_params` is added >> * the value of this TLV type is a nested TLV blob, that contains all the >> necessary fields and values needed to properly handle the channel >> switch >> over >> >> Returning to the flow control example earlier in this post, the new limits >> for `max_allowed_htlcs`, can be included in this blob. More complex >> channel >> types could send information such as new keys to be used, or other >> parameters >> that govern how a commitment is to be constructed (like the size of the >> anchor outputs). >> >> # Conclusion >> >> Summarizing, in this post we've proposed a series of protocol >> modifications >> (with TLV fields doing most of the heavy lifting) that allows LN nodes to >> upgrade their commitments _without any on-chain_ transactions. Depending >> on >> the architecture of a node, new types may even be added/removed without >> actual downtime. >> >> The ability to upgrade commitments after the fact lessens the pressure of >> newer possibly experimental channel types to get all the details (and >> explore the rather large design space) correct up front. Once Taproot >> rolls >> around, we can simply update the funding output, roll that out, then >> continue to hash out the details on the possibly new channel type(s) that >> take advantage of all the new tools. >> >> Allowing channel types to be upgraded on the fly let's us update the >> network >> to the new _safer_ channel types in a de-synchronized, distributed manner >> that doesn't require any on-chain transactions! Dynamic commitments as a >> whole also creates another point of extensibility in the protocol so we >> can >> start to explore all the variants on channels as we know them that exist. >> >> I'm keen to gather feedback, as internally for `lnd` we've committed to >> exploring this direction so we can start to upgrade _all_ the existing >> lnd-involved channels to the new anchor commitment format, which is the >> safest format yet. >> >> [1]: https://eprint.iacr.org/2020/476 >> >> -- Laolu >> _______________________________________________ >> Lightning-dev mailing list >> Lightning-dev at lists.linuxfoundation.org >> https://www.learnbitcoin.com/archive/lists/lightning-dev >> >
Hi Z,
Quoted text (3 lines)
> Probably arguably off-topic, but this post triggered me into thinking
> about an insane idea: offchain update from existing Poon-Dryja to newer
> Decker-Russell-Osuntokun ("eltoo") mechanism.Ooo, yeh I don't see why this would be possible assuming at that point no_input has been deployed...
However, switching between commitment types that have distinct commitment invalidation mechanisms appears to make things a bit more complex. Consider that since the earlier lifetime of my channel used _revocation_ based invalidation, I'd need to be able to handle two types of invalid commitment broadcasts: broadcast of a revoked commitment, and broadcast of a _replaced_ commitment.
As a result, implementations may want to limit the types of transitions to only a commitment type with the same invalidation mechanism. On the other hand, I don't think that additional complexity (being able to handle both types of contract violations) is insurmountable.
For those that wish to retain a revocation based commitment invalidation model, they may instead opt to upgrade to something like this [1], which I consider to be the current best successor to the OG Poon-Dryja revocation mechanism (has some other tool traits too). The commitment format still needs a sexy name though...."el tres"? ;)
Quoted text (2 lines)
> We can create an upgrade transaction that is a cut-through of a mutual > close of the Poon-Dryja, and a funding open of a Decker-Russell-Osuntokun.
Splicing reborn!
Quoted text (5 lines)
> The channel retains its short-channel-id, which may be useful, since a > provably-long-lived channel implies both channel participants have high > reliability (else one or the other would have closed the channel at some > point), and a pathfinding algorithm may bias towards such long-lived > channels.
Indeed, I think some implementations (eclair?) factor in the age of the channel they're attempting to traverse during path finding.
[1]: https://eprint.iacr.org/2020/476
-- Laolu
On Tue, Jul 21, 2020 at 7:50 AM ZmnSCPxj <ZmnSCPxj at protonmail.com> wrote:
Quoted text (52 lines)
> Good morning Laolu, and list,
>
> Probably arguably off-topic, but this post triggered me into thinking
> about an insane idea: offchain update from existing Poon-Dryja to newer
> Decker-Russell-Osuntokun ("eltoo") mechanism.
>
> Due to the way `SIGHASH_ANYPREVOUT` will be deployed --- requires a new
> pubkey type and works only inside the Taproot construction --- we cannot
> seamlessly upgrade from a Poon-Dryja channel to a Decker-Russell-Osuntokun.
> The funding outpoint itself has to be changed.
>
> We can create an upgrade transaction that is a cut-through of a mutual
> close of the Poon-Dryja, and a funding open of a Decker-Russell-Osuntokun.
> This transaction spends the funding outpoint of an existing Poon-Dryja
> channel, and creates a Decker-Russell-Osuntokun funding outpoint.
>
> However, once such an upgrade transaction has been created and signed by
> both parties (after the necessary initial state is signed in the
> Decker-Russell-Osuntokun mechanism), nothing prevents the participants
> from, say, just keeping the upgrade transaction offchain as well.
>
> The participants can simply, after the upgrade transaction has been
> signed, revoke the latest Poon-Dryja state (which has been copied into the
> initial Decker-Russell-Osuntokun state).
> Then they can keep the upgrade transaction offchain, and treat the funding
> outpoint of the upgrade transaction as the "internal funding outpoint" for
> future Decker-Russell-Osuntokun updates.
>
> Now, of course, since the onchain funding outpoint remains a Poon-Dryja,
> it can still be spent using a revoked state.
> Thus, we do not gain anything much, since the entire HTLC history of the
> Poon-Dryja channel needs to be retained as protection against theft
> attempts.
>
> However:
>
> * Future HTLCs in the Decker-Russell-Osuntokun domain need not be recorded
> permanently, thus at least bounding the information liability of the
> upgraded channel.
> * The channel retains its short-channel-id, which may be useful, since a
> provably-long-lived channel implies both channel participants have high
> reliability (else one or the other would have closed the channel at some
> point), and a pathfinding algorithm may bias towards such long-lived
> channels.
>
> Of note, is that if the channel is later mutually closed, the upgrade
> transaction, being offchain, never need appear onchain, so this potentially
> saves blockchain space.
>
> Regards,
> ZmnSCPxj
>Hi Laolu,
I think that's a must before we introduce a bunch of new features and the number of channels explodes. The de-synchronized side could be underscored more as any scheduled, automatic, massive upgrade for security forcing chain writes can be exploited to launch mempool-congestion attacks.
Quoted text (15 lines)
> Finally, the ability to update the commitment format itself will also allow > us to re-parametrize portions of the channels which are currently set in > stone. As an example, right now the # of max allowed outstanding HTLCs is > set in stone once the channel has opened. With the ability to also swap out > commitment _parameters_, we can start to experiment with flow-control like > ideas such as limiting a new channel peer to only a handful of HTLC slots, > which is then progressively increased based on "good behavior" (or the other > way around as well). Beyond just updating the channel parameters, it's also > possible to "change the rules" of a channel on the fly. An example of this > variant would be creating a new psuedo-type that implements a fee policy > other than "the initiator pays all fees".
Yes, there is a wide scope of events for which you want to upgrade: * fine-grained security policies, like scaling your `channel_reserve_satoshis`/`to_self_delay` based on my balance increasing * fee-market adjustments, like increasing `dust_limit_satoshis` or `feerate_per_kw` * new features deployments, scoping channel types, commitment types, new channel attributes (`max_dust_value`), new packets types (DLC/PTLC) * basepoints rotation, as a good practice you may want to swap them every X * routing strategies adjustments, increase `max_accepted_htlcs` to attract more traffic
Given complexity negotiation, we should cleanly dissociate the signaling of upgraded component ("I want to update output type") from the upgrade rational ("I want to update because my fee-estimator sees a feerate increase"). Former should be obviously part of the spec, latter should be left as a client-side policy, beyond avoiding footgunish behaviors.
Quoted text (8 lines)
> To solve this existing ambiguity in the channel type negotiation, we'll > need to make the channel type used for funding _explicit_. Thankfully, we > recently modified the message format to be forwarding looking in order to > allow _TLV extensions_ to be added for all existing message types. A new > `channel_type` (type #???) TLV would be added which makes the channel type > used in funding explicit, with the existing feature bit advertisement system > being kept in place.
I think we may need more than channel_type, like commitment_type/output_type. Or else we may have factorial complexity to check every features combination. As you said, TLV should make it easy.
Quoted text (2 lines)
> As we add more types, there may not be a "default" type, so making this process explicit is important to future exploration and extensibility.
We may want a "default" type based on the most secure/private one to avoid downgrade attack a la TLS between implementations. If we introduce dynamic negotiation, Alice supporting type X,Y,Z with X being the less secure, Bob a malicious routing node only signals X to force a X channel opening. To avoid this, we may deprecate from negotiation older types once newer ones are widely deployed. Maybe that you meant by "`channel_type transition isn't allowed". Experimental/advanced features can stay in allowed negotiation range but feature-gated behind some flags.
Quoted text (6 lines)
> An alternative to attaching the `channel_type` message to the `commit_sig` > and having _that_ kick off the commitment upgrade, we could instead possibly > add a _new_ update message (like `update_fee`) to make the process more > explicit. In either case, we may want to restrict things a bit by only > allowing the initiator to trigger a commitment format update.
I favor this alternative, as your new channel type may imply a channel data/round-trip extension (like signatures round-trip for PTLCs). Or if you constrain channel-flow policy, your added HTLCs might in fact be unlawful. We should avoid dependencies where validity of upgrades depend on channel state.
Moving forward, we may want to start with a minimal first-step with just introducing a new `upgrade_channel` message and its handling flow + new TLV in `open/accept`. And then slowly increase scope of what you can actually upgrade/negotiate.
Overall, that's a really cool proposal, dynamic commitment doesn't say enough on scope, maybe "flexible channels" :) ?
Antoine
Le lun. 20 juil. 2020 à 21:18, Olaoluwa Osuntokun <laolu32 at gmail.com> a écrit :
Quoted text (263 lines)
> Hi y'all, > > In this post, I'd like to share an early version of an extension to the > spec > and channel state machine that would allow for on-the-fly commitment > _format/type_ changes. Notably, this would allow for us to _upgrade_ > commitment types without any on-chain activity, executed in a > de-synchronized and distributed manner. The core realization these proposal > is based on the fact that the funding output is the _only_ component of a > channel that's actually set in stone (requires an on-chain transaction to > modify). > > > # Motivation > > (you can skip this section if you already know why something like this is > important) > > First, some motivation. As y'all are likely aware, the current deployed > commitment format has changed once so far: to introduce the > `static_remote_key` variant which makes channels safer by sending the funds > of the party that was force closed on to a plain pubkey w/o any extra > tweaks > or derivation. This makes channel recovery safer, as the party that may > have > lost data (or can't continue the channel), no longer needs to learn of a > secret value sent to them by the other party to be able to claim their > funds. However, as this new format was introduced sometime after the > initial > bootstrapping phase of the network, most channels in the wild today _are > not_ using this safer format. Transitioning _all_ the existing channels to > this new format as is, would require closing them _all_, generating tens of > thousands of on-chain transactions (to close, then re-open), not to mention > chain fees. > > With dynamic commitments, users will be able to upgrade their _existing_ > channels to new safer types, without any new on-chain transactions! > > Anchor output based commitments represent another step forward in making > channels safer as they allow users/software to no longer have to predict > chain fees ahead of time, and also bump up the fee of a > commitment/2nd-level-htlc-transaction, which is extremely important when it > comes to timely on-chain resolution of HTLC contracts. This upgrade process > (as touched on below) can either be manually triggered, or automatically > triggered once the software updates and finds a new preferable default > commitment format is available. > > As many of us are aware, the addition of schnorr and taproot to the Bitcoin > protocol dramatically increases the design space for channels as a whole. > It > may take some time to explore this design space, particularly as entirely > new channel/commitment formats [1] continue to be discovered. The roll out > of dynamic commitments allows us to defer the concrete design of the future > commitment formats, yet still benefit from the immediate improvement that > comes with morphing the funding output to be a single-key (non-p2wsh, > though > the line starts to blur w/ taproot) output. With this new funding output > format in place, users/software will then be able to update to the latest > and greatest commitment format that starts to utilize all the new tools > available (scriptless script based htlcs, etc) at a later date. > > Finally, the ability to update the commitment format itself will also allow > us to re-parametrize portions of the channels which are currently set in > stone. As an example, right now the # of max allowed outstanding HTLCs is > set in stone once the channel has opened. With the ability to also swap out > commitment _parameters_, we can start to experiment with flow-control like > ideas such as limiting a new channel peer to only a handful of HTLC slots, > which is then progressively increased based on "good behavior" (or the > other > way around as well). Beyond just updating the channel parameters, it's also > possible to "change the rules" of a channel on the fly. An example of this > variant would be creating a new psuedo-type that implements a fee policy > other than "the initiator pays all fees". > > > # Protocol Changes > > With the motivation/background set up, let's dig into some potential ways > the protocol can be modified to support this new meta-feature. As this > change is more of a meta-change, AFAICT, the amount of protocol changes > doesn't appear to be _too_ invasive ;). Most of the heavy lifting is done > by > the wondrous TLV message field extensions. > > ## Explicit Channel Type Negotiation > > Right now in the protocol, as new channel types are introduced (static key, > and now anchors) we add a new feature bit. If both nodes have the feature > bit set, then that new channel type is to be used. Notice how this is an > _implicit_ upgrade: there's no explicit signalling during the _funding_ > process that a new channel type is to be used. This works OK, if there's > one > major accepted "official" channel type, but not as new types are introduced > for specific use cases or applications. The implicit negotiation also makes > things a bit ambiguous at times. As an example, if both nodes have the > `static_remote_key` _and_ anchor outputs feature bit set, which channel > type > should they open? > > To resolve this existing ambiguity in the channel type negotiation, we'll > need to make the channel type used for funding _explicit_. Thankfully, we > recently modified the message format to be forwarding looking in order to > allow _TLV extensions_ to be added for all existing message types. A new > `channel_type` (type #???) TLV would be added which makes the channel type > used in funding explicit, with the existing feature bit advertisement > system > being kept in place. > > A draft of the changes in this area would be something like: > > * `open_channel` and `accept_channel` gain a new `channel_type` TLV > field. > * retroactively the OG commitment format is numbered as `channel_type=0`, > `static_remote_key`, as `channel_type=1`, and anchors as > `channel_type=2` > * if one receives an `open_channel`, or `accept_channel` message with an > unknown `channel_type`, they're to fail the funding flow > * nodes MUST NOT send an `open_channel` or `accept_channel` message with > a > `channel_type` that isn't covered by their existing advertise feature > bits > * a mapping between feature bits and expected `channel_type` values would > then be added > * during funding negotiation, the _commitment_ type itself is > parametrized > based on the `channel_type` value > * as we've all implemented `static_remote_key` commitments at this > point, I assume the necessary code-level abstractions are already > in-place > > ## Commitment State Machine Changes > > With the changes described in the above section, we're now able to > explicitly identify _which_ channel type we want to enter a funding flow > for. As we add more types, there may not be a "default" type, so making > this > process explicit is important to future exploration and extensibility. In > this section, we'll introduce a series of small changes to the > `commit_sig`, > and `revoke_and_ack` messages which'll allow us to implement the "dynamic" > portion of this proposal. > > Relying once again on the wondrous power of TLV message extensions we'll > carry over the `channel_type` TLV (just the name, # may be diff since this > is a diff message context) to the `commit_sig`, and `revoke_and_ack` > messages. The following guidelines on inclusion and interpretation would > then be applied: > > * the `channel_type` specified on a given `commit_sig` message should be > the `channel_type` of the _new_ commitment being _created_ > * when receiving a `commit_sig` with a `channel_type` that differs from > the `channel_type` of one's on revoked commitment: > * if the `channel_type` is unknown (or the `channel_type` transition > isn't allowed or defined), then the _p2p_ connection should be > aborted > * otherwise, using the `channel_type` as a parameter for commitment > transaction construction, a new commitment adhering to the rules of > the `channel_type` should be constructed > * the `channel_type` sent in the `revoke_and_ack` message should be the > `channel_type` of the commitment that's being _revoked_ > > With the above new rules, let's say Alice and Bob upgrade to new versions > of > their LN software that support a new channel type `1`, while they're on > channel type `0`. Either triggered automatically, or manually (by either > side), the commitment flow would look something like: > > 1. sig_c_1 -> > 2. <- revoke_c_0 > 3. <- sig_c_1 > 4. revoke_c_0 -> > > By exchanging 4 messages, both sides are able to upgrade to a new > commitment > format. However, one issue with the above flow is that it currently isn't > allowed by the spec, since we disallow sending a `commit_sig` message that > doesn't cover any updates. If we end up going with this route, then we'd > have to relax that constraint to something like: > > * an empty `commit_sig` message (one that covers no updates) is > disallowed, unless the `commit_sig` has a `channel_type`, `c_n` that > differs from the channel type of the prior commitment, `c_n-1`. > > It would then be up to _new protocol extension documents_ to define _how_ > to > construct those new channel types, and also any changes to the on-chain > handling that are required by those channel types. Also certain transitions > may be disallowed. As an example, implementations may want to prevent a > user > from going back to the non-static remote key channels from the > `static_remote_key` format. > > In order to prepare for these changes, implementations need to be able to > handle "holding" unrevoked commitments of heterogeneous types, as if either > of them hit the chain, they'll need to be able to resolve all contracts > properly. > > An alternative to attaching the `channel_type` message to the `commit_sig` > and having _that_ kick off the commitment upgrade, we could instead > possibly > add a _new_ update message (like `update_fee`) to make the process more > explicit. In either case, we may want to restrict things a bit by only > allowing the initiator to trigger a commitment format update. > > ## Further Channel Type Parameterization > > With the above protocol sketch, we're able to handle "simple" upgrades, > where some/all of the parameters of the channel are hard coded and/or have > been negotiated out of band. More complex channel types may require the > exchange of additional keys or parameters which need to be known in order > to > reconstruct the _new_ commitment format and verify the new signature. This > additional information can possibly be piggy-backed on the `commit_sig` > message in the form of a _nested TLV_ type: > > * a msg-local TLV type `channel_params` is added > * the value of this TLV type is a nested TLV blob, that contains all the > necessary fields and values needed to properly handle the channel > switch > over > > Returning to the flow control example earlier in this post, the new limits > for `max_allowed_htlcs`, can be included in this blob. More complex channel > types could send information such as new keys to be used, or other > parameters > that govern how a commitment is to be constructed (like the size of the > anchor outputs). > > # Conclusion > > Summarizing, in this post we've proposed a series of protocol modifications > (with TLV fields doing most of the heavy lifting) that allows LN nodes to > upgrade their commitments _without any on-chain_ transactions. Depending on > the architecture of a node, new types may even be added/removed without > actual downtime. > > The ability to upgrade commitments after the fact lessens the pressure of > newer possibly experimental channel types to get all the details (and > explore the rather large design space) correct up front. Once Taproot rolls > around, we can simply update the funding output, roll that out, then > continue to hash out the details on the possibly new channel type(s) that > take advantage of all the new tools. > > Allowing channel types to be upgraded on the fly let's us update the > network > to the new _safer_ channel types in a de-synchronized, distributed manner > that doesn't require any on-chain transactions! Dynamic commitments as a > whole also creates another point of extensibility in the protocol so we can > start to explore all the variants on channels as we know them that exist. > > I'm keen to gather feedback, as internally for `lnd` we've committed to > exploring this direction so we can start to upgrade _all_ the existing > lnd-involved channels to the new anchor commitment format, which is the > safest format yet. > > [1]: https://eprint.iacr.org/2020/476 > > -- Laolu > _______________________________________________ > Lightning-dev mailing list > Lightning-dev at lists.linuxfoundation.org > https://www.learnbitcoin.com/archive/lists/lightning-dev >
Good morning laolu,
Quoted text (20 lines)
> Hi Z,
>
> > Probably arguably off-topic, but this post triggered me into thinking
> > about an insane idea: offchain update from existing Poon-Dryja to newer
> > Decker-Russell-Osuntokun ("eltoo") mechanism.
>
> Ooo, yeh I don't see why this would be possible assuming at that point
> no_input has been deployed...
>
> However, switching between commitment types that have distinct commitment
> invalidation mechanisms appears to make things a bit more complex. Consider
> that since the earlier lifetime of my channel used _revocation_ based
> invalidation, I'd need to be able to handle two types of invalid commitment
> broadcasts: broadcast of a revoked commitment, and broadcast of a _replaced_
> commitment.
>
> As a result, implementations may want to limit the types of transitions to
> only a commitment type with the same invalidation mechanism. On the other
> hand, I don't think that additional complexity (being able to handle both types
> of contract violations) is insurmountable.What I am proposing is that there is an adaptor, an upgrade transaction, which transitions from one type to the other.
This is needed in transitioning to the Decker-Russell-Osuntokun case anyway, since as mentioned, current Poon-Dryja channels use P2WSH while `SIGHASH_ANYPREVOUT`, which Decker-Russell-Osuntokun absolutely relies on, will only be available on Taproot outputs.
Then, the only thing you need to watch for will be old state for the *oldest* mechanism the channel had (i.e. the mechanism used at the time of channel construction), OR the upgrade transaction.
When you see the upgrade transaction onchain, you then switch to watching for the next-oldest mechanism of the channel.
If a third mechanism is implemented for channels on Lightning as well and this channel is upgraded again from Decker-Russell-Osuntokun to this third mechanism, then at this point you switch to watching for revoked states of Decker-Russell-Osuntokun OR the 2-to-3 upgrade transaction.
Quoted text (5 lines)
> For those that wish to retain a revocation based commitment invalidation > model, they may instead opt to upgrade to something like this [1], which I > consider to be the current best successor to the OG Poon-Dryja revocation > mechanism (has some other tool traits too). The commitment format still > needs a sexy name though...."el tres"? ;)
Interesting, will check.
Calling it Aumayr-Ersoy-Erwig-Faust-Hostakova-Maffei-Moreno-Sanchez-Riahi seems fine to me. :P
Quoted text (4 lines)
> > We can create an upgrade transaction that is a cut-through of a mutual > > close of the Poon-Dryja, and a funding open of a Decker-Russell-Osuntokun. > > Splicing reborn!
Not quite splicing: the issue with splice-in (and only splice-in, splice-out is trivial) is that there is another UTXO being spent, which can invalidate the transaction that does the splice-in, and leave the channel in limbo.
This upgrade transaction is a 1-input 1-output transaction, spending from the previous funding outpoint for a particular channel mechanism, and then creating a new funding outpoint.
The trick is that the upgrade tranaction is ***not*** broadcast (i.e. we do not close and reopen the channel), it is kept offchain in your database, waiting to be lost by disk failure like all the other important data, and at mutual close the upgrade transaction can be ignored.
The node only needs to keep watching for theft attempts on the *oldest* mechanism the channel has, as the upgrade transaction appearing onchain signals when the node has to switch over to watching for the newer mechanism(s).
Quoted text (10 lines)
> > > The channel retains its short-channel-id, which may be useful, since a > > provably-long-lived channel implies both channel participants have high > > reliability (else one or the other would have closed the channel at some > > point), and a pathfinding algorithm may bias towards such long-lived > > channels. > > Indeed, I think some implementations (eclair?) factor in the age of the > channel they're attempting to traverse during path finding. >
Indeed, which is why you might want to upgrade a Poon-Dryja to a Decker-Russell-Osuntokun.
Regards, ZmnSCPxj
Olaoluwa Osuntokun <laolu32 at gmail.com> writes:
Quoted text (7 lines)
> After getting some feedback from the Lightning Labs squad, we're thinking > that it may be better to make the initial switch over double-opt-in, similar > to the current `shutdown` message flow. So with this variant, we'd add two > new messages: `commit_switch` and `commit_switch_reply` (placeholder > names). We may want to retain the "initiator" only etiquette for simplicity, > but if we want to allow both sides to initiate then we'll need to handle > collisions (with a randomized back off possibly).
(Sorry for long delay catching up with backlog).
Yeah, modelling on the shutdown flow makes more sense to me, due to simplicity.
I think we will end up with a linear progression of channel types (type n+1 is always preferred over type n). This has the benefit of *reducing* the test matrix at some point by dropping older formats.
(You can't drop older format completely without an onchain event, of course, since you need to be able to penalize ancient commit txs. Though perhaps you just pregen penalty txs for those cases and behave like a watchtower, maybe even not bothering about HTLCs?)
I think inventing a new commitment type numbering scheme is unnecessary: just use existing feature bits and define what upgrades are permissable.
I send `commit_switch` with features, you send `commit_switch` with features, we do feature matching to determine new features for channel. You can easily figure out the intersection: if one requires a feature the other doesn't offer, it's a noop (upgrade failure). Similarly, if the combination offers no new features, it's a noop.
You can't add HTLCs after you've sent `commit_switch`. You can add again (under the new rules) once: 1. You've both sent and received `commit_switch`. 2. You have no outstanding HTLCs (in either direction).
This means we don't have to worry about the case where we both propose upgrades at once, it Just Works. It's also Just Works to always send on reconnect, and simply echo your current features if you receive an unexpected `commit_switch`.
--- I'd like to Upgrade The World to anchor_outputs, so maybe cleanest would be:
1. Release supports anchor_outputs (odd). 2. Release supports upgrading to anchor_outputs. 3. Release requires anchor_outputs (even), unilaterally closes channels w/o (ideally very few!).
We need a feature bit for upgrades, since we don't want to stop the flow if they don't respond to commit_switch (i.e. it should be even).
Anyone working on this right now?
Cheers, Rusty.