The listtransactions command does not display transactions when restoring a wallet from a backup #20293

issue du2zy openend this issue on November 3, 2020
  1. du2zy commented at 11:41 am on November 3, 2020: none

    In March, I made a backup of the wallet and continued using the node. In October, I restored my old backup. After restoring the backup, I found that the listtransactions command stopped displaying some transactions made during the period from March to October.

    Expected behavior

    The listtransactions command displays all transactions in the restored wallet.

    Actual behavior

    The listtransactions command in the restored wallet does not display some transactions since the backup.

    To reproduce

    1. Run bitcoin core in regtest mode
    2. Create a new address A and generate 101 blocks with sending a reward to the created address A
    3. Create a wallet backup
    4. Create new address B
    5. Send transaction to address B, write TXID
    6. Generate 1 block with sending a reward to address A
    7. View getaddressinfo B. Verify labels are not an empty list
    8. View listtransactions. Make sure there is a TXID transaction present
    9. Stop bitcoin core
    10. Restore backup
    11. Run bitcoin core
    12. View getaddressinfo B and listtransactions. Detect that the address does not have a label set and that listtransactions does not contain a TXID transaction.

    System information

    Bitcoin Core 0.20.1 on Debian GNU / Linux.

  2. du2zy added the label Bug on Nov 3, 2020
  3. ghost commented at 9:08 pm on November 3, 2020: none
    1. Create a wallet backup

    Maybe 3 can be done after 8

    I was not able to reproduce this issue in bitcoin core (testnet). I followed the below steps:

    1. Create new wallet (testnet)
    2. Create new address with label: testlabel1
    3. Send 0.005 tBTC : https://blockstream.info/testnet/tx/6b9d739034c32d6480ca8ccac567d05226d948e85c8adddb06340c5ff3c32526
    4. Check the transaction using listtransactions
    5. Backup wallet
    6. Exit bitcoin core and delete wallet folder from testnet3/wallets
    7. Copy the backup file in wallets folder: backuptest2.dat
    8. Start bitcoin core and check the transaction using listtransactions

    image

  4. du2zy commented at 12:47 pm on November 5, 2020: none

    My reproduce steps are correct.

    First I make a backup, after that I use the wallet for a while, then I restore the backup. At the same time, the backup does not contain the last few addresses and transactions. After restoring the backup, I expect to see all transactions for the entire period from the moment the wallet was created to the current moment. I really see that the last addresses and transactions have been restored, I can use the funds received.

    However, there is a problem. I do not see in the output of listtransaction some transactions that were made after the backup was created. There are no transactions in the output that I make within my wallet (transferring funds from address to address).

    Experimentally, I found out, when restoring from a backup, automatically generated addresses are created without a label. Perhaps this is the reason.

  5. Crypto2 commented at 9:28 am on November 16, 2020: none
    When you use getaddressinfo does the address say ischange: true? If so it’s probably this same longstanding bug: #16160 - if so it’s an easy fix and documented in that thread.
  6. du2zy commented at 1:38 pm on November 16, 2020: none
    Yes, it is the very same problem. Am I right that that this problem cannot be solved without bitcoin core compilation?
  7. Crypto2 commented at 4:03 pm on November 16, 2020: none
    Correct, you do have to comment those lines out and recompile. Unfortunately the devs refuse to believe it exists, or at least saw “addwitnessaddress” and threw their hands up and walked away :(
  8. du2zy commented at 8:35 am on November 17, 2020: none
    Unfortunately, we don’t have a possibility to compile bitcoin-core from the source code. I tried to revive the discussion in that issue which you sent to me. I added links to bug descriptions and steps to reproduce the problem. But that issue is closed and it’s possible that my message will be ignored. Is there some possible way to attract developers’ attention to that problem?
  9. Crypto2 commented at 9:52 pm on November 17, 2020: none
    You said you are on Linux, why can’t you compile it? It’s very easy to do.
  10. du2zy commented at 12:00 pm on November 18, 2020: none
    We use not only bitcoin-core, but also a lot of bitcoin-based forks (such as LiteCoin, DASH, OmniCore, etc.) It’s very time-consuming to manually apply the patch to all coins and to maintain it in future updates. Therefore, we hope to see the fix included into upstream.
  11. laanwj closed this on Dec 2, 2021

  12. DrahtBot locked this on Dec 2, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-19 12:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me