Commit Graph

6446 Commits

Author SHA1 Message Date
Sean Bowe f6b6c9bed8 Update libsnark again. 2016-09-05 12:00:50 -06:00
Jack Grigg 333ea3c426 Remove testnet-only difficulty rules
The min-difficulty blocks are incompatible with difficulty averaging.

Network difficulty is also now defined as the difficulty the network is
currently working to solve, rather than the last non-min-difficulty block
difficulty.
2016-09-05 23:13:25 +12:00
Jack Grigg 29842505cc Adjust from average difficulty instead of previous difficulty 2016-09-05 22:25:11 +12:00
zkbot 485ace0a1b Auto merge of #1311 - ebfull:cleanup-pp, r=ebfull
Deallocate the public parameters during Shutdown.

This also has it deallocated in `GenerateParams` and `test_bitcoin`. The virtual destructor probably isn't necessary but I added it just in case we need it some other time.
2016-09-02 03:03:45 +00:00
zkbot 2640989d9a Auto merge of #1308 - str4d:1181-getmininginfo-testnet-difficulty-rules, r=ebfull
Separate concepts of block difficulty and network difficulty in RPC

"Block difficulty" is the difficulty listed in a block's header, which in the
testnet can sometimes be min-difficulty (if time-since-last-block is too large).

"Network difficulty" is the difficulty that the network was trying to satisfy
at a particular block height. In mainnet this is always equal to the difficulty
of the solved block for that height, but in testnet the network difficulty is
derived from the last non-min-difficulty block difficulty.

This commit fixes the RPC APIs that are intended to show network difficulty, so
that on testnet they don't sometimes drop to 1.0, confusing users.

Closes #1181
2016-09-01 18:12:46 +00:00
zkbot 8a620d507f Auto merge of #1326 - str4d:1185-remove-mainnet-dns-seeds, r=ebfull
Remove mainnet DNS seeds, set checkpoint to genesis

Closes #1185
2016-09-01 13:54:52 +00:00
zkbot a723794f81 Auto merge of #1233 - str4d:1199-note-tracking, r=str4d
Add Note tracking

This PR extends the existing transaction tracking in the wallet to track spendable Notes.

Closes #1199
2016-09-01 08:17:07 +00:00
Jack Grigg f7d78fdde1 Fix failing test 2016-09-01 20:16:18 +12:00
Jack Grigg 57466ea652 Remove mainnet DNS seeds, set checkpoint to genesis
Closes #1185
2016-09-01 17:01:28 +12:00
Jack Grigg 00939d09ba Add test comparing GetDifficulty() with GetNetworkDifficulty() 2016-09-01 16:36:18 +12:00
Jack Grigg 695a7a8826 Separate concepts of block difficulty and network difficulty in RPC
"Block difficulty" is the difficulty listed in a block's header, which in the
testnet can sometimes be min-difficulty (if time-since-last-block is too large).

"Network difficulty" is the difficulty that the network was trying to satisfy
at a particular block height. In mainnet this is always equal to the difficulty
of the solved block for that height, but in testnet the network difficulty is
derived from the last non-min-difficulty block difficulty.

This commit fixes the RPC APIs that are intended to show network difficulty, so
that on testnet they don't sometimes drop to 1.0, confusing users.

Closes #1181
2016-09-01 15:13:05 +12:00
Jack Grigg 268bd84f9a Add coverage of the assertion inside GetNoteWitnesses() 2016-09-01 15:04:57 +12:00
Jack Grigg 73db0c12b9 Increase coverage of GetNoteDecryptor() 2016-09-01 14:44:01 +12:00
Jack Grigg 5abaca1af6 Fix the failing test! 2016-09-01 13:00:02 +12:00
Jack Grigg ac91ebbe92 Add test showing that the witness cache isn't being serialised 2016-09-01 12:47:44 +12:00
Jack Grigg 32a103aab7 Changes after review 2016-09-01 11:48:15 +12:00
zkbot 83ec5cb87b Auto merge of #1322 - bitcartel:zc.v0.11.2.z9_1316_getblocksubsidy, r=ebfull
Closes #1315 - change to RPC getblocksubsidy

For #1315
RPC getblocksubsidy height parameter is now optional
Returns result for future block
Test has been added to verify parameter input and results
2016-08-31 21:45:11 +00:00
Jack Grigg 0736fa14fc Keep any existing cached witnesses when updating transactions 2016-08-31 21:16:59 +12:00
Jack Grigg be86b6c332 Add test for GetNoteDecryptor() 2016-08-31 18:57:32 +12:00
Jack Grigg 1551db870a Add transactions to wallet if we spend notes in them 2016-08-31 18:28:00 +12:00
Jack Grigg 38a6e7a74d Set witness cache size equal to coinbase maturity duration
Both constants have the same implicit assumption: that the blockchain will very
rarely undergo a reorganisation of that size.
2016-08-31 15:26:49 +12:00
Jack Grigg ad20f2149a mapNullifiers -> mapNullifiersToNotes for clarity 2016-08-31 15:11:35 +12:00
Jack Grigg 4086e5ce98 Replace vAnchorCache with a cache size counter
The anchor is obtained from the returned witnesses; since all witnesses are to
the same point (the latest blockchain tip), they all have the same root.
2016-08-31 15:03:42 +12:00
Simon 5d50130bc9 Closes #1315. RPC getblocksubsidy height parameter is now optional and
a test has been added to verify parameter input and results.
2016-08-30 15:11:07 -07:00
zkbot 835588a629 Auto merge of #1314 - str4d:fix-getblock-solution-output, r=ebfull
Output Equihash solution in RPC results as a hex string

When the Equihash solution was changed to a compact form in #1175, the block header changed from storing a vector of indices to a vector of chars. `blockToJSON()` was not updated, which meant that RPC calls like `getblock` returned the solution as a list of 1344 integers.

This PR changes `blockToJSON()` to output the Equihash solution as a hex string, identical to how it appears in the block header.
2016-08-30 18:40:19 +00:00
zkbot 6731665a12 Auto merge of #1313 - bitcartel:zc.v0.11.2.z9_1122, r=ebfull
Fixes #1122 where json_spirit could stack overflow

See #1122 for details.
2016-08-30 18:00:11 +00:00
Jack Grigg 3fac1020e7 Remove GetNoteDecryptors(), lock inside FindMyNotes() instead 2016-08-31 02:09:17 +12:00
Jack Grigg de42390f90 Pass ZCIncrementalMerkleTree to wallet to prevent race conditions 2016-08-31 02:00:11 +12:00
Jack Grigg 3e3da44c71 Test solution output of blockToJSON() 2016-08-30 14:42:49 +12:00
zkbot e0fa312756 Auto merge of #1307 - str4d:remove-debug-pow-code, r=ebfull
Undo debugging change from 5be6abbf84

This was unintentionally committed, and caused Equihash verification of blocks
without parents to be skipped. This only affects the genesis block on the test
network, but also causes the "time verifyequihash" benchmark to incorrectly
appear instantaneous.
2016-08-29 22:09:17 +00:00
Jack Grigg 769e031c1a Update cached incremental witnesses when the active block chain tip changes 2016-08-30 00:29:49 +12:00
Jack Grigg be74c80deb Add caching of incremental witnesses for spendable notes 2016-08-30 00:29:49 +12:00
Jack Grigg 8db7e25c3f Create mapping from nullifiers to received notes
This is used in the same way as CTxIn.prevout (e.g. to mark transactions dirty).
2016-08-30 00:29:49 +12:00
Jack Grigg 0f1060478f Keep track of spent notes, and detect and report conflicts 2016-08-30 00:29:49 +12:00
Jack Grigg c3a7307a69 Store mapping between notes and PaymentAddresses in CWalletTx 2016-08-30 00:29:49 +12:00
Jack Grigg 02e674555e Add wallet method for finding spendable notes in a CTransaction 2016-08-30 00:29:49 +12:00
Jack Grigg 5db5e42ec3 Add optional bool to disable computation of proof in JSDescription constructor 2016-08-30 00:29:49 +12:00
Simon 1f882153b6 Throw a domain error as json_spirit is a third-party library. 2016-08-27 09:14:25 -07:00
Jack Grigg e1dde421c3 Output Equihash solution in RPC results as a hex string 2016-08-27 23:58:11 +12:00
Simon df3af446e7 Fixes #1122 where json_spirit could stack overflow because there
was no maximum limit set on the number of nested compound elements.
2016-08-26 23:35:45 -07:00
Sean Bowe 7ee82c4361 Deallocate the public parameters during Shutdown. 2016-08-26 16:55:43 -06:00
Jack Grigg 488e61e852 Undo debugging change from 5be6abbf84
This was unintentionally committed, and caused Equihash verification of blocks
without parents to be skipped. This only affects the genesis block on the test
network, but also causes the "time verifyequihash" benchmark to incorrectly
appear instantaneous.
2016-08-26 14:09:25 +12:00
zkbot 77a99f4a2a Auto merge of #1285 - ralphtheninja:zc.v0.11.2.latest, r=daira
update FormatException()

changed module name from "bitcoin" to "Zcash" in FormatException()
2016-08-26 02:06:23 +00:00
zkbot 8b139c2441 Auto merge of #1303 - daira:z9-version-number, r=daira
Update version number and add release notes for z9.

refs #1290
2016-08-25 19:32:20 +00:00
Daira Hopwood 727ed5ffa3 Update pchMessageStart for the z9 testnet. ⚧Ⓐ
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-08-25 15:55:51 +01:00
Daira Hopwood bda0693aab Increment version number for z9 release.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-08-25 15:07:16 +01:00
Simon 3bff998b38 Rename methods to avoid using prefix of _ underscore which is reserved.
Added logging of explicit exception rather than a catch all.
Removed redundant spending key check.
Updated user facing help message.
2016-08-24 11:55:26 -07:00
Simon 4b2e557181 Fix comments. 2016-08-24 11:19:34 -07:00
Simon 309b0ecd80 Add "zkey" to list of key types (used by the wallet to decide
whether or not it can be recovered if it detects bad records).
2016-08-24 11:19:34 -07:00
Simon 79d769a382 Remove one line of dead code. 2016-08-24 11:19:34 -07:00
Simon 2e0cc87acf Fix comment. 2016-08-24 11:19:34 -07:00
Simon badb9a9c2f Add test coverage for RPC call z_getnewaddress. 2016-08-24 11:19:34 -07:00
Simon 60f762a549 Added wallet rpc tests to cover:
z_importwallet, z_exportwallet
z_importkey, z_exportkey
z_listaddresses
2016-08-24 11:19:34 -07:00
Simon 0feffd1424 Don't mark wallet as dirty if key already exists.
Fix incorrect method name used in error message.
2016-08-24 11:19:33 -07:00
Simon 4cea36bef3 Add gtest to cover new methods in:
CWallet
- GenerateNewZKey()
- AddZKey()
- LoadZKey()
- LoadZKeyMetadata()
CWalletDB
- WriteZKey()
2016-08-24 11:19:33 -07:00
Simon e709997ff2 Implemented z_listaddresses to return all the zaddr in the wallet. 2016-08-24 11:19:33 -07:00
Simon 92444edc00 Add z_importwallet and z_exportwallet to handle keys for both
taddr and zaddr.  Restore behaviour of dumpwallet and importwallet
to only handle taddr.
2016-08-24 11:19:33 -07:00
Simon c1c4594371 Implemented RPC calls z_importkey, z_exportkey, z_getnewaddress.
Modified RPC calls dumpwallet and importwallet to include spending keys.
2016-08-24 11:19:33 -07:00
Daira Hopwood b93c8139e6 Decrease MAX_HEADERS_RESULTS to 160. fixes #1289
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-08-24 06:14:09 +01:00
Daira Hopwood bcf79c78c5 Change some asserts in equihash.cpp to be static.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-08-24 06:13:13 +01:00
Daira Hopwood c6a7e897bc Add mostly-static checks on consistency of Equihash parameters, MAX_HEADERS_RESULTS, and MAX_PROTOCOL_MESSAGE_LENGTH.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-08-24 06:13:06 +01:00
zkbot cd9d373987 Auto merge of #1260 - str4d:1175-byte-array-manipulation, r=ebfull
Update Equihash implementation to match the Zcash spec

Closes #1175
2016-08-24 03:01:13 +00:00
Jack Grigg 90b740fd3b Test conversion between solution indices and minimal representation 2016-08-24 13:42:52 +12:00
zkbot 27bd8e4129 Auto merge of #1270 - ThisIsNotOfficialCodeItsJustForks:t1168-fix-optimization-flags, r=daira
Fix inconsistent -O1/-O2, fix libzcash flags, add -fwrapv -fno-strict-aliasing

Closes #1168. In that ticket I decided the optimization flags for dependencies are out of scope, i.e. we go with whatever the upstream package maintainer chose.
2016-08-23 03:30:31 +00:00
Sean Bowe 393b2b7834 Update proving/verifying keys. 2016-08-22 15:48:43 -06:00
Sean Bowe decde3864d Enable MONTGOMERY_OUTPUT everywhere. 2016-08-22 15:48:43 -06:00
Sean Bowe ae6b333c75 Perform curve parameter initialization at start of gtest suite. 2016-08-22 15:47:00 -06:00
Daira Hopwood ea92aba9fe Move bigint arithmetic implementations to libsnark. 2016-08-22 15:46:58 -06:00
Sean Bowe f0dab51cf3 Implement zkSNARK compression. 2016-08-22 00:36:12 -06:00
zkbot 365845216b Auto merge of #1268 - ThisIsNotOfficialCodeItsJustForks:t1130-upgrade-libsodium, r=ebfull
Upgrade libsodium for AVX2-detection bugfix.

Upgrades libsodium to bring in an AVX2-detection bugfix (to help with #1130).
2016-08-22 02:34:30 +00:00
zkbot f4491c51e4 Auto merge of #1248 - rcseacord:rcseacord-patch-4, r=ebfull
Update uint256.h

Addresses load of misaligned address for type 'const uint32_t' #1246
2016-08-22 00:12:48 +00:00
Lars-Magnus Skog 8fd71a194e changed module name from "bitcoin" to "Zcash" in FormatException() 2016-08-21 15:10:09 +02:00
Jack Grigg e273f05d10 Remove unnecessary temporary array from Equihash hash generation 2016-08-21 06:05:48 +12:00
Jack Grigg 6e629886e5 Add another test case based on example in the spec 2016-08-21 05:57:46 +12:00
Gaurav Rana 6c7cc8ebea update zcash-cli stop message
changed "Bitcoin server stopping" to "Zcash server stopping"
2016-08-20 12:27:12 +00:00
zkbot 7e556172d9 Auto merge of #1236 - tomrittervg:tomrittervg-comments-1, r=ebfull
Clarify comment about nonce space for Note Encryption
2016-08-18 23:38:36 +00:00
Taylor Hornby 2902ac7ce8 Use libsodium's s < L check, instead checking that libsodium checks that. 2016-08-18 16:38:20 -06:00
Tom Ritter 36d5f42948 Update NoteEncryption.hpp 2016-08-18 16:51:15 -05:00
zkbot 28a30f7801 Auto merge of #1254 - ebfull:tx-structure-changes, r=bitcartel
Change memo field size and relocate `ciphertexts` field of JoinSplit description

Closes #1190
Closes #1187
2016-08-18 16:49:47 +00:00
ebfull 2ee6ed64eb Add parenthesis around macro value definition 2016-08-18 10:43:58 -06:00
zkbot af9898eee5 Auto merge of #1258 - ThisIsNotOfficialCodeItsJustForks:t1251-upstream-anti-dos, r=daira
Pull in some DoS mitigations from upstream

Closes #1251.

**WARNING: I force pushed**
2016-08-18 16:08:25 +00:00
zkbot 3d28c86c8e Auto merge of #1205 - str4d:1199-key-management, r=str4d
Add support for spending keys to the basic key store

Prerequisite for #1197 and #1199.
2016-08-18 00:27:09 +00:00
Jack Grigg a4f4fa8fe9 ASSERT -> EXPECT in test to get more info per test run about future regressions 2016-08-18 12:25:01 +12:00
Jack Grigg 04dfc3c569 Rework test to check for failure to return a spending key 2016-08-18 12:22:30 +12:00
Taylor Hornby f5d3d420f6 Add -fwrapv -fno-strict-aliasing; fix libzcash flags. 2016-08-17 11:57:51 -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 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
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
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
zkbot 95277e0311 Auto merge of #1144 - bitcartel:zc.v0.11.2.z7_tx_malleability_gettxid, r=bitcartel
A fix for transaction malleability

This PR fixes transaction malleability by not including the sigscript of transaction inputs and joinsplit sigs when hashing the txid.

This PR supercedes PR #1101 which was a minimal solution based on a new serialization flag.

This PR introduces GetTxid() to distinguish between getting a transaction id and the double sha256 hash.

The key changes are:
- Adding GetTxid() method to CTransaction which makes a copy of the transaction, clearing out the sigscript and joinsplitsig fields, before hashing.
- Verifying that every call to GetHash() actually wants a txid, and replacing with GetTxid().
- Renaming GetHash() to GetSerializeHash()
  - Rationale: In future, upstream code we want to merge will use GetHash() but we don't know the intent.  We should check to see if the intent is to receive a txid (most likely) in which case we replace with GetTxid(), or if upstream actually wants a double hash of the transaction we can use GetSerializeHash().
- Updated genesis data in chainparams.cpp

Note that coinbase transactions are excluded as they need the sigscript hashed to help avoid duplicate txids per BIP34:
  - This modification is related to a question from @ebfull on PR #1101 - "Can we think of a way this change allows us to construct two transactions with the same txid which can simultaneously appear in the blockchain? My guess is it would be possible to construct a coinbase transaction of such a form... this surely breaks invariants."

This PR Passes all tests in test_bitcoin (test data was updated in bloom_tests, miner_tests and script_tests).
2016-08-05 19:31:52 +00:00
zkbot e5b57a1432 Auto merge of #1173 - str4d:1165-equihash-fix-large-k-ballooning, r=bitcartel
Eliminate some of the duplicates caused by truncating indices

Closes #1165
2016-08-05 17:35:35 +00:00
Jack Grigg 036dcbd94a Remove the assumption that n/(k+1) is a multiple of 8.
This version works, but generates the initial rows in a way that is not what we
want to specify. See #1175 for resolving this.

Co-author: Daira Hopwood <daira@jacaranda.org>
2016-08-06 02:40:07 +12:00
Jack Grigg 3c3ef34505 Add missing assert 2016-08-05 22:24:04 +12:00
Jack Grigg e999c1e339 Simplify IsProbablyDuplicate() 2016-08-05 22:17:40 +12:00
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