Skip to content

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

Merged
merged 5 commits into from
Dec 12, 2019

Conversation

TheBlueMatt
Copy link
Collaborator

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.

@TheBlueMatt TheBlueMatt changed the title 2019 11 signer api Replace keys API with Signer API to support hardware wallets eventually Nov 28, 2019
@TheBlueMatt
Copy link
Collaborator Author

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.

@TheBlueMatt
Copy link
Collaborator Author

Amended to use the new remote transaction signing API in the initial funding_signed signature generation.

@TheBlueMatt TheBlueMatt force-pushed the 2019-11-signer-api branch 4 times, most recently from 3bbaec3 to 42e1d49 Compare December 9, 2019 21:43
Copy link

@ariard ariard left a 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.

@TheBlueMatt TheBlueMatt added this to the 0.0.11 milestone Dec 11, 2019
TheBlueMatt and others added 5 commits December 11, 2019 17:29
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.
@TheBlueMatt
Copy link
Collaborator Author

Took your commit. Will merge after the 0.0.10 bump is done.

@TheBlueMatt TheBlueMatt merged commit edab29e into lightningdevkit:master Dec 12, 2019
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.

2 participants