-
Notifications
You must be signed in to change notification settings - Fork 19
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
feat: add page Migrating from 0.X #86
base: master
Are you sure you want to change the base?
Conversation
Probably could use a snippet of Cargo.toml explaining the dependencies as well as how the Edit: Done |
b443cae
to
750eaaa
Compare
Looks good to me |
Someone brought up on discord that a sync might actually be more appropriate here so I made that change in 5cee1e6. |
For background this was the original issue bitcoindevkit/bdk#1606. Yes, the issue is not so much db size but that a lot has changed since 0.X that it would be infeasible to take your old db with you. In fact if you did nothing else but a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, I'm mainly just requesting some minor language changes for clarification. Even as someone who's worked on bdk for a few months these points weren't super clear to me
|
||
The below steps are for migrating wallet details from the old [`bdk` v0.30][0] to the new [`bdk_wallet` v1.0][1]. | ||
This procedure can be applied to wallets backed by a SQLite database. | ||
Of particular concern is the ability to restore the _last known address index_ for each keychain. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is essentially the only thing we're doing correct? I would personally say something like
"to migrate your wallet data to a new version of bdk, all you essentially need to do is grab the [last used addresses] from the old db, add them to the new db and sync to refetch the rest of the data. Note that we don't need to perform a full scan because we will already have the last used addresses"
To make it extra clear
bdk_wallet = { version = "=1.0.0-beta.5", features = ["rusqlite"] } | ||
``` | ||
|
||
Because there are two versions of bdk in the same project, we need to pay attention to how types are imported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems like an important note, I would add a subheader here
|
||
<!-- sync --> | ||
Now that we have a new database and have properly restored our addresses, you will want to sync with the blockchain to recover the wallet's transactions. | ||
Below is an example of doing a `sync` using `bdk_esplora` but the exact method of syncing will depend on your application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally I would mention again here that a scan is not necessary, just a sync will suffice (since it's not obvious that having the last used addresses is the only difference)
5cee1e6
to
a5da578
Compare
In this PR:
migrate-version
settings.json
andexamples/justfile
fixes #81