-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BOLT 2: option_shutdown_anysegwit
(Feature 26/27)
#672
BOLT 2: option_shutdown_anysegwit
(Feature 26/27)
#672
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, we may need to revisit depending on whether no input uses external tagging or not
ACK e8f8a79 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK
Can land once rebased! |
Assigned features 22/23. |
e8f8a79
to
2df5c06
Compare
Rebased on top of master, assigned feature bits as per http://www.erisian.com.au/meetbot/lightning-dev/2020/lightning-dev.2020-08-17-20.08.html |
As discussed on IRC, needs feature bit bump to not conflict with #824 |
2df5c06
to
75c02f9
Compare
Clean rebase on top of |
765e26d
to
4acbb39
Compare
Featurebits bumped from 22/23 to 24/25 as per specification meeting 2020/12/20 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 4acbb39
If two implementations can successfully test interop, we can merge this.
4. `OP_0` `32` 32-bytes (version 0 pay to witness script hash) | ||
4. `OP_0` `32` 32-bytes (version 0 pay to witness script hash), OR | ||
5. if (and only if) `opt_shutdown_anysegwit` is negotiated: | ||
* `OP_1` through `OP_16` inclusive, followed by a single push of 2 to 40 bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beware that your is_witness_program()
is bip 141 compliant, otherwise if the witness program size is unbounded the non-funder counterparty might inflate its scriptpubkey
to burn in fees the funder balance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if it makes sense to clarify, but to check with others, the way I read this, if I disconnect from a peer, then reconnect with new features bits set, you can opt into onlysegwit on an old channel as long as you didn't set an upfront shutdown script. I think thats correct and a good idea.
I agree, this looks desirable and compatible with the PR. |
e127a2a
to
42d6d79
Compare
4f72856
to
4e32927
Compare
opt_shutdown_anysegwit
option_shutdown_anysegwit
option_shutdown_anysegwit
option_shutdown_anysegwit
(Feature 26/27)
Opt-in to allow any future segwit script in shutdown as long as it complies with BIP 141 (see lightning/bolts#672).
Opt-in to allow any future segwit script in shutdown as long as it complies with BIP 141 (see lightning/bolts#672).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I implemented this in eclair and tested against c-lightning v0.10.0 (compiled with --enable-experimental-features
) and didn't find any issue.
Opt-in to allow any future segwit script in shutdown as long as it complies with BIP 141 (see lightning/bolts#672).
Applying as per action at meeting 2021-05-24. |
lightning/bolts#672 was merged. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: `option_shutdown_anysegwit` allows future segwit versions on shutdown transactions.
lightning/bolts#672 was merged. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: `option_shutdown_anysegwit` allows future segwit versions on shutdown transactions.
lightning/bolts#672 was merged. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: `option_shutdown_anysegwit` allows future segwit versions on shutdown transactions.
lightning/bolts#672 was merged. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: `option_shutdown_anysegwit` allows future segwit versions on shutdown transactions.
lightning/bolts#672 was merged. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: `option_shutdown_anysegwit` allows future segwit versions on shutdown transactions.
lightning/bolts#672 was merged. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: `option_shutdown_anysegwit` allows future segwit versions on shutdown transactions.
lightning/bolts#672 was merged. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: `option_shutdown_anysegwit` allows future segwit versions on shutdown transactions.
lightning/bolts#672 was merged. Signed-off-by: Rusty Russell <[email protected]> Changelog-Added: Protocol: `option_shutdown_anysegwit` allows future segwit versions on shutdown transactions.
lightning/bolts#672 We check the received shutdown script against higher segwit versions and accept closing to that script if option_shutdown_anysegwit has been negotiated.
lightning/bolts#672 We check the received shutdown script against higher segwit versions and accept closing to that script if option_shutdown_anysegwit has been negotiated.
lightning/bolts#672 We check the received shutdown script against higher segwit versions and accept closing to that script if option_shutdown_anysegwit has been negotiated.
Opt-in to allow any future segwit script in shutdown as long as it complies with BIP 141 (see lightning/bolts#672). This is particularly useful to allow wallet users to close channels to a Taproot address.
Opt-in to allow any future segwit script in shutdown as long as it complies with BIP 141 (see lightning/bolts#672). This is particularly useful to allow wallet users to close channels to a Taproot address.
Opt-in to allow any future segwit script in shutdown as long as it complies with BIP 141 (see lightning/bolts#672). This is particularly useful to allow wallet users to close channels to a Taproot address.
In bitcoin 0.19.0, standardness rules are going to be relaxed to allow
future witness versions. Once this is widely deployed, it will be safe
to accept them, smoothing use of future segwit versions.
See: bitcoin/bitcoin#15846
Signed-off-by: Rusty Russell [email protected]