olalonde/blind-liability-proof — pull request #18 by zw (2014-03-20 02:37:07+00:00)
Title:  Describe serialisation format very fully/formally

As promised, this patch to README.md covers the key parts in unambiguous gory glory.

Specifically, the changes are:
* SHA256 hashes are now hex-encoded instead of base64-encoded (you'll need to fix the specific ones used in your CLI examples; I just blindly put some arbitrary SHA256s in)
* nonces now have explicit advice on length and specified hex encoding
* balances are in strings, ensuring that code handling them gets to make explicit decisions to avoid rounding issues (as opposed to leaving it to the JSON library!)
* there are pointers to the "proper money handling" code snippets on the Bitcoin wiki in the right place
* the form that inputs to SHA256 take is explicit/unambiguous/predictable, and worked examples are given
* especially for Bitcoin (otherwise verifiers would have to try hashing 1.23, 1.230, 1.2300 etc until they found a match)
* there's convention on producing accounts trees deterministically, to ensure predictable root hashes
* the advice to omit data to encourage its regeneration for verification is repeated in the partial tree section
* "value" is now "sum" everywhere
* "interior" is now "internal" everywhere as it seems the more common term according to a GoogleFight

Doubts:

* maybe we should make nonces *more* free but not totally free; e.g. disallow troublesome things like embedded '|' and control characters, but otherwise not constrain them (to hexadecimal, which is what I've said) since nothing relies on them