Make UpfrontShutdownScript a TLV record#1333
Merged
Merged
Conversation
ChannelReestablish contains optional fields that are currently gated on the DLP/SRK feature bits. We make them mandatory to allow extending the message with TLVs.
OpenChannel and AcceptChannel contained an optional field for upfront_shutdown_script. We make this field mandatory to allow extending the message with TLVs. We move this field inside a TLV record for future flexibility.
pm47
reviewed
Feb 28, 2020
pm47
reviewed
Feb 28, 2020
Codecov Report
@@ Coverage Diff @@
## master #1333 +/- ##
==========================================
+ Coverage 77.62% 77.75% +0.13%
==========================================
Files 144 144
Lines 10141 10206 +65
Branches 406 401 -5
==========================================
+ Hits 7872 7936 +64
- Misses 2269 2270 +1
|
pm47
approved these changes
Feb 28, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We make some previously optional fields mandatory in
ChannelReestablish,OpenChannelandAcceptChannel. This allows us to extend all messages with an optional TLV stream.See lightning/bolts#714 for more details.
We're moving
upfront_shutdown_scriptto 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: