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

WalletDB Migration to v3 #889

Closed
wants to merge 2 commits into from
Closed

Conversation

nodech
Copy link
Contributor

@nodech nodech commented Mar 18, 2024

Migration to WalletDB v3 is different from previous migrations. It does not try to reindex the old data into new layout, instead it drops most of it - allowing us to do heavier modifications. This migration removes all txdb mappings (except for blinds) and cleans up block entries received from the chain. This should trigger rescan from the genesis block.

Migration is separated from the actual txdb/walletdb changes in order to allow multiple PRs to modify the database and w/o it getting in the way. Migration needs to get merged last, before release of v7. This allows us to invalidate all commits between wdb v3 modifications and the migration. After migration there should no longer be any wdb modifications for wdb v3.

This PR currently tracks modifications:

@nodech nodech added migrations part of the codebase wallet-db part of the codebase breaking-major Backwards incompatible - Release version labels Mar 18, 2024
@nodech nodech added this to the hsd 7.0.0 milestone Mar 18, 2024
nodech added a commit to nodech/hsd that referenced this pull request Mar 18, 2024
This requires full wdb block entry wipe and rescan. That is handled by
PR handshake-org#889. `layout.h` is looked up by height, so only missing data was
time. Now we can implement walletdb only median time past calculation.
@nodech nodech mentioned this pull request Mar 18, 2024
1 task
nodech added a commit to nodech/hsd that referenced this pull request Mar 18, 2024
This requires full wdb block entry wipe and rescan. That is handled by
PR handshake-org#889. `layout.h` is looked up by height, so only missing data was
time. Now we can implement walletdb only median time past calculation.
@nodech nodech mentioned this pull request Jun 6, 2024
4 tasks
nodech added a commit to nodech/hsd that referenced this pull request Aug 29, 2024
This requires full wdb block entry wipe and rescan. That is handled by
PR handshake-org#889. `layout.h` is looked up by height, so only missing data was
time. Now we can implement walletdb only median time past calculation.
@nodech
Copy link
Contributor Author

nodech commented Sep 22, 2024

Closing this. Proper migration is implemented in #888.

@nodech nodech closed this Sep 22, 2024
@nodech nodech deleted the wdb-migration-v3 branch September 22, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-major Backwards incompatible - Release version migrations part of the codebase wallet-db part of the codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant