Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Ideas for wallet storage

jim618 edited this page Sep 16, 2011 · 6 revisions

The current way in which wallets are stored is a direct serialisation of the wallet class. This causes a couple of problems:

  • the serialisation is quite brittle, small changes make the wallet unreadable
  • because of the above I (Jim) have basically frozen the bitcoinj code by including it into MultiBit. This will cause problems as it is difficult to keep up to date with bitcoinj and controbute patches back.
  • the serialisation is not readable by humans

In preparation of something better, I have put a wallet version number in the [info](wiki/Wallet info files). This gives a hook to introducing a new wallet format whilst still supporting the old.

My prefered wallet format is XML. We read it in and create a wallet from the nodes. Similiarly we write it out by writing out the wallet keys and transactions etc. We traverse the XML in code (i.e. no automatic XMl -> object conversion) and then can cope in code with the various versions we will have to support over time.

We put a wallet version in the XML.

We can also add the information that is going into the [info](wiki/Wallet info files).