Post
Topic
Board Bitcoin Technical Support
Merits 2 from 2 users
Question about Change & Receiving addresses
by
apogio
on 07/05/2025, 17:02:06 UTC
⭐ Merited by Cricktor (1) ,ABCbits (1)
The experiment:

I was doing an experiment and I have a question that I wasn't able to answer myself.

I will post some real data here (but not private keys etc).

I have a fully airgaped computer, where I installed Bitcoin Core and I created a wallet.

I got an address from there bc1qfrmthac4es7fpw5yhl7cu9kvedsgj7levwxv5g and sent some sats there.

I then stored the encrypted wallet.dat in another usb stick for backup.

I also got the descriptors of the wallet using the command listdescriptors:

Code:
> listdescriptors

{
   ...
   "desc": "wpkh([6ac77e84/84h/0h/0h]xpub6D9yC3ibKEDbLjV8fcF1AmQyBXuKErT13KeW4cVTqS7e6XmaoEMzJeU1gyHUUHwMx5F6utw4VkSB416rXrPCgRi1tLWxSHbZoWjv281oEKc/0/*)#hrntfr65"
   "internal": false
   ...
},
{
   ...
   "desc": "wpkh([6ac77e84/84h/0h/0h]xpub6D9yC3ibKEDbLjV8fcF1AmQyBXuKErT13KeW4cVTqS7e6XmaoEMzJeU1gyHUUHwMx5F6utw4VkSB416rXrPCgRi1tLWxSHbZoWjv281oEKc/1/*)#xhk25k2v"
   "internal": false
   ...
}

Then, I decided, to import the descriptors on Sparrow wallet to see if I would be able to create a simple watch-only wallet.

Sparrow didn't let me import two descriptors on the same wallet, so I had to google it and someone suggested to import the descriptor like this:

Code:
wpkh([6ac77e84/84h/0h/0h]xpub6D9yC3ibKEDbLjV8fcF1AmQyBXuKErT13KeW4cVTqS7e6XmaoEMzJeU1gyHUUHwMx5F6utw4VkSB416rXrPCgRi1tLWxSHbZoWjv281oEKc/<0;1>/*)

Notice the <0;1> in the path, which I suspect is to get both receiving and change addresses.

To my surprise, it looked like it worked perfectly, but...

I decided to import the descriptors on my full node (bitcoin core) to create a watch-only wallet there too, so I did:

Code:
> importdescriptors "[{\"desc\": \"wpkh([6ac77e84/84h/0h/0h]xpub6D9yC3ibKEDbLjV8fcF1AmQyBXuKErT13KeW4cVTqS7e6XmaoEMzJeU1gyHUUHwMx5F6utw4VkSB416rXrPCgRi1tLWxSHbZoWjv281oEKc/0/*)#hrntfr65\", \"range\": [0, 999], \"timestamp\": 1746528820, \"internal\": false, \"watchonly\": true, \"active\": true}]"

> importdescriptors "[{\"desc\": \"wpkh([6ac77e84/84h/0h/0h]xpub6D9yC3ibKEDbLjV8fcF1AmQyBXuKErT13KeW4cVTqS7e6XmaoEMzJeU1gyHUUHwMx5F6utw4VkSB416rXrPCgRi1tLWxSHbZoWjv281oEKc/1/*)#xhk25k2v\", \"range\": [0, 999], \"timestamp\": 1746528820, \"internal\": false, \"watchonly\": true, \"active\": true}]"

The "strange" result:

In Bitcoin Core, it looks like my addresses (when I click to generate a new address) are correct, but it generates the Receive addresses that Sparrow considers to be the Change addresses.

In simpler terms, it looks like:

Bitcoin Core -> Receive Address = Sparrow -> Change Address

My question:

Even though the answer may be the simplest one, like that I have confused the descriptors when importing them, or that Sparrow doesn't work well with the <0;1>, I would like to ask for a clear justification.