Commit Graph
927 Commits
Author SHA1 Message Date
Sean Bowe 83ee1903fc Add tests for CZCPaymentAddress. 2016-06-15 15:06:07 -06:00
zkbot 6793168a2e Auto merge of #1017 - ebfull:coinbase-must-be-protected, r=ebfull
Enforce that coinbases must be protected

This PR forces miners to place their funds in the private value transfer system, making "transparent coins" opt-in for users, and increasing privacy for all participants on a systemic level.

Closes #101.
2016-06-15 03:06:23 +00:00
Jack Grigg 284e125957 Update tests for new difficulty algorithm 2016-06-15 13:44:27 +12:00
Sean Bowe d212ba320b Disable enforced coinbase protection in miner_tests. 2016-06-14 15:18:52 -06:00
Sean Bowe 542da618df Enforce remaining softfork activation rules unconditionally. 2016-06-14 12:34:38 -06:00
Sean Bowe c0dde76d8a Disable coinbase-must-be-protected rule on regtest. 2016-06-13 12:23:55 -06:00
Sean Bowe 1d38795f50 Prevent coinbases from being spent to transparent outputs. 2016-06-13 11:58:10 -06:00
Jack Grigg f3aee6b109 Update miner tests for platform-independent Equihash 2016-06-12 00:00:26 +12:00
Jack Grigg a6dcf2ee6f Use little-endian for hash personalisation and hashing indices
The test vectors have been regenerated using the basic solver.
2016-06-11 16:28:57 +12:00
Jack Grigg 1dd8ce9ba5 Update tests to account for new Equihash parameters 2016-06-11 15:45:55 +12:00
Jack Grigg 3fe29eab90 Fix failing tests 2016-06-10 16:16:33 +12:00
Jack Grigg a59c352cfd Update tests to account for decreased block interval 2016-06-10 12:02:47 +12:00
zkbot 6ccd212218 Auto merge of #973 - ebfull:chained-pours, r=ebfull
Add chained `JoinSplit`s

Closes #555
2016-06-08 15:23:57 +00:00
Sean Bowe ecd8ca5dbe Minor changes to coins_tests. 2016-06-08 09:15:44 -06:00
Sean Bowe 49ab032b5f Add test to ensure parent treestates only can appear earlier in the transaction or in the global state, not later. 2016-06-07 21:05:25 -06:00
Jack Grigg 50121909aa Update tests to account for reserved field 2016-06-07 22:45:41 +12:00
zkbot d0cc00207b Auto merge of #929 - bitcartel:zc.v0.11.2.z2_fix_717, r=ebfull
Fix issue #717 t

Fix issue #717 where if addrman is starved of addresses (e.g. on testnet)
the Select_() function will loop endlessly trying to find an address,
and therefore eat up 100% cpu time on the 'opencon' thread.

Solution is to (1) add a delay to the loop and (2) restrict the number
of attempts to find an address.  On exiting the loop, we return
to an outer loop in net.cpp which will sleep, add seed nodes and
calculate new addresses.
2016-06-06 20:03:16 +00:00
zkbot 55bf149df9 Auto merge of #921 - str4d:optimised-equihash, r=daira
Optimise memory usage of Equihash implementation

Part of #857.
2016-06-01 13:10:26 +00:00
Sean Bowe 10c33f0f87 Test behavior of chained pour consensus rules. 2016-05-30 22:46:44 -06:00
Sean Bowe 8048f4c048 Ensure merkle tree fixed point removal is tested against inside coins_tests. 2016-05-30 22:46:44 -06:00
Sean Bowe 14b12fde2b Move new coins tests to within coins_tests test suite. 2016-05-30 22:46:44 -06:00
zkbot 19769ba6c5 Auto merge of #976 - ebfull:implement-joinsplit-signatures, r=ebfull
Signing pours with ed25519

This is an alternative to #964 which uses ed25519 instead of secp256k1, and avoids the separate hash for fitting the public key into the `h_sig` block. It's based on @defuse's work in that branch.

Closes #808.
2016-05-31 03:46:30 +00:00
Sean Bowe 7c68cc0747 Add additional assertions. 2016-05-30 21:38:44 -06:00
Sean Bowe e8af0028eb Change error for invalid joinsplit signature for consistency. 2016-05-30 19:38:01 -06:00
Sean Bowe 320f2cc7e0 Switch to Ed25519 for cryptographic binding of joinsplits to transactions. 2016-05-30 11:05:55 -06:00
Taylor Hornby b48122b57b Fix tests for JoinSplit signatures 2016-05-30 11:05:43 -06:00
zkbot b1f699660f Auto merge of #887 - str4d:mining-slow-start, r=ebfull
Implement mining slow start

Closes #762.
2016-05-27 02:15:24 +00:00
Ethan Heilman 1bf2cb1a06 Increase test coverage for addrman and addrinfo
Adds several unittests for CAddrMan and CAddrInfo.
Increases the accuracy of addrman tests.
Removes non-determinism in tests by overriding the random number generator.
Extracts testing code from addrman class to test class.

Signed-off-by: Simon <simon@bitcartel.com>
2016-05-24 12:55:33 -07:00
EthanHeilman 8375e1a3e7 Creates unittests for addrman, makes addrman testable.
Adds several unittests for addrman to verify it works as expected.
Makes small modifications to addrman to allow deterministic and targeted tests.

Signed-off-by: Simon <simon@bitcartel.com>
2016-05-24 11:10:54 -07:00
Sean Bowe 6b5d608899 Update proving key and tests that depend on transaction structure changes 2016-05-24 11:09:17 -06:00
Sean Bowe 9285bba885 Enable binary serializations of proofs and r1cs keys, and make the CPourTx proof field fixed-size. 2016-05-24 11:08:31 -06:00
Jack Grigg e95747288a Use template parameters to statically initialise Equihash 2016-05-24 23:16:50 +12:00
Jack Grigg c92c1f6050 Implement index-truncation Equihash optimisation 2016-05-24 12:02:46 +12:00
Jack Grigg a3361e778b Refactor StepRow to make optimisation easier 2016-05-24 12:02:08 +12:00
Taylor Hornby 7c1ccd9006 Remove unused code in libzerocash util.cpp 2016-05-18 11:22:29 -06:00
Taylor Hornby e857a0cd1f Fix build warnings in sighash tests. 2016-05-18 11:22:29 -06:00
Taylor Hornby bf2e3122ac Remove the Merkle tree hash function's fixed point. 2016-05-16 20:20:36 -06:00
Sean Bowe 2dc3599271 Transplant of libzcash. 2016-05-12 16:44:47 -06:00
Sean Bowe 2140639309 Remove scriptPubKey/scriptSig from CPourTx, and add randomSeed. 2016-05-12 16:44:30 -06:00
Jack Grigg 442eff615b Fix failing miner test 2016-05-12 00:01:24 +12:00
Jack Grigg 4f4a8c3c88 Update miner tests to account for mining slow start 2016-05-10 23:03:23 +12:00
Jack Grigg 91818cf28c Update subsidy tests to account for mining slow start 2016-05-10 23:03:23 +12:00
Sean Bowe 5961dcb6da Change ciphertext length to match protocol spec, and refactor the use of constants. 2016-05-05 21:02:03 -06:00
zkbot 92f3c6082a Auto merge of #889 - ebfull:new-imt-redux, r=ebfull
Implement and integrate new Incremental Merkle Tree

This supersedes #823.

----

This is an implementation of a new incremental merkle tree with

* no memory safety issues
* a more sensible internal design
* better space efficiency (tree representation, witnessing)
* simpler API

It is intended that this tracks the behavior of the previous tree, which it does, as verified by tests. I even wrote a little circuit for testing that all the paths work.

This PR also integrates the tree into the codebase and deprecates the old tree in almost all of our code. (I left it alone in `zerocashTest` but everything else has been changed.)

This change is compatible with the testnet but you will need to clear your *local* blockchain data out since the serialized representation of the merkle tree is now different.

Closes #517, Closes #519, Closes #591, Closes #460, Closes #473
2016-05-03 17:33:27 +00:00
Sean Bowe 57f118176f Move NoteEncryption tests to gtest suite. 2016-04-28 16:25:14 -06:00
Sean Bowe 6c36a9fe03 NoteEncryption implementation and integration, removal of ECIES and crypto++ dependencies. 2016-04-28 16:25:12 -06:00
Sean Bowe 6850b45e4d Move incremental merkle tree tests to zcash-gtest. 2016-04-28 16:10:21 -06:00
Sean Bowe d0c4b0e850 Add more well-formedness checks/tests to tree. 2016-04-28 16:07:52 -06:00
Sean Bowe 01e4ff0f74 Improve well-formedness checks and add additional serialization/deserialization tests. 2016-04-28 16:07:52 -06:00
Sean Bowe 6d71658673 Initialize curve/field parameters in case another test hasn't done so. 2016-04-28 16:07:52 -06:00