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

database: versioning #102

Open
JoeGruffins opened this issue Mar 6, 2020 · 0 comments
Open

database: versioning #102

JoeGruffins opened this issue Mar 6, 2020 · 0 comments

Comments

@JoeGruffins
Copy link
Member

Currently objects track their own versioning. We don't have a decided way to update values already in the db to a new version. If the version is incorrect, the only thing to do is to wipe all values for that key and start over. The only way to do that is for the user to delete their wallet manually and restore from seed words. This is a bad ux.

dcrwallet has a seperate updating package and handles all updates at once on start-up. https://github.com/decred/dcrwallet/blob/master/wallet/udb/upgrades.go That seems like a good way to do things to me. If there's a problem it is best to stop at startup rather than half way through doing something when you get a random exception, as will be the case if we have each object handle its own versioning.

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

No branches or pull requests

1 participant