Commit Graph

11937 Commits

Author SHA1 Message Date
Sean Bowe
9285bba885 Enable binary serializations of proofs and r1cs keys, and make the CPourTx proof field fixed-size. 2016-05-24 11:08:31 -06:00
Sean Bowe
defe37a6d4 Enforce first four bits are zero for all spending keys and phi. 2016-05-24 11:07:09 -06:00
Jack Grigg
b5c6a3af12 Use optimised Equihash solver for miner and benchmarks
The basic solver is still used for regtest-only purposes.
2016-05-24 23:16:53 +12:00
Jack Grigg
d4d76536a5 Use fixed-width array for storing hash and indices 2016-05-24 23:16:53 +12:00
Jack Grigg
29d9986c83 Store full indices in the same char* as the hash 2016-05-24 23:16:52 +12:00
Jack Grigg
639c40047f Use comparator object for sorting StepRows 2016-05-24 23:16:52 +12:00
Jack Grigg
a683cc85d9 Merge *StepRow XOR and trimming operations 2016-05-24 23:16:52 +12:00
Jack Grigg
e95747288a Use template parameters to statically initialise Equihash 2016-05-24 23:16:50 +12:00
zkbot
9cf13a3e85 Auto merge of #955 - loxal:zc.v0.11.2.latest, r=ebfull
#776 add sha256sum support for Mac OS X
2016-05-24 03:47:03 +00:00
zkbot
4ac1841614 Auto merge of #958 - ebfull:prf-refactor, r=ebfull
Refactor PRF_gadget to hand responsibility to PRF_addr_a_pk_gadget for creating the '0' argument to the PRF

Closes #930
2016-05-24 01:11:44 +00:00
Jack Grigg
39f5cb35f9 Store truncated indices in the same char* as the hash (H/T tromp for the idea!) 2016-05-24 12:02:46 +12:00
Jack Grigg
c92c1f6050 Implement index-truncation Equihash optimisation 2016-05-24 12:02:46 +12:00
Jack Grigg
6afef0dd6d Cleanups 2016-05-24 12:02:46 +12:00
Jack Grigg
a3361e778b Refactor StepRow to make optimisation easier 2016-05-24 12:02:08 +12:00
zkbot
0395055549 Auto merge of #961 - alfiedotwtf:zc.v0.11.2.latest, r=ebfull
Rename libzerocash to libzcash

Rename libzerocash to libzcash in Makefiles and source (C++ namespace) #960
2016-05-23 22:49:59 +00:00
Alfie John
1785bdb98a Rename libzerocash to libzcash 2016-05-24 08:36:48 +10:00
Alex
7e540a0b6f add sha256sum support for Mac OS X 2016-05-23 23:54:29 +02:00
zkbot
a09517f313 Auto merge of #948 - nathan-at-least:t946.fix-cov-zcash, r=nathan-at-least
Fix a test name bug so that ``make cov-zcash`` correctly runs the ``zcash-gtest`` binary. Fixes #946.
2016-05-23 21:44:20 +00:00
Sean Bowe
1bcdec40a4 Refactor PRF_gadget to hand responsibility to PRF_addr_a_pk_gadget for creating the '0' argument to the PRF. 2016-05-23 10:43:25 -06:00
zkbot
671b9562f1 Auto merge of #943 - str4d:938-clientversion, r=ebfull
Update version and help strings for Zcash

Closes #938.
2016-05-21 00:30:13 +00:00
Jack Grigg
b3e712a4d2 Minor error message tweak 2016-05-21 11:48:52 +12:00
Jack Grigg
c5d080bb83 Add Zcash Developers to CLI copyright notice 2016-05-20 11:56:19 +12:00
Jack Grigg
a1de76c7a0 Bitcoin -> Zcash in version and help text 2016-05-20 11:56:11 +12:00
Nathan Wilcox
7fde87cd4e Fix a test name bug so that `make cov-zcash correctly runs the zcash-gtest` binary. Fixes #946. 2016-05-19 10:52:28 -07:00
Taylor Hornby
be1bae14e8 Hide new Boost warnings on GCC 6. 2016-05-18 12:20:16 -06:00
Taylor Hornby
e334392fab Patch libsnark to build with my compiler. Upstream PR #35. 2016-05-18 11:22:29 -06:00
Taylor Hornby
6dc53bdc33 Turn on -Werror for the Zcash build. 2016-05-18 11:22:29 -06:00
Taylor Hornby
7c1ccd9006 Remove unused code in libzerocash util.cpp 2016-05-18 11:22:29 -06:00
Taylor Hornby
ec3bd70b6d Ignore deprecated declaration warnings. 2016-05-18 11:22:29 -06:00
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
Simon
b0f75847ea Fix issue #717 where if addrman is starved of addresses (e.g. on testnet)
the Select_() function will loop endlessly trying to find an address,
and therefore eat up 100% cpu time on the 'opencon' thread.

Solution is to (1) add a delay to the loop and (2) restrict the number
of attempts to find an address.  On exiting the loop, we return
to an outer loop in net.cpp which will sleep, add seed nodes and
calcualte new addresses.
2016-05-13 16:00:22 -07: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