Replies: 3 comments 6 replies
-
Thank you for the very thorough description.
That should not be the case AFAIK. The wallet is only involved in the lock transaction. The keys that we use to spend that lock output are part of the |
Beta Was this translation helpful? Give feedback.
-
Thanks for this thorough write up. Here are my two sats on this topic: Backup vs ExportThe initial ticket was about backing up the seed file with a focus only on the wallet seed. PeerID vs WalletI agree, these two things don't necessarily have to be derived from the same seed. We made some attempts in the past which allowed us to pass in a Bip84 xprv as arg for the wallet. Wallet exportIt was probably for simplicity reasons that we went for a seed file and not for Bip39 right away. This is biting us a bit now because we cannot generate a Bip39 seed phrase from our seed file. Wallet importAssuming the wallet and peer id are decoupled it should theoretically be easy to just import a seed file again and replace the wallet. This comes with a few caveats though: Existing positionsExisting positions have CETs which spend into an address generated by the wallet. These CETs are already final and cannot be changed. However, on every rollover a new set of CETs will be generated. Meaning, we have the option to force a rollover when a (new) wallet seed was imported so that all existing positions will end up in the new wallet. Note: we need to be careful if there is a transaction currently pending. Force closeA force close of existing positions is probably not the best idea: Our protocol enforces a timeout of 12 blocks (~2h) between including the commit transaction and publishing a CET. Additionally, if you force close now, your CET will only be valid in 24h. This would make the wallet upgrade a bad experience because the funds will only show up in 24h. Bip39It looks like that the de-facto standard is Bip39. Even though, there are attempts to push for a new approach using descriptors. The reason for this is that a seed phrase alone does not tell you how to derive addresses, i.e. which derivation path was used. This can be troublesome if we upgrade to Taproot which uses Bip86 while Segwit uses Bip84. Long story short, I'm still in favor of using Bip39 😅 Proposed approachMy proposal is as following: For existing usersWhen importing/creating a new wallet notify the user that the old wallet will be drained and existing positions will be forced rolled over. If this fails, we fail the wallet import/creation. The way how I imagine this is a simple edit field which generated 24 seed words or allows you to edit it to import an existing seed phrase. We did something like this before in our browser extension and this wasn't too bad. For new usersWe generate a default wallet (using Bip39) but let the user create a new one through the wallet interface which then goes back to the same functionality as above. That way we don't have to provide a different setup scenario for new users vs existing users. |
Beta Was this translation helpful? Give feedback.
-
I continued with the issue and finished the import seed feature with the seed file - #3173. This feature is disabled for umbrel users though as 1) the seed is not stored to file and 2) the seed is 32 bytes instead of 256 bytes long. Theoretically we could implement a compatibility, but I don't think the added complexity is worth it. |
Beta Was this translation helpful? Give feedback.
-
Backup & Restore VS Export & Import
Recently we are mixing up backup & restore with export & import functionalities. Let me start by describing my view on these functionalities.
Backup & Restore
Typically an infrastructural topic, where the storage will be simply copied to or from another device / storage. During that process the system will typically not available - neither during backup nor during restore. Creating a backup of a system while running brings some risks as the system and the backup process might interfere with each other. e.g. changing the database while the backup is running may result into a corrupted state.
There are several existing solutions that can simply be used. e.g. Start9 provides such functionality, longhorn on kubernetes, or simple rsync scripts.
Export & Import
In this context I refer to exporting or importing a wallet. This is a common functionality seen in other wallets as well with which you can export / import your keys so you can easily move your wallet from one app to another. As already pointed out in previous discussions and tickets BIP39 is a common standard for supporting that interoperability.
Conclusion / Open for Discussion
Related ideas
How should we proceed with #1065 and #2989
Restoring the seed works prototypical - but the following tasks are still outstanding though.
That being said I don't think this feature will have a clear use case without the migration to BIP39. If that's the plan we could continue, given that we don't think that a BIP39 migration will not bring too many changes to the export & import functionality.
Related discussions, tickets and pull requests
Beta Was this translation helpful? Give feedback.
All reactions