Upgrade on reestablish. [combined summary]



Individual post summaries: Click here to read the original discussion on the lightning-dev mailing list

Published on: 2021-05-09T05:22:40+00:00


Summary:

Rusty has announced that he has simplified something, but he hasn't specified what it is. He mentions that he disliked the previous implementation and will complete the new one before posting the specification.The Lightning Network has developed a method for upgrading channels by introducing option_static_remotekey. They have created a pull request for this upgrade on GitHub. The upgrade can be performed when both implementations support it during reconnection. Each peer indicates the upgrades they offer, and if both peers agree on an upgrade, it is implemented after any reestablish retransmissions and corresponding commitments. This brings the channel into a symmetrical state with no outstanding updates. However, in case of a disconnection, one peer may consider the channel upgraded while the other does not. To address this issue and improve diagnostics in the future, they now indicate the current channel features upon reconnection. The more upgraded feature is immediately applied. The current channel features are defined as option_static_remotekey and option_anchor_outputs (which requires option_static_remotekey). Once both peers confirm that things are quiescent by sending update_upgrade, the channel features are considered upgraded. A normal commitment_signed cycle then occurs with the new upgrade in place. There are specific requirements for nodes when sending and receiving channel_reestablish messages. If a node sends channel_reestablish, it must set the channel features that currently apply to the channel. If it sets upgrades_wanted, it should set it to a single channel feature that is not in channel_features, along with any required features that are also not in channel_features. If a node receives an update_upgrade message, it will fail the upgrade if the features mentioned are not the same as the ones it sent or will send.In general, it is preferable to have both sides synchronized when upgrades occur. Most upgrades happen when the software is restarted, which initiates a reconnect cycle anyway.


Updated on: 2023-07-31T23:27:41.709260+00:00