Skip to content

Add ability to have user specify custom upfront shutdown script on channel open #2218

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

Conversation

benthecarman
Copy link
Contributor

@benthecarman benthecarman commented Apr 23, 2023

This is a nice to have feature so you don't need to do something wacky with your channel manager if you want to open a channel with a specific shutdown script.

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 88.17% and project coverage change: -0.05 ⚠️

Comparison is base (bc54441) 91.57% compared to head (b32bd8a) 91.53%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2218      +/-   ##
==========================================
- Coverage   91.57%   91.53%   -0.05%     
==========================================
  Files         104      104              
  Lines       51553    51566      +13     
  Branches    51553    51566      +13     
==========================================
- Hits        47212    47201      -11     
- Misses       4341     4365      +24     
Impacted Files Coverage Δ
lightning-background-processor/src/lib.rs 83.56% <ø> (ø)
lightning/src/ln/shutdown_tests.rs 96.49% <23.07%> (-1.57%) ⬇️
lightning/src/ln/channel.rs 90.00% <95.45%> (-0.03%) ⬇️
lightning-invoice/src/utils.rs 96.97% <100.00%> (ø)
lightning/src/ln/chanmon_update_fail_tests.rs 98.61% <100.00%> (ø)
lightning/src/ln/channelmanager.rs 88.82% <100.00%> (+<0.01%) ⬆️
lightning/src/ln/functional_test_utils.rs 92.79% <100.00%> (ø)
lightning/src/ln/functional_tests.rs 98.25% <100.00%> (ø)
lightning/src/ln/payment_tests.rs 97.57% <100.00%> (ø)
lightning/src/ln/priv_short_conf_tests.rs 97.59% <100.00%> (ø)
... and 1 more

... and 3 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TheBlueMatt
Copy link
Collaborator

This is already done via SignerProvider::get_shutdown_script, but if we want to move it to make it explicit it should be in the handshake config rather than via a new parameter, I think.

@benthecarman
Copy link
Contributor Author

Similar reasoning here: #2219 (comment)

This PR is less useful I'll admit because we could just set the upfront shutdown option to false and decide the closing address at close time.

@benthecarman
Copy link
Contributor Author

I thought about putting it in the handshake config, however this is something you can set for the node globally I believe and that could result in a user reusing an address across multiple channels

@wpaulino
Copy link
Contributor

I thought about putting it in the handshake config, however this is something you can set for the node globally I believe and that could result in a user reusing an address across multiple channels

It's currently already reused across multiple channels (which should change with #2174), but you can override the config you use for outbound channels.

@TheBlueMatt
Copy link
Collaborator

Can you specify the intended use-case exactly here, at least as far as its different from #2219? I'm missing a bit of why you'd want to hard-code the shutdown script for a specific channel at open, in a way that isn't generic (ie "get an address of mine and use that") but is somehow specific to that channel.

@benthecarman
Copy link
Contributor Author

Can you specify the intended use-case exactly here, at least as far as its different from #2219? I'm missing a bit of why you'd want to hard-code the shutdown script for a specific channel at open, in a way that isn't generic (ie "get an address of mine and use that") but is somehow specific to that channel.

tbh #2219 is all we really need. With this PR was just trying to cover all the times you could override the shutdown script. If you want to punt on this that is fine, feel free to close

@TheBlueMatt
Copy link
Collaborator

Yea, absent a strong motivating use-case I'm inclined to punt on this, I'm not convinced its as useful as 2219 and is just one more place we can override the shutdown script I'd rather skip.

@TheBlueMatt TheBlueMatt closed this May 2, 2023
@benthecarman benthecarman deleted the custom-upfront-shutdown-script branch May 2, 2023 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants