Commit Graph
92 Commits
Author SHA1 Message Date
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
zkbot f8b73015bc Auto merge of #1208 - bitcartel:z8_rpc_keys, r=daira
RPC calls to manage zkey creation, management and backup

Rebased on PR #1205 for keystore functionality.

For #1197, implements:
z_getnewaddress
z_importkey
z_exportkey

For #1198, spending key support added to:
z_exportwallet
z_importwallet

Example dump file containing zkeys:
https://gist.github.com/bitcartel/d7013b30b19419c6a550bc5d6ff6cc47

Also adds:
z_listaddresses

Tests in:
gtest/test_wallet_zkeys
test/rpc_wallet_tests
2016-08-25 13:49:05 +00:00
zkbot cca52f36df Auto merge of #1301 - bitcartel:zc.v0.11.2.latest_701_md_formatting, r=daira
Fix formatting of first paragraph of payment API document

The description of taddr and zaddr were bunched up one line.  This PR fixes the issue.

Self-ACK.  Please merge.
2016-08-25 10:09:56 +00:00
zkbot 2833fb14af Auto merge of #1291 - daira:decrease-max-headers-results, r=daira
Decrease MAX_HEADERS_RESULTS to 1000. fixes #1289

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-08-24 05:45:53 +00:00
zkbot cab581256f Auto merge of #1292 - bitcartel:zc.v0.11.2.latest_701_rpc_docs, r=daira
Closes #701 by adding documentation about the Payment RPC interface.

@daira Calls which might not make it into z9 are labelled (NOT IN Z9 ALPHA).
2016-08-24 05:05:11 +00: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
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
zkbot fed866e212 Auto merge of #1262 - ebfull:compressed-proofs, r=ebfull
Implement zkSNARK compression

Implement zkSNARK compression.

The serialization format of zkSNARKs has now been specified in our protocol specification. G1/G2 elements are now compressed into 33 byte and 65 byte formats, repsectively. `MONTGOMERY_OUTPUT` is enabled everywhere to make proving/verifying keys load faster and be consistent with the MPC.

Proofs are now 296 bytes. This PR also updates the proving and verifying keys.

Closes #1103. Closes #471.

See also https://github.com/zcash/libsnark/pull/3 and https://github.com/zcash/libsnark/pull/4
2016-08-23 02:11:30 +00:00
zkbot 07b246988b Auto merge of #1261 - str4d:892-branch-coverage, r=daira
Coverage report improvements
2016-08-23 00:19:48 +00: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
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
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
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
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
zkbot d7da4ecc33 Auto merge of #1194 - bitcartel:zc.v0.11.2.z8_issue_1193_fixtest, r=ebfull
Improve speed and accuracy of zcbenchmark validatelargetx

The verification test, in a loop, passes `spending_tx` (a `CMutableTransaction`) to the constructor of `MutableTransactionSignatureChecker`, which immediately uses it to create a non-mutable `CTransaction` object, which is used for the actual verification process.

Since `spending_tx` is not mutated during the verification loop & process, we can instead convert it to a `CTransaction` just once, and use it with `TransactionSignatureChecker`.

This removes the time to create `CTransaction` objects from the benchmark itself.

Results show an improvement in running time to complete the verification phase of the test and consistent times across z7 and z8 releases.

```
Benchmarks on i3 processor:
z7 old 228.67205900 --> z7 new 49.27225200
z7 old 229.90048900 --> z7 new 48.38650700
z8 old 295.77963800 --> z8 new 48.37695100
z8 old 294.32640100 --> z8 new 49.93216100
```
2016-08-14 21:21:58 +00: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
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
zkbot 76470978f4 Auto merge of #1172 - str4d:1148-remove-equihash-collision-length-assumption, r=bitcartel
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 probably
not what we want to specify.

Closes #1148
2016-08-05 16:53:28 +00:00
zkbot 9cc43696ec Auto merge of #1086 - zcash:daira-simplify-readme-title, r=bitcartel
README.md: simplify the title, drop "Core"

We only have one public tree.
2016-08-04 01:33:43 +00: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 1f7e1f68c6 Auto merge of #1157 - ThisIsNotOfficialCodeItsJustForks:t761-run-tests-under-valgrind, r=nathan-at-least
[WIP] Add more commands to run unit tests under valgrind.

This runs both zcash-gtest and test_bitcoin under valgrind. There's a corresponding PR to the buildbot config https://github.com/Electric-Coin-Company/bbotzc/pull/23. Closes #761.
2016-08-03 23:11:44 +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
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
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
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
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
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
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
zkbot b83061544f Auto merge of #1116 - ebfull:performance-check-valid-pour-fix, r=ebfull
Introduce `zcsamplejoinsplit` for creating a raw joinsplit description

We need this to generate joinsplits for use in the performance measurements. The current measurements for *memory usage* of verification are wrong now that we're computing the joinsplit before verifying: https://speed.z.cash/timeline/?exe=1&base=1%2B9&ben=memory+verifyjoinsplit&env=1&revs=50&equid=off&quarts=on&extr=on

This PR fixes that.
2016-07-20 00:03:46 +00:00
zkbot a1cded5b91 Auto merge of #1088 - ThisIsNotOfficialCodeItsJustForks:t1078-fix-sighash-bug-2, r=ebfull
Fix SIGHASH_SINGLE bug by removing in-band signalling.

Competes with #1079. Closes #1078.

**I FORCE PUSHED**
2016-07-19 23:39:06 +00:00
zkbot b5dfcd0fbb Auto merge of #1063 - ThisIsNotOfficialCodeItsJustForks:t898-remove-insecurely-downloaded-dependencies, r=ebfull
Remove insecurely-downloaded dependencies that we don't currently use.

Closes #898.
2016-07-19 23:14:06 +00:00
zkbot 741cf2cedf Auto merge of #1115 - ebfull:shorten-proving-key, r=ebfull
Remove the constraint system from the alpha proving key.

This removes the constraint system from the `z5-proving.key`, shortening it by about 35%. It appeared at the end of the file, which is why we didn't need to change public parameters in #1104.
2016-07-19 22:38:50 +00:00
zkbot 431604c7d9 Auto merge of #1094 - ThisIsNotOfficialCodeItsJustForks:t488-document-side-channel-attacks, r=ebfull
Add security warnings doc with warning about side channels.

Closes #5. Closes #785. Closes #488. Closes #784.

Let's only merge this once we're sure the warning is at least as strong as it needs to be (and thus sufficient to close those tickets).
2016-07-19 17:39:27 +00:00
zkbot d20d866d89 Auto merge of #1105 - bitcartel:zc.v0.11.2.z6_issue_424, r=ebfull
New private/public key pairs for broadcasting alert messages

Implements #424

Fixes and integrates method of sending alerts as described by upstream here:
- https://gist.github.com/laanwj/0e689cfa37b52bcbbb44

To send an alert:
- Copy private keys into alertkeys.h.
- Modify alert parameters and message found in sendalert.cpp
- Build and run to send the alert e.g. ./zcashd -printtoconsole -sendalert

Tested and verified with local nodes on alpha 6 testnet.
2016-07-18 21:09:46 +00:00
zkbot 4d459f93a4 Auto merge of #1090 - ebfull:rename-pour-and-serial, r=ebfull
Rename things to match protocol specification

This is a pass through the code to eliminate usage of "pour" and "serial" and any other outdated terminology.

Closes #602
2016-07-18 19:58:25 +00:00
zkbot e613014526 Auto merge of #1104 - ebfull:libsnark-updates, r=ebfull
Update libsnark

We have now forked libsnark's current master and applied the following patches:

* [`9216072`: Remove code that we don't use.](https://github.com/zcash/libsnark/commit/9216072c3b20d65359f4d5f3982c8270dab422b6) (unblocks #69)
* [`dcb78b2`: Modify makefile to stop compiling things we removed.](https://github.com/zcash/libsnark/commit/dcb78b24d9de86522f7f976741111e9e66804889)
* [`a6b0ad0`: Use libsodium's PRNG](https://github.com/zcash/libsnark/commit/a6b0ad0c801fe96d0e12e5961279cdf306a412fa) (closes #780)
* [`4036716`: Don't (de)serialize the constraint system in the proving key.](https://github.com/zcash/libsnark/commit/403671675ada05caf7446f9676fa3c54d5830325) (closes #491)
* [`a703148`: Taylor's compilation patch](https://github.com/zcash/libsnark/commit/a7031481fd8d2360337321401fe8e24f0359317a) (@defuse can you submit this to upstream?)

This PR adopts those changes, and makes the requisite changes to Zcash to support them. I have decided to not bring libsnark in tree for the time being, though it should be incredibly easy to do later if we're *absolutely* sure we should.
2016-07-18 18:04:56 +00:00
zkbot f30580744f Auto merge of #1059 - bitcartel:zc.v0.11.2.z5_getblocksubsidy, r=ebfull
Add getblocksubsidy RPC command to return block reward taking into account mining slow start

This PR adds a new RPC command to return the block reward as defined by function `GetBlockSubsidy`.

Usage:
`zcash-cli getblocksubsidy blockheight
`

The basis for this PR is that some users have been unaware of the mining slow start and they subsequently sought help to clarify if they were mining blocks correctly or if there was a bug in the reward schedule.
2016-07-17 16:19:39 +00:00
zkbot fc127fc2db Auto merge of #1051 - ThisIsNotOfficialCodeItsJustForks:t863-mock-coverage-of-checktransaction, r=ebfull
Add mock test coverage of CheckTransaction

Closes #863.
2016-07-14 18:43:07 +00:00
zkbot 4bcdd85583 Auto merge of #1047 - aniemerg:fix/get-difficulty-fix2, r=ebfull
Update GetDifficulty() to use consensus.powLimit from consensus parameters.

Fixes #1032.
2016-07-14 04:18:56 +00:00
zkbot 331cae91bc Auto merge of #1085 - zcash:daira-clang-cpp11, r=ebfull
.clang-format: change standard to C++11

A nitpick for folks who want to test with clang.
2016-07-14 03:08:55 +00:00
zkbot 42825a9f6a Auto merge of #979 - nathan-at-least:nathan.cleanup-nonofficial-tags, r=ebfull
A script to remove "unofficial" tags from a remote, such as github.

Officialness is determined by a regular expression. ;-)

This is handy because we often want upstream Bitcoin tags for local
diffs, but sometimes we accidentally upload them to github which then
claims they are our releases, which is confusing and misleading.
2016-07-13 02:23:14 +00:00
zkbot 2b75ad0bd4 Auto merge of #1089 - ThisIsNotOfficialCodeItsJustForks:t960-rename-zerocash-zcash, r=ebfull
Rename zerocash to zcash in places

Closes #960.
2016-07-13 01:51:22 +00:00
zkbot 46187fbe7a Auto merge of #1082 - ebfull:reorder-logs, r=ebfull
Reorder initialization routines to ensure verifying key log messages appear in debug.log.

Closes #721
2016-07-12 04:41:10 +00:00
zkbot 04932a64e8 Auto merge of #1080 - ebfull:performance-check-valid-pour, r=ebfull
Always check valid joinsplits during performance tests

This will generate a valid joinsplit instead of using one from an environment variable.
2016-07-11 22:38:25 +00:00
zkbot 6caacc892e Auto merge of #1058 - ebfull:coin-cache, r=ebfull
Flush to disk more consistently by accounting memory usage of serials/anchors in cache.

Closes #626.

It's important that this at least *approximates* the memory usage, so that we flush the cache to disk as expected. It's okay that we overestimate. The serials are stored in keys in the `boost::unordered_map`, so we can simply use that map's `DynamicMemoryUsage`. The anchors are another story.
2016-07-11 17:23:19 +00:00
zkbot ecef582339 Auto merge of #1061 - ebfull:remove-libzerocash-completely, r=ebfull
Remove the rest of libzerocash.

Closes #510.
2016-07-11 16:17:35 +00:00
zkbot 3c72ec710e Auto merge of #1044 - bitcartel:zc.v0.11.2.z5_issue_932, r=ebfull
Disable USE_ASM when building libsnark

For #932.
2016-07-09 17:36:19 +00:00
zkbot 89a9e46cc9 Auto merge of #1049 - str4d:equihash-faster-sort-comparison, r=bitcartel
Only compare the first n/(k+1) bits when sorting

We only need to sort based on the bits we are colliding. In earlier solver rounds, this speeds up the comparison considerably (calling `memcmp()` on 3 bytes instead of 12 in the first round for the current parameters).
2016-07-07 20:43:42 +00:00
zkbot 99edcaaf53 Auto merge of #1062 - ebfull:remove-mainnet-checkpoints, r=ebfull
Remove the mainnet checkpoints.

This removes the checkpoints from mainnet (just as we have with the other chain parameters).

Closes #695.
2016-06-30 17:56:28 +00:00
zkbot 16abefdd22 Auto merge of #1060 - str4d:1033-randomise-nonce, r=ebfull
Randomise the nonce in the block header

The top and bottom 16 bits of the nonce are left clear for local use as thread
flags and counters. This does not leak any more local information about the
miner than is currently exposed.

The cleared bits should not be considered a consensus rule, as miners are free
to set all bits of the nonce however they wish.

Closes #1033
2016-06-29 19:15:23 +00:00
zkbot 0df212bae3 Auto merge of #1046 - str4d:971-large-tx-benchmark, r=ebfull
Add performance tests for creating and validating a MAX_BLOCK_SIZE transaction

Closes #971.
2016-06-29 07:54:28 +00:00
zkbot 68b8b95c53 Auto merge of #962 - ebfull:2mb-blocks, r=ebfull
Increase block size limit to 2MB.

http://gavinandresen.ninja/a-guided-tour-of-the-2mb-fork

Closes #765.
2016-06-28 17:46:47 +00:00
zkbot 658cdb15f7 Auto merge of #1027 - ThisIsNotOfficialCodeItsJustForks:t862-trivial-mock-test-example, r=ebfull
Add example mock test of CheckTransaction

Closes #862.
2016-06-22 14:30:12 +00:00
zkbot 62a2d12672 Auto merge of #1026 - ebfull:address-serialization, r=ebfull
Zcash address encoding

We need to encode Zcash addresses so they aren't as large and unweildy. We're using Base58Check just like upstream does, and to ensure the first character is "z" in our addresses we must use two bytes for the version string. Two bytes gives us an extra character for free, so this PR targets the beginning of addresses to have "zc".

```
$ ./src/zcash-cli zcrawkeygen
{
    "zcaddress" : "tnvaj4ZbZG83tj4RwZcFeLgJoSt8nw1ZvSCG8EMyowAsXTQgJPat77Y43BVdVCrwrbLy7GG9msJDYdn5hmreHmkXAkX17hb",
    "zcsecretkey" : "SKzkxCRWvscKnroSFyhCqhY332KcDMH4LLNdK2TsSvbmr3CGAB8B",
    "zcviewingkey" : "10aa74046f31cbe5eaa8965d1e104853234c3d6c6e45f9c497ca3a025d159755"
}
```

This PR also encodes the spending keys with a prefix that targets "SK". The spec needs to be updated with these changes.

Testnet addresses will start with "tn".

Closes #572
2016-06-16 18:52:30 +00:00
zkbot 1178df0883 Auto merge of #1004 - str4d:931-difficulty-algorithm, r=ebfull
Implement new difficulty algorithm

Closes #931. Closes #696.
2016-06-15 23:26:49 +00:00
zkbot fe97a405e3 Auto merge of #994 - ebfull:remove-redundant-constraints, r=ebfull
Final changes to the circuit

* Remove [redundant](https://github.com/scipr-lab/libsnark/issues/37) bitness constraints that I pointed out in #908.
* The depth is increased from 20 to 29. I chose 29 because the QAP degree ends up being a power of two, which is probably going to be useful for the FFT in our MPC. (Closes #16)

If we're happy with depth 29 (over 268 million possible joinsplits), this will probably be the final change to the constraint system before 1.0.
2016-06-15 21:39:32 +00: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
zkbot c80ce72845 Auto merge of #1019 - ebfull:mempool-integrity-chained-pours, r=ebfull
Ensure mempool integrity checks don't trip on chained joinsplits.
2016-06-14 02:43:28 +00:00
zkbot 1a30d65859 Auto merge of #1008 - str4d:850-platform-independent-equihash, r=str4d
Implement Equihash in a platform-independent manner

Closes #850.
2016-06-13 21:48:56 +00:00
zkbot 47e6645005 Auto merge of #1009 - ThisIsNotOfficialCodeItsJustForks:t171-hard-fork-alerts-and-tests, r=ebfull
Enable -alertnotify for hard fork detection. Test it.

Closes #171. Closes #131.
2016-06-12 18:04:53 +00:00
zkbot 7232b5d70a Auto merge of #988 - str4d:optimised-equihash, r=ebfull
Use depth-first scan for eliminating partial solutions instead of breadth-first

This reduces the peak number of lists in-memory from 2^k to k, and enables the
solver to eliminate most duplicates before it has instantiated the full set of
leaves.

Part of #857.
2016-06-09 22:43:09 +00:00
zkbot b3418be123 Auto merge of #1005 - bitcartel:zc.v0.11.2.z4_issue_857_optimize, r=ebfull
Equihash - Optimization to DistinctIndices function (rebased PR)

Update to DistinctIndices function (for issue #857).
Replaces pull request #974.
2016-06-09 03:49:22 +00:00
zkbot 5d9f28cfc7 Auto merge of #1001 - str4d:904-disable-relaypriority, r=ebfull
Set -relaypriority default to false

This enables spending of individual coins during mining slow start.

Closes #904.
2016-06-08 18:07:05 +00: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
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
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
zkbot 212cdc4fa4 Auto merge of #972 - bitcartel:zc.v0.11.2.z3_issue_651_remove_bitcoin_seeds, r=ebfull
Remove Bitcoin mainnet and testnet seeds.

Simple patch for issue #651 to remove hard-coded mainnet and testnet seeds
- they currently point to bitcoin nodes
- some are .onion addresses but Tor support has not yet been added
- gets rid of error messages in debug.log which might confuse people testing the alpha builds
2016-05-27 18:55:42 +00: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
zkbot 8ff7c0752e Auto merge of #954 - ebfull:fix-cpourtx-structure, r=ebfull
CPourTx structural changes

* Enable binary serialization of proofs and the proving key (closes #799) and make the proofs fixed-size.
* Reorder fields of CPourTx to match the spec (closes #927)
2016-05-25 16:33:31 +00:00
zkbot 1f07deb5db Auto merge of #956 - ebfull:uint252, r=ebfull
Enforce first four bits are zero for all spending keys and phi.

This introduces a `uint252` to ensure these fields are 252-bits for the PRFs.

Closes #899
2016-05-25 14:59:00 +00:00
zkbot 9cf13a3e85 Auto merge of #955 - loxal:zc.v0.11.2.latest, r=ebfull
#776 add sha256sum support for Mac OS X
2016-05-24 03:47:03 +00:00
zkbot 4ac1841614 Auto merge of #958 - ebfull:prf-refactor, r=ebfull
Refactor PRF_gadget to hand responsibility to PRF_addr_a_pk_gadget for creating the '0' argument to the PRF

Closes #930
2016-05-24 01:11:44 +00:00
zkbot 0395055549 Auto merge of #961 - alfiedotwtf:zc.v0.11.2.latest, r=ebfull
Rename libzerocash to libzcash

Rename libzerocash to libzcash in Makefiles and source (C++ namespace) #960
2016-05-23 22:49:59 +00:00
zkbot a09517f313 Auto merge of #948 - nathan-at-least:t946.fix-cov-zcash, r=nathan-at-least
Fix a test name bug so that ``make cov-zcash`` correctly runs the ``zcash-gtest`` binary. Fixes #946.
2016-05-23 21:44:20 +00:00
zkbot 671b9562f1 Auto merge of #943 - str4d:938-clientversion, r=ebfull
Update version and help strings for Zcash

Closes #938.
2016-05-21 00:30:13 +00:00
zkbot 9e387120eb Auto merge of #908 - ebfull:trafford, r=ebfull
libzcash and new zkSNARK circuit implementation

This PR completes [`libzcash`](https://github.com/zcash/zcash/tree/zc.v0.11.2.latest/src/zcash), the implementation of the [Zcash protocol specification](https://github.com/zcash/zips/blob/9bb4410e45394c8b7e43e35622f54dd4041a4ddd/protocol/protocol.pdf) and replacement of [`libzerocash`](https://github.com/Zerocash/libzerocash), our old Zerocash protocol implementation. The new spec comes with some improvements to security and terminology, with minimal differences from the original academic design.

This implementation includes:

* A rewrite of the zkSNARK circuit for `JoinSplit` operations. This rewrite is cleaner, broken up into separate gadgets, easier to audit and review, and fixes some security bugs. (Closes #822, Closes #809, Closes #500, Closes #854)
* A minimal API for interacting with `JoinSplit`s and surrounding primitives. This PR removes almost twice as much code as it introduces. (Closes #877, Closes #315, Closes #824, Closes #798, Closes #707, Closes #512, Closes #247, Closes #128, Closes #514)
2016-05-17 01:04:49 +00:00
zkbot 35fd74e598 Auto merge of #924 - ebfull:init-sodium-gtest, r=ebfull
Initialize libsodium in the gtest suite.

We left behind this initialization routine when we switched to gtest. I would rather we had moved those tests over in a separate PR instead of changing existing PRs at the last second -- we would have paid more attention to the consequences.
2016-05-12 21:33:21 +00:00
zkbot c9a2eea5e2 Auto merge of #905 - ebfull:test-suite-fixes, r=ebfull
Run `zcash-gtest` in `make check` and fix performance tests.

* gtest tests weren't being run by make check
* performance tests were broken
* We need to automatically upload graphs of performance, [see this PR](https://github.com/Electric-Coin-Company/bbotzc/pull/15).
* Moves zerocash tests into `zcash`'s full test suite, we're removing them anyway later and it'd be nice to remove them in the PR instead of from buildbot
2016-05-05 23:29:34 +00:00
zkbot 87485d5ff3 Auto merge of #907 - DoNotUseThisCodeJUSTFORKS:t844-rename-bitcoin-conf, r=defuse
Rename bitcoin.conf and bitcoind.pid

This leaves the mentions of those files in `doc/` and `contrib/` unchanged.

**FORCE PUSHED**
2016-05-04 00:55:10 +00: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
zkbot 94f0dcddb4 Auto merge of #873 - nathan-at-least:t832-zc2-release, r=nathan-at-least
Update release process docs; release notes; clean up ./docs directory a bit.

closes #834
2016-04-13 00:12:35 +00:00
zkbot f2e157ab25 Auto merge of #846 - DoNotUseThisCodeJUSTFORKS:automated-performance-measurement-zcash-cli-method, r=ebfull
Automated performance measurement

Supersedes #843 because that one would have merged into the wrong branch. (Oh yeah and I rebased).

**REBASED AND FORCE PUSHED**
2016-04-11 21:56:12 +00:00
zkbot 4d322a4497 Auto merge of #831 - ebfull:foundersreward, r=nathan-at-least
Implement Founders' Reward

More info:  https://z.cash/blog/funding.html

The consensus rule is as follows:

```
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`.
```

Right now, `FOUNDERS_REWARD_SCRIPT` is a 2-of-3 multisig P2SH.

Closes #125
2016-04-11 19:21:41 +00:00
zkbot 9b7606fb6e Auto merge of #800 - str4d:592-disable-comparison-utility, r=defuse
Disable comparison utility

Also fixes `configure` to check that Java is present if `--with-comparison-tool` is set.

Closes #592
2016-04-01 00:02:59 +00:00