Instead of prividing the descriptor string as stored in the db, use the normalized descriptor as is done for getaddressinfo’s parent_desc field.
Split from #32489
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32594.
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
Concept ACK
In general normalized descriptors are more useful, because you can’t derive addresses from e.g. xpub/1h/*
. So it makes sense to use them for the parent.
ACK 107517ea7d29d959e7a0b94d8217dcb894680547
I checked that the tests fail if I revert the first commit.
nit: “prividing” -> “providing”
ACK 107517ea7d29d959e7a0b94d8217dcb894680547
Before change listtransactions (and others) shows un-normalized descriptors, after the descriptors are normalized
0 {
1 "address": "bcrt1qgymj02gx6dzrkh49d9sj0cj8rxfcrut7dyxz7r",
2 "parent_descs": [
3 "wpkh(tpubD6NzVbkrYhZ4YdzwuYwQLEypddJ64KVEG9tyZibLxLKMxyMCaru1c7RFX2S8NEQ7dZuNccdzk5qikw51rxzXYWdkeuREgxgdqbJy3ty68qy/84h/1h/0h/0/*)#tz7s9af2"
4 ],
5 "category": "immature",
6 "amount": 50.00000000,
7 "label": "",
8 "vout": 0,
9 "abandoned": false,
10 "confirmations": 1,
11 "generated": true,
12 [...]
this commit:
0 "address": "bcrt1qgwme02jk087aessn9tht9yjkawdxys3xm36cy8",
1 "parent_descs": [
2 "wpkh([83869ebd/84h/1h/0h]tpubDCS1CwM385BY77ffiamcKJ4CnZc2G15YxGXeisvNhkYzocxNcSjLrPZL8KaMtYLXSCo9ng7XRrX7q7Yn7oh2652QU79ybjh4YoY7m5zZxgN/0/*)#ettrwdmf"
3 ],
4 "category": "immature",
5 "amount": 50.00000000,
6 "label": "",
7 "vout": 0,
8 "abandoned": false,
9 "confirmations": 1,
10 "generated": true,
11 [...]
Instead of providing the descriptor string as stored in the db, use the
normalized descriptor as is done for getaddressinfo's parent_desc field.
getaddressinfo, listunspent, listtransactions, listsinceblock, and
gettransaction all include parent_desc(s). Make sure that these are
consistent with each other, as well as being in normalized form.
nit: “prividing” -> “providing”
Fixed
re ACK a759a22d59e805834d077a28c95695e4834983a9
Changes since last ACK: