dumpwallet / importwallet: change and reserve addresses

+1 vote
Hi.

When I want to synchronize a wallet between 2 or more nodes using dumpwallet, is it ok to remove the lines for "reserve" addresses?

What about "change" addresses? Are they already active usable addresses?

 

Thanks,

Alex
asked May 16 by Alexoid

1 Answer

+1 vote
You can remove "reserve" address(es). If the wallet was created by MultiChain, there should be only one "reserve" address. This address was never used by the wallet. (It will be the next address created by getnewaddress).

But you have to do this every time you dump the wallet. If address was created by wallet A (and was never used), then wallet was dumped (with "reserve" address) and imported to wallet B. It can be used by wallet B. So, when you remove "reserve" address and import dump file to wallet C - you can miss some transactions created by B. If you always remove "reserve" address from  dump file - it cannot be used by other wallets.

As for the "change" address, MultiChain always sends change to one of the addresses in inputs (at least for walletdbversion=2). So, you should not see "change" addresses in the dump file.

If you see more than one "reserve" address or "change" address - please let us know which version of MultiChain are you using.
answered May 21 by Michael
Thanks for the information.

When I start the multichain-daemon and do a dump-wallet after a minute I get two reserve addresses:

[...]YLtDQsqWAc 2018-05-22T07:18:42Z label= # addr=17LKMGg97Baf9mCUhLMZAgFZZbUoCdojS7mHpr

[...]Udh81o1taav 2018-05-22T07:18:42Z reserve=1 # addr=1C3fgicLhtPQ2KNEhRZmYVRkdRsyn7xBGNKmYj

[...]r9S3S9Dc 2018-05-22T07:19:12Z reserve=1 # addr=1BfXTmWhY2KK3akxvzqWtap4fVW2dZY3WqVZLg

(using MultiChain 1.0.4)
We were not able to reproduce this. Unless you played with -keypool parameter (default 1, we will fix help message in the next release) or keypoolrefill API, you should see only one reserved key.

Under certain circumstances, if you perform some activity related to addresses, you can see temporarily several reserved addresses. In any case, these addresses were never used by the wallet if they appear in the dump file with "reserve=1", at least before the moment of dump-wallet. So you can remove them from the dump file.
...