-
Notifications
You must be signed in to change notification settings - Fork 407
Fetch KeysInterface
's get_shutdown_pubkey
at close-time with !commit_upfront_shutdown_pubkey
#994
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
Comments
To make |
Right, I think we can just throw our hands up and say "if you use a non-p2wpkh (where we'd have to get the public key) shutdown script or do not commit to it upfront, then you cannot open your serialization on old versions". No reason to default to not committing upfront so at least the default stuff would still work. |
Are you saying if
|
Ah, actually I didn't realize |
It may make sense to merge this with #1006 somehow. Maybe an
Yea. |
In conjunction with merging Could also keep it as Thoughts? |
In theory I think we should do that, but (a) Payload allows any length version-0 witness script, whereas standardness on the network and BOLTS only allows 20 bytes and 32 bytes and (b) if we want to support writing content that old versions can read we have to support providing the full public key, not the public key hash. I'm open to breaking (b) at this stage, but (a) is a bit more tricky. I guess we could return a Result to avoid (a), but it's a bit nicer to have it not be possible by API limits. |
I suppose we could wrap Do we want to impose the BOLT restrictions on contexts outside of BOLT 2 usage? That is, should we merge the two |
I guess, but what does that get us vs just making our own enum? In most contexts users are creating addresses from public keys anyway, so the extra step is just an unwrap for its own sake. Plus, it'd be nice to avoid the backwards-incompatibility, even though I admit it's not really a big deal.
I feel like it would be really nice to have a single interface for "send on-chain funds here", so to do that we'd need to, but if you feel that they should remain separate APIs no reason to require it. |
Thought about this more and realized we really don't need |
Sounds good, I assume it'll look pretty similar, though, basically
|
Config allows users to select if they want to commit to the shutdown public key or not, but either way we pull the shutdown public key form users at channel-open (storing it in
Channel::shutdown_pubkey
). We should instead actually pull the public key at shutdown-time based on the config bool. https://docs.rs/lightning/0.0.99/lightning/util/config/struct.ChannelConfig.html#structfield.commit_upfront_shutdown_pubkeyThe text was updated successfully, but these errors were encountered: