Commit Graph
7164 Commits
Author SHA1 Message Date
Jack Grigg 3c654f38eb Eliminate probably duplicates in final round
This is more likely to eliminate valid solutions than doing so in intermediate
rounds, but the probability is still very low.
2016-08-05 18:15:34 +12:00
Jack Grigg 6b4f4475a5 Use fixed-size array in IsProbablyDuplicate to avoid stack protector warning 2016-08-05 17:18:47 +12:00
Jack Grigg d4af3dd5fd Eliminate some of the duplicates caused by truncating indices 2016-08-05 17:09:30 +12:00
Jack Grigg f7478de67f Add thread parameter to solveequihash benchmark
Closes #1147
2016-08-05 15:05:38 +12:00
Simon fbd90518e3 Use -O1 opimitization flag when building libzcash.
Continuation of #1064 and related to #1168.
2016-08-03 22:41:28 -07:00
zkbot abd4c16ae9 Auto merge of #1064 - ThisIsNotOfficialCodeItsJustForks:t915-enable-security-hardening, r=bitcartel
Verify security hardening features are turned on
2016-08-03 23:57:05 +00:00
zkbot a40d70f464 Auto merge of #1160 - str4d:1131-remove-hardfork, r=bitcartel
Remove hardfork from special testnet difficulty rules

Closes #1131
2016-08-03 17:56:32 +00:00
zkbot 19b49de082 Auto merge of #1158 - bitcartel:zc.v0.11.2.latest_1126_trycatch, r=ebfull
Extend try catch block around call to libsnark verifier

As discussed in #1126.

@daira Per your [comment](https://github.com/zcash/zcash/pull/1126#issuecomment-234714939):

> I would like assertion errors during tests to cause a test failure (unless the test explicitly expects them). Can we split this into verify and verify_internal, where the former does the try/catch around a call to verify_internal, and the latter is called by verification unit tests?

Did you mean move everything inside the extended try/catch to verify_internal, or just the call to r1cs_ppzksnark_verifier_strong_IC?
2016-08-01 21:16:53 +00:00
Simon 74cd8821c7 Remove GetSerializeHash() method. 2016-07-29 23:28:34 -07:00
zkbot 4714ea145b Auto merge of #1146 - str4d:1143-equihash-solution-callback, r=ebfull
Equihash: Pass each obtained solution to a callback for immediate checking

Closes #1143
2016-07-30 02:59:12 +00:00
Jack Grigg 4a0bdc9020 Fix bug in 'generate' RPC method that caused it to fail with high probability 2016-07-30 01:28:17 +12:00
Jack Grigg 9e0713f47f Remove hardfork from special testnet difficulty rules
Closes #1131
2016-07-29 21:46:27 +12:00
Simon d81c31f5fb Extend try catch block around calls to libsnark, per discussion in #1126. 2016-07-29 00:02:22 -07:00
Simon c63af91a78 Update comment. 2016-07-28 18:44:00 -07:00
Simon 3979881fc5 Fix comment. 2016-07-28 16:40:01 -07:00
zkbot b2e956be01 Auto merge of #1137 - bitcartel:zc.v0.11.2.latest_deprecate_zcraw_api, r=ebfull
zcash-cli: Label zcraw... rpc commands as being deprecated

These RPC calls will be removed from 1.0, so let's mark them as deprecated.
2016-07-28 17:25:52 +00:00
Simon eae3794152 Update deprecation message for zcraw api. 2016-07-27 21:40:26 -07:00
Simon 92f7426d19 Make txid const. 2016-07-27 12:14:44 -07:00
Simon 0ccb650b5a Update genesis block hashes and test data. 2016-07-27 00:55:48 -07:00
Simon 90a9019387 Fix issue where a coinbase tx should have it's sigscript hashed
to avoid duplicate txids, as discussed in BIP34 and BIP30.
2016-07-27 00:52:27 -07:00
Simon 2481bab2b8 Revert "Set nLockTime in CreateNewBlock() so coinbase txs do not have the same txid."
This reverts commit 29306269f4.
2016-07-27 00:41:26 -07:00
Jack Grigg 51eb5273f5 Equihash: Pass each obtained solution to a callback for immediate checking
Closes #1143
2016-07-27 19:15:49 +12:00
Simon 07e6d5b025 Refactor GetTxid() into UpdateTxid() to match coding style of hash member variable.
UpdateTxid() is called alongside UpdateHash() when a CTransaction is
deserialized or constructed.  GetTxid() now returns a const reference.
2016-07-26 17:13:03 -07:00
Simon 29306269f4 Set nLockTime in CreateNewBlock() so coinbase txs do not have the same txid.
Update test data in miner_tests.
2016-07-26 17:13:03 -07:00
Simon 10d2c57c0d Replace calls to GetHash() with GetTxid() for transaction objects.
Where the caller intends to receive a transaction id and not a double
SHA256 hash.
2016-07-26 17:13:03 -07:00
Simon 1e84d84d3a Rename GetHash() method to GetSerializeHash().
When pulling from upstream we are now forced to examine GetHash() usage
and replace with GetSerializeHash() if the caller wants a double SHA256
hash, or with GetTxid() if the caller wants a transaction id.
2016-07-26 17:09:27 -07:00
Simon 3574c9251f Updated test data for script_tests by uncommenting UPDATE_JSON_TESTS flag. 2016-07-26 17:09:27 -07:00
Simon b742003ee9 Update block and tx data used in bloom filter tests. 2016-07-26 17:09:27 -07:00
Simon 2b9130cd1f Update precomputed equihash solutions used in test. 2016-07-26 17:09:27 -07:00
Simon a2cf219581 Update genesis blocks. 2016-07-26 17:09:27 -07:00
Simon 49689a574c Add GetTxid() which returns a non-malleable txid. 2016-07-26 17:09:27 -07:00
zkbot 6dfc9e7a7c Auto merge of #1120 - str4d:1055-asynchronous-miner-interrupts, r=str4d
Make Equihash solvers cancellable

The miner only cancels the solver when chainActive.Tip() changes.

Closes #1055
2016-07-25 23:51:23 +00:00
Simon a24a2e1144 Inform user that zcraw... rpc calls are being deprecated. 2016-07-24 10:05:20 -07:00
Sean Bowe 167aece517 z7 Release 2016-07-22 15:50:04 -06:00
zkbot eef6f737dc Auto merge of #1126 - ebfull:more-libsnark-changes, r=ebfull
Remove more from libsnark, and fix potential remote-DoS.

See https://github.com/zcash/libsnark/pull/1 as well.

[`59adbef`](https://github.com/zcash/libsnark/commit/59adbefcc870c1e807a0378403b6a4022da71d03) removes a remote-DoS that can occur if proofs are not well-formed.

[`e3779f9`](https://github.com/zcash/libsnark/commit/e3779f90490905e88c3a08c7194ee948dd8a0da5) removes more files that we do not need from libsnark.

[`11242d8`](https://github.com/zcash/libsnark/commit/11242d8afe304c8bcc252baec483f04a110d1dd4) replaces assertions that could be triggered by our verifier with exceptions.

Here in Zcash, we catch all exceptions from the verifier and return false.

Closes #459, Closes #69
2016-07-22 20:16:27 +00:00
zkbot f0f8622f2a Auto merge of #1127 - ebfull:test-merkle-tree-gadget, r=ebfull
Add test for non-intuitive merkle tree gadget witnessing behavior.

Closes #920
2016-07-22 19:37:13 +00:00
Jack Grigg 215b9e139d Use std::shared_ptr to deallocate partialSolns automatically 2016-07-23 00:31:47 +12:00
Jack Grigg 1655db285d Move initialisations to simplify cancelled checks 2016-07-22 23:54:14 +12:00
Taylor Hornby 73537ebe97 Put hardened stuff in libzcash CPPFLAGS. 2016-07-21 20:45:11 -06:00
Taylor Hornby 56734f4b27 Pull in upstream's make check-security, based on upstream PR #6854 and #7424. 2016-07-21 20:45:10 -06:00
Jack Grigg 9e6adb124f Hardfork to the previous testnet difficulty adjustment behaviour at block 43400
This hardfork will be removed the next time the testnet blockchain is reset.
2016-07-22 14:17:46 +12:00
Sean Bowe 4d66f8f68a Add test for non-intuitive merkle tree gadget witnessing behavior. 2016-07-21 19:28:58 -06:00
Sean Bowe 25d2197043 Remove more from libsnark, and fix potential remote-DoS. 2016-07-21 18:34:59 -06:00
Jack Grigg e99731b4a4 Reinstate previous testnet adjustment behaviour
When the difficulty adjustment algorithm was altered, the special testnet
min-difficulty case was maintained, but the difficulty adjustment for the
following block then adjusted from min-difficulty instead of from the last
non-min-difficulty block. This caused the difficulty on the testnet to sawtooth
instead of stabilising. The intended behaviour is restored here.
2016-07-21 20:50:05 +12:00
Jack Grigg 5a360a5c6a Fix segfault by indirectly monitoring chainActive.Tip(), locking on mutex 2016-07-21 19:34:21 +12:00
zkbot cebeabb2f4 Auto merge of #1119 - ebfull:version-bump, r=ebfull
Bump the (minimum) protocol version to avoid invoking legacy behavior

This sets the current protocol version to `170002` (an order of magnitude larger than Bitcoin's) and the minimum to the same.

Closes #1107
2016-07-21 04:55:06 +00:00
Jack Grigg 5b4ebcd5e2 Add tests that exercise the cancellation code branches 2016-07-21 16:39:32 +12:00
Jack Grigg 2dbabb1159 Make Equihash solvers cancellable
The miner only cancels the solver when chainActive.Tip() changes.

Closes #1055
2016-07-20 19:17:02 +12:00
zkbot e117ff7651 Auto merge of #1048 - str4d:collect-all-valid-equihash-solns, r=ebfull
Collect all permutations of final solutions

This fixes a small bug where if there was a three-way (or more) collision in the final step, one or more valid solutions would be left out.
2016-07-20 03:54:30 +00:00
Sean Bowe 697cc53b29 Bump the (minimum) protocol version to avoid invoking legacy behavior from upstream. 2016-07-19 19:07:14 -06:00