Sean Bowe
b8d320df19
Update public zkSNARK parameters for new circuit.
2016-05-12 16:44:49 -06:00
Sean Bowe
4ec57478c4
Remove nearly all of libzerocash.
2016-05-12 16:44:49 -06:00
Sean Bowe
0d990f31a7
Stop testing old tree against new tree.
2016-05-12 16:44:49 -06:00
Sean Bowe
5975bf1c32
Added public zkSNARK parameter generation utility.
2016-05-12 16:44:49 -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
Sean Bowe
5a2db9e283
libzcash: Add tests for API
2016-05-12 16:44:30 -06:00
Sean Bowe
59c3d926c6
zkSNARK: Enforce merkle authentication path from nonzero-valued public inputs to root.
2016-05-12 16:44:30 -06:00
Sean Bowe
fcece37f00
zkSNARK: Witness commitments to input notes.
2016-05-12 16:44:30 -06:00
Sean Bowe
e5f7c49d55
zkSNARK: Ensure that values balance correctly.
2016-05-12 16:44:30 -06:00
Sean Bowe
5e61a78fec
zkSNARK: Enforce disclosure of commitments to output notes.
2016-05-12 16:44:30 -06:00
Sean Bowe
6b010d9bfd
zkSNARK: Enforce that new output notes have unique rho to prevent faerie gold attack.
2016-05-12 16:44:30 -06:00
Sean Bowe
e52f40e839
zkSNARK: Authenticate h_sig with a_sk
2016-05-12 16:44:30 -06:00
Sean Bowe
2a2f3fb80f
zkSNARK: Enforce disclosure of input note nullifiers
2016-05-12 16:44:30 -06:00
Sean Bowe
ca8d6c9347
zkSNARK: Enforce spend-authority of input notes.
2016-05-12 16:44:30 -06:00
Sean Bowe
53d2ade7c2
zkSNARK: Add "zero" constant variable.
2016-05-12 16:44:30 -06:00
Sean Bowe
074eb3a2cf
zkSNARK: Foundations of circuit design and verification logic.
2016-05-12 16:44:30 -06:00
Sean Bowe
369df06583
Introduce new libzcash Zcash protocol API and crypto constructions surrounding the zkSNARK circuit.
2016-05-12 16:44:27 -06: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
Sean Bowe
26007222e8
Distinguish the failure cases of wfcheck in tree.
2016-05-03 11:23:54 -06:00
Sean Bowe
956dcdde80
Perform zerocash tests as part of full-test-suite, in preparation for removal of zerocash waterfall.
2016-05-03 06:49:15 -06:00
Sean Bowe
6bd8e46922
Run zcash-gtest in make check and fix performance tests.
2016-05-02 23:14:53 -06:00
Sean Bowe
6f1b70300d
Small nit fixes
2016-04-30 11:59:39 -06:00
Sean Bowe
4b2c67d212
Check exception has specific string message.
2016-04-28 19:35:22 -06:00
Sean Bowe
70ac6ce2ee
Clarify the usage of decryption API.
2016-04-28 17:06:08 -06:00
Sean Bowe
984bdd88f1
Add additional tests for ephemeral key behavior.
2016-04-28 16:52:22 -06: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
9b92a9d5fb
Make appending algorithm more succinct.
2016-04-28 16:07:52 -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
Sean Bowe
1760b3cd88
Deprecate the old tree and remove old tree tests from the test suite.
2016-04-28 16:07:52 -06:00
Sean Bowe
482aefbd0d
Test old tree along with new tree as much as possible.
2016-04-28 16:07:52 -06:00
Sean Bowe
434f328446
Integrate new incremental merkle tree implementation into consensus.
2016-04-28 16:07:52 -06:00
Sean Bowe
e1ff849d8d
New implementation of incremental merkle tree
...
This is a new implementation of the incremental merkle tree used by our
scheme to witness commitments to spendable value. It serves as a fixed-sized
accumulator.
This new construction has a much simpler API surface area, avoids memory
safety issues, remains pruned at all times, avoids serialization edge cases,
has more efficient insertion, and is abstract over the depth and hash
function used at the type level.
Further, it lays the groundwork for efficient "fast-forwarding" of witnesses
into the tree as the treestate is updated.
2016-04-28 16:07:52 -06:00
Sean Bowe
291b191bd7
Add serialization for primitive boost::optional<T>.
2016-04-28 16:07:52 -06:00
Sean Bowe
62fdd8d094
Change pchMessageStart for new testnet.
2016-04-11 12:46:46 -06:00
Sean Bowe
6ca317e1cc
Fix remaining RPC tests.
2016-04-11 12:46:46 -06:00
Sean Bowe
f3ffa3d27f
Implementation of Founders' Reward.
...
All blocks before the first subsidy halving block, with the exception of
the genesis block, must contain an output which sends 20% of the block
subsidy value to a scriptPubKey `FOUNDERS_REWARD_SCRIPT`.
2016-04-08 14:40:28 -06:00
Sean Bowe
abc1c352c9
Add missing synchronization that causes race condition in test.
2016-04-08 13:54:44 -06:00
Sean Bowe
e22df48519
Fix miner_tests to work with equihash
2016-04-08 22:16:29 +12:00
Sean Bowe
fd5007c126
Create new hasher for sha256() utility.
2016-03-31 16:19:29 -06:00
Sean Bowe
27a109af01
Improve testing and API of CSHA256 compression.
2016-03-31 16:15:07 -06:00
Sean Bowe
d3612b1c94
Remove zerocash's SHA256 implementation
2016-03-31 15:59:06 -06:00
Sean Bowe
8466467a35
Added SHA256Compress to Bitcoin's SHA256 implementation.
2016-03-31 14:23:56 -06:00
Sean Bowe
6806256b80
Initialize libsodium and remove openssl headers from util.cpp
2016-03-23 16:26:57 -06:00
Sean Bowe
a633044b25
Reorder proving key and verifying key arguments.
2016-03-15 15:59:52 -06:00
Sean Bowe
8f8c4c6c0c
Lazily load the proving key at time of first pour.
2016-03-15 14:16:05 -06:00
ebfull
b947af52f3
Merge pull request #741 from zcash/zc.v0.11.2.update-repo-url.0
...
Update repo URL in README.md
2016-03-03 15:38:49 -07:00
ebfull
b08894066a
Fix typo
2016-02-18 17:16:28 -07:00
ebfull
2d1d3b2bf5
Merge pull request #726 from Electric-Coin-Company/import-libzerocash
...
Bring libzerocash in tree
2016-02-18 09:12:22 -07:00
Sean Bowe
57220d0320
Fix test_pour return type.
2016-02-18 00:04:55 -07:00
Sean Bowe
25f0e1072e
Fix test paths.
2016-02-17 14:54:48 -07:00
Sean Bowe
0b43e787e0
Add merkleTest and utilTest to test suite.
2016-02-17 13:35:40 -07:00
Sean Bowe
6e96cf089b
Add zerocash tests and utilities.
2016-02-15 22:57:55 -07:00
Sean Bowe
cf5f4f679d
Remove unnecessary comments.
2016-02-15 19:10:15 -07:00
Sean Bowe
e463edc122
Build and link libzerocash.
2016-02-15 15:28:20 -07:00
Sean Bowe
a897db652f
Reorganizing the zerocash tree.
2016-02-15 15:28:20 -07:00
Sean Bowe
1e62bba762
Remove ate-pairing, xbyak and libzerocash dependencies from the depends tree.
...
The ALT_BN128 curve does not need ate-pairing or xbyak.
Also, remove crypto++ dependency from libsnark.
2016-02-15 15:27:59 -07:00
Sean Bowe
523bc77f64
Move libzerocash (dd5db5815be70f0e4895784cc905df6f1c73cb17) into the src tree.
2016-02-11 13:44:25 -07:00
ebfull
0294f34d15
Merge pull request #698 from Electric-Coin-Company/fix-pour-rpc-tests
...
Fixed RPC tests for Pours.
2016-02-03 13:07:53 -07:00
Sean Bowe
a5cbd56a3a
Fixed RPC tests for Pours.
2016-01-29 19:40:05 -07:00
ebfull
2553facbf7
Merge pull request #683 from nathan-at-least/t681.remove-python-fetch-params
...
Remove fetch-params.py.
2016-01-27 20:14:20 -07:00
ebfull
32e370c38f
Merge pull request #667 from Electric-Coin-Company/change-decoderawtx
...
Add decoding support for vpour in the `decoderawtransaction` RPC.
2016-01-27 15:19:16 -07:00
ebfull
405dd80aeb
Merge pull request #670 from mattherman/patch-1
...
Fixed spelling error in README.md
2016-01-25 12:39:49 -07:00
Sean Bowe
63ea9b75bb
Add decoding support for vpour in the decoderawtransaction RPC.
2016-01-23 18:07:18 -07:00
ebfull
e9ae5d2221
Merge pull request #664 from jzbz/patch-1
...
Update INSTALL
2016-01-23 16:47:12 -07:00
ebfull
23c0154a66
Merge pull request #665 from jzbz/patch-2
...
Update README.md
2016-01-23 16:47:07 -07:00
ebfull
5d0b0129f5
Merge pull request #660 from nathan-at-least/t654.fetch-params-resume-downloads
...
Add feature to resume downloads of params files.
2016-01-22 13:03:39 -07:00
ebfull
b204f7cd1e
Merge pull request #657 from eliteraspberries/fetch-params-py
...
Implement the fetch-params.sh script in Python
2016-01-22 12:09:37 -07:00
ebfull
7f689b0a42
Merge pull request #642 from nathan-at-least/t641.fetch-params-ignore-cert-errors
...
Ignore certificate errors when fetching params.
2016-01-21 02:31:17 -07:00
ebfull
fc0ae34c58
Merge pull request #640 from ebfull/remove-type-ck
...
Remove type check on zcrawpour which is not necessary and causes errors with the RPC.
2016-01-20 15:05:48 -07:00
Sean Bowe
9ce86bec59
Remove type check on zcrawpour which is not necessary and causes errors with the RPC.
2016-01-20 14:53:27 -07:00
Sean Bowe
559ab22589
Added link to alpha guide in the README.
2016-01-20 09:15:36 -07:00
Sean Bowe
293e4f015b
Updated README and COPYING.
2016-01-20 00:38:40 -07:00
Sean Bowe
d488e75ea8
Fix comment.
2016-01-19 16:29:44 -07:00
Sean Bowe
cf47198370
Fixed a couple incremental merkle tree bugs breaking consistency checks.
2016-01-19 14:36:10 -07:00
Sean Bowe
2c2dd2305e
Update fallback path.
2016-01-19 14:36:10 -07:00
Sean Bowe
8505fd548a
Prevent testnet from connecting to Bitcoin and getting people marked as DoS.
2016-01-19 14:36:10 -07:00
Sean Bowe
9144ea8c2b
Testnet modifications -- just take the parameters from regtest. Also, move loading ZC params to _before_ verification.
2016-01-19 14:36:10 -07:00
Sean Bowe
d66877afb3
Added mapSerials consensus rules to prohibit double-spending.
2016-01-19 14:36:09 -07:00
Sean Bowe
03bff15fe2
Enforce zk-SNARK validity during consensus.
2016-01-19 14:36:09 -07:00
Sean Bowe
0a87fc4ad0
Increase timeouts for comparison utility.
2016-01-19 14:36:09 -07:00
Sean Bowe
6674f41c1a
Fixed system test.
2016-01-19 14:36:09 -07:00
Sean Bowe
a8ac403db0
Added mapAnchors consensus rules, finished zcrawpour/zcrawreceive.
...
Some specifics on consensus changes:
* Transactions must be anchored to a real anchor in the chain.
* Anchors are pushed and popped during ConnectBlock/DisconnectBlock as appropriate.
* DisconnectTip triggers evictions, under some circumstances, of transactions in the
mempool which are anchored to roots that are no longer valid.
* Commitments append to the tree at the current best root during ConnectBlock.
2016-01-19 14:36:04 -07:00
Sean Bowe
e934af2404
Update libzerocash ref
2016-01-19 14:36:04 -07:00
Sean Bowe
730790f7a4
Added primitive zcrawkeygen/zcrawpour implementations
2016-01-19 14:36:04 -07:00
Sean Bowe
4f1c37980e
Load proving/verifying keys at startup from the public alpha parameters file.
2016-01-19 14:36:04 -07:00
Sean Bowe
f512cf7c7b
Added value balance consensus enforcement for pours.
2016-01-19 14:36:04 -07:00
Sean Bowe
45d6bee945
Add mapSerials infrastructure to CCoinsView.
...
This adds the TXDB/CCoinsViewCache primitives necessary for
writing consensus rules for mapSerials later.
2016-01-19 14:36:04 -07:00
Sean Bowe
9f25631d50
Add mapAnchors infrastructure to CCoinsView.
...
This adds the TXDB/CCoinsViewCache primitives necessary for
writing consensus rules for mapAnchors later.
2016-01-19 14:36:04 -07:00
Sean Bowe
96c31d163f
Added CPourTx verification and construction routines.
2016-01-19 14:36:04 -07:00
Sean Bowe
69761d8269
Primitive, context-free consensus changes for CPourTx
...
* PourTxs cannot appear in coinbase transactions.
* Transactions can only contain empty vin/vouts if they contain a PourTx.
* PourTx public values must be well-formed (not negative or too large).
* Transactions cannot have the same serial twice throughout all PourTxs.
2016-01-19 14:36:04 -07:00
Sean Bowe
5884044ba9
Introduce vpour to CTransaction.
...
Transactions of version 2 and above contain a `vpour` field which is a vector of `CPourTx`
objects that embody our protocol. We introduce serialization primitives for boost::array
(we intend for changing the amount of inputs and outputs in the circuit to be simple).
SIGHASH_* operations hash this field like any other for now.
2016-01-19 14:35:59 -07:00
Sean Bowe
4cc1a6b2b6
Added calgary design doc with updated references to design.
2015-12-22 13:36:24 -07:00