Before this change, a client could spend funds before the accountant
processed a previous spend. With this change in place, the accountant
updates balances immediately, but that comes at an architectural cost.
The accountant now verifies signatures on behalf of the historian, so
that it can ensure logging will not fail.
The log crate was starting to be the catch-all for all things
related to entries, events, signatures, and hashes. This split
shows us that:
* Event depends only on signatures, not on hashes [directly]
* All event testing was done via log testing (shame on me)
* Accounting depends only on events
This implementation assumes 'from' is the current owner of 'data'.
Once that's verified, the signature ensures that nobody modified
'data' (the asset being transferred) or 'to' the entity taking
ownership.
Fixes#14
Unlike a Discovery event, a Claim event associates a public key
with a hash. It's intended to to be used to claim ownership of
some hashable data. For example, a graphic designer could claim
copyright by hashing some image they created, signing it with
their private key, and publishing the hash-signature pair via
the historian. If someone else tries to claim it as their own,
the designer can point to the historian's log as cryptographically
secure evidence that the designer's copy existed before anyone
else's.
Note there's nothing here that verifies the first claim is the actual
content owner, only that the first claim almost certainly happened
before a second.
From the perspective of the log, when some data's hash is added,
that data is "discovered" by the historian. Another event
might be a "claim" that some signed data belongs to the owner of a
public key.
Hasher will generate different hashes for the same input if it
had already generated a hash.
Also add a binary to ensure the example in the README works.
Make it so the parallel and sequential verification implementations
are only different in one line.
For reasons I don't understand Rayon's `all()` isn't `mut`.
* Define a tick to be an event with no user data.
* Use the term "event log" for now.
** Reserve the word "entry" for hash entries, and "item" for array items.
** Reserve the word "blockchain" for when the event is a block of something.
** Reserve the word "ledger" for when the event is of a particular type,
such as transactions.