-
Notifications
You must be signed in to change notification settings - Fork 407
Replace keys API with Signer API to support hardware wallets eventually #404
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
Replace keys API with Signer API to support hardware wallets eventually #404
Conversation
71a0d39
to
4b35f86
Compare
4b35f86
to
e15ab02
Compare
Process note: I'd like to land #347 before this and cut a release so that we don't have a partial API in a release that is needed to get important protocol features that other clients are requiring now. |
e15ab02
to
d010039
Compare
Amended to use the new remote transaction signing API in the initial funding_signed signature generation. |
3bbaec3
to
42e1d49
Compare
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 don't see this breaking anything for the new ChannelKeys::sign_remote_commitment
method. The rest of the change are just templating.
I've taken my nits + better documentation of current assumptions of KeysInterface in commit ariard@95f666d
I think that's a good head start in making hardware-wallet support a first-class concern of RL.
Instead of having in-memory access to the list of private keys associated with a channel, we should have a generic API which allows us to request signing, allowing the user to store private keys any way they like. The first step is the (rather mechanical) process of templating the entire tree of ChannelManager -> Channel impls by the key-providing type. In a later commit we should expose only public keys where possible.
This adds a new fn to ChannelKeys which is called when we generte a new remote commitment transaction for signing. While it may be theoretically possible to unwind state updates by disconnecting and reconnecting as well as making appropriate state machine changes, the effort required to get it correct likely outweighs the UX cost of "preflighting" the requests to hardwre wallets.
Improve some comments of interface methods.
42e1d49
to
35814b6
Compare
Took your commit. Will merge after the 0.0.10 bump is done. |
Built on #403 cause I'm lazy (as always), so just the top two commits.
Its obviously insufficient, but its a decent size diff so figured should get the ball rolling by just getting it upstream.