salvage wallet warns "Number of keys in data does not match number of values" on uncorrupt wallet file #20151

issue maflcko opened this issue on October 15, 2020
  1. maflcko commented at 8:20 AM on October 15, 2020: member
    Salvage: WARNING: Number of keys in data does not match number of values.
    Salvage: WARNING: Unexpected end of file while reading salvage output.
    WARNING: WalletBatch::Recover skipping key: CDataStream::read(): end of data: iostream error
    

    Steps to reproduce: #19078

    The failure happens intermittently.

  2. maflcko added the label Bug on Oct 15, 2020
  3. maflcko added the label Wallet on Oct 15, 2020
  4. maflcko commented at 9:15 AM on October 15, 2020: member

    optionally it will print

    WARNING: WalletBatch::Recover skipping key: Error reading wallet database: CPubKey/CPrivKey corrupt
    
  5. maflcko added this to the milestone 0.21.0 on Oct 19, 2020
  6. maflcko commented at 8:52 AM on October 19, 2020: member

    I think we should warn that -salvage is non-functioning and should not be used

  7. maflcko cross-referenced this on Oct 22, 2020 from issue test: Extend salvage test for wallet tool by maflcko
  8. maflcko commented at 11:04 AM on October 30, 2020: member

    Ignoring the warning will result in a loss of funds:

    AssertionError: not({'mine': {'trusted': Decimal('49.99929420'), 'untrusted_pending': Decimal('0E-8'), 'immature': Decimal('5000.00000000')}} == {'mine': {'trusted': Decimal('49.84929420'), 'untrusted_pending': Decimal('0E-8'), 'immature': Decimal('4700.00000000')}})
    
  9. maflcko commented at 12:30 PM on October 30, 2020: member

    loss of funds even happen with the DB_AGRESSIVE removed. See also #7463 (comment)

  10. maflcko cross-referenced this on Oct 30, 2020 from issue doc: Document that wallet salvage is experimental by maflcko
  11. maflcko removed this from the milestone 0.21.0 on Oct 30, 2020
  12. meshcollider referenced this in commit f1fcbdea25 on Nov 1, 2020
  13. sidhujag referenced this in commit 5310819618 on Nov 2, 2020
  14. maflcko commented at 12:43 PM on November 11, 2022: member

    The command should just be removed along with bdb. Closing this issue and the test in #19078 (comment) for now

  15. maflcko closed this on Nov 11, 2022

  16. vijaydasmp referenced this in commit 2c37e32f37 on Jul 14, 2023
  17. vijaydasmp referenced this in commit a67fda800d on Jul 14, 2023
  18. vijaydasmp referenced this in commit 123ece1f05 on Jul 14, 2023
  19. vijaydasmp referenced this in commit 4f9bc6569e on Jul 14, 2023
  20. vijaydasmp referenced this in commit a2a6ab1d29 on Jul 14, 2023
  21. vijaydasmp referenced this in commit e611ace889 on Jul 14, 2023
  22. vijaydasmp referenced this in commit 586968c028 on Jul 14, 2023
  23. vijaydasmp referenced this in commit 27b90c74ce on Jul 14, 2023
  24. vijaydasmp referenced this in commit 5e18a92728 on Jul 17, 2023
  25. vijaydasmp referenced this in commit 7e2dbded89 on Jul 18, 2023
  26. vijaydasmp referenced this in commit b9d911c521 on Jul 20, 2023
  27. vijaydasmp referenced this in commit 3a5b4012ec on Jul 21, 2023
  28. PastaPastaPasta referenced this in commit 4f3a1effbf on Jul 21, 2023
  29. bitcoin locked this on Nov 11, 2023

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: 2026-05-19 06:53 UTC