Commit Graph

6611 Commits

Author SHA1 Message Date
zkbot
10ad093bbb Auto merge of #1567 - str4d:rename-binaries, r=daira
Rename binaries

This ensures that our installs don't clash with existing Bitcoin binaries and libraries.

Closes #1563 and #1565
2016-10-21 20:48:11 -04:00
zkbot
dc21a8a39f Auto merge of #1578 - daira:1570.tromp-equihash-with-libsodium-blake.2, r=daira
1570.tromp equihash with libsodium blake.2

Remove BLAKE2b implementation from Tromp Equihash solver, and address almost all of @str4d's review comments on #1570. Supercedes #1576.

Signed-off-by: Daira Hopwood daira@jacaranda.org
2016-10-21 19:07:26 -04:00
zkbot
cd8e856df7 Auto merge of #1585 - bitcartel:1583_stop_test_writing_to_testnet3, r=daira
Closes #1583 by setting up the datadir for the wallet gtest.

Stops test writing to ~/.zcash/testnet3.
Also related to #1506
2016-10-21 03:15:00 -04:00
zkbot
c99a1c7e4f Auto merge of #1566 - daira:1557.make-v2-txns-standard, r=ageis
1557.make v2 txns standard

Make v2 transactions standard. This also corrects a rule about admitting large orphan transactions into the mempool, to account for v2-specific fields. ref #1557
2016-10-21 01:10:37 -04:00
zkbot
323b8214c2 Auto merge of #1580 - str4d:1378-repair-witness-cache, r=daira
Clear witness cache when re-witnessing notes

Closes #1378
2016-10-21 00:24:39 -04:00
Daira Hopwood
f19cb7b7ee Revert "Avoid boost::posix_time functions that have potential out-of-bounds read bugs. ref #1459"
This reverts commit a652e4183e.
2016-10-21 03:14:40 +01:00
Simon
ffd2cb3437 Closes #1583 by setting up the datadir for the wallet gtest. 2016-10-20 16:45:02 -07:00
zkbot
f90526579b Auto merge of #1569 - str4d:1552-disable-wallet-encryption, r=daira
Disable wallet encryption

Closes #1552
2016-10-20 17:01:51 -04:00
Daira Hopwood
5f0009b2d2 Assert that the Equihash solver is a supported option.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-20 21:17:34 +01:00
Daira Hopwood
f91bbeedb7 Add help for -equihashsolver= option.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-20 21:17:02 +01:00
Jack Grigg
d8e06e3f58 Add test that encryptwallet is disabled 2016-10-20 14:45:44 -05:00
zkbot
bb891cb4a2 Auto merge of #1571 - daira:1459.avoid-boost-posix-time, r=daira
Avoid boost::posix_time functions that have potential out-of-bounds read bugs

ref #1459

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-20 15:42:23 -04:00
Jack Grigg
1532cb75f3 Throw an error when encryptwallet is disabled 2016-10-20 12:58:20 -05:00
zkbot
b492ef3232 Auto merge of #1568 - str4d:1548-remove-block-index-tag, r=daira
Remove the RC 1 block index error message

Reverts 85457ddec1

Closes #1548
2016-10-20 13:57:23 -04:00
Daira Hopwood
a652e4183e Avoid boost::posix_time functions that have potential out-of-bounds read bugs. ref #1459
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-20 17:04:52 +01:00
Jack Grigg
1b407cba2b Add heights to log output 2016-10-20 11:02:15 -05:00
Jack Grigg
878c4b1b50 Clear witness cache when re-witnessing notes
Closes #1378
2016-10-20 10:32:20 -05:00
zkbot
0dfe612ff9 Auto merge of #1561 - str4d:778-randomise-note-order, r=daira
Randomize JoinSplit input and output orders

Closes #778.
2016-10-20 03:55:33 -04:00
Daira Hopwood
c7aaab7aa3 Integrate Tromp solver into miner code and remove its dependency on extra BLAKE2b implementation.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-20 06:03:16 +01:00
Daira Hopwood
ae10ed9c4f Add Tromp's implementation of Equihash solver
(as of tromp/equihash commit 690fc5eff453bc0c1ec66b283395c9df87701e93).

Author: John Tromp <john.tromp@gmail.com>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-20 06:00:30 +01:00
Daira Hopwood
0ee86d399e Changes to build on Alpine Linux.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-20 00:36:32 +01:00
Jack Grigg
aa36398b27 Add more assertions, throw if find_output params are invalid 2016-10-19 08:49:08 -05:00
Jack Grigg
62c0aa9e58 Disable wallet encryption
Closes #1552
2016-10-18 17:47:17 -05:00
Jack Grigg
d9d59f5176 Remove the RC 1 block index error message
Reverts 85457ddec1

Closes #1548
2016-10-18 17:19:54 -05:00
Jack Grigg
66a89c08df Rename bitcoin-tx to zcash-tx
Closes #1565
2016-10-18 16:45:43 -05:00
Jack Grigg
08d6b02d5e Rename libbitcoinconsensus to libzcashconsensus
Closes #1563
2016-10-18 16:45:37 -05:00
Daira Hopwood
e923e3ae0f Make v2 transactions standard.
This also corrects a rule about admitting large orphan transactions into the mempool, to account for v2-specific fields.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-18 19:37:55 +01:00
Daira Hopwood
71cc1b58a1 Add tests for IsStandardTx applied to v2 transactions.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-18 19:37:55 +01:00
Jack Grigg
328d39d29c Remove stale comment 2016-10-18 13:10:20 -05:00
Jack Grigg
3774c944f8 Refactor test code to better test JSDescription::Randomized() 2016-10-18 12:44:56 -05:00
Jack Grigg
2eeb6bebde Randomize JoinSplits in z_sendmany 2016-10-18 10:41:30 -05:00
Jack Grigg
7f0aa74666 Implement static method for creating a randomized JSDescription 2016-10-18 10:41:00 -05:00
Jack Grigg
0382417fee Implement MappedShuffle for tracking the permutation of an array 2016-10-18 00:20:47 -05:00
Simon
f7a624299d Update release version number for 1.0.0-rc1 2016-10-17 10:59:07 -07:00
Jack Grigg
6a7acc29a1 Set CBlockIndex.hashAnchor correctly in ConnectBlock 2016-10-17 11:09:24 -05:00
Jack Grigg
85457ddec1 Add clear error message for upgrading users 2016-10-17 09:55:02 -05:00
Jack Grigg
b6961fc112 Increment witnesses for new transactions on rescan
Closes #1400
2016-10-17 09:55:02 -05:00
zkbot
fd23341f1e Auto merge of #1547 - daira:1378-witness-cache-assertion-failure.1, r=bitcartel
Add more precise assertions in IncrementNoteWitnesses

Part of #1378
2016-10-17 03:00:19 -04:00
zkbot
98224d76f5 Auto merge of #1521 - zcash:gitian, r=bitcartel
Update Linux Gitian descriptor for building Zcash

Changes required to use the Gitian builder at https://github.com/zcash/zcash-gitian

Closes #540.
2016-10-17 01:55:03 -04:00
zkbot
4ee9d712b5 Auto merge of #1541 - str4d:upstream-gitian-updates, r=bitcartel
Upstream gitian updates

This PR pulls in all gitian-related PRs that have been merged upstream since 0.11.2. The only ones I left out were documentation-only PRs, because we removed `doc/gitian-building.md` at some point. Here are the commits applied here, in the order shown in `git log` (ie. last to first):

- bitcoin/bitcoin#7283
  - fa42a67
  - fa58c76
- bitcoin/bitcoin#8175
  - 74c1347
- bitcoin/bitcoin#8167
  - 7e7eb27
  - ad38204
  - b676f38
- bitcoin/bitcoin#7776
  - f063863
- bitcoin/bitcoin#7424
  - a81c87f ~ we already partly applied
  - a8ce872
  - f3d3eaf ~ we already partly applied
  - 475813b
  - ~~cd27bf5~~ X we already applied
- bitcoin/bitcoin#7060
  - 3b468a0 ~ we removed doc/gitian-building.md
  - ~~99fda26~~ X we removed doc/gitian-building.md
- bitcoin/bitcoin#7251
  - fa09562
- bitcoin/bitcoin#6900
  - ~~2cecb24~~ X we removed doc/gitian-building.md
  - 957c0fd
  - 2e31d74
  - ~~0b416c6~~ X we removed QT
  - 9f251b7
- bitcoin/bitcoin#6854
  - 579b863 ~ we already partly applied

Part of #540
2016-10-17 01:17:01 -04:00
Daira Hopwood
95e32d88b0 Add another assertion about the witness cache.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-17 05:09:27 +01:00
Daira Hopwood
8e41408aa7 Add another assertion to narrow down where the bug occurs.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-17 05:09:27 +01:00
Daira Hopwood
8a7d37befd Move the increment of nWitnessCacheSize to make the later assertions correct.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-17 05:09:27 +01:00
Jack Grigg
83d7b5b67b Add more asserts to track down the bug 2016-10-17 05:09:27 +01:00
zkbot
ec8dc3a88a Auto merge of #1431 - bitcartel:master_1373_taddr_coinbase_error, r=bitcartel
Return a more informative error message when trying to spend coinbase; select non-coinbase inputs when sending to a transparent output if needed

For #1373 and #1519

Code change:
- Extra parameter added to AvailableCoins to include or exclude Coinbase coins.  Default value of parameter is 'true' as current behaviour is to include Coinbase coins.
- SelectCoins, used for sending taddr->taddr, will now exclude Coinbase coins.

Unit test:
Tried to write a test to focus on the extra parameter added to AvailableCoins but could not.

Empirical testing on Testnet:
Current behaviour is that upstream RPC commands sendfrom and sendtoaddress try to spend coinbase coins returned by AvailableCoins.  So the user will see:

```
./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."}

./zcash-cli sendfrom "" mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."}
```

After fix is applied:

```
./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Coinbase funds can only be sent to a zaddr"}
```

When non-coinbase UTXOs exist, they will now be selected and used:

```
./zcash-cli z_sendmany tnPJZHeVxegCg91utaquBRPEDBGjozfz9iLDHt7zvphFbZdspNgkTVLCGjDcadQBKNyUwKs8pNjDXuEZKrE1aNLpFwHgz4t '[{"address":"mx5fTRhLZwbYE7ZqhAPueZgQGSnwTbdvKU", "amount":0.01}]'

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
9818e543ac2f689d4ce8b52087607d73fecd771d45d316a1d9db092f0485aff2

./zcash-cli sendfrom "" mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
899f2894823f51f15fc73b5e0871ac943edbe0ff88e1635f86906087b72caf30
```
2016-10-16 22:08:07 -04:00
Simon
2b1cda3b6a Return improved error message when trying to spend Coinbase coins (#1373).
Extra parameter added to AvailableCoins to include or exclude Coinbase coins.
SelectCoins, used for sending taddr->taddr, will exclude Coinbase coins.

Added qa rpc test and a runtime parameter -regtestprotectcoinbase to enforce
the coinbase->zaddr consensus rule in regtest mode.
2016-10-16 19:05:56 -07:00
Jack Grigg
6e263a5fd3 Address review comments 2016-10-16 16:26:51 -05:00
Kevin Gallagher
b2ba9d64ed Adds json_test_vectors.h to zcash_gtest_SOURCES 2016-10-15 15:57:11 -05:00
Kevin Gallagher
2f3ecb4422 Adds zcbenchmarks.h to libbitcoin_wallet_a_SOURCES 2016-10-15 15:57:11 -05:00
Kevin Gallagher
58d09f27f5 Adds files in src/zcash/circuit to libzcash_a_SOURCES 2016-10-15 15:57:11 -05:00