Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
I control if the descriptor that I want to import is valid:
$ bitcoin-cli -signet getdescriptorinfo "wsh(or_d(pk([a5c6b76e/48'/1'/0'/2']tpubDF5861hj6vR3iJr3aPjGJz4rNbqDCRujQ21mczzKT5SiedaQqNVgHC8HT9ceyxvMFRoPMx4P6HAcL3NZrUPhRUbwCyj3TKSa64bAfnE3sLh/1/*),and_v(v:pkh([c477fd13/48'/1'/0'/2']tpubDFn7iPbFqGrTQ2aRACNsUK1MXQR4Z6dYfU2nD1WA9ifSaia642j3Wah4n5pBUEpERNWGJsyv3Dv5qwBabC9TLQrwSboKzukw9wmurGu7XVH/1/*),older(3))))"
output:
{
"descriptor": "wsh(or_d(pk([a5c6b76e/48'/1'/0'/2']tpubDF5861hj6vR3iJr3aPjGJz4rNbqDCRujQ21mczzKT5SiedaQqNVgHC8HT9ceyxvMFRoPMx4P6HAcL3NZrUPhRUbwCyj3TKSa64bAfnE3sLh/1/*),and_v(v:pkh([c477fd13/48'/1'/0'/2']tpubDFn7iPbFqGrTQ2aRACNsUK1MXQR4Z6dYfU2nD1WA9ifSaia642j3Wah4n5pBUEpERNWGJsyv3Dv5qwBabC9TLQrwSboKzukw9wmurGu7XVH/1/*),older(3))))#vpa5k5p6",
"checksum": "vpa5k5p6",
"isrange": true,
"issolvable": true,
"hasprivatekeys": false
}
then try to import descriptor (w/ checksum computed by core) returned by getdescriptorinfo:
$ bitcoin-cli -signet -rpcwallet=liana importdescriptors '[{"desc": "wsh(or_d(pk([a5c6b76e/48'/1'/0'/2']tpubDF5861hj6vR3iJr3aPjGJz4rNbqDCRujQ21mczzKT5SiedaQqNVgHC8HT9ceyxvMFRoPMx4P6HAcL3NZrUPhRUbwCyj3TKSa64bAfnE3sLh/1/*),and_v(v:pkh([c477fd13/48'/1'/0'/2']tpubDFn7iPbFqGrTQ2aRACNsUK1MXQR4Z6dYfU2nD1WA9ifSaia642j3Wah4n5pBUEpERNWGJsyv3Dv5qwBabC9TLQrwSboKzukw9wmurGu7XVH/1/*),older(3))))#vpa5k5p6", "range": [0,10000], "timestamp": 1682920310, "active": true, "internal":false}]'
output:
[
{
"success": false,
"error": {
"code": -5,
"message": "Provided checksum 'vpa5k5p6' does not match computed checksum 'lkv9vrah'"
}
}
]
Expected behaviour
Then I take the checksum given as a reference, and use it to replace the 'wrong' one:
$ bitcoin-cli -signet -rpcwallet=liana importdescriptors '[{"desc": "wsh(or_d(pk([a5c6b76e/48'/1'/0'/2']tpubDF5861hj6vR3iJr3aPjGJz4rNbqDCRujQ21mczzKT5SiedaQqNVgHC8HT9ceyxvMFRoPMx4P6HAcL3NZrUPhRUbwCyj3TKSa64bAfnE3sLh/1/*),and_v(v:pkh([c477fd13/48'/1'/0'/2']tpubDFn7iPbFqGrTQ2aRACNsUK1MXQR4Z6dYfU2nD1WA9ifSaia642j3Wah4n5pBUEpERNWGJsyv3Dv5qwBabC9TLQrwSboKzukw9wmurGu7XVH/1/*),older(3))))#lkv9vrah", "range": [0,10000], "timestamp": 1682920310, "active": true, "internal":false}]'
output:
[
{
"success": true
}
]
seems ok now
Steps to reproduce
Then control the imported descriptor:
$ bitcoin-cli -signet -rpcwallet=liana listdescriptors
output:
{
"wallet_name": "liana",
"descriptors": [
{
"desc": "wsh(or_d(pk([a5c6b76e/48/1/0/2]tpubDF5861hj6vR3iJr3aPjGJz4rNbqDCRujQ21mczzKT5SiedaQqNVgHC8HT9ceyxvMFRoPMx4P6HAcL3NZrUPhRUbwCyj3TKSa64bAfnE3sLh/1/*),and_v(v:pkh([c477fd13/48/1/0/2]tpubDFn7iPbFqGrTQ2aRACNsUK1MXQR4Z6dYfU2nD1WA9ifSaia642j3Wah4n5pBUEpERNWGJsyv3Dv5qwBabC9TLQrwSboKzukw9wmurGu7XVH/1/*),older(3))))#lkv9vrah",
"timestamp": 1682920310,
"active": true,
"internal": false,
"range": [
0,
10000
],
"next": 0,
"next_index": 0
}
]
}
if we look at the key origins of the listed descriptor, we can see they do not match (hardened indicator missing) with imported ones:
- [a5c6b76e/48/1/0/2] != [a5c6b76e/48
'/1'/0'/2'] - [c477fd13/48/1/0/2] != [c477fd13/48
'/1'/0'/2']
Relevant log output
If I use importdescriptors w/ h as hardened indicator, the issue doesn't appear.
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
v25.0
Operating system and version
Arch Linux w/ kernel 6.4.10-arch1-1
Machine specifications
No response