Commit Graph

8857 Commits

Author SHA1 Message Date
Taylor Hornby 675e17022f Use left shift instead of floating-point pow() in equihash. 2016-05-18 11:22:29 -06:00
Taylor Hornby 6fe2e85816 Use HARDENED_CPPFLAGS in the Makefile consistently. 2016-05-18 11:22:29 -06:00
Taylor Hornby 67f3fe3d25 Fix FORTIFY_SOURCE build errors. 2016-05-18 11:22:29 -06:00
Taylor Hornby e857a0cd1f Fix build warnings in sighash tests. 2016-05-18 11:22:29 -06:00
Jack Grigg fe0cacd2d8 Add Zcash revision to version strings 2016-05-18 16:50:28 +12:00
Sean Bowe a6770caa45 Update versions and release notes. 2016-05-16 23:08:35 -06:00
Sean Bowe 383f8b0c8a Change testnet network magics. 2016-05-16 22:54:33 -06:00
Taylor Hornby bf2e3122ac Remove the Merkle tree hash function's fixed point. 2016-05-16 20:20:36 -06:00
zkbot 9e387120eb Auto merge of #908 - ebfull:trafford, r=ebfull
libzcash and new zkSNARK circuit implementation

This PR completes [`libzcash`](https://github.com/zcash/zcash/tree/zc.v0.11.2.latest/src/zcash), the implementation of the [Zcash protocol specification](9bb4410e45/protocol/protocol.pdf) and replacement of [`libzerocash`](https://github.com/Zerocash/libzerocash), our old Zerocash protocol implementation. The new spec comes with some improvements to security and terminology, with minimal differences from the original academic design.

This implementation includes:

* A rewrite of the zkSNARK circuit for `JoinSplit` operations. This rewrite is cleaner, broken up into separate gadgets, easier to audit and review, and fixes some security bugs. (Closes #822, Closes #809, Closes #500, Closes #854)
* A minimal API for interacting with `JoinSplit`s and surrounding primitives. This PR removes almost twice as much code as it introduces. (Closes #877, Closes #315, Closes #824, Closes #798, Closes #707, Closes #512, Closes #247, Closes #128, Closes #514)
2016-05-17 01:04:49 +00:00
Sean Bowe 1896a89cac Add h_sig test vectors. 2016-05-12 16:45:12 -06:00
Sean Bowe 3e0af61b86 Update zkSNARK proving/verifying keys. 2016-05-12 16:45:12 -06:00
Sean Bowe 81469bbb83 `Note` values should be little-endian byte order. 2016-05-12 16:45:12 -06:00
Sean Bowe 032164d5d5 Rename hmac -> mac in circuit. 2016-05-12 16:45:12 -06:00
Sean Bowe a9640f67f1 Rename ZCASH_ constants to ZC_. 2016-05-12 16:45:07 -06:00
Sean Bowe 53ab7c06ba Use inheritance for PRF gadgets. 2016-05-12 16:44:49 -06:00
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
zkbot 35fd74e598 Auto merge of #924 - ebfull:init-sodium-gtest, r=ebfull
Initialize libsodium in the gtest suite.

We left behind this initialization routine when we switched to gtest. I would rather we had moved those tests over in a separate PR instead of changing existing PRs at the last second -- we would have paid more attention to the consequences.
2016-05-12 21:33:21 +00:00
Taylor Hornby 45d7a9b4a7 Trivial change: Capitalize the Z in Zerocash 2016-05-11 16:59:21 -06:00
Jack Grigg 442eff615b Fix failing miner test 2016-05-12 00:01:24 +12:00
Sean Bowe c75d6bd0fa Initialize libsodium in the gtest suite. 2016-05-10 17:46:58 -06:00
Jack Grigg 7a1f55183d Disable mining slow start in regtest mode 2016-05-10 23:11:32 +12:00
Jack Grigg 4f4a8c3c88 Update miner tests to account for mining slow start 2016-05-10 23:03:23 +12:00
Jack Grigg 91818cf28c Update subsidy tests to account for mining slow start 2016-05-10 23:03:23 +12:00
Jack Grigg bcb34c0802 Implement mining slow start with a linear ramp 2016-05-10 23:03:18 +12: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