Commit Graph
1114 Commits
Author SHA1 Message Date
Jack Grigg f92f004714 Fix zkey test 2016-10-04 11:05:57 -07:00
zkbot 4cfbe798bf Auto merge of #1429 - str4d:867-update-dependencies, r=str4d
Update all dependencies

Also re-enables disabled compiler warnings.

Closes #867, #944, #1241, #1255, #1348.
2016-10-04 03:48:42 -04:00
Jack Grigg ee64b5e726 Re-encode hard-coded addresses in tests 2016-10-03 23:53:14 -07:00
Daira Hopwood fbad4cac24 Reencode keys in JSON test data. refs #812
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-03 23:53:14 -07:00
Jack Grigg a4f2555b35 Mark previously-valid test data as invalid 2016-10-03 20:09:18 -07:00
zkbot efe18f2e9b Auto merge of #1374 - str4d:1106-alert-safe-mode, r=str4d
Enable high-priority alerts to put the RPC into safe mode

This reverts the changes in 986b5e257e and adds a priority check.

Continuation of #1337
Closes #1106
2016-10-03 17:36:59 -04:00
zkbot fa632c1c91 Auto merge of #1468 - str4d:1138-change-versioning-scheme, r=str4d
Change versioning scheme

Closes #1138
2016-10-02 19:29:38 -04:00
Daira Hopwood 0fafbd5d0a Repair FormatSubVersion tests. refs #1138
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-02 16:44:56 +01:00
Simon 2d6e97ecc5 Add field fMinerTestModeForFoundersRewardScript to chainparams 2016-09-30 18:31:51 -07:00
Jack Grigg 7f01e437a6 Remove OP_CODESEPARATOR from tests 2016-10-01 01:17:32 +13:00
Simon 82bd9ee81b Fix comment and formatting per review 2016-09-29 22:07:38 -07:00
Jack Grigg 6567a7b534 Add tests for alerts enabling RPC safe mode 2016-09-30 17:47:28 +13:00
Simon 73699ceaf6 Add support for spending keys to the encrypted wallet. 2016-09-29 20:17:30 -07:00
Jack Grigg 017abaf694 Assert that new OpenSSL allocators succeed 2016-09-29 17:58:29 +13:00
Jack Grigg fa318aa9fe Upgrade OpenSSL to 1.1.0b
Closes #1348
2016-09-29 12:34:09 +13:00
Daira Hopwood 05e2db116d Remove FindAndDelete. refs #1386
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-09-27 00:48:30 +01:00
jl777 50027f0631 mindiff exception for notaries 2016-09-23 10:30:15 -03:00
jl777 3a02f67bf3 coin supply, rewards 2016-09-13 15:04:42 -03:00
Simon da5e7e5185 Formatting and updated test per review. 2016-09-08 21:46:15 -07:00
Simon e883ffef91 Add test for calling RPC z_getbalance, z_gettotalbalance, z_listreceivedbyaddress with invalid parameters. 2016-09-08 21:46:15 -07:00
Simon 7b79275eba Add tests to try and improve coverage of perform_joinsplit. 2016-09-08 21:46:14 -07:00
Simon cff6f0ac46 Add friend class for testing private members of AsyncRPCOperation_sendmany. 2016-09-08 21:46:14 -07:00
Simon fc4b127ed3 Add tests for async queue and rpc commands: z_getoperationstatus, z_getoperationresult, z_listoperationids, z_sendmany 2016-09-08 21:46:14 -07:00
Simon b922924d14 Add test for AsyncRPCQueue and AsyncRPCOperation. 2016-09-08 21:46:14 -07:00
zkbot 2271d3feda Auto merge of #1338 - str4d:147-tweak-difficulty-adjustment-algorithm, r=ebfull
Tweaks to difficulty adjustment algorithm

This PR changes the difficulty algorithm to adjust from the average difficulty over the
block window instead of from the last difficulty. It also removes the special rules for the
testnet, which are incompatible with difficulty averaging.

Closes #147 again.
2016-09-08 02:21:13 +00:00
Jack Grigg 4b37cfd5b8 Remove unnecessary method 2016-09-08 12:22:08 +12:00
Simon 805344dcf4 Refactor: replace calls to GetTxid() with GetHash() 2016-09-07 15:12:09 -07:00
Simon a64f681f2c Remove #1144 from input data of script_tests.
Revert script_invalid.json to commit df1609f.
Revert script_valid.json to commit 1c54757.
2016-09-07 15:12:09 -07:00
Simon 5316bd3560 Remove #1144 from bloom_tests by reverting to commit 5012190. 2016-09-07 15:12:09 -07:00
Sean Bowe a4b00373ab Fix transaction test in test_bitcoin. 2016-09-07 13:55:31 -06:00
Jack Grigg 4a749674a8 Update tests for new genesis blocks 2016-09-07 21:05:12 +12:00
Jack Grigg 8f3ec042af Expand bounds on difficulty adjustment 2016-09-06 13:13:23 +12:00
Jack Grigg cb708a99a5 Add comments explaining changed semantics of pow_tests 2016-09-06 11:33:59 +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
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
Sean Bowe 7ee82c4361 Deallocate the public parameters during Shutdown. 2016-08-26 16:55:43 -06:00
Simon 4b2e557181 Fix comments. 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
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
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
Taylor Hornby 2902ac7ce8 Use libsodium's s < L check, instead checking that libsodium checks that. 2016-08-18 16:38:20 -06: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
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
Sean Bowe f5e5707d4c Change memo field size and relocate ciphertexts field of JoinSplit description. 2016-08-15 09:39:14 -06:00
Jack Grigg a23507d086 Update tests to account for new Equihash parameters 2016-08-06 17:33:23 +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
Simon 0ccb650b5a Update genesis block hashes and test data. 2016-07-27 00:55:48 -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