-
Notifications
You must be signed in to change notification settings - Fork 312
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
Reintroduce descriptor data to bdk::Wallet
persistence
#1101
Comments
This is a good point. I seem to recall that things turned out this way because I didn't even plan on having any keychain data in the database in general and would leave that up to the application. This changed in order to simplify the lives of Why don't we just persist the public descriptor in the database? We could even have this as part of the changeset for I seem to remember @afilini mentioning that it was to maintain some kind of forward privacy against an attacker who can read your database at some point (and then loses access). This would prevent them from learning the full descriptor at that point. I think this is a very weak guarantee:
If you want strong privacy against a database compromiser then there are two better choices: |
Had a little discussion about this with @evanlinjin and rather than persist the full descriptors I like the idea of offering a different trait for storing the descriptors, in case the wallet user wants to store those in a different more secure way. I still think we need the |
I would still just store the public descriptor in there. You mentioned storing them in a different "more secure" way but did not make the case for doing that if the entire wallet history is stored in the persistence anyway. Is there really context where users don't care about an attacker knowing their wallet history up until the point the attacker compromised it but care deeply about the future of it after that event? That doesn't make sense to me. I think we should guide application developers in the right direction here which is to encrypt history and descriptors together. |
I've assigned myself to this issue as it's one of the priority tickets for the next release. I agree with @LLFourn's points, and I think the best way to implement it is what @LLFourn suggested:
@notmandatory Would you be okay with this, or is there something we haven't considered? |
bdk::Wallet
persistencebdk::Wallet
persistence
...txout index changeset Fixes bitcoindevkit#1101
...txout index changeset Fixes bitcoindevkit#1101
...txout index changeset Fixes bitcoindevkit#1101
...txout index changeset Fixes bitcoindevkit#1101
I re-read above comments and I'm on-board with storing the descriptors in the wallet data and if the users is concerned about forward privacy then we should also have some example for how to encrypt all persisted wallet data. @thunderbiscuit and @reez you guys should think about the best way to use android/ios features to encrypt persisted wallet data. |
I agree with this. In most cases for production software you'd want to encrypt all persisted wallet-related data IMO, so having the public descriptors in there is totally fine. |
Describe the enhancement
The current stable version of BDK stores the descriptor checksum in the database. This ensures the caller does not use the wrong descriptor with the database. We should reintroduce this.
Implementation proposal
Add
verify_checksum
method to thePersist
trait.The text was updated successfully, but these errors were encountered: