Qtumd changed address / created new wallet.dat after unlocking



  • Hi guys,

    I prepared my Raspberry PI and installed latest qtum software
    Mainnet Ignition v0.15.2 from github.

    Then I did the following:

    1. encrypted my wallet by using $ .../bin/qtum-cli -stdin encryptwallet
    2. backed up wallet.dat
    3. sent funds from my exchange wallet to my qtum wallet
    4. waited for qtumd to synchronize network
    5. could confirm my correct balance by using $ .../bin/qtum-cli getwalletinfo
    6. before reaching maturity of 500 blocks, I opened my wallet for staking by using
      $ .../bin/qtum-cli -stdin walletpassphrase

    then, my raspberry PI was lagging for like 10 to 15 seconds

    I noticed my address changed to a new address. It shows zero balance in qtum-cli and on explorer.
    qtumd wallet restarted to sync to network.

    Also, wallet.dat file changed, so I backed it up seperately.

    Is that normal behavior, in the sense that qtumd changes wallet address with each unlock process?

    Should I recover my old address with my old wallet.dat file and send my qtum to my new address?

    Many thanks in advance!



  • okay, my problem is solved.

    What happened in summary:

    After I received a couple of Qtum in the qtumd wallet, a new receiving address was generated.
    For some unkown reason, the wallet needed to re-sync again.
    After succesful re-sync, my QTUM balance is correct and the QTUM are still stored on the old address.

    As a conclusion, I should learn more about the address management of qtumd, however I am not sure where to start reading about it. Any ideas are welcome.

    qtumd is now staking :-)



  • Hello CryptoFlow,

    Qtum wallets manage a large number (up to 100) addresses and opportunistically top them up in the keypool. The default behavior for the wallet is for single-use addresses, and if you are sending QTUM the wallet will actually select a larger previous transaction (this is the UTXO model) to send, along with a new “change address”, which will receive the change back from that transaction on this change address. Wallets sending out many transactions (but not for staking) will burn through these change addresses and they should have their wallet.dat file backed up again after about 50 transactions (the keypool is for 100 addresses). If you are only (or mostly) staking, it would be good practice to backup the wallet.dat file again right before every version update (so at least every few months).

    As for learning more about this topic, I suggest Googling for “bitcoin keypool”. There is lots of good info in the bitcoin wiki and in the Bitcoin Forum, and it mostly applies directly to Qtum since this basic functionality was forked from bitcoin code.

    You can use the command "listaddressgroupings" to see which addresses are holding QTUM in your wallet, but you don't have to move them around, the wallet will sum all the addresses for the staking wallet weight.

    You might also enjoy some of the topics in this series of blogs



  • Hi jb395,
    thank you, that helped a lot :-)


Log in to reply
 

Looks like your connection to QTUM was lost, please wait while we try to reconnect.