Jackson Sandland
250830ade9
cargo fmt run
2018-05-11 11:38:52 -07:00
Jackson Sandland
b7a0bd6347
event.rs - panic cleanup
2018-05-10 16:59:13 -07:00
Jackson Sandland
670a6c50c9
event.rs - panic cleanup
2018-05-08 22:58:48 -07:00
Stephen Akridge
f4466c8c0a
Change for cuda verify integration
2018-04-05 20:00:44 -07:00
Greg Fitzgerald
07aa2e1260
Add witness data to entry hash
...
Otherwise, witnesses can be dropped or reordered by a malicious
generator.
2018-04-02 20:47:51 -06:00
Jackson Sandland
ef169a6652
94: source doc review
2018-03-30 10:43:38 -07:00
Greg Fitzgerald
55179101cd
Add more documentation
2018-03-29 12:20:54 -06:00
Greg Fitzgerald
ddb21d151d
Nightly rustfmt
...
Format code with the nightly version of rustfmt, which sorts imports.
2018-03-26 22:03:28 -06:00
Greg Fitzgerald
117ab0c141
Clippy review
2018-03-22 14:50:24 -06:00
Greg Fitzgerald
e5bae0604b
Specialize transaction assets to i64
...
Proof-of-history is generic, but now that we're using it entirely
for tokens, we can specialize the type and start doing more interesting
things than just Eq and Serialize operations.
2018-03-17 19:56:15 -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
923162ae9d
WIP: process timestamps
2018-03-08 10:19:54 -07:00
Greg Fitzgerald
94daf4cea4
Add Cancel and Timestamp events
...
Fixes #31 , #34 , #39
2018-03-08 08:17:34 -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
f09952f3d7
DRY up transaction signing
...
Cleanup the big mess I copy-pasted myself into.
2018-03-06 16:34:25 -07:00
Greg Fitzgerald
4376032e3a
data -> asset
...
'data' is too vague.
2018-03-06 14:50:32 -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
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
1929601425
Cleanup
...
Now that Transfer is out of the enum, we don't need to pattern
match to access its fields.
2018-03-06 11:19:59 -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
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
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
7cf0d55546
Remove optional 'from' field
2018-03-03 20:41:07 -07:00
Greg Fitzgerald
ce60b960c0
Special case sending money to self
...
In the genesis block, let matching 'from' and 'to' keys be used
to mint new coin.
2018-03-03 20:27:12 -07:00
Greg Fitzgerald
be518b569b
Remove cyclic dependency between event and log
2018-03-02 12:03:59 -07:00
Greg Fitzgerald
c998fbe2ae
Sign the owner's public key
...
Without this, the accountant will reject transfers from different
entities if they are for the same amount and to the same entity.
2018-03-02 11:56:42 -07:00
Greg Fitzgerald
9f12cd0c09
Purge the Claim event type
...
It's now represented as a Transaction from an unknown party.
2018-03-02 11:48:58 -07:00
Greg Fitzgerald
0d0fee1ca1
Sign Claim's 'to' field
...
Otherwise, the accountant will treat deposits of the same amount as
duplicates.
2018-03-02 11:46:22 -07:00
Greg Fitzgerald
a0410c4677
Pipe all Claim constructors through a function
2018-03-02 10:58:43 -07:00
Greg Fitzgerald
8fe464cfa3
Rename Claim's key field to match same field in Transaction
2018-03-02 10:47:21 -07:00
Greg Fitzgerald
3e2d6d9e8b
Generalize Transaction to express a Claim
...
If a Transaction doesn't have an existing address, it's being used
to create new funds.
2018-03-02 10:41:15 -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
fd209ef1a9
Rename event crate to log
2018-02-18 09:59:33 -07:00
Greg Fitzgerald
471f036444
Better names
...
Event -> Entry
EventData -> Event
2018-02-18 09:53:40 -07:00
Greg Fitzgerald
831e2cbdc9
Add historian
...
A microservice that continuously generates hashes, only stopping to
tag messages with the latest hash.
Fixes #8
2018-02-17 20:58:23 -07:00
Greg Fitzgerald
69f70cfe72
Add separate benchmarks for seq and par versions of verify_slice
2018-02-16 09:38:12 -08:00
Greg Fitzgerald
1c2e0af69b
Docs cleanup
2018-02-16 09:56:10 -07:00
Greg Fitzgerald
a857ae514b
Test sequential version of verify_slice with same tests
2018-02-16 09:14:42 -07:00
Greg Fitzgerald
09ccc1ee6d
Use create_ticks() outside of benchmark for improved code coverage
2018-02-16 09:06:25 -07:00
Greg Fitzgerald
38485b09c7
Move tests to expose them to rustfmt and kcov
2018-02-15 17:47:54 -07:00
Greg Fitzgerald
fb168fcee0
Cleanup
...
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`.
2018-02-15 16:00:53 -07:00
Greg Fitzgerald
b5645bc776
Rename project
2018-02-15 13:59:33 -07:00
Greg Fitzgerald
3cef50056b
Consistent naming
2018-02-15 11:50:48 -07:00
Greg Fitzgerald
a20e114a80
Cleanup tests
2018-02-15 11:48:18 -07:00
Greg Fitzgerald
0dc0ae506d
Better names
2018-02-15 11:45:04 -07:00
Greg Fitzgerald
9723c827f5
mut hash -> end_hash
2018-02-15 11:29:09 -07:00