Make UpfrontShutdownScript a TLV record #1333
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We make some previously optional fields mandatory in
ChannelReestablish
,OpenChannel
andAcceptChannel
. This allows us to extend all messages with an optional TLV stream.See lightning/bolts#714 for more details.
We're moving
upfront_shutdown_script
to a TLV field: this is compatible at the byte level and provides more flexibility in the future (to either include or exlude it). For now we always include an empty one, for backwards-compatibility.This allowed removing the ugly hack in the codecs that was made specifically for Phoenix. In the branch we deploy to the node connected to Phoenix wallets, we should simply remove the
UpfrontShutdownScript(ByteVector.empy)
from the TLV stream and we will be backwards-compatible with older Phoenix.E2E tests: