Commit Graph

7321 Commits

Author SHA1 Message Date
Jack Grigg
ad96d74afe build: Split hardening/fPIE options out in Zcash-specific binaries 2017-12-01 14:10:11 +00:00
Cory Fields
c459de2f03 build: Split hardening/fPIE options out
This allows for fPIE to be used selectively.
2017-11-30 15:17:37 +00:00
Jack Grigg
c6b39fbbd6 Include endian-ness compatibility layer in Equihash implementation 2017-11-29 17:28:44 +00:00
Jack Grigg
d3096198c8 [libsnark] Use POSIX-compliant ar arguments 2017-11-29 17:28:44 +00:00
Jack Grigg
daad2c2736 Check if OpenMP is available before using it 2017-11-29 17:28:44 +00:00
Cory Fields
4bfe8a744b c++11: CAccountingEntry must be defined before use in a list
c++11ism. This fixes builds against libc++.
2017-11-29 17:24:59 +00:00
Cory Fields
4165af1b73 c++11: don't throw from the reverselock destructor
noexcept is default for destructors as of c++11. By throwing in reverselock's
destructor if it's lock has been tampered with, the likely result is
std::terminate being called. Indeed that happened before this change.

Once reverselock has taken another lock (its ctor didn't throw), it makes no
sense to try to grab or lock the parent lock. That is be broken/undefined
behavior depending on the parent lock's implementation, but it shouldn't cause
the reverselock to fail to re-lock when destroyed.

To avoid those problems, simply swap the parent lock's contents with a dummy
for the duration of the lock. That will ensure that any undefined behavior is
caught at the call-site rather than the reverse lock's destruction.

Barring a failed mutex unlock which would be indicative of a larger problem,
the destructor should now never throw.
2017-11-29 17:24:59 +00:00
Homu
37ffef4628 Auto merge of #2767 - syd0:cleanup-reserved-include-guards, r=str4d
Get rid of underscore prefixes for include guards.

This is because they may conflict with reserved names. Also took
this opportunity to make the guards in the zcash subdir a bit
more uniform by having them all conform to ZC_<...>_H_

This closes #1272
2017-11-29 06:52:52 -08:00
Homu
213ac8d1fe Auto merge of #2764 - syd0:remove-old-boost-defines, r=str4d
Remove Boost conditional compilation.

Boost is currently at version 106200 in the depends subsystem
so it is safe to remove code the refers to earlier versions.

This closes #2445
2017-11-28 12:19:27 -08:00
syd
4e4aa5b6ec Get rid of underscore prefixes for include guards.
This is because they may conflict with reserved names. Also took
this opportunity to make the guards in the zcash subdir a bit
more uniform by having them all conform to ZC_<...>_H_

This closes #1272
2017-11-28 14:57:58 -05:00
Homu
2ff8ab7dfb Auto merge of #2751 - syd0:upgrade-googletest-1.8.0, r=str4d
Upgrade googletest to 1.8.0

Closes #1432.
2017-11-28 07:37:20 -08:00
syd
d52dcf5d0c InitGoogleMock instead of InitGoogleTest per CR 2017-11-27 11:08:34 -05:00
Homu
9ce4859459 Auto merge of #2766 - syd0:remove-fPowAllowMinDifficultyBlocks, r=str4d
Get rid of consensus.fPowAllowMinDifficultyBlocks.

This closes #1380
2017-11-27 04:06:27 -08:00
syd
5163fd9d07 Get rid of fp3 from libsnark, it is not used.
This is for #1544
2017-11-25 15:08:01 -05:00
syd
a10c2f46a5 Add gtests to .gitignore 2017-11-25 11:05:01 -05:00
syd
7c591c6d2f Don't compile libgtest.a when building libsnark.
Previously libsnark would try to build libgtest if /usr/src/gtest
exists on the build machine. This caused issues because the
version of libgtest in /usr/src isn't necessarily the same as
the one that the rest of zcash's gtests were built with.
2017-11-25 10:58:37 -05:00
syd
dffc025d38 Get rid of consensus.fPowAllowMinDifficultyBlocks.
This closes #1380
2017-11-23 12:20:50 -05:00
syd
6df5f51b7c Update to address @daira comments wrt fixing configure.ac
Since we're enforcing Boost >= 1.62, we no longer need HAVE_WORKING_BOOST_SLEEP_FOR.
2017-11-23 11:58:25 -05:00
syd
c72a4732cc Remove Boost conditional compilation.
Boost is currently at version 106200 in the depends subsystem
so it is safe to remove code the refers to earlier versions.

This closes #2445
2017-11-23 00:05:21 -05:00
Homu
df1c3debcc Auto merge of #2752 - syd0:fix-sec-hard-tests, r=daira
Get the sec-hard tests to run correctly.

This fixes the way arguments were passed to security-check, and also
a typo in how BIND_NOW was being searched for in a list.

Also fix how symbol-check is invoked although that script isn't
currently used.
2017-11-22 15:22:10 -08:00
Jack Grigg
0523d21d22 make-release.py: Versioning changes for 1.0.13. 2017-11-20 12:23:45 +00:00
syd
2d342736dc Get the sec-hard tests to run correctly.
This fixes the way arguments were passed to security-check, and also
a typo in how BIND_NOW was being searched for in a list.

Also fix how symbol-check is invoked although that script isn't
currently used.
2017-11-20 00:48:12 -05:00
Jack Grigg
e70c8d2ea3 make-release.py: Versioning changes for 1.0.13-rc2. 2017-11-17 17:49:28 +00:00
Jack Grigg
fee8835388 Mark libsnark includes as library includes 2017-11-15 16:49:10 +00:00
Jack Grigg
8f23c734e6 Pass correct dependencies path to libsnark from both Gitian and build.sh 2017-11-15 15:30:21 +00:00
Jack Grigg
83bef3fcbe Move libsnark from DIST_SUBDIRS into EXTRA_DIST 2017-11-15 11:10:19 +00:00
Jack Grigg
66a9fd8b72 Change auto-senescence cycle to 16 weeks
Closes #2686
2017-11-15 00:37:02 +00:00
Jack Grigg
c5b04132bd make-release.py: Versioning changes for 1.0.13-rc1. 2017-11-14 23:53:45 +00:00
Homu
c8ecd49574 Auto merge of #2159 - bitcartel:1.0.7_payment_disclosure, r=str4d
Payment disclosure (experimental feature)
2017-11-14 14:06:22 -08:00
Simon
45232b1961 Add payment disclosure as experimental feature. 2017-11-14 13:29:05 -08:00
Homu
064600ec8a Auto merge of #2649 - bitcartel:2576_security_url, r=str4d
Closes #2576. Update link to security info on z.cash website.
2017-11-09 15:19:41 -08:00
Homu
6f9f09dfb0 Auto merge of #2670 - arielgabizon:lowmemprover, r=daira
Low memory prover

This PR integrates @ebfull 's low memory changes:  https://github.com/zcash/zcash/pull/2243/commits
on top of @str4d 's work bringing in libsnark as a subtree
4699d0eb36
2017-11-06 04:22:20 -08:00
Jack Grigg
bef1b5ce1b Fix NPE in rpc_wallet_tests 2017-11-05 12:02:21 -05:00
Simon
c5dabd2b66 Closes #2639. Adds optional limit parameter with a default value of 50.
The new parameter is to satisfy the principle of least astonishment
by providing a sensible default for the maximum number of transparent
inputs to shield.  If users do not configure -mempooltxinputlimit
it is possible for them to create transactions with hundreds of
inputs which suffer from mining delay, due to the current state of
the network where some miners have configured -mempooltxinputlimit
as a way to deal with the problem of quadratic hashing.
2017-11-01 10:40:24 -07:00
Simon
1051242926 Closes #2576. Update link to security info on z.cash website. 2017-10-31 20:31:40 -07:00
Ariel Gabizon
4305a56221 boost::format -> tinyformat 2017-11-01 02:11:49 +13:00
Sean Bowe
394f41853b Integrate low memory prover. 2017-11-01 02:11:49 +13:00
Sean Bowe
c8a7f74753 Add streaming prover. 2017-11-01 02:11:49 +13:00
Sean Bowe
abf4af12df Refactor proof generation function. 2017-11-01 02:11:46 +13:00
Simon
c2d3bafeaa Closes #2639. z_shieldcoinbase is now supported, no longer experimental.
This reverts commit 5023af7bd5.
2017-10-26 11:29:36 -07:00
Homu
fb2f98e00b Auto merge of #2555 - jasondavies:fix-2554, r=str4d
Fix various thread assertion errors caused during shutdown.

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6719
- bitcoin/bitcoin#6990
- bitcoin/bitcoin#8421
  - Second commit only in this PR
- bitcoin/bitcoin#11006

I've cherry-picked the relevant commits, along with a note in each commit referring to the original Bitcoin commit ID (and the Zcash issue numbers where applicable).  I've tested each issue with/without these patches applied.

Closes #2214, #2334, and #2554.
2017-10-23 15:15:14 -07:00
João Barbosa
d3c8109b41 Improve shutdown process
Zcash: cherry-picked from commit 793667af1c31835e0eefcdd283930bb89cfeda8f
2017-10-23 14:14:45 +01:00
Sean Bowe
1a9543d064 Remove crusty old "loadVerifyingKey"/"loadProvingKey" APIs and associated invariants. 2017-10-21 15:42:41 +03:00
Homu
4ca8f506d7 Auto merge of #2652 - str4d:820-libsnark-subtree, r=str4d
Move libsnark in-repo as a git subtree

This PR pulls in the libsnark subtree at the exact commit that we currently fetch via the depends system. To verify:

```
$ ./contrib/devtools/git-subtree-check.sh src/snark
src/snark in HEAD was last updated to upstream commit 9ada3f84ab484c57b2247c2f41091fd6a0916573 (tree c10a38c759)
src/snark in HEAD currently refers to tree 34e916d3f6
:100644 100644 427f4f4ce9 13e54da68b M	Makefile
:040000 040000 42f29e42d1 dd73536163 M	src
FAIL: subtree directory tree doesn't match subtree commit tree
```

This shows that there are changes relative to what we currently use, due to the later commits in the PR. If we exclude them, we see that the code is identical:

```
$ git checkout 26a8f68ea8
$ ./contrib/devtools/git-subtree-check.sh src/snark
src/snark in HEAD was last updated to upstream commit 9ada3f84ab484c57b2247c2f41091fd6a0916573 (tree c10a38c759)
src/snark in HEAD currently refers to tree c10a38c759
GOOD
```

Closes #820.
2017-10-17 20:41:11 -07:00
Jack Grigg
d43b32bbfe Remove OpenSSL libraries from libsnark LDLIBS
Unnecessary in the Zcash libsnark fork.
2017-10-17 20:33:28 -07:00
Jack Grigg
99ca5e1a22 Ensure that libsnark is built first, so its headers are available 2017-10-17 19:04:38 -07:00
Jack Grigg
e2283742db Add libsnark to "make clean" 2017-10-17 19:03:41 -07:00
Homu
af549fe6ed Auto merge of #2650 - str4d:2645-listunspent-benchmark, r=str4d
Add benchmark for listunspent

Closes #2645.
2017-10-12 15:24:53 -07:00
Jack Grigg
8598c20d40 Changes to get test_r1cs_ppzksnark passing 2017-10-11 21:15:49 +01:00
Jack Grigg
82e839e4ff Add "make libsnark-tests" that runs libsnark's "make check" 2017-10-11 15:22:24 +01:00