Closed zoedberg closed 3 months ago
I assume you provide a wrong key descriptor. When calling rgb create --wpkh KEY
the KEY
must in in format of [xxxxxxxx/84h/1h/xh]xpubDATA/<0;1;9>/*
Please give a look at the code I've linked. The provided key descriptor and keychains are the same for both Wpkh
and Tr
wallets.
IMO since I've forgot to specify the keychains both type of wallets should look at their default keychains, that should be <0;1;9>
for Wpkh
wallets and <0;1;9;10>
for Tr
wallets.
Tr had a bug assuming <0;1;9;10>, which will lead to unexpected divergence between a provided xpub descriptor and saved wallet descriptor. I made yesterday a commit fixing that - but haven't pushed it until we close this question here
With that fix I think this issue can be closed, since the issue ended up being just about default keychains. By providing the keychains when constructing the XpubDerivable
all wallets are able to find coins and all tests pass
Ok. I publish this as a PR and once it is reviewed I will close this
Addressed in https://github.com/RGB-WG/rgb/pull/223
In this branch https://github.com/zoedberg/rgb-integration-tests/tree/rgb_next_master_no_dw I've completely switched the integration tests from descriptor-wallet to bp-wallet. By running
cargo test --test issuance
you can see that all tests withWpkh
wallets fail looking for coins (the call towallet().address_coins()
returns an empty list).It seems the issue is with the
update
method (used to find new coins), that withTr
wallets correctly logskeychain 0 .......... keychain 1 .......... keychain 9 .......... keychain 10 ..........
, while withWpkh
wallets logskeychain 0 .......... keychain 1 ..........
. So it seems like it's not looking at keychains 9 and 10, therefore missing the UTXOs.