You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We generate our wallet from an extended private key (xprv) and realized that the resulting wallet is different when upgrading bdk from 0.19 to a version >=0.20.
This project uses 4 different bdk versions and prints the resulting addresses/name and found balances.
It shows that the wallet created with <=0.19 is different to a wallet created with >=0.20
Expected behavior
Should be the same?
Build environment
BDK tag/commit: 0.20+
OS+version:
rustc 1.62.0 (a8314ef7d 2022-06-27)
cargo cargo 1.62.0 (a748cf5a3 2022-06-08)
Additional context
The text was updated successfully, but these errors were encountered:
I think this is caused by #585 which fixed the derivation paths we use for BIP 44, 49 and 84 in testnet/regtest and it was first release as part of BDK 0.20.0 (see release notes). Mainnet is unaffected by that PR.
Originally we were using m/84'/0'/0' for all networks, while instead on testnet/regtest it should be m/84'/1'/0'. If you need to import older wallets you can write your own descriptor template that preserves the old behavior or you can just use the descriptor macro and hardcode the derivation path there. Something like this should work:
let external_desc = descriptor!(wpkh((xprv,DerivationPath::from_str("m/84'/0'/0'/0").unwrap())));let internal_desc = descriptor!(wpkh((xprv,DerivationPath::from_str("m/84'/0'/0'/1").unwrap())));
Describe the bug
We generate our wallet from an extended private key (xprv) and realized that the resulting wallet is different when upgrading bdk from 0.19 to a version >=0.20.
To Reproduce
I've created a simple project to reproduce the behavior: https://github.com/bonomat/bdk-showcase
This project uses 4 different bdk versions and prints the resulting addresses/name and found balances.
It shows that the wallet created with <=0.19 is different to a wallet created with >=0.20
Expected behavior
Should be the same?
Build environment
Additional context
The text was updated successfully, but these errors were encountered: