Greg Fitzgerald
624c151ca2
Add signature module
...
Because things other than transactions can be signed.
2018-03-06 12:48:28 -07:00
Greg Fitzgerald
4fcd9e3bd6
Give Transaction its own module
2018-03-06 12:18:17 -07:00
Greg Fitzgerald
66bf889c39
Rename Transfer to Transaction
...
struct names should be nouns
2018-03-06 11:54:47 -07:00
Greg Fitzgerald
a2811842c8
More cleanup
...
Far fewer branches when we process transfers outside the context
of events.
2018-03-06 11:43:55 -07:00
Greg Fitzgerald
282afee47e
Use Transfer struct on the client side too
...
Sharing is caring.
2018-03-06 11:03:43 -07:00
Greg Fitzgerald
e701ccc949
Rename Request::Transfer to Request::Transaction
2018-03-06 10:59:47 -07:00
Greg Fitzgerald
6543497c17
Move Transaction data into its own struct
...
This will allow us to add addition transfer types to the log.
2018-03-06 10:50:32 -07:00
Greg Fitzgerald
720c54a5bb
Allow balances to be negative
...
* Will allow owners to loan token to others.
* Will allow for parallel verification of balances without spilling
over 64 bits.
Fixes #43
2018-03-05 17:30:53 -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
d76ecbc9c9
Don't block the server
2018-03-05 11:39:59 -07:00
Greg Fitzgerald
79fb9c00aa
Boot wait_on_signature() from accountant
...
Instead, there should be a way to query for a page of log data,
and checking whether it has a signature should be done client-side.
2018-03-05 10:45:18 -07:00
Greg Fitzgerald
608def9c78
Consolidate imports
2018-03-04 07:28:51 -07:00
Greg Fitzgerald
876d7995e1
Refactor to support loading an existing ledger
2018-03-03 22:25:40 -07:00
Greg Fitzgerald
d8c50b150c
Move key generation and signing from transaction benchmark
...
Key generation, signing and verification are not the performance
bottleneck. Something is probably wrong here.
2018-03-03 11:11:46 -07:00
Greg Fitzgerald
1b77e8a69a
Move Event into its own crate
...
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
2018-03-02 08:43:57 -07:00
Greg Fitzgerald
c9cc4b4369
Switch to UDP from TCP
...
And remove all the sleep()'ing around.
2018-03-01 13:47:53 -07:00
Greg Fitzgerald
4610de8fdd
Switch to sync_channel to preserve order
2018-02-28 19:33:28 -07:00
Greg Fitzgerald
3fcc2dd944
Add testnode
...
Fixes #20
2018-02-28 18:05:20 -07:00
Greg Fitzgerald
8299bae2d4
Add accountant stub
2018-02-28 16:01:12 -07:00
Greg Fitzgerald
604ccf7552
Add network interface for accountant
2018-02-28 14:00:04 -07:00