Commit Graph

7575 Commits

Author SHA1 Message Date
Homu a4a020de7b Auto merge of #2217 - str4d:2074-chainparams, r=str4d
Bitcoin 0.12 chainparams cleanups

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6222
- bitcoin/bitcoin#6381
- bitcoin/bitcoin#6473
- bitcoin/bitcoin#6242

Part of #2074.
2018-01-22 15:22:24 -08:00
Homu d11230be73 Auto merge of #2886 - bitcartel:2885_cleanup_node_getutxo, r=str4d
Remove redundant service flag NODE_GETUTXO meant for Bitcoin XT.

For #2885. This frees up a service bit.  Zcash has never used this flag
and upstream Bitcoin Core does not support this flag, although
it did reserve it for compatibility with Bitcoin XT.
2018-01-22 08:38:49 -08:00
Jack Grigg 40ebf08ff8
Add viewing key prefix to regtest parameters 2018-01-22 15:32:52 +00:00
Jack Grigg ff145dfe32
Add missing namespace for boost::get 2018-01-22 10:30:41 -05:00
Cory Fields 91690d6e84
chainparams: don't use std namespace 2018-01-22 10:30:41 -05:00
Cory Fields 47b71cec5d
chainparams: move CCheckpointData into chainparams.h
This unties CChainParams from its dependency on checkpoints. Instead, now it
only depends on the raw checkpoint data.
2018-01-22 10:30:41 -05:00
Daniel Kraft a97308c5d4
Clean up chainparams some more.
Clean up the code in chainparams a bit more after the recent
refactorings.  In particular, make sure the structure of the "RegTest"
params matches the structure of the other classes.  This makes the code
clearer to read.

Also remove redundant values of the genesis block in always-specified
optional arguments and mark variable/argument as "const".
2018-01-22 10:30:41 -05:00
Jorge Timón 54ab3b3183
Chainparams: CTestNetParams and CRegTestParams extend directly from CChainParams
...instead of CMainParams and CTestNetParams respectively

Do the same for CBaseChainParams.
The inheritance was only reducing readibility in this case
2018-01-22 10:30:41 -05:00
Jorge Timón 90b6ee6ce5
Chainparams: Introduce CreateGenesisBlock() static function 2018-01-22 10:30:41 -05:00
Mark Friedenbach fe53749dc9
Explicitly set tx.nVersion for the genesis block and mining tests
If/when CTransaction::CURRENT_VERSION is incremented, this will break CChainParams and the miner tests. This fix sets the transaction version explicitly where we depend on the hash value (genesis block, proof of work checks).
2018-01-22 10:30:41 -05:00
Simon 03a61ed87c Remove redundant service flag NODE_GETUTXO meant for Bitcoin XT.
This frees up a service bit.  Zcash has never used this flag
and upstream Bitcoin Core does not support this flag, although
it did reserve it for compatibility with Bitcoin XT.
2018-01-19 17:22:54 -08:00
Simon 5befbed4bc Fixes #2793. Backport commit f33afd3 to increase dbcache default. 2018-01-15 23:17:34 -08:00
Homu b2a114a8c9 Auto merge of #2771 - syd0:fix-snark-dep-build, r=str4d
Fix libsnark dependency build.

This changes libsnark to build in-place, instead of copying first to
a build directory. Previously, modifications made to the original
sources wouldn't get rebuilt without a 'make clean' because users
would be pointing to the copies.

This closes #2689.
2018-01-04 17:06:33 -08:00
Homu 8dbe11451a Auto merge of #2770 - syd0:remove-some-cruft, r=str4d
Remove OSX and Windows files from Makefile + share directory.

These are stale holdovers from bitcoin.

This closes #2169.
2018-01-04 16:02:27 -08:00
syd b6a990def0
Remove OSX and Windows files from Makefile + share directory.
These are stale holdovers from bitcoin.

This closes #2169.
2018-01-04 22:50:17 +00:00
Homu db9f6f0485 Auto merge of #2821 - str4d:2335-scope-ecdsa-constants, r=str4d
Scope the ECDSA constant sizes to CPubKey / CKey classes

Cherry-picked from https://github.com/bitcoin/bitcoin/pull/10657, upstreaming our patches from #2335.
2018-01-04 14:47:50 -08:00
Jack Grigg 2091cf23ae
make-release.py: Versioning changes for 1.0.14. 2018-01-03 23:44:51 +01:00
Jay Graber 9d2974ed5b Add getdeprecationinfo rpc call to return current version and deprecation block height. 2018-01-02 11:38:39 -08:00
Jack Grigg 275f21ad4b
make-release.py: Versioning changes for 1.0.14-rc1. 2017-12-22 09:59:01 +00:00
kozyilmaz bf69507cb5 Fix test/gtest bugs caught by latest macOS clang 2017-12-21 12:35:16 +03:00
Homu 1683c2d5bf Auto merge of #2143 - str4d:1997-viewing-keys, r=str4d
Implement incoming viewing keys

Closes #1997.
2017-12-20 14:11:05 -08:00
Jack Grigg c4c7c6630b
Scope the ECDSA constant sizes to CPubKey / CKey classes 2017-12-20 17:28:13 +00:00
Jack Grigg 2bbfe6c4e8
Add cautions to z_getbalance and z_gettotalbalance help text about viewing keys 2017-12-20 11:24:51 +00:00
Jack Grigg bec2235148
Cleanup: Add braces for clarity 2017-12-20 11:18:59 +00:00
Jack Grigg 7b8d4f87ec
Modify zcrawkeygen RPC method to set "zcviewingkey" to the viewing key
The "zcviewingkey" field has never been documented before, and the method itself
is deprecated; this just ensures it is consistent with the rest of the RPC.
2017-12-20 00:46:41 +00:00
Jack Grigg 44e37656bf
Add watch-only support to Zcash RPC methods
Balance totals do not include spends linked to viewing key addresses, as
nullifiers cannot be calculated and therefore spends cannot be detected.
2017-12-20 00:46:37 +00:00
Jack Grigg 9a2b8ae57f
Update wallet logic to account for viewing keys
The wallet code previously assumed that an unlocked wallet would always
have a spending key associated with a note decryptor. Viewing keys break
this assumption.
2017-12-20 00:46:37 +00:00
Jack Grigg e85b33a52e
Add RPC methods for exporting/importing viewing keys 2017-12-20 00:46:37 +00:00
Jack Grigg 167cd33374
Implement viewing key storage in the wallet 2017-12-20 00:46:37 +00:00
Jack Grigg 49cf707d2c
Add Base58 encoding of viewing keys 2017-12-20 00:46:33 +00:00
syd a55c186a74 Fix libsnark dependency build.
This changes libsnark to build in-place, instead of copying first to
a build directory. Previously, modifications made to the original
sources wouldn't get rebuilt without a 'make clean' because users
would be pointing to the copies.

This closes #2689.
2017-12-16 15:52:08 -05:00
Homu 7888624f74 Auto merge of #2795 - str4d:2351-sprout-circuit-value, r=str4d
Track net value entering and exiting the Sprout circuit

Delta values will be stored for new blocks; old blocks can be filled in by
re-indexing. The net value currently in the Sprout circuit is only calculated
when delta values for all previous blocks are present.

Part of #2351.
2017-12-16 02:09:40 -08:00
Jack Grigg e365ca1c53
Remove nSproutValue TODO from CDiskBlockIndex
Block indices are flushed to disk when they are marked as dirty, and this
happens via enough distinct pathways that it would be sufficiently complex to
update nSproutValue via all of them. Thus it is necessary to be able to
serialize "no value" for writes by upgraded clients.
2017-12-16 10:01:26 +00:00
Homu 2a48fa62bf Auto merge of #2780 - str4d:1272-secp256k1, r=daira
Merge current secp256k1 subtree

Part of #1272.
2017-12-15 12:35:13 -08:00
Jack Grigg 9d0c70e9e7
Clarify operator precedence in serialization of nSproutValue 2017-12-15 18:36:05 +00:00
Homu f44a4cea42 Auto merge of #2790 - bitcartel:2746_payment_disclosure_prefix, r=str4d
Closes #2746. Payment disclosure blobs now use 'zpd:' prefix.
2017-12-15 10:31:58 -08:00
Homu b9c7d84990 Auto merge of #2800 - str4d:2788-libsnark-test-hardening, r=str4d
Fix buffer overflow in libsnark

Applies `-fstack-protector-all` to libsnark, and fixes an underlying bug. This bug was not triggerable in `zcashd` because the function in question was being inlined by the compiler.

Closes #2788.
2017-12-15 07:32:41 -08:00
Homu 83af270002 Auto merge of #2786 - str4d:2074-build, r=str4d
Build system improvements

Includes commits cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6978
  - Only the first commit (second is for QT)
- bitcoin/bitcoin#7059
- bitcoin/bitcoin#7603
  - Only the first commit (without the `BITCOIN_QT_BIN` variable; the rest are for QT)
- bitcoin/bitcoin#7954
- bitcoin/bitcoin#8314
  - Only the second commit (first is for QT)
- bitcoin/bitcoin#8504
  - Only the first commit (second was undoing something we didn't have)
- bitcoin/bitcoin#8520
- bitcoin/bitcoin#8563
- bitcoin/bitcoin#8249
- bitcoin/bitcoin#9156
- bitcoin/bitcoin#9831
- bitcoin/bitcoin#9789
- bitcoin/bitcoin#10766

Part of #2074.
2017-12-15 05:04:44 -08:00
syd 4a617475ec
Fix libsnark test failure.
The shorten() method was copying too much into the destination
buffer, overflowing it and affecting neighboring data.
2017-12-15 10:37:07 +00:00
Jack Grigg d66bf190cb
Apply -fstack-protector-all to libsnark 2017-12-15 10:02:54 +00:00
Jack Grigg e319633435
Add Sprout value pool to getblock and getblockchaininfo 2017-12-14 22:06:15 +00:00
Jack Grigg ad6a36ad02
Track net value entering and exiting the Sprout circuit
Delta values will be stored for new blocks; old blocks can be filled in by
re-indexing. The net value currently in the Sprout circuit is only calculated
when delta values for all previous blocks are present.
2017-12-14 22:06:11 +00:00
Simon 61345ae703 Closes #2746. Payment disclosure blobs now use 'zpd:' prefix. 2017-12-07 10:11:43 -08:00
Homu 019c4bddc8 Auto merge of #2741 - bitcartel:stop_dumpwallet_overwriting, r=str4d
Prevent RPC calls dumpwallet and z_exportwallet from overwriting an existing file

Closes #2740
2017-12-04 09:41:52 -08:00
Jack Grigg 13933e4c13
Factor out common logic from CZCPaymentAddress and CZCSpendingKey 2017-12-04 17:17:18 +00:00
Jack Grigg aa666c9673
Implement viewing key storage in the keystore 2017-12-04 17:17:18 +00:00
Jack Grigg 642a1caf93
ViewingKey -> ReceivingKey per zcash/zips#117 2017-12-04 17:17:18 +00:00
Homu 28e0159707 Auto merge of #2724 - arcalinea:1020-add-examples-for-zrpc, r=str4d
Add examples for z_rpc calls

Adds missing cli and json-rpc examples for `z_` rpc calls

Closes #2723
(Accidentally named the branch being merged in with wrong issue number)
2017-12-04 08:39:20 -08:00
Cory Fields 5dd887fdf7
build: add --enable-werror option
This turns some compiler warnings into errors. Useful for c-i.
2017-12-01 14:10:17 +00:00
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
Jack Grigg 7a448d3fa5
Bump secp256k1 subtree 2017-11-28 16:43:13 +00:00
Jack Grigg cde23ac085
Squashed 'src/secp256k1/' changes from 84973d3..6ad5cdb
6ad5cdb Merge #479: Get rid of reserved _t in type names
d1dc9df Get rid of reserved _t in type names
0b70241 Merge #474: Fix header guards using reserved identifiers
ab1f89f Merge #478: Fixed multiple typos
8c7ea22 Fixed multiple typos
abe2d3e Fix header guards using reserved identifiers
f532bdc Merge #459: Add pubkey prefix constants to include/secp256k1.h
cac7c55 Merge #470: Fix wnaf_const documentation
768514b Fix wnaf_const documentation with respect to return value and number of words set
b8c26a3 Merge #458: Fix typo in API documentation
817fb20 Merge #440: Fix typos
12230f9 Merge #468: Remove redundant conditional expression
2e1ccdc Remove redundant conditional expression
bc61b91 add pubkey prefix constants to include/secp256k1.h
b0452e6 Fix typo in API documentation
4c0f32e Fix typo: "Agressive" → "Aggressive"
73aca83 Fix typo: "exectured" → "executed"

git-subtree-dir: src/secp256k1
git-subtree-split: 6ad5cdb42a1a8257289a0423d644dcbdeab0f83c
2017-11-28 16:42:12 +00: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
Jay Graber 9eb8089e98 Fix cli help result for z_shieldcoinbase 2017-11-27 20:06:36 -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
Jay Graber 337a99a219 Add cli and rpc examples for z_sendmany 2017-11-17 13:17:51 -08:00
Jack Grigg e70c8d2ea3
make-release.py: Versioning changes for 1.0.13-rc2. 2017-11-17 17:49:28 +00:00
Simon ba1dbb3040 RPC dumpwallet and z_exportwallet updated to no longer allow
overwriting an existing file.
2017-11-16 22:29:37 -08: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
Jack Grigg 19f6668c27
Add "make check" to libsnark that runs the Google Tests 2017-10-11 15:21:44 +01:00
Jack Grigg 638e742f3f
Update libsnark LDLIBS
-lsodium is necessary as we altered libsnark to use libsodium's RNG.
2017-10-11 15:19:33 +01:00
Jack Grigg 4699d0eb36
Add alt_bn128 to QAP and Merkle tree gadget tests 2017-10-11 15:18:01 +01:00
Jack Grigg df3083fe4e
Remove test code corresponding to removed code 2017-10-11 14:59:51 +01:00
Jack Grigg 054ae60645
Migrate libsnark test code to Google Test 2017-10-11 14:54:42 +01:00
Jason Davies b30900a54b Replace "bitcoin" with "Zcash". 2017-10-05 18:10:15 +01:00
Simon 6de850120f Replace 'bitcoin address' with 'zcash address'. 2017-10-04 17:07:07 -07:00
Jay Graber c16528495c s/zcash/Zcash 2017-10-04 17:06:51 -07:00
Bruno Arueira d2c1e4a807 Removes out bitcoin mention in favor for zcash
Bitcoin Core => Zcash
bitcoin address => Zcash address
bitcoinaddress => zcashaddress

Closes #1756
2017-10-04 17:05:30 -07:00
Jack Grigg 99dd50c30c
Add benchmark for listunspent
Closes #2645.
2017-10-04 12:48:50 +01:00
Jack Grigg 0f49863acb
make-release.py: Versioning changes for 1.0.12. 2017-09-28 01:17:05 +01:00
Simon 5023af7bd5 Closes #2637. Make z_shieldcoinbase an experimental feature where it
can be enabled with: zcashd -experimentalfeatures -zshieldcoinbase.
2017-09-27 10:43:54 -07:00
Simon b85008e786 Update which lock to synchronize on when calling GetBestAnchor(). 2017-09-26 10:16:33 -07:00
Jack Grigg 39cb7df909
make-release.py: Versioning changes for 1.0.12-rc1. 2017-09-23 10:42:23 +01:00
Homu f34c60de37 Auto merge of #2615 - bitcartel:2448_shield_coinbase, r=bitcartel
Add RPC command shield_coinbase #2448.

Shield transparent coinbase funds by sending to a shielded z address. Closes #2448.
2017-09-22 12:04:31 -07:00
Simon 06c19063bb Implement RPC shield_coinbase #2448. 2017-09-21 15:04:12 -07:00
Homu 8f16b27304 Auto merge of #2616 - nathan-at-least:importprivkey-shows-address.4, r=str4d
Importprivkey shows address

Scratching an itch: make `importprivkey` output the corresponding address.

Without this PR, `importprivkey` shows no output. Because we're moving towards an "address-based" RPC interface, rather than "account-based", there's a gap when using `importprivkey` because there's no way to assign it to a specific account, but also no easy way to determine the address. This change fixes that wart.
2017-09-21 14:29:03 -07:00
Homu 60b4a79000 Auto merge of #2620 - bitcartel:2583_watch_only_fspendable, r=str4d
Closes #2583. Exclude watch-only utxos from coin selection.
2017-09-20 04:49:48 -07:00
Simon b17e1b4080 Closes #2583. Exclude watch-only utxos from z_sendmany coin selection. 2017-09-19 19:42:48 -07:00
Homu 6e9964ff70 Auto merge of #2613 - arielgabizon:load-wallet-benchmark, r=str4d
Add load-wallet benchmark

Closes #2518.
2017-09-19 01:52:22 -07:00
Ariel Gabizon 2e8aefdce1 add load-wallet benchmark 2017-09-18 21:54:53 +02:00
Homu 61d9c6745a Auto merge of #2545 - bhjortsberg:fixes-for-gcc-7, r=str4d
Fixes for gcc 7

This fixes a few issues when using a newer compiler (in my case gcc 7.1.1) available in for example Arch Linux.
Solves for example this issue: https://github.com/zcash/zcash/issues/2304

The first thing is an error when checking for boost_system and is solved by disabling that warning (wich is treated as an error and, hence, stops the build):

```
configure:22242: checking for exit in -lboost_system-mt
configure:22267: g++ -m64 -o conftest -std=c++11 -pipe -fPIC -O1 -fwrapv -fno-strict-aliasing -Werror -g  -Wformat -Wformat-security -Wstack-protector -fstack-protector-all -fPIE ..<snip>... /x86_64-unknown-linux-gnu/share/../lib conftest.cpp -lboost_system-mt  -lanl  >&5
conftest.cpp:70:6: error: declaration of 'char exit()' conflicts with built-in declaration 'void exit(int)' [-Werror=builtin-declaration-mismatch]
 char exit ();
      ^~~~
cc1plus: all warnings being treated as errors

```

The second thing was to clean some code that is deprecated in C++11 which also lead to a warning treated as error. It could also be fixed with `-Wno-deprecated` but better to fix the issue in my opinion.
2017-09-18 11:45:24 -07:00
Homu e0bef1de56 Auto merge of #2564 - str4d:2074-currency-units, r=str4d
Rationalize currency unit to "ZEC"

Cherry-picked from the upstream PR bitcoin/bitcoin#6504

Part of #2074
2017-09-18 00:07:52 -07:00
Nathan Wilcox de422c066b [tests pass] Ensure `importprivkey` outputs the address in case key is already imported. 2017-09-18 15:30:42 +09:00
Nathan Wilcox d187317083 [tests pass] Output address on new key import. 2017-09-18 15:30:42 +09:00
Homu d1bba6f1b6 Auto merge of #2601 - str4d:2156-large-wallet-utxos, r=str4d
Benchmark time to call sendtoaddress with many UTXOs

Part of #2156.
2017-09-13 15:38:57 -07:00
Jack Grigg a76174b76b
Benchmark time to call sendtoaddress with many UTXOs 2017-08-31 02:15:06 +01:00
Jason Davies d6252a9473 Fix deprecation policy comment.
Thanks to @daira for spotting this and suggesting the correct policy.
2017-08-15 19:09:12 +01:00
Jack Grigg 2fd43c599f
make-release.py: Versioning changes for 1.0.11. 2017-08-15 09:52:36 +01:00
Jack Grigg 6dec2d0355
Rationalize currency unit to "ZEC" 2017-08-03 18:49:04 +01:00
Ross Nicoll 091b2116a0
Rationalize currency unit to "BTC"
Previously various user-facing strings have used inconsistent currency units "BTC",
"btc" and "bitcoins". This adds a single constant and uses it for each reference to
the currency unit.

Also adds a description of the unit for --maxtxfee, and adds the missing "amount"
field description to the (deprecated) move RPC command.
2017-08-03 16:32:41 +01:00
Jack Grigg 24d98cece0
Add libsnark compile flag to not copy DEPINST to PREFIX
This is useful for Zcash, where DEPINST is its depends folder, not libsnark's
internal dependency folder.
2017-08-02 15:53:51 +01:00
Sean Bowe 26a8f68ea8
Remove libsnark from depends system and integrate it into build system. 2017-08-02 15:49:30 +01:00
Jack Grigg a06446408c
Merge commit '51e448641d6cbcd582afa22cd8475f8c3086dad7' as 'src/snark' 2017-08-02 11:17:32 +01:00
Jack Grigg 51e448641d
Squashed 'src/snark/' content from commit 9ada3f8
git-subtree-dir: src/snark
git-subtree-split: 9ada3f84ab484c57b2247c2f41091fd6a0916573
2017-08-02 11:17:25 +01:00
Cory Fields c98b91b7c5 httpserver: explicitly detach worker threads
When using std::thread in place of boost::thread, letting the threads destruct
results in a std::terminate. According to the docs, the same thing should be
be happening in later boost versions:
http://www.boost.org/doc/libs/1_55_0/doc/html/thread/thread_management.html#thread.thread_management.thread.destructor

I'm unsure why this hasn't blown up already, but explicitly detaching can't
hurt.

Zcash: cherry-picked from commit d3773ca9aeb0d2f12dc0c5a0726778050c8cb455
This fixes #2554 (zcash-cli stop during getblocktemplate long poll
causes 'Assertion `!pthread_mutex_unlock(&m)' failed.')
2017-08-01 20:24:27 +01:00
Wladimir J. van der Laan c7f77e28f0 http: speed up shutdown
This continues/fixes #6719.

`event_base_loopbreak` was not doing what I expected it to, at least in
libevent 2.0.21.
What I expected was that it sets a timeout, given that no other pending
events it would exit in N seconds. However, what it does was delay the
event loop exit with 10 seconds, even if nothing is pending.

Solve it in a different way: give the event loop thread time to exit
out of itself, and if it doesn't, send loopbreak.

This speeds up the RPC tests a lot, each exit incurred a 10 second
overhead, with this change there should be no shutdown overhead in the
common case and up to two seconds if the event loop is blocking.

As a bonus this breaks dependency on boost::thread_group, as the HTTP
server minds its own offspring.

Zcash: cherry-picked from commit a264c32e3321ae909ca59cb8ce8bf5d812dbc4e1
2017-08-01 20:24:27 +01:00
Wladimir J. van der Laan 2abe8ef721 http: Force-exit event loop after predefined time
This makes sure that the event loop eventually terminates, even if an
event (like an open timeout, or a hanging connection) happens to be
holding it up.

Zcash: cherry-picked from commit ec908d5f7aa9ad7e3487018e06a24cb6449cc58b
2017-08-01 20:24:27 +01:00
Wladimir J. van der Laan dbf7057f7a http: Wait for worker threads to exit
Add a WaitExit() call to http's WorkQueue to make it delete the work
queue only when all worker threads stopped.

This fixes a problem that was reproducable by pressing Ctrl-C during
AppInit2:
```
/usr/include/boost/thread/pthread/condition_variable_fwd.hpp:81: boost::condition_variable::~condition_variable(): Assertion `!ret' failed.
/usr/include/boost/thread/pthread/mutex.hpp:108: boost::mutex::~mutex(): Assertion `!posix::pthread_mutex_destroy(&m)' failed.
```

I was assuming that `threadGroup->join_all();` would always have been
called when entering the Shutdown(). However this is not the case in
bitcoind's AppInit2-non-zero-exit case "was left out intentionally
here".

Zcash: cherry-picked from commit de9de2de361ab1355b976f17371d73e36fe3bf56
Fixes #2334 and #2214.
2017-08-01 20:24:27 +01:00
Wladimir J. van der Laan c0fe29370a Make HTTP server shutdown more graceful
Shutting down the HTTP server currently breaks off all current requests.
This can create a race condition with RPC `stop` command, where the calling
process never receives confirmation.

This change removes the listening sockets on shutdown so that no new
requests can come in, but no longer breaks off requests in progress.

Meant to fix bitcoin/#6717.

Zcash: cherry-picked from commit 5e0c22135600fe36811da3b78216efc61ba765fb
2017-08-01 20:24:27 +01:00
Ariel Gabizon fcf824e9f1 make-release.py: Versioning changes for 1.0.11-rc1. 2017-08-01 17:11:57 +02:00
Homu 10acd8a1fb Auto merge of #2484 - str4d:block-download-completion, r=daira
Add block download progress to metrics UI
2017-07-28 21:57:19 -07:00
Jack Grigg 92bfde0edf
Improve network height estimation 2017-07-28 10:50:07 +00:00
Jack Grigg 4a651837be
Correct and extend EstimateNetHeightInner tests
Corrections are to the median block times, which were generated by subtracting
CBlockIndex::nMedianTimeSpan / 2 from the block height and then multiplying by
the target spacing. GetMedianTimePast() takes an array sorted by std::sort() and
returns element CBlockIndex::nMedianTimeSpan / 2, meaning that if
CBlockIndex::nMedianTimeSpan is odd (which it is), there is an out-by-one error
in the subtraction.
2017-07-28 10:45:44 +00:00
Homu d6e6f51724 Auto merge of #2526 - bitcartel:2480_segfault_zeroconf_from_zaddr, r=daira
Fixes #2480 where missing map entry would cause a segfault.

`wtxHeight = mapBlockIndex[wtx.hashBlock]->nHeight;` results in undefined behaviour when the block hash is not present in the map, returning a null value which is dereferenced via `->nHeight`.  This error is triggered by a zero-conf wallet transaction which has not been mined yet.  As discussed in #2480, on some systems there is a segfault whilst on others there is a silent exit.  This makes it difficult to write a test, but the fix has been tested empirically to confirm an exception is thrown.  This PR fixes the segfault and complements #2525 which prevents a user from sending from a zaddr with minconf 0.
2017-07-27 22:42:59 -07:00
Jack Grigg 047aec1e0e
Add block download progress to metrics UI 2017-07-26 00:51:12 +00:00
Homu e88ab1a920 Auto merge of #2529 - str4d:2444-rpc-www-authenticate, r=daira
[rpc] Add WWW-Authenticate header to 401 response

Fix cherry-picked from upstream PR bitcoin/bitcoin#7472.

Closes #2444.
2017-07-25 15:36:33 -07:00
Homu a698116b28 Auto merge of #2478 - bitcartel:2477_send_alert_1.0.10, r=daira
Alert for 2017-06-23.a degraded networking (fixed in 1.0.10-1)

Alert 1004 (version 1.0.10 only) Issue #2477
2017-07-25 13:03:53 -07:00
Homu 95d18784ec Auto merge of #2525 - bitcartel:2519_no_zero_minconf_from_zaddr_zsendmany, r=daira
When sending from a zaddr, minconf cannot be zero.

Closes #2519.
2017-07-20 08:24:54 -07:00
Bjorn Hjortsberg ecd04e914f Remove deprecated exception specification
Warns on a newer compiler that these are deprecated in C++11
2017-07-20 13:58:39 +02:00
Homu d2627bc65d Auto merge of #2504 - daira:2501.remove-upnp, r=daira
Remove UPnP support. fixes #2500

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-07-16 03:43:54 -07:00
Simon 9b5da42745 Fixes #2480. Null entry in map was dereferenced leading to a segfault. 2017-07-14 00:10:54 -07:00
Wladimir J. van der Laan 20fb708e6f
rpc: Add WWW-Authenticate header to 401 response
A WWW-Authenticate header must be present in the 401
response to make clients know that they can authenticate,
and how.

    WWW-Authenticate: Basic realm="jsonrpc"

Fixes #7462.
2017-07-12 16:37:48 -05:00
Jack Grigg 689264bbff
Add test for issue #2444
A WWW-Authenticate header must be present in the 401 response to make clients
know that they can authenticate, and how.
2017-07-12 16:34:58 -05:00
Simon b639bb1eef Fixes #2519. When sending from a zaddr, minconf cannot be zero. 2017-07-11 11:29:43 -07:00
Simon d77a0ac4a0 Closes #2446 by adding generated field to listunspent.
If generated is true, the unspent transaction output is from a
coinbase transaction and can only be sent to a shielded address.
2017-07-11 10:44:36 -07:00
Homu 90a255a747 Auto merge of #2464 - str4d:torcontrol-rbf-resource-leak, r=daira
Net: Fix resource leak in ReadBinaryFile(...)

Introduced in 3290567bbd via PR #2177.

Cherry-picked from Bitcoin PR https://github.com/bitcoin/bitcoin/pull/10408
2017-07-10 10:43:22 -07:00
Daira Hopwood 506a21850a Remove UPnP support. fixes #2500
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-07-03 08:57:05 +01:00
Daira Hopwood 262fc5f4e3 Alert 1004 (version 1.0.10 only)
Author: Simon <simon@bitcartel.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-24 19:49:41 +01:00
Simon d444e1cf40 make-release.py: Versioning changes for 1.0.10-1. 2017-06-23 19:43:29 -07:00
Sean Bowe 15a9937654 Revert "Delete old protocol version constants and simplify code that used them."
This reverts commit 5a49c929dd.
2017-06-23 18:19:25 -06:00
Sean Bowe 9ad9a25eff Revert "Remove an unneeded version workaround as per @str4d's review comment."
This reverts commit 1e9db0b38a.
2017-06-23 18:19:17 -06:00
practicalswift 1240717431
Net: Fix resource leak in ReadBinaryFile(...)
Introduced in 3290567bbd via PR #2177.
2017-06-23 18:49:43 +12:00
Jack Grigg dc2ead6021
make-release.py: Versioning changes for 1.0.10. 2017-06-22 14:47:15 +12:00
Homu 59de56eeca Auto merge of #2342 - bitcartel:1081__mempoolpatch, r=str4d
Add ability for node to reject tx from mempool by number of tx inputs

Implement short-term solution described in #2343 so that users can respond promptly to critical short-term problems caused by quadratic validation scaling, such as the getblocktemplate latency, block propagation latency, and mempool size inflation issues described in #2333.
2017-06-21 14:42:13 -07:00
Homu 02e5fffadc Auto merge of #2360 - daira:2359.remove-lax-der-validation, r=arcalinea
Remove unneeded lax ECDSA signature verification

Fixes #2359. Removes code for lax ECDSA verification, and the SCRIPT_VERIFY_DERSIG flag that controlled it. The behaviour is as-if the flag is always set.
2017-06-20 19:05:58 -07:00
Simon d8616d012a Partial revert & fix for commit 9e84b5a ; code block in wrong location. 2017-06-19 21:11:34 -07:00
Jack Grigg 4ef014151d
Additional testing of -mempooltxinputlimit 2017-06-20 15:58:46 +12:00
Kevin Pan 26d27a15ce "getblocktemplate" could work without wallet 2017-06-20 10:41:46 +08:00
Daira Hopwood c2a722d3c4 Fix a comment that was made stale before launch by #1016 (commit 542da61).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-19 16:33:18 +01:00
Daira Hopwood 00fde35b1c Make transaction test failures print the comments preceding the test JSON.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-19 16:33:18 +01:00
Daira Hopwood 4a785b0a5b Repair tests for strict DER signatures.
While we're at it, repair a similar test for CLTV, and make the repaired RPC tests run by default.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-19 16:32:15 +01:00
Simon 9e84b5aa0d Check mempooltxinputlimit when creating a transaction to avoid local
mempool rejection.
2017-06-17 14:41:25 -07:00
Daira Hopwood de609b8c54 Strict DER signatures are always enforced; remove the flag and code that used it.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-17 17:19:08 +01:00
Daira Hopwood 3c985d26ce Remove unneeded lax ECDSA signature verification.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-17 17:19:08 +01:00
Homu ef24e8e6be Auto merge of #2335 - str4d:2333-validation-speed, r=str4d
Switch to libsecp256k1-based validation for ECDSA

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6983
- bitcoin/bitcoin#6954

Part of #2333.
2017-06-17 07:18:25 -07:00
Jack Grigg b661736b87
Hold an ECCVerifyHandle in zcash-gtest 2017-06-18 02:15:05 +12:00
Jack Grigg 5799c5f8c0
Add test for -mempooltxinputlimit 2017-06-17 14:59:16 +12:00
Simon da6d93916d Add option 'mempooltxinputlimit' so the mempool can reject a transaction
based on the number of transparent inputs.
2017-06-16 19:31:33 -07:00
Jack Grigg fd0d1c7d60
Ensure that ECDSA constant sizes are correctly-sized 2017-06-17 12:10:15 +12:00
Jack Grigg 1f5941062a
Remove redundant `= 0` initialisations 2017-06-17 12:10:14 +12:00
Jack Grigg 877964c82f
Specify ECDSA constant sizes as constants 2017-06-17 12:10:14 +12:00
Jack Grigg c032f1b687
Add comments 2017-06-17 12:09:44 +12:00
Homu dfa4ed19bb Auto merge of #2440 - bitcartel:1360_reduce_info_leakage_vpub_new, r=str4d
Fix intermediate vpub_new leakage in multi joinsplit tx

Resolves information leakage discussed here https://github.com/zcash/zcash/issues/1360#issuecomment-284561331

Example output in debug.log showing how intermediate vpub_new is now 0
https://gist.github.com/bitcartel/86ca316b74f0b1ec6d8de3ac132006da

When reviewing, note that the indentation of a large chunk of code (scenario 3 part 2) changed, so use `git diff -w` (or similar) or append `?w=1` to the Github URL e.g. https://github.com/zcash/zcash/pull/2440/files?w=1
2017-06-15 21:33:01 -07:00
Homu 3440de74ee Auto merge of #2386 - str4d:2385-consensus-correction, r=str4d
Correct consensus logic in ContextualCheckInputs

Closes #2385.
2017-06-15 18:50:03 -07:00
Jack Grigg 30006a2e79
Correct consensus logic in ContextualCheckInputs
Closes #2385.
2017-06-16 13:45:19 +12:00
Jack Grigg 1b786a93c3
Add test for incorrect consensus logic 2017-06-16 13:45:14 +12:00
Homu 0a80a1cea3 Auto merge of #2227 - str4d:2074-ignore-virtual-cores, r=str4d
Use real number of cores, ignore virtual cores

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6361
- bitcoin/bitcoin#6370

Part of #2074.
2017-06-15 17:05:02 -07:00
Homu 6189c70caa Auto merge of #1747 - str4d:fix-spendingkey-locking, r=str4d
Fix incorrect locking in CCryptoKeyStore
2017-06-15 16:02:07 -07:00
Simon c93a0872e8 Fix intermediate vpub_new leakage in multi joinsplit tx (#1360) 2017-06-13 23:21:53 -07:00
Homu a23fdf862d Auto merge of #2245 - daira:2244.remove-old-peer-workarounds, r=str4d
Delete old protocol version constants and simplify code that used them.

fixes #2244

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-13 23:10:19 -07:00
Jack Grigg 50fa079748
Fix potential overflows in ECDSA DER parsers 2017-06-06 20:08:03 +12:00
Pieter Wuille 3d02d0f63a
Switch to libsecp256k1-based validation for ECDSA 2017-06-06 17:52:25 +12:00
Pieter Wuille c1afe40a17
Update key.cpp to new secp256k1 API 2017-06-06 17:50:22 +12:00
Jack Grigg c7d50a19cd
Merge commit '77404203ee87992f34ff57c2e8a6f0c85717318f' into 2333-validation-speed 2017-06-06 17:49:32 +12:00
Jack Grigg 77404203ee
Squashed 'src/secp256k1/' changes from 22f60a6..84973d3
84973d3 Merge #454: Remove residual parts from the schnorr expirement.
5e95bf2 Remove residual parts from the schnorr expirement.
cbc20b8 Merge #452: Minor optimizations to _scalar_inverse to save 4M
4cc8f52 Merge #437: Unroll secp256k1_fe_(get|set)_b32 to make them much faster.
465159c Further shorten the addition chain for scalar inversion.
a2b6b19 Fix benchmark print_number infinite loop.
8b7680a Unroll secp256k1_fe_(get|set)_b32 for 10x26.
aa84990 Unroll secp256k1_fe_(get|set)_b32 for 5x52.
cf12fa1 Minor optimizations to _scalar_inverse to save 4M
1199492 Merge #408: Add `secp256k1_ec_pubkey_negate` and `secp256k1_ec_privkey_negate`
6af0871 Merge #441: secp256k1_context_randomize: document.
ab31a52 Merge #444: test: Use checked_alloc
eda5c1a Merge #449: Remove executable bit from secp256k1.c
51b77ae Remove executable bit from secp256k1.c
5eb030c test: Use checked_alloc
72d952c FIXUP: Missing "is"
70ff29b secp256k1_context_randomize: document.
9d560f9 Merge #428: Exhaustive recovery
8e48aa6 Add `secp256k1_ec_pubkey_negate` and `secp256k1_ec_privkey_negate`
2cee5fd exhaustive tests: add recovery module
8225239 Merge #433: Make the libcrypto detection fail the newer API.
12de863 Make the libcrypto detection fail the newer API.
678b0e5 exhaustive tests: remove erroneous comment from ecdsa_sig_sign
2928420 Merge #427: Remove Schnorr from travis as well
03ff8c2 group_impl.h: remove unused `secp256k1_ge_set_infinity` function
a724d72 configure: add --enable-coverage to set options for coverage analysis
b595163 recovery: add tests to cover API misusage
8eecc4a Remove Schnorr from travis as well
6f8ae2f ecdh: test NULL-checking of arguments
25e3cfb ecdsa_impl: replace scalar if-checks with VERIFY_CHECKs in ecdsa_sig_sign
a8abae7 Merge #310: Add exhaustive test for group functions on a low-order subgroup
b4ceedf Add exhaustive test for verification
83836a9 Add exhaustive tests for group arithmetic, signing, and ecmult on a small group
20b8877 Add exhaustive test for group functions on a low-order subgroup
80773a6 Merge #425: Remove Schnorr experiment
e06e878 Remove Schnorr experiment
04c8ef3 Merge #407: Modify parameter order of internal functions to match API parameter order
6e06696 Merge #411: Remove guarantees about memcmp-ability
40c8d7e Merge #421: Update scalar_4x64_impl.h
a922365 Merge #422: Restructure nonce clearing
3769783 Restructure nonce clearing
0f9e69d Restructure nonce clearing
9d67afa Update scalar_4x64_impl.h
7d15cd7 Merge #413: fix auto-enabled static precompuatation
00c5d2e fix auto-enabled static precompuatation
91219a1 Remove guarantees about memcmp-ability
7a49cac Merge #410: Add string.h include to ecmult_impl
0bbd5d4 Add string.h include to ecmult_impl
353c1bf Fix secp256k1_ge_set_table_gej_var parameter order
541b783 Fix secp256k1_ge_set_all_gej_var parameter order
7d893f4 Fix secp256k1_fe_inv_all_var parameter order
c5b32e1 Merge #405: Make secp256k1_fe_sqrt constant time
926836a Make secp256k1_fe_sqrt constant time
e2a8e92 Merge #404: Replace 3M + 4S doubling formula with 2M + 5S one
8ec49d8 Add note about 2M + 5S doubling formula
5a91bd7 Merge #400: A couple minor cleanups
ac01378 build: add -DSECP256K1_BUILD to benchmark_internal build flags
a6c6f99 Remove a bunch of unused stdlib #includes
65285a6 Merge #403: configure: add flag to disable OpenSSL tests
a9b2a5d configure: add flag to disable OpenSSL tests
b340123 Merge #402: Add support for testing quadratic residues
e6e9805 Add function for testing quadratic residue field/group elements.
efd953a Add Jacobi symbol test via GMP
fa36a0d Merge #401: ecmult_const: unify endomorphism and non-endomorphism skew cases
c6191fd ecmult_const: unify endomorphism and non-endomorphism skew cases
0b3e618 Merge #378: .gitignore build-aux cleanup
6042217 Merge #384: JNI: align shared files copyright/comments to bitcoinj's
24ad20f Merge #399: build: verify that the native compiler works for static precomp
b3be852 Merge #398: Test whether ECDH and Schnorr are enabled for JNI
aa0b1fd build: verify that the native compiler works for static precomp
eee808d Test whether ECDH and Schnorr are enabled for JNI
7b0fb18 Merge #366: ARM assembly implementation of field_10x26 inner (rebase of #173)
001f176 ARM assembly implementation of field_10x26 inner
0172be9 Merge #397: Small fixes for sha256
3f8b78e Fix undefs in hash_impl.h
2ab4695 Fix state size in sha256 struct
6875b01 Merge #386: Add some missing `VERIFY_CHECK(ctx != NULL)`
2c52b5d Merge #389: Cast pointers through uintptr_t under JNI
43097a4 Merge #390: Update bitcoin-core GitHub links
31c9c12 Merge #391: JNI: Only call ecdsa_verify if its inputs parsed correctly
1cb2302 Merge #392: Add testcase which hits additional branch in secp256k1_scalar_sqr
d2ee340 Merge #388: bench_ecdh: fix call to secp256k1_context_create
093a497 Add testcase which hits additional branch in secp256k1_scalar_sqr
a40c701 JNI: Only call ecdsa_verify if its inputs parsed correctly
faa2a11 Update bitcoin-core GitHub links
47b9e78 Cast pointers through uintptr_t under JNI
f36f9c6 bench_ecdh: fix call to secp256k1_context_create
bcc4881 Add some missing `VERIFY_CHECK(ctx != NULL)` for functions that use `ARG_CHECK`
6ceea2c align shared files copyright/comments to bitcoinj's
70141a8 Update .gitignore
7b549b1 Merge #373: build: fix x86_64 asm detection for some compilers
bc7c93c Merge #374: Add note about y=0 being possible on one of the sextic twists
e457018 Merge #364: JNI rebased
86e2d07 JNI library: cleanup, removed unimplemented code
3093576a JNI library
bd2895f Merge pull request #371
e72e93a Add note about y=0 being possible on one of the sextic twists
3f8fdfb build: fix x86_64 asm detection for some compilers
e5a9047 [Trivial] Remove double semicolons
c18b869 Merge pull request #360
3026daa Merge pull request #302
03d4611 Add sage verification script for the group laws
a965937 Merge pull request #361
83221ec Add experimental features to configure
5d4c5a3 Prevent damage_array in the signature test from going out of bounds.
419bf7f Merge pull request #356
6c527ec Merge pull request #357
445f7f1 Fix for Windows compile issue
03d84a4 Benchmark against OpenSSL verification
2bfb82b Merge pull request #351
06aeea5 Turn secp256k1_ec_pubkey_serialize outlen to in/out
970164d Merge pull request #348
6466625 Improvements for coordinate decompression
e2100ad Merge pull request #347
8e48787 Change secp256k1_ec_pubkey_combine's count argument to size_t.
c69dea0 Clear output in more cases for pubkey_combine, adds tests.
269d422 Comment copyediting.
b4d17da Merge pull request #344
4709265 Merge pull request #345
26abce7 Adds 32 static test vectors for scalar mul, sqr, inv.
5b71a3f Better error case handling for pubkey_create & pubkey_serialize, more tests.
3b7bc69 Merge pull request #343
eed87af Change contrib/laxder from headers-only to files compilable as standalone C
d7eb1ae Merge pull request #342
7914a6e Make lax_der_privatekey_parsing.h not depend on internal code
73f64ff Merge pull request #339
9234391 Overhaul flags handling
1a36898 Make flags more explicit, add runtime checks.
1a3e03a Merge pull request #340
96be204 Add additional tests for eckey and arg-checks.
bb5aa4d Make the tweak function zeroize-output-on-fail behavior consistent.
4a243da Move secp256k1_ec_privkey_import/export to contrib.
1b3efc1 Move secp256k1_ecdsa_sig_recover into the recovery module.
e3cd679 Eliminate all side-effects from VERIFY_CHECK() usage.
b30fc85 Avoid nonce_function_rfc6979 algo16 argument emulation.
70d4640 Make secp256k1_ec_pubkey_create skip processing invalid secret keys.
6c476a8 Minor comment improvements.
131afe5 Merge pull request #334
0c6ab2f Introduce explicit lower-S normalization
fea19e7 Add contrib/lax_der_parsing.h
3bb9c44 Rewrite ECDSA signature parsing code
fa57f1b Use secp256k1_rand_int and secp256k1_rand_bits more
49b3749 Add new tests for the extra testrand functions
f684d7d Faster secp256k1_rand_int implementation
251b1a6 Improve testrand: add extra random functions
31994c8 Merge pull request #338
f79aa88 Bugfix: swap arguments to noncefp
c98df26 Merge pull request #319
67f7da4 Extensive interface and operations tests for secp256k1_ec_pubkey_parse.
ee2cb40 Add ARG_CHECKs to secp256k1_ec_pubkey_parse/secp256k1_ec_pubkey_serialize
7450ef1 Merge pull request #328
68a3c76 Merge pull request #329
98135ee Merge pull request #332
37100d7 improve ECDH header-doc
b13d749 Fix couple of typos in API comments
7c823e3 travis: fixup module configs
cc3141a Merge pull request #325
ee58fae Merge pull request #326
213aa67 Do not force benchmarks to be statically linked.
338fc8b Add API exports to secp256k1_nonce_function_default and secp256k1_nonce_function_rfc6979.
52fd03f Merge pull request #320
9f6993f Remove some dead code.
357f8cd Merge pull request #314
118cd82 Use explicit symbol visibility.
4e64608 Include public module headers when compiling modules.
1f41437 Merge pull request #316
fe0d463 Merge pull request #317
cfe0ed9 Fix miscellaneous style nits that irritate overactive static analysis.
2b199de Use the explicit NULL macro for pointer comparisons.
9e90516 Merge pull request #294
dd891e0 Get rid of _t as it is POSIX reserved
201819b Merge pull request #313
912f203 Eliminate a few unbraced statements that crept into the code.
eeab823 Merge pull request #299
486b9bb Use a flags bitfield for compressed option to secp256k1_ec_pubkey_serialize and secp256k1_ec_privkey_export
05732c5 Callback data: Accept pointers to either const or non-const data
1973c73 Bugfix: Reinitialise buffer lengths that have been used as outputs
788038d Use size_t for lengths (at least in external API)
c9d7c2a secp256k1_context_set_{error,illegal}_callback: Restore default handler by passing NULL as function argument
9aac008 secp256k1_context_destroy: Allow NULL argument as a no-op
64b730b secp256k1_context_create: Use unsigned type for flags bitfield
cb04ab5 Merge pull request #309
a551669 Merge pull request #295
81e45ff Update group_impl.h
85e3a2c Merge pull request #112
b2eb63b Merge pull request #293
dc0ce9f [API BREAK] Change argument order to out/outin/in
6d947ca Merge pull request #298
c822693 Merge pull request #301
6d04350 Merge pull request #303
7ab311c Merge pull request #304
5fb3229 Fixes a bug where bench_sign would fail due to passing in too small a buffer.
263dcbc remove unused assignment
b183b41 bugfix: "ARG_CHECK(ctx != NULL)" makes no sense
6da1446 build: fix parallel build
5eb4356 Merge pull request #291
c996d53 Print success
9f443be Move pubkey recovery code to separate module
d49abbd Separate ECDSA recovery tests
439d34a Separate recoverable and normal signatures
a7b046e Merge pull request #289
f66907f Improve/reformat API documentation secp256k1.h
2f77487 Add context building benchmarks
cc623d5 Merge pull request #287
de7e398 small typo fix
9d96e36 Merge pull request #280
432e1ce Merge pull request #283
14727fd Use correct name in gitignore
356b0e9 Actually test static precomputation in Travis
ff3a5df Merge pull request #284
2587208 Merge pull request #212
a5a66c7 Add support for custom EC-Schnorr-SHA256 signatures
d84a378 Merge pull request #252
72ae443 Improve perf. of cmov-based table lookup
92e53fc Implement endomorphism optimization for secp256k1_ecmult_const
ed35d43 Make `secp256k1_scalar_add_bit` conditional; make `secp256k1_scalar_split_lambda_var` constant time
91c0ce9 Add benchmarks for ECDH and const-time multiplication
0739bbb Add ECDH module which works by hashing the output of ecmult_const
4401500 Add constant-time multiply `secp256k1_ecmult_const` for ECDH
e4ce393 build: fix hard-coded usage of "gen_context"
b8e39ac build: don't use BUILT_SOURCES for the static context header
baa75da tests: add a couple tests
ae4f0c6 Merge pull request #278
995c548 Introduce callback functions for dealing with errors.
c333074 Merge pull request #282
18c329c Remove the internal secp256k1_ecdsa_sig_t type
74a2acd Add a secp256k1_ecdsa_signature_t type
23cfa91 Introduce secp256k1_pubkey_t type
4c63780 Merge pull request #269
3e6f1e2 Change rfc6979 implementation to be a generic PRNG
ed5334a Update configure.ac to make it build on OpenBSD
1b68366 Merge pull request #274
a83bb48 Make ecmult static precomputation default
166b32f Merge pull request #276
c37812f Add gen_context src/ecmult_static_context.h to CLEANFILES to fix distclean.
125c15d Merge pull request #275
76f6769 Fix build with static ecmult altroot and make dist.
5133f78 Merge pull request #254
b0a60e6 Merge pull request #258
733c1e6 Add travis build to test the static context.
fbecc38 Add ability to use a statically generated ecmult context.
4fb174d Merge pull request #263
4ab8990 Merge pull request #270
bdf0e0c Merge pull request #271
31d0c1f Merge pull request #273
eb2c8ff Add missing casts to SECP256K1_FE_CONST_INNER
55399c2 Further performance improvements to _ecmult_wnaf
99fd963 Add secp256k1_ec_pubkey_compress(), with test similar to the related decompress() function.
145cc6e Improve performance of _ecmult_wnaf
36b305a Verify the result of GMP modular inverse using non-GMP code
0cbc860 Merge pull request #266
06ff7fe Merge pull request #267
5a43124 Save 1 _fe_negate since s1 == -s2
a5d796e Update code comments
3f3964e Add specific VERIFY tests for _fe_cmov
7d054cd Refactor to save a _fe_negate
b28d02a Refactor to remove a local var
55e7fc3 Perf. improvement in _gej_add_ge
a0601cd Fix VERIFY calculations in _fe_cmov methods
17f7148 Merge pull request #261
7657420 Add tests for adding P+Q with P.x!=Q.x and P.y=-Q.y
8c5d5f7 tests: Add failing unit test for #257 (bad addition formula)
5de4c5d gej_add_ge: fix degenerate case when computing P + (-lambda)P
bcf2fcf gej_add_ge: rearrange algebra
e2a07c7 Fix compilation with C++
873a453 Merge pull request #250
91eb0da Merge pull request #247
210ffed Use separate in and out pointers in `secp256k1_ec_pubkey_decompress`
a1d5ae1 Tiny optimization
729badf Merge pull request #210
2d5a186 Apply effective-affine trick to precomp
4f9791a Effective affine addition in EC multiplication
2b4cf41 Use pkg-config always when possible, with failover to manual checks for libcrypto

git-subtree-dir: src/secp256k1
git-subtree-split: 84973d393ac240a90b2e1a6538c5368202bc2224
2017-06-06 17:49:31 +12:00
Jack Grigg 3326155481
Revert "Fix secp256k1 test compilation"
This reverts commit 87da7b4ea0 to make updating
the subtree easier.
2017-06-06 17:45:50 +12:00
Nathan Wilcox de9c56c88a make-release.py: Versioning changes for 1.0.9. 2017-05-24 12:50:05 -07:00
Sean Bowe 9eb9eebbb8 Check that pairings work properly when the G1 point is at infinity. 2017-05-23 16:31:41 -06:00
Homu 8214ebc61c Auto merge of #2372 - str4d:2355-connectblock-bench, r=nathan-at-least
Benchmark for calling ConnectBlock on a block with many inputs

Requires placing `block-107134.tar.gz` (containing the block, and a fake CoinsDB containing its inputs) into the base directory of the repository.

To facilitate generation of the fake CoinsDB, an additional field `valuesZat` has been added to `getrawtransaction` containing the integer number of zatoshis instead of a decimal number of ZEC.

Closes #2355.
2017-05-18 20:13:26 -07:00
Jack Grigg c66c731adf
Add a benchmark for calling ConnectBlock on a block with many inputs
Requires placing block-107134.tar.gz (containing the block, and a fake CoinsDB
containing its inputs) into the base directory of the repository. This can be
generated using qa/zcash/create_benchmark_archive.py (see the script for usage
details).

To facilitate generation of the fake CoinsDB, an additional field 'valueZat' has
been added to 'getrawtransaction' containing the integer number of zatoshis
instead of a decimal number of ZEC.

Closes #2355.
2017-05-18 11:03:46 +12:00
Jack Grigg 2857f6960d
Regenerate miner tests
Closes #2271.
2017-05-16 22:38:07 +12:00
Homu 38684e4c42 Auto merge of #2293 - daira:alerts-for-2017-04-11.a, r=nathan-at-least
Alerts for 2017-04-11.a security issue (fixed in 1.0.8-1)

Alert 1002 (versions 1.0.0-1.0.2 inclusive).
Alert 1003 (versions 1.0.3-1.0.8 inclusive).

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-05-15 16:08:29 -07:00
Homu e209ba4951 Auto merge of #2338 - amgadabdelhafez:patch-1, r=nathan-at-least
Update timedata.cpp to fix error message string from bitcoin core to zcash

Changing error message string from bitcoin core to zcash. fixes issue #2336
2017-05-15 09:42:19 -07:00
Homu 3a98e3b4c2 Auto merge of #2297 - str4d:2274-apoptosis, r=nathan-at-least
Implement automatic shutdown of deprecated Zcash versions

Closes #2274.
2017-05-14 18:39:14 -07:00
Homu 01bc99205a Auto merge of #2251 - str4d:2210-tor-quotedstring-escapes, r=nathan-at-least
Handle escapes in Tor QuotedStrings

Also adds a missing copyright header.

Closes #2210.
2017-05-13 15:24:58 -07:00
Jack Grigg b4f861d191 Wrap messages nicely on metrics screen 2017-05-12 14:41:50 +12:00
Jack Grigg 5b3bc9716e Implement automatic shutdown of deprecated Zcash versions
Closes #2274.
2017-05-12 14:41:46 +12:00
Daira Hopwood 1e9db0b38a Remove an unneeded version workaround as per @str4d's review comment.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-05-11 07:27:43 +01:00
Amgad Abdelhafez 8dafb9c6ce Update timedata.cpp
Capitalizing the 'z' in "Zcash" string
2017-05-05 11:24:48 -04:00
Amgad Abdelhafez bed9dd2cd2 Update timedata.cpp
Changing error message string from botcoin core to zcash
2017-05-02 19:33:52 -04:00
Daira Hopwood 8d8318c947 Alert 1003 (versions 1.0.3-1.0.8 inclusive).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-24 19:55:20 +01:00
Daira Hopwood fa151bc517 Alert 1002 (versions 1.0.0-1.0.2 inclusive).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-24 19:42:12 +01:00
Jack Grigg 409606118b
Check that >3-digit octals are truncated. 2017-04-21 13:23:29 +12:00
Jack Grigg 8df5fd1116
Correctly handle three-digit octals with leading digit 4-7 2017-04-21 13:22:51 +12:00
Jack Grigg d15cab21bc
Address Daira's further comments 2017-04-21 13:15:39 +12:00
zkbot 20d61ac0ea Auto merge of #2270 - bitcartel:2269_change_regtest_port, r=daira
Change regtest port to 18344.  Closes #2269.
2017-04-19 11:07:49 +00:00
Jack Grigg 0b431fbdb5
Address Daira's comments 2017-04-19 15:23:28 +12:00
Jack Grigg 519713d32e
torcontrol: Add missing copyright header 2017-04-18 12:54:22 +12:00
Jack Grigg b93cedafe4
torcontrol: Handle escapes in Tor QuotedStrings
https://trac.torproject.org/projects/tor/ticket/14999 is tracking an encoding
bug with the Tor control protocol, where many of the QuotedString instances that
Tor outputs are in fact CStrings, but it is not documented which ones are which.

https://spec.torproject.org/control-spec section 2.1.1 provides a future-proofed
rule for handing QuotedStrings, which this commit implements.
2017-04-18 12:54:16 +12:00
zkbot 8e96dc44dd Auto merge of #2205 - arcalinea:1804_zcash_addresses_in_help, r=daira
Change help text examples to use Zcash addresses

Closes #1804 and #2109

Ensures command line help text addresses are Zcash addresses.

Didn't change the text strings that say bitcoin or btc, leaving that for #2150 to close

Did I get all the addresses?
2017-04-17 15:49:37 +00:00
Simon 05844ba53b Change regtest port to 18344. Closes #2269. 2017-04-16 14:48:04 -07:00
zkbot f7f764e0b2 Auto merge of #2189 - bitcartel:1.0.7_with_apache_qpid, r=bitcartel
Add AMQP 1.0 support via Apache Qpid Proton C++ API 0.17.0

Closes #2188
2017-04-16 15:09:19 +00:00
Nathan Wilcox 451047d14a Bump version numbers for v1.0.8-1. 2017-04-13 17:10:32 -07:00
Daira Hopwood 60b7410cce Add check for JoinSplit priority as calculated by CCoinsViewCache::GetPriority.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-13 22:40:37 +01:00
Daira Hopwood ec19e8e283 Simplify JoinSplit priority calculation. refs 1896
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-13 22:40:20 +01:00
str4d c83c5932e4 Add unit test for security issue 2017-04-11.a 2017-04-13 17:59:36 +01:00
str4d e40180aa0f Update tests to check actual infinity as well as INF_FEERATE 2017-04-13 17:59:36 +01:00
Daira Hopwood 0090c64534 Don't rely on a finite upper bound on fee rate or priority.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-13 17:59:36 +01:00
Daira Hopwood 5a49c929dd Delete old protocol version constants and simplify code that used them.
fixes #2244

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-09 13:19:48 +01:00
Jack Grigg 0d0265fd11
Use AtomicTimer for metrics screen thread count 2017-03-29 18:25:09 +13:00
Wladimir J. van der Laan 2854c4e366
Remove ChainParams::DefaultMinerThreads
No longer relevant after #5957. This hack existed because of another
hack where the numthreads parameter, on regtest, doubled as how many
blocks to generate.
2017-03-29 16:06:02 +13:00
Wladimir J. van der Laan da1357e6cc
Use real number of cores for default -par, ignore virtual cores
To determine the default for `-par`, the number of script verification
threads, use [boost:🧵:physical_concurrency()](http://www.boost.org/doc/libs/1_58_0/doc/html/thread/thread_management.html#thread.thread_management.thread.physical_concurrency)
which counts only physical cores, not virtual cores.

Virtual cores are roughly a set of cached registers to avoid context
switches while threading, they cannot actually perform work, so spawning
a verification thread for them could even reduce efficiency and will put
undue load on the system.

Should fix issue #6358, as well as some other reported system overload
issues, especially on Intel processors.

The function was only introduced in boost 1.56, so provide a utility
function `GetNumCores` to fall back for older Boost versions.
2017-03-29 16:06:00 +13:00
Daira Hopwood 83aac13083 Update version numbers.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-27 21:01:18 +01:00
zkbot 45faa928ec Auto merge of #2177 - str4d:2061-tor-ephemeral-hs, r=daira
Tor ephemeral hidden services

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6503 (included to reduce merge conflicts)
- bitcoin/bitcoin#6639
- bitcoin/bitcoin#6643
- bitcoin/bitcoin#7090
- bitcoin/bitcoin#7035
- bitcoin/bitcoin#7170
- bitcoin/bitcoin#7218 (non-QT part)
- bitcoin/bitcoin#7313
- bitcoin/bitcoin#7438
- bitcoin/bitcoin#7553
- bitcoin/bitcoin#7637
- bitcoin/bitcoin#7683
- bitcoin/bitcoin#7813
- bitcoin/bitcoin#7703
- bitcoin/bitcoin#8203
- bitcoin/bitcoin#9004
- bitcoin/bitcoin#9234
- bitcoin/bitcoin#9911 (partial)

Closes #2061.
2017-03-26 02:44:06 +00:00
zkbot f7fcad709b Auto merge of #2203 - arcalinea:2142_security_log_message, r=daira
Add message directing users to security guide

Addresses #2142, which was blocking on updates to zcash/support/security.html. That page has now been added, so this message directing users to the site can be included.

It displays in the zcash-cli --help and --version message text, and on the zcashd metrics screen.
2017-03-26 01:36:24 +00:00
Jack Grigg 87b7f4d878
torcontrol: Log invalid parameters in Tor reply strings where meaningful 2017-03-26 14:35:13 +13:00
Daira Hopwood f0d1accb7d Line-wrap privacy notice. Use <> around URL and end sentence with '.'.
Include privacy notice in help text for zcashd -help.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-26 02:08:29 +01:00
Jack Grigg 3290567bbd
torcontrol: Check for reading errors in ReadBinaryFile
This ensures that ReadBinaryFile never returns exactly TOR_COOKIE_SIZE bytes if
the file was larger than that.
2017-03-26 13:53:13 +13:00
Simon 99eb947a98 Add AMQP 1.0 support via Apache Qpid Proton C++ API 0.17.0 2017-03-25 08:51:40 -07:00
Jack Grigg 64101d0407
torcontrol: Fix ParseTorReplyMapping
- Ignore remaining input if it is an OptArguments
- Correctly handle escapes
2017-03-26 00:35:13 +13:00
Jack Grigg 6dbd95afa1
torcontrol: Add unit tests for Tor reply parsers 2017-03-26 00:34:53 +13:00
Jack Grigg 8966598033
torcontrol: Improve comments 2017-03-25 20:25:59 +13:00
Pavel Janík 4b5ba449bb
Make some global variables less-global (static) 2017-03-25 20:25:57 +13:00
Pavel Janík f0e9019223
Prevent -Wshadow warnings with gcc versions 4.8.5, 5.3.1 and 6.2.1.
Zcash: partial (ignoring src/test/script_tests.cpp due to merge conflicts)
2017-03-25 20:25:56 +13:00
Wladimir J. van der Laan 9e5c9d0a04
torcontrol: Explicitly request RSA1024 private key
When generating a new service key, explicitly request a RSA1024 one.

The bitcoin P2P protocol has no support for the longer hidden service names
that will come with ed25519 keys, until it does, we depend on the old
hidden service type so make this explicit.

See #9214.
2017-03-25 20:25:55 +13:00