Commit Graph

50 Commits

Author SHA1 Message Date
Greg Fitzgerald aa7e3df8d6 Plan -> Budget
Budget is now an EDSL. PaymentPlan is the interface to it.
2018-05-29 18:09:03 -06:00
Greg Fitzgerald ad00d7bd9c Move plan methods to a trait 2018-05-29 18:09:03 -06:00
Greg Fitzgerald 41efcae64b Remove dead code
History: we thought SigVerifyStage would use these, but it does
signature verification before deserializing transactions.
2018-05-29 10:38:58 -06:00
Greg Fitzgerald cf5671d058 tr -> tx
Missed a few.
2018-05-29 10:38:58 -06:00
Greg Fitzgerald 8d26be8b89 Run benchmarks in nightly
And name functions the same way as test functions
2018-05-26 00:36:50 -06:00
Greg Fitzgerald aaeb5ba52f tr -> tx 2018-05-25 16:47:21 -06:00
Greg Fitzgerald ecb3dbbb60 Add witness tx constructors 2018-05-24 10:10:41 -06:00
Greg Fitzgerald cc907ba69d Add Instruction type 2018-05-24 10:10:41 -06:00
Greg Fitzgerald 2e059f8504 Rename TransactionData to Contract
No longer a single place to get all the data that was signed.
2018-05-22 17:00:40 -06:00
Greg Fitzgerald 207b6686d1 Hoist last_id
First step in unifying Witness processing and Transaction processing
2018-05-22 17:00:40 -06:00
Jackson Sandland 44bf79e35f transaction.rs - panic cleanup 2018-05-10 18:24:33 -07:00
Jackson Sandland 02c573986b historian / transaction updates 2018-05-09 17:22:14 -07:00
Jackson Sandland 86c1aaf7d8 transaction.rs - panic cleanup 2018-05-08 22:46:22 -07:00
Greg Fitzgerald 51633f509d Fix test
The test was meant to ensure the signature covered the 'tokens'
field, but then when the 'plan' field was rolled in, Transaction::verify()
started failing because Plan::verify() failed. When Transaction::verify()
was split into two, the unexpected failure was exposed but went unnoticed.
This patch brings it back to its original intent, to ensure signature
verification fails if the network attempts to change the client's payment.
2018-04-11 22:17:21 -06:00
Greg Fitzgerald 705228ecc2 Remove redundant signs 2018-04-11 22:17:21 -06:00
Greg Fitzgerald 6fd32fe850 Cleanup constants 2018-04-06 15:43:05 -06:00
Stephen Akridge f4466c8c0a Change for cuda verify integration 2018-04-05 20:00:44 -07:00
Greg Fitzgerald 2f80747dc7 Move tests
After we restructured for parallel verification, the tests here
were unreferenced by the accountant, but still meaningful to
transaction verification.
2018-04-02 21:45:21 -06:00
Greg Fitzgerald 94eea3abec fmt 2018-04-02 21:15:21 -06:00
Greg Fitzgerald 6fec8fad57 Adding from to the signature is redundant 2018-04-02 20:34:18 -06:00
Greg Fitzgerald 55179101cd Add more documentation 2018-03-29 12:20:54 -06:00
Greg Fitzgerald 878ca8c5c5 Add microbenchmark for signature verification 2018-03-28 22:02:47 -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 6be3d62d89 Remove Action from spending plans 2018-03-20 15:43:07 -06:00
Greg Fitzgerald 265f41887f asset -> tokens 2018-03-19 10:03:41 -06:00
Greg Fitzgerald f4e0d1be58 Make conditions explicit in races
And boot recursive spending plans. That path required heap allocations.
Since we don't have a need for this generality right now, reduce the
language to the smallest one that can pass our test suite.
2018-03-17 20:43:05 -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 e7da083c31 Move spending plans to their own crate 2018-03-17 19:56:15 -06:00
Greg Fitzgerald 367c32dabe Guard spending plans, not just payments 2018-03-17 19:56:15 -06:00
Greg Fitzgerald 45765b625a Don't let users accidentally burn their funds either 2018-03-11 12:04:49 -06:00
Greg Fitzgerald aa0a184ebe Ensure the server isn't passed a Plan that spends more than is bonded 2018-03-11 11:53:45 -06:00
Greg Fitzgerald 0eb3669fbf cleanup timestamp processing 2018-03-11 00:30:01 -07:00
Greg Fitzgerald 30449b6054 cleanup sig processing 2018-03-11 00:11:08 -07:00
Greg Fitzgerald f5f71a19b8 First go at smart contracts
Needs lots of cleanup.
2018-03-10 22:00:48 -07:00
Greg Fitzgerald 8579795c40 Ensure transactions won't get canceled after next refactor 2018-03-10 19:44:45 -07:00
Greg Fitzgerald 9d77fd7eec Store only spending plans, not full transactions 2018-03-10 18:35:10 -07:00
Greg Fitzgerald 8c40d1bd72 Move spending endpoints into expressions 2018-03-10 17:41:18 -07:00
Greg Fitzgerald 7a0bc7d888 Move smart contract fields into their own struct 2018-03-10 16:55:39 -07:00
Greg Fitzgerald e759bd1a99 Add conditions to the signature to reject duplicates 2018-03-08 08:18:34 -07:00
Greg Fitzgerald 94daf4cea4 Add Cancel and Timestamp events
Fixes #31, #34, #39
2018-03-08 08:17:34 -07:00
Greg Fitzgerald 2379792e0a Add DateTime and Cancel conditions
Fixes #32, #33
2018-03-08 08:17:08 -07:00
Greg Fitzgerald 491ba9da84 Add accessors to keypairs and signatures 2018-03-07 15:32:22 -07:00
Greg Fitzgerald 9834c251d0 Boot genesis block helper
Before this change, if you wanted to use a new Transaction
feature in the genesis block, you'd need to extend its
Creator object and associated methods.  With yesterday's
addtions to Transcation, it's now so easy to work with
Transactions directly that we can get rid of the middleman.

Also added a KeyPair type alias, so that ring could be easily swapped
out with a competing library, if needed.
2018-03-07 11:10:15 -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 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 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