Commit Graph

9422 Commits

Author SHA1 Message Date
Taylor Hornby 46ad3c2758 Fix inconsistent optimization flags; single source of truth. 2016-08-17 11:38:28 -06:00
Taylor Hornby a635d6e995 Upgrade libsodium for AVX2-detection bugfix. 2016-08-17 10:43:06 -06:00
zkbot 39af39fb85 Auto merge of #1231 - rcseacord:rcseacord-patch-3, r=str4d
Address incorrect use of shared_ptr in test_equihash.cpp

Closes #1228
2016-08-17 01:30:26 +00:00
zkbot cdc01fad17 Auto merge of #1230 - rcseacord:rcseacord-patch-1, r=str4d
Address incorrect use of shared_ptr in equihash.cpp

Closes #1214
2016-08-17 00:35:57 +00:00
Jack Grigg 0d7386916d Add separate lock for SpendingKey key store operations 2016-08-16 22:17:33 +12:00
Jack Grigg c2059f9e09 Remove non-libsnark dependencies and test harness code from coverage reports
Closes #1203
2016-08-16 22:05:35 +12:00
Jack Grigg 71442d31cf Add gtest coverage to folders deleted by "make clean" 2016-08-16 20:30:24 +12:00
Jack Grigg 873625bc85 Add gtest coverage intermediates to list of files deleted by make 2016-08-16 18:38:42 +12:00
Jack Grigg 6ecb05dd2f Enable branch coverage in coverage reports
Closes #892
2016-08-16 18:32:56 +12:00
Jack Grigg 5be6abbf84 Store the Equihash solution in minimal representation in the block header
The genesis blocks and miner tests have been regenerated, because changing the
block header serialisation format changes the block hash, and thus validity.

The Equihash solutions have been removed from the bloom test inputs for
simplicity (block validity is not checked there; only a valid serialisation is
necessary).
2016-08-16 16:02:39 +12:00
Wladimir J. van der Laan 9dcea38a6b net: correctly initialize nMinPingUsecTime
`nMinPingUsecTime` was left uninitialized in CNode.
The correct initialization for a minimum-until-now is int64_t's max value, so initialize it to that.
Thanks @MarcoFalke for noticing.
2016-08-15 20:03:50 -06:00
Patrick Strateman 85e84f5e58 Use network group instead of CNetAddr in final pass to select node to disconnect 2016-08-15 19:38:34 -06:00
Patrick Strateman b63e75ae12 Fix comment 2016-08-15 19:38:29 -06:00
Patrick Strateman f1e7e37130 Acquire cs_vNodes before changing refrence counts 2016-08-15 19:38:22 -06:00
Patrick Strateman 75c0598cac CNodeRef copy constructor and assignment operator 2016-08-15 19:38:17 -06:00
Patrick Strateman ce94413e03 Return false early if vEvictionCandidates is empty 2016-08-15 19:38:10 -06:00
Patrick Strateman 4dad09350f Better support for nodes with non-standard nMaxConnections 2016-08-15 19:38:04 -06:00
Patrick Strateman 6e966f67fd RAII wrapper for CNode* 2016-08-15 19:37:56 -06:00
Patrick Strateman 396bd999ad Add comments to AttemptToEvictConnection 2016-08-15 19:37:50 -06:00
Patrick Strateman 0560d671ab Remove redundant whiteconnections option 2016-08-15 19:37:27 -06:00
Patrick Strateman dd99be0f8c Prefer to disconnect peers in favor of whitelisted peers 2016-08-15 19:31:27 -06:00
Patrick Strateman 2fa41ff9b3 AttemptToEvictConnection 2016-08-15 19:31:21 -06:00
Patrick Strateman e279e5f90a Record nMinPingUsecTime 2016-08-15 19:31:14 -06:00
Patrick Strateman bd80ec0d23 Refactor: Move failure conditions to the top of AcceptConnection 2016-08-15 19:31:06 -06:00
Patrick Strateman 12005016cd Refactor: Bail early in AcceptConnection 2016-08-15 19:30:49 -06:00
Patrick Strateman 057d60781d Refactor: AcceptConnection (modified to include 95a50390) 2016-08-15 19:28:18 -06:00
Jack Grigg 20abe2083c Extend byte array expansion and compression methods with optional padding 2016-08-16 11:02:04 +12:00
Jack Grigg caa0348f04 Update Equihash hash generation to match the Zcash spec
Changes:

- floor(512/n)*n/8 bytes of BLAKE2b output is split between floor(512/n)
  adjacent indices, instead of using one hash call per index.

- Parameters with n/(k+1) mod 8 != 0 will expand the BLAKE2b output to byte
  boundaries for colliding, instead of using a longer output and clearing bits.

- The genesis blocks have been regenerated.

- The test vectors have been regenerated.

- The Equihash inputs for the cancellation tests were modified to ensure that
  valid solutions were available to exercise the full solver.
2016-08-16 11:02:04 +12:00
Jack Grigg 881ffbfc87 Add methods for byte array expansion and compression
These methods convert between:

- A byte array of length NL/8, and
- An array of N blocks of ceil(L/8) bytes.
2016-08-16 11:02:00 +12:00
Sean Bowe f5e5707d4c Change memo field size and relocate `ciphertexts` field of JoinSplit description. 2016-08-15 09:39:14 -06:00
zkbot d7da4ecc33 Auto merge of #1194 - bitcartel:zc.v0.11.2.z8_issue_1193_fixtest, r=ebfull
Improve speed and accuracy of zcbenchmark validatelargetx

The verification test, in a loop, passes `spending_tx` (a `CMutableTransaction`) to the constructor of `MutableTransactionSignatureChecker`, which immediately uses it to create a non-mutable `CTransaction` object, which is used for the actual verification process.

Since `spending_tx` is not mutated during the verification loop & process, we can instead convert it to a `CTransaction` just once, and use it with `TransactionSignatureChecker`.

This removes the time to create `CTransaction` objects from the benchmark itself.

Results show an improvement in running time to complete the verification phase of the test and consistent times across z7 and z8 releases.

```
Benchmarks on i3 processor:
z7 old 228.67205900 --> z7 new 49.27225200
z7 old 229.90048900 --> z7 new 48.38650700
z8 old 295.77963800 --> z8 new 48.37695100
z8 old 294.32640100 --> z8 new 49.93216100
```
2016-08-14 21:21:58 +00:00
Robert C. Seacord c4cbee4381 Update uint256.h
Addresses load of misaligned address for type 'const uint32_t' #1246
2016-08-13 11:12:18 -04:00
Jack Grigg b5c06c83b0 Consistent parameter naming 2016-08-12 14:37:17 +12:00
Jack Grigg 0bfdb9628e Merge AddSpendingKeyPaymentAddress into AddSpendingKey to simplify API 2016-08-12 14:24:29 +12:00
Taylor Hornby 998eea5db6 Disable hardening when building for coverage reports. 2016-08-11 15:15:50 -06:00
Tom Ritter 2dd950ecae Clarify comment about nonce space for Note Encryption 2016-08-11 13:48:47 -05:00
Robert C. Seacord 47251e8460 Update test_equihash.cpp 2016-08-10 22:02:00 -04:00
Robert C. Seacord 1031047885 Update equihash.cpp
fix https://github.com/zcash/zcash/issues/1214
2016-08-10 15:40:32 -04:00
Jack Grigg 7c929cf5bc Add support for spending keys to the basic key store 2016-08-09 17:38:25 +12:00
Simon 75c2f26887 Update variable. 2016-08-08 00:51:27 -07:00
Simon 822b84b616 Fixes #1193 so that during verification benchmarking it does not
unncessarily create thousands of CTransaction objects.
2016-08-07 23:57:39 -07:00
Simon a8270035c0 Release process for z8. Issue #1140. 2016-08-06 15:37:24 -07:00
zkbot 0822971120 Auto merge of #1183 - bitcartel:zc.v0.11.2.latest_txid_tests, r=bitcartel
Add gtest for non-malleable txids.

1. Test txid of normal transaction is double sha256 with sigscript input data removed
2. Test txid of coinbase transaction is double sha256 over whole tx

You can run a single test with:
./zcash-gtest --gtest_filter="txid_tests*"
2016-08-06 21:47:23 +00:00
Simon 2a7fde3f42 Add test for non-malleable txids. To run just this test:
./zcash-gtest --gtest_filter="txid_tests*"
2016-08-05 22:54:21 -07:00
Jack Grigg 23acf86791 Ignore duplicate entries after partial recreation 2016-08-06 17:33:38 +12:00
Jack Grigg a23507d086 Update tests to account for new Equihash parameters 2016-08-06 17:33:23 +12:00
Jack Grigg ca202e2db1 Change Equihash parameters to n = 200, k = 9 (about 563-700 MiB) 2016-08-06 15:27:27 +12:00
Jack Grigg 30bd297920 Fix bug in IsProbablyDuplicate()
Closes #1179
2016-08-06 15:26:22 +12:00
Jack Grigg fa19e1b357 Add test showing bug in IsProbablyDuplicate() 2016-08-06 15:23:47 +12:00
Jack Grigg eeb4177843 Add Equihash support for n = 200, k = 9
Closes #1177
2016-08-06 10:33:14 +12:00