Make wallet.dat a CSV file #1442

issue xanatos opened this issue on June 12, 2012
  1. xanatos commented at 6:40 AM on June 12, 2012: none

    No, I'm not kidding. As is a program to interoperate with Bitcoin needs to use BerkeleyDB because the "Irreplaceable " data part is stored in BerkeleyDB format. New operations could simply be written after the last row "overwriting" previous versions (so I have key A with public key B and description C. The public/private parts are immutable. If I want to change its description I can: 1) insert a new record of type "new description" that changes the old description or 2) reinsert the same row with a different description) and if there are too many "dead" rows (or if the keys need to be re-encrypted) the entire file could be rewritten. An XML file doesn't have this property: it can easily get corrupted (but then it's normally quite easy to repair it if you know what you are doing) and to append some information you have to "reopen" the last element (or we could write an XML fragment without the root element. It would be the same, but XML are a little larger). The file would be written in UTF8 with some characters escaped (but these are details). It would be a little bigger than it's now, but at least it would be easy for the user to cut and paste the keys in and out.

  2. gmaxwell commented at 6:50 AM on June 12, 2012: contributor

    Do you have a patch? This is a lot more complicated than I think you think it is. Pieter has been working on non-BDB wallets, but a simple text file "for the user to cut and paste the keys" isn't really something that can be sanely and safely done without a lot of work (or potentially at all) because there are relational integrity constraints on the wallet data.

  3. laanwj commented at 6:53 AM on June 12, 2012: member

    @sipa is already working on a append-only wallet format, to make it easier to have wallet 'files'. As there are some requirements with regard to robustness and error recovery, these will not be in an interoperable format such as XML or CSV, though.

    We recommend interoperating with bitcoin through JSON-RPC, not by reading/writing its files directly.

  4. gavinandresen closed this on Jun 14, 2012

  5. gavinandresen commented at 1:20 AM on June 14, 2012: contributor

    Closing as "not going to happen."

  6. lateminer referenced this in commit b366afcdf4 on Jan 22, 2019
  7. lateminer referenced this in commit a5288eca97 on May 6, 2020
  8. MarcoFalke locked this on Sep 8, 2021

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-04-29 03:16 UTC

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