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

hsmtools: add a tool to recover a to_remote output from peer unilateral close #3217

Closed

Conversation

darosior
Copy link
Collaborator

This builds upon #3186 (starts at 02a1934).

I suffered a power outage some weeks ago and lost the dbid of many channels from the database, the remote peer has then unilaterally closed the channel : I was not able to recover the private key from the to_remote output of its commitment transaction without the dbid. Since I've seen others in the same situation (this has been in the news, too...), here is a tool which derives n payment keys for every dbid and compares it to the pubkeyhash output in the witness program (we just take a bech32 P2WPKH address and derive the goal hash from it).

darosior and others added 6 commits October 22, 2019 11:15
A general one, for all things hsm_secret.
This takes a dbid, a "depth" (how many commits to dump), the hsm_secret
path, and a potential password to dump informations about all
commitments until the depth.

Co-Authored-By: Sjors Provoost <sjors@sprovoost.nl>
In case of a loss of data, namely the dbid of a given channel, we might
not be able to recover the payment private key corresponding to the
`to_remote` output of the commitment transaction of the peer.

This adds a tool which compares the pubkeyhash in the output witness
program to the hash of payment keys derived until a specified depth and
a seed derived for every dbid..
@darosior
Copy link
Collaborator Author

darosior commented Oct 29, 2019

Closing this, since it doesn't make sense without option_static_remotekey

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.

1 participant