Commit Graph

8784 Commits

Author SHA1 Message Date
Sean Bowe
ccb439c510 Protect-style joinsplits should anchor to the latest root for now, until #604 is resolved. 2016-05-12 16:44:49 -06:00
Sean Bowe
0cdfab1d92 Remove the zerocash tests from the full test suite. 2016-05-12 16:44:49 -06:00
Sean Bowe
ddb03c3e8d Fix performance measurements due to modified transaction structure. 2016-05-12 16:44:49 -06:00
Sean Bowe
b8d320df19 Update public zkSNARK parameters for new circuit. 2016-05-12 16:44:49 -06:00
Sean Bowe
4ec57478c4 Remove nearly all of libzerocash. 2016-05-12 16:44:49 -06:00
Sean Bowe
0d990f31a7 Stop testing old tree against new tree. 2016-05-12 16:44:49 -06:00
Sean Bowe
5975bf1c32 Added public zkSNARK parameter generation utility. 2016-05-12 16:44:49 -06:00
Sean Bowe
2dc3599271 Transplant of libzcash. 2016-05-12 16:44:47 -06:00
Sean Bowe
2140639309 Remove scriptPubKey/scriptSig from CPourTx, and add randomSeed. 2016-05-12 16:44:30 -06:00
Sean Bowe
5a2db9e283 libzcash: Add tests for API 2016-05-12 16:44:30 -06:00
Daira Hopwood
dbab243725 zkSNARK: Add constraint that the total value in a JoinSplit is a 64-bit integer. 2016-05-12 16:44:30 -06:00
Sean Bowe
59c3d926c6 zkSNARK: Enforce merkle authentication path from nonzero-valued public inputs to root. 2016-05-12 16:44:30 -06:00
Sean Bowe
fcece37f00 zkSNARK: Witness commitments to input notes. 2016-05-12 16:44:30 -06:00
Sean Bowe
e5f7c49d55 zkSNARK: Ensure that values balance correctly. 2016-05-12 16:44:30 -06:00
Sean Bowe
5e61a78fec zkSNARK: Enforce disclosure of commitments to output notes. 2016-05-12 16:44:30 -06:00
Sean Bowe
6b010d9bfd zkSNARK: Enforce that new output notes have unique rho to prevent faerie gold attack. 2016-05-12 16:44:30 -06:00
Sean Bowe
e52f40e839 zkSNARK: Authenticate h_sig with a_sk 2016-05-12 16:44:30 -06:00
Sean Bowe
2a2f3fb80f zkSNARK: Enforce disclosure of input note nullifiers 2016-05-12 16:44:30 -06:00
Sean Bowe
ca8d6c9347 zkSNARK: Enforce spend-authority of input notes. 2016-05-12 16:44:30 -06:00
Sean Bowe
53d2ade7c2 zkSNARK: Add "zero" constant variable. 2016-05-12 16:44:30 -06:00
Sean Bowe
074eb3a2cf zkSNARK: Foundations of circuit design and verification logic. 2016-05-12 16:44:30 -06:00
Sean Bowe
369df06583 Introduce new libzcash Zcash protocol API and crypto constructions surrounding the zkSNARK circuit. 2016-05-12 16:44:27 -06:00
Sean Bowe
5961dcb6da Change ciphertext length to match protocol spec, and refactor the use of constants. 2016-05-05 21:02:03 -06:00
zkbot
c9a2eea5e2 Auto merge of #905 - ebfull:test-suite-fixes, r=ebfull
Run `zcash-gtest` in `make check` and fix performance tests.

* gtest tests weren't being run by make check
* performance tests were broken
* We need to automatically upload graphs of performance, [see this PR](https://github.com/Electric-Coin-Company/bbotzc/pull/15).
* Moves zerocash tests into `zcash`'s full test suite, we're removing them anyway later and it'd be nice to remove them in the PR instead of from buildbot
2016-05-05 23:29:34 +00:00
zkbot
87485d5ff3 Auto merge of #907 - DoNotUseThisCodeJUSTFORKS:t844-rename-bitcoin-conf, r=defuse
Rename bitcoin.conf and bitcoind.pid

This leaves the mentions of those files in `doc/` and `contrib/` unchanged.

**FORCE PUSHED**
2016-05-04 00:55:10 +00:00
Nathan Wilcox
b6aa043d1f Add googlemock 1.7.0 dependency. 2016-05-03 13:46:09 -07:00
Taylor Hornby
aaf6495948 Rename bitcoin.conf and bitcoind.pid to zcash.conf and zcashd.pid in qa/ and src/ 2016-05-03 14:01:01 -06:00
zkbot
92f3c6082a Auto merge of #889 - ebfull:new-imt-redux, r=ebfull
Implement and integrate new Incremental Merkle Tree

This supersedes #823.

----

This is an implementation of a new incremental merkle tree with

* no memory safety issues
* a more sensible internal design
* better space efficiency (tree representation, witnessing)
* simpler API

It is intended that this tracks the behavior of the previous tree, which it does, as verified by tests. I even wrote a little circuit for testing that all the paths work.

This PR also integrates the tree into the codebase and deprecates the old tree in almost all of our code. (I left it alone in `zerocashTest` but everything else has been changed.)

This change is compatible with the testnet but you will need to clear your *local* blockchain data out since the serialized representation of the merkle tree is now different.

Closes #517, Closes #519, Closes #591, Closes #460, Closes #473
2016-05-03 17:33:27 +00:00
Sean Bowe
26007222e8 Distinguish the failure cases of wfcheck in tree. 2016-05-03 11:23:54 -06:00
Sean Bowe
956dcdde80 Perform zerocash tests as part of full-test-suite, in preparation for removal of zerocash waterfall. 2016-05-03 06:49:15 -06:00
Sean Bowe
6bd8e46922 Run zcash-gtest in make check and fix performance tests. 2016-05-02 23:14:53 -06:00
Sean Bowe
6f1b70300d Small nit fixes 2016-04-30 11:59:39 -06:00
Sean Bowe
4b2c67d212 Check exception has specific string message. 2016-04-28 19:35:22 -06:00
Sean Bowe
70ac6ce2ee Clarify the usage of decryption API. 2016-04-28 17:06:08 -06:00
Sean Bowe
984bdd88f1 Add additional tests for ephemeral key behavior. 2016-04-28 16:52:22 -06:00
Sean Bowe
57f118176f Move NoteEncryption tests to gtest suite. 2016-04-28 16:25:14 -06:00
Sean Bowe
6c36a9fe03 NoteEncryption implementation and integration, removal of ECIES and crypto++ dependencies. 2016-04-28 16:25:12 -06:00
Sean Bowe
6850b45e4d Move incremental merkle tree tests to zcash-gtest. 2016-04-28 16:10:21 -06:00
Sean Bowe
9b92a9d5fb Make appending algorithm more succinct. 2016-04-28 16:07:52 -06:00
Sean Bowe
d0c4b0e850 Add more well-formedness checks/tests to tree. 2016-04-28 16:07:52 -06:00
Sean Bowe
01e4ff0f74 Improve well-formedness checks and add additional serialization/deserialization tests. 2016-04-28 16:07:52 -06:00
Sean Bowe
6d71658673 Initialize curve/field parameters in case another test hasn't done so. 2016-04-28 16:07:52 -06:00
Sean Bowe
1760b3cd88 Deprecate the old tree and remove old tree tests from the test suite. 2016-04-28 16:07:52 -06:00
Sean Bowe
482aefbd0d Test old tree along with new tree as much as possible. 2016-04-28 16:07:52 -06:00
Sean Bowe
434f328446 Integrate new incremental merkle tree implementation into consensus. 2016-04-28 16:07:52 -06:00
Sean Bowe
e1ff849d8d New implementation of incremental merkle tree
This is a new implementation of the incremental merkle tree used by our
scheme to witness commitments to spendable value. It serves as a fixed-sized
accumulator.

This new construction has a much simpler API surface area, avoids memory
safety issues, remains pruned at all times, avoids serialization edge cases,
has more efficient insertion, and is abstract over the depth and hash
function used at the type level.

Further, it lays the groundwork for efficient "fast-forwarding" of witnesses
into the tree as the treestate is updated.
2016-04-28 16:07:52 -06:00
Sean Bowe
291b191bd7 Add serialization for primitive boost::optional<T>. 2016-04-28 16:07:52 -06:00
Taylor Hornby
b2cf9ba300 Fix RPC tests 2016-04-28 13:35:47 -06:00
Taylor Hornby
0000d23121 Add empty merkle/noteencryption tests so Sean can rebase. 2016-04-28 10:10:40 -06:00
Taylor Hornby
3098bab6d6 Fix sighash tests 2016-04-28 09:44:12 -06:00