Michael Vines
79924e407c
Include nanoseconds in log timestamp
2018-07-29 19:08:27 -07:00
Greg Fitzgerald
73ae3c3301
Apply most of clippy's feedback
2018-07-12 09:40:40 -06:00
Greg Fitzgerald
f0d1fdfb46
Add missing module descriptions
2018-06-07 09:25:36 -06:00
Anatoly Yakovenko
c2e2960bf7
Add broadcast impl
2018-05-03 10:34:01 -07:00
Greg Fitzgerald
64af37e0cd
logger -> recorder
...
Free up namespace for a traditional runtime logger.
2018-03-19 10:16:21 -06:00
Greg Fitzgerald
49281b24e5
Move Tick out of Event
...
Every Entry is now a Tick and the entries contain events.
2018-03-09 17:22:17 -07:00
Greg Fitzgerald
cc9f0788aa
Batch events
...
It's now a Tick that locks down event order. Before this change, the
event order would be locked down in the order the server sees it.
Fixes #59
Fixes #61
2018-03-09 16:16:33 -07:00
Greg Fitzgerald
d1b6206858
Monomorphisize Entry and Event
...
Transaction turned out to be the only struct worth making generic.
2018-03-06 20:29:18 -07:00
Greg Fitzgerald
b725fdb093
Sha256Hash -> Hash
...
Because in Loom, there's just the one. Hopefully no worries that it
shares a name with std::Hash.
2018-03-06 17:40:01 -07:00
Greg Fitzgerald
1436bb1ff2
Move entry into its own module
...
Hmm, Logger doesn't depend on log.
2018-03-06 17:40:01 -07:00
Greg Fitzgerald
5a44c36b1f
Move hash into its own module
2018-03-06 17:40:01 -07:00
Greg Fitzgerald
f09952f3d7
DRY up transaction signing
...
Cleanup the big mess I copy-pasted myself into.
2018-03-06 16:34:25 -07:00
Greg Fitzgerald
624c151ca2
Add signature module
...
Because things other than transactions can be signed.
2018-03-06 12:48:28 -07:00
Greg Fitzgerald
b019416518
Move verify into methods
...
A little overly-coupled to Serialize, but makes the code a lot tighter
2018-03-06 12:27:08 -07:00
Greg Fitzgerald
4fcd9e3bd6
Give Transaction its own module
2018-03-06 12:18:17 -07:00
Greg Fitzgerald
a4336a39d6
Initialize the testnode from a log
...
$ cargo run --bin silk-genesis-file-demo > demo-genesis.json
$ cat demo-genesis.json | cargo run --bin silk-genesis-block > demo-genesis.log
$ cat demo-genesis.log | cargo run --bin silk-testnode
2018-03-05 15:34:44 -07:00
Greg Fitzgerald
48c28c2267
Transactions now require a hash of the last entry they've seen
...
This ensures the transaction cannot be processed on a chain
that forked before that ID. It will also provide a basis for
expiration constraints. A client may want their transaction
to expire, and the generators may want to reject transactions
that have been floating in the ether for years.
2018-03-05 12:48:14 -07:00
Greg Fitzgerald
c9e03f37ce
Logger now only speaks when spoken to
...
Before this change, the logger's send channel could quickly be
flooded with Tick events. Those events should only be passed to
a writer.
Also, the log_event() function no longer sends entries. That
functionality moved to the new process_events() function. This
will allow us to initialize the with the genesis block without
flooding the send channel with events the historian won't read.
2018-03-05 10:33:12 -07:00
Greg Fitzgerald
aa5f1699a7
Update the set of unique signatures when loading an existing log.
2018-03-04 22:31:12 -07:00
Greg Fitzgerald
955f76baab
Finally, genesis block generation without channels
2018-03-04 14:32:30 -07:00
Greg Fitzgerald
ff82fbf112
Make num_hashes mean the num_hashes since the last ID
...
Before this change, num_hashes meant the number of hashes since
the last ID, minus any hashing done on the event data. It made
no difference for Tick events, but logged Transaction events with
one less hash than actually occurred.
2018-03-04 09:52:36 -07:00
Greg Fitzgerald
8503a0a58f
Refactor
2018-03-04 09:21:45 -07:00
Greg Fitzgerald
b1e9512f44
Rename end_hash to id
2018-03-04 07:50:26 -07:00
Greg Fitzgerald
608def9c78
Consolidate imports
2018-03-04 07:28:51 -07:00
Greg Fitzgerald
9b26892bae
Add a demo app to generate the genesis file
2018-03-04 01:21:40 -07:00
Greg Fitzgerald
cebcb5b92d
Start genesis with a Tick, so that its hash can be used to bootstrap verification
2018-03-03 19:57:22 -07:00
Greg Fitzgerald
11a0f96f5e
Add command-line tool for generating a genesis block
2018-03-03 17:35:05 -07:00
Greg Fitzgerald
bebba7dc1f
Give logger its own crate
2018-03-03 14:24:32 -07:00