Skip to content
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

Implement BOLT2: opt_shutdown_anysegwit #780

Closed
ariard opened this issue Jan 18, 2021 · 2 comments
Closed

Implement BOLT2: opt_shutdown_anysegwit #780

ariard opened this issue Jan 18, 2021 · 2 comments
Labels
good first issue Good for newcomers

Comments

@ariard
Copy link

ariard commented Jan 18, 2021

See lightning/bolts#672.

@ariard ariard added the good first issue Good for newcomers label Jan 18, 2021
@TheBlueMatt
Copy link
Collaborator

We should probably do a few things related to this - we should (a) implement the protocol itself, (b) we should require the feature for all peers, (c) we should change KeysInterface.get_shutdown_pubkey to allow it to return any segwit script, probably via a segwit type enum or so.

galderz added a commit to galderz/rust-lightning that referenced this issue Feb 5, 2021
* Implemented protocol.
* Made feature required for all.
galderz added a commit to galderz/rust-lightning that referenced this issue Feb 11, 2021
* Made the feature optional.
* Verify that the default value is true.
* Add a supports_shutdown_anysegwit field to Channel,
based on the features of the remote peer.
* Verify that on shutdown,
if Channel.supports_shutdown_anysegwit is enabled,
the script can be a witness program.
* Added a test that verifies that a scriptpubkey
for an unreleased segwit version is handled successfully.
* Added a test that verifies that
if node has op_shutdown_anysegwit disabled,
a scriptpubkey with an unreleased segwit version on shutdown
throws an error.
galderz added a commit to galderz/rust-lightning that referenced this issue Feb 23, 2021
* Implemented protocol.
* Made feature optional.
* Verify that the default value is true.
* Verify that on shutdown,
if Channel.supports_shutdown_anysegwit is enabled,
the script can be a witness program.
* Added a test that verifies that a scriptpubkey
for an unreleased segwit version is handled successfully.
* Added a test that verifies that
if node has op_shutdown_anysegwit disabled,
a scriptpubkey with an unreleased segwit version on shutdown
throws an error.
* Added peer InitFeatures to handle_shutdown
* Check if shutdown script is valid when given upfront.
* Added a test to verify that an invalid test results in error.
* Added a test to check that if a segwit script with version 0 is provided,
the updated anysegwit check detects it and returns unsupported.
galderz added a commit to galderz/rust-lightning that referenced this issue Feb 25, 2021
* Implemented protocol.
* Made feature optional.
* Verify that the default value is true.
* Verify that on shutdown,
if Channel.supports_shutdown_anysegwit is enabled,
the script can be a witness program.
* Added a test that verifies that a scriptpubkey
for an unreleased segwit version is handled successfully.
* Added a test that verifies that
if node has op_shutdown_anysegwit disabled,
a scriptpubkey with an unreleased segwit version on shutdown
throws an error.
* Added peer InitFeatures to handle_shutdown
* Check if shutdown script is valid when given upfront.
* Added a test to verify that an invalid test results in error.
* Added a test to check that if a segwit script with version 0 is provided,
the updated anysegwit check detects it and returns unsupported.
* An empty script is only allowed when sent as upfront shutdown script,
so make sure that check is only done for accept/open_channel situations.
* Instead of reimplementing a variant of is_witness_script,
just call it and verify that the witness version is not 0.
TheBlueMatt added a commit that referenced this issue Feb 25, 2021
Add support for `opt_shutdown_anysegwit` feature #780
@ariard
Copy link
Author

ariard commented Apr 7, 2021

Closed by #794

@ariard ariard closed this as completed Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants
@TheBlueMatt @ariard and others