Post
Topic
Board Development & Technical Discussion
Re: Hash-based chainless transactions theory
by
JoelKatz
on 26/06/2011, 04:52:20 UTC
All it has to do is this: Define a hashing function GETTHEBLOCK_1( inputs ) which takes a map of (private key, balance) pairs, and produces a very large number based on it, in such a way that any pairs with a balance of zero passed to the input does not affect the output, and additionally such that an examination of the hash can securely prove that the amount of currency embodied within it has not changed from a reference.
Seems pretty simple:
1) Take map of private key, balance pairs.
2) Omit any pairs with a balance of zero.
3) Sort the pairs.
4) Take the SHA1 hash.
5) Append the SHA1 hash to the total of all balances expressed in any fixed-length format.

This should meet your requirements. Adding or removing zero balance pairs will not affect the calculation at step 4 (because they are eliminated in step 2) nor the total at step 5, because they have no affect on the total. So the output is the same with or without zero-balance pairs.

You can prove the amount of currency has not changed because any change in the amount of currency will require changing one of the private key / balance pairs, which will change the hash in step 4.