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

allow offline signing a PSBT using a software wallet keystore without having all accounts/descriptors setup #1382

Open
AndySchroder opened this issue Apr 14, 2024 · 5 comments
Labels
low Low priority

Comments

@AndySchroder
Copy link

AndySchroder commented Apr 14, 2024

Consider the following scenario:

  1. Create software wallet on offline computer
  2. backup seed phrase and descriptor for the first account
  3. Add second account on the offline computer
  4. load descriptors for first and second account onto online computer
  5. offline computer gets destroyed
  6. restore seed and descriptor for first account onto new offline computer
  7. Create PSBT on an online machine in the second account.
  8. Transfer PSBT to offline machine for signing
  9. Get "(!) No open wallets can sign. Open Wallet?"

I believe the PSBT should include the master fingperprint, derivation path, and xpub for the second account, so the offline computer should be able to use its keystore to sign the transaction, regardless of what descriptors/accounts have been setup. Is this correct? It would be nice if sparrow wallet could look at the PSBT, then check the master fingerprint of all open keystores and if there is an open keystore that matches, sign the transaction without needing to setup an account/descriptor for the PSBT to work in..

I realize the online computer will have a copy of the descriptor for all accounts and they could be copied back to the offline computer to re-setup all accounts after it was destroyed, but I don't really think all that work should be necessary. The offline computer should need to store minimal state information. For example, I don't know that a Coldcard needs to have each account restored when you load a seed phrase into a new Coldcard.

@craigraw
Copy link
Collaborator

This is possible, but I struggle to balance this (apparently) niche use case with the additional code complexity and maintenance. Why would the user not simply just add the second account - they have clearly created a transaction using it on the online computer, so they know it exists, and presumably something as dramatic as the destruction of their offline computer would trigger some degree of restoration. Is there really a practical need for this feature?

@AndySchroder
Copy link
Author

Wondering if it would also be possible to re-use a seed for a multi-sig account and not even need the descriptor for the multi-sig on the offline computer? Could a single-sig keystore using the same seed be good enough to sign a PSBT for a multi-sig?

@AndySchroder
Copy link
Author

This is possible, but I struggle to balance this (apparently) niche use case with the additional code complexity and maintenance. Why would the user not simply just add the second account - they have clearly created a transaction using it on the online computer, so they know it exists, and presumably something as dramatic as the destruction of their offline computer would trigger some degree of restoration. Is there really a practical need for this feature?

Trying to address the use case where the person who is doing the restoration may not know much about what is going on. Trying to make it as simple as possible for someone to do the restoration that has limited skills about descriptors, derivation paths, etc.. For example, just tell them to use a seedhammer single sig plate (https://seedhammer.com/article/the-seedhammer-metal-plates) and scan 2 QR codes and that should be enough for a casual user to get their offline computer working again.

@AndySchroder
Copy link
Author

If this functionality were implemented there could possibly even be a wallet type where only a keystore is configured and no descriptor is needed to be defined (or I guess you could just leave it as the default descriptor and only worry about scanning the seed QR and not bother to scan a descriptor QR from the seedhammer plate).

@craigraw craigraw added the low Low priority label Apr 16, 2024
@craigraw
Copy link
Collaborator

Trying to address the use case where the person who is doing the restoration may not know much about what is going on.

It's a legitimate use case, but I think a rare one. Marking this as low priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low Low priority
Projects
None yet
Development

No branches or pull requests

2 participants