Commit Graph

11291 Commits

Author SHA1 Message Date
Jack Grigg f5007d8912
When rewinding, remove insufficiently-validated blocks
If a block is insufficiently-validated against a particular branch ID, then we
cannot guarantee that even the block header will be valid under the actual
consensus rules the node will want to apply. Instead require that the blocks are
completely re-validated, by removing them from the block index (which is
equivalent to reducing their validity to BLOCK_VALID_UNKNOWN).
2018-04-03 10:58:31 +01:00
Jack Grigg fe87fd2b36
Add RPC test of RewindBlockIndex 2018-04-03 10:58:27 +01:00
Homu ca981fd442 Auto merge of #3080 - leto:jsindex, r=bitcartel
Return JoinSplit and JoinSplitOutput indexes in z_listreceivedbyaddress

This implements a feature request by @nathan-at-least in https://github.com/zcash/zcash/issues/2932 and I wanted to ask for feedback about the exact form of the data returned before updating tests and docs.
2018-04-03 00:30:11 -07:00
Jack Grigg 28915c30ca
Fix z_importviewingkey startHeight parameter
Closes #2937.
2018-04-03 02:43:52 +01:00
Jonathan "Duke" Leto afdd64c6ae Add tests for new JoinSplit keys returned by z_listreceivedbyaddress 2018-04-02 13:23:00 -07:00
Homu 65dedeeae3 Auto merge of #3131 - str4d:3096-cargo-checksum-fixes, r=daira
depends: Fix regex bugs in cargo-checksum.sh
2018-04-01 05:54:41 -07:00
Homu 347804fe73 Auto merge of #3106 - braddmiller:3046-mergetoaddress-concurrent, r=str4d
Add Note Locking to z_mergetoaddress

Adds note locking to `z_mergetoaddress` allowing it to be invoked multiple times before previous `z_mergetoaddress` operations have finished.

Reference issue [#3046](https://github.com/zcash/zcash/issues/3046)

Co-authored-by: Eirik Ogilvie-Wigley <eirik@z.cash>
2018-03-30 14:29:17 -07:00
Homu 1a9caa6ac1 Auto merge of #3127 - str4d:2688-mandatory-rust, r=ebfull
Make Rust compilation mandatory

The temporary integration check in CheckEquihashSolution() remains, until we
have "real" Rust code to integrate.

Closes #2688.
2018-03-30 12:58:34 -07:00
Jack Grigg 0e400c8854
depends: Fix regex bugs in cargo-checksum.sh 2018-03-30 19:06:51 +01:00
Homu 989e16e302 Auto merge of #3130 - bitcartel:upgrade_openssl_1.1.0h, r=str4d
Upgrade OpenSSL to 1.1.0h

Closes #3129
2018-03-30 10:02:15 -07:00
Homu 72f14060bc Auto merge of #3098 - str4d:2343-overwinter-disable-mempooltxinputlimit, r=str4d
Ignore -mempooltxinputlimit once Overwinter activates

Overwinter changes the SignatureHash function to solve the quadratic hashing problem, so this option will no longer be needed.
2018-03-30 08:33:58 -07:00
Simon 09bf7d2d3c Upgrade OpenSSL to 1.1.0h 2018-03-29 23:05:17 -07:00
Brad Miller 4e6400bc00 Implement note locking for z_mergetoaddress
Co-authored-by: Eirik Ogilvie-Wigley <eirik@z.cash>
2018-03-29 15:48:34 -06:00
Jack Grigg 9666cc912a Test calling z_mergetoaddress to merge notes while a note merge is ongoing 2018-03-29 15:38:26 -06:00
Jack Grigg b96f7d692d
wallet: Cast size_t to uint64_t before passing to UniValue 2018-03-29 01:05:45 +02:00
Jack Grigg 4ff92bb6d8
rpcwallet.cpp: Cast size_t to uint64_t before passing to UniValue 2018-03-29 01:02:58 +02:00
Jack Grigg 8e95a12b63
Cast ZCIncrementalMerkleTree::size() to uint64_t before passing to UniValue
size_t is ambiguous for serialization, and UniValue doesn't have an API for
handling this internally.
2018-03-28 19:51:48 +02:00
Homu 5bdce01848 Auto merge of #2913 - bitcartel:2910_z_listunspent, r=bitcartel
Closes #2910. Add z_listunspent RPC call.

Have tested on network.  Opening up for review.
2018-03-28 10:40:49 -07:00
Simon d72c19a662 Closes #2910. Add z_listunspent RPC call. 2018-03-28 10:38:57 -07:00
Jack Grigg f0118aaa0b
Add base case to CurrentEpoch() 2018-03-28 18:29:20 +02:00
Jack Grigg 792c05d8a9
Set PLATFORM flag when compiling libsnark 2018-03-28 18:29:19 +02:00
Jack Grigg 381a79a909
libsnark: Don't set -static on Darwin
Co-authored-by: kozyilmaz <kazim@monolytic.com>
2018-03-28 18:29:19 +02:00
Jack Grigg 4fe053e6e8
Move explicit instantiation of IncrementalMerkleTree::emptyroots into header
Fixes a -Wundefined-var-template warning with clang.
2018-03-28 18:29:19 +02:00
Jack Grigg 6c7930f688
Use uint64_t instead of size_t for serialized indices into tx.vjoinsplit
size_t has no guarantee of uniform size, and thus far has been serialized as a
uint64_t on supported platforms.
2018-03-28 18:29:19 +02:00
Jack Grigg d58ed91af0
Optimise serialization of MerklePath, avoiding ambiguity of std::vector<bool>
The serialization enforces a maximum supported Merkle tree depth of 64.

Closes #2831.
2018-03-28 18:26:08 +02:00
Jack Grigg d9cd254e5e
Make Rust compilation mandatory
The temporary integration check in CheckEquihashSolution() remains, until we
have "real" Rust code to integrate.

Closes #2688.
2018-03-28 17:55:45 +02:00
Homu 058efdbe0f Auto merge of #3124 - bitcartel:update_boost_url, r=str4d
Update boost package URL to match official download url on boost.org

Part of #3123.
2018-03-28 08:26:39 -07:00
Homu a08ad2b815 Auto merge of #3096 - str4d:2231-depends-vendor-rust-crates, r=str4d
depends: Explicitly download and vendor Rust dependencies

Closes #2231.
2018-03-28 07:01:39 -07:00
Jack Grigg 0adfdc99b2
depends: Explicitly download and vendor Rust dependencies
Closes #2231.
2018-03-28 15:46:51 +02:00
Homu 2c91e3ebc0 Auto merge of #3117 - charlieok:add_windows_rust_package, r=daira
Add filename and SHA256 hash for Windows Rust package

When running `make download` in the `depends` directory, the `download-win` target (which `download` depends on) generates an error when it runs the commands defined in `check_or_remove_sources`:

```Makefile
sha256sum: /home/vagrant/zcash/depends/work/download/rust-1.16.0/..hash: no properly formatted SHA256 checksum lines found
funcs.mk:242: recipe for target '/home/vagrant/gitian-builder/cache/common/download-stamps/.stamp_fetched-rust-.hash' failed
make[1]: *** [/home/vagrant/gitian-builder/cache/common/download-stamps/.stamp_fetched-rust-.hash] Error 1
make[1]: Leaving directory '/home/vagrant/zcash/depends'
Makefile:153: recipe for target 'download-win' failed
make: *** [download-win] Error 2
```

The reason for the error is that `depends/packages/rust.mk` defines `rust_file_name_linux` and `rust_file_name_darwin` but leaves `rust_file_name_mingw32` undefined.

A directory of available rust downloads is here: https://static.rust-lang.org/dist/index.html

The closest windows analog in that list (using the same version number as currently defined in `rust.mk`) appears to be `rust-mingw-1.16.0-x86_64-pc-windows-gnu.tar.gz`. A corresponding sha256 value is also given in `rust-mingw-1.16.0-x86_64-pc-windows-gnu.tar.gz.sha256`.

After adding these values to `rust.mk`, the rust-mingw tar package was downloaded along with the rest of the dependencies and the above error message went away.
2018-03-28 05:31:43 -07:00
Jack Grigg 31afbcc5c9
Ignore -mempooltxinputlimit once Overwinter activates 2018-03-28 14:25:42 +02:00
Homu fb26130787 Auto merge of #3109 - bitcartel:2966_extend_tests, r=str4d
Part of #2966, extending Sprout tests to other epochs.

Tests updated:
- test_Get
- test_simple_joinsplit_invalidity
2018-03-27 13:10:39 -07:00
Homu 99b6f76355 Auto merge of #3111 - bitcartel:3110_high_fee_error_reporting, r=bitcartel
Closes #3110.  Ensure user can see error message about absurdly high fees.
2018-03-27 10:33:52 -07:00
Simon 8b15afd315 Closes #3110. Ensure user can see error message about absurdly high fees. 2018-03-27 10:23:24 -07:00
Simon 2b0783792b Update boost package URL to match official download url on boost.org 2018-03-27 09:39:06 -07:00
Homu 9a6809a75b Auto merge of #3113 - bitcartel:update_boost_1.66.0, r=str4d
Update boost to 1.66.0

- Remove no longer required patch `deprecated_auto_ptr.patch`.
- Remove potentially no longer required patch `include_poll.patch`. This might cause a regression for unsupported platform Alpine Linux (see #1559)
2018-03-27 07:31:16 -07:00
Homu c24a617c40 Auto merge of #3120 - str4d:pyflakes-clean, r=daira
cleanup: Ensure code is pyflakes-clean for CI
2018-03-27 05:44:06 -07:00
Jack Grigg b466c1c90c
cleanup: Ensure code is pyflakes-clean for CI 2018-03-27 02:47:57 +02:00
Simon 68cc953012 Part of #2966, extending Sprout tests to other epochs.
Tests updated:
- test_Get
- test_simple_joinsplit_invalidity
2018-03-26 16:22:37 -07:00
Charlie O'Keefe de2c5e9be9 Add filename and sha256 hash for windows rust package 2018-03-26 14:52:58 -06:00
Jack Grigg 31e6dde842
snark: Remove -mt suffix from Boost library 2018-03-26 18:28:07 +02:00
Jack Grigg 1c4a74d40b
depends: Remove -mt suffix from Boost libraries
Requires disabling --build-type=complete, because in Boost 1.66 it appears to be
broken (only the tagged libraries are built).
2018-03-26 16:33:27 +02:00
Jack Grigg e6e4b619a9
Use correct Boost::System linker flag for libzcash 2018-03-26 16:22:35 +02:00
Jack Grigg e6a34c283a
Revert "remove -mt suffix from boost libraries built by depends"
This reverts commit 33ae5edd2c.
2018-03-26 16:20:55 +02:00
Simon bbcdabc28d Update boost to 1.66.0 2018-03-23 15:07:17 -07:00
Homu 4d6498b900 Auto merge of #3082 - str4d:overwinter-info, r=daira
Add link to Overwinter info page
2018-03-23 07:25:09 -07:00
Homu 8ed0346284 Auto merge of #3077 - str4d:asan-initialization-order-fiasco, r=str4d
Split declaration and definition of SPROUT_BRANCH_ID constant

Fixes an initialization-order-fiasco error detected by ASan:
https://ci.z.cash/#/builders/7/builds/149
2018-03-20 16:16:13 -07:00
Homu 64de921747 Auto merge of #3091 - bitcartel:cache_invalidation_qa, r=str4d
Closes #1988. Add qa test for cache invalidation bug found in v1.0.0 to v1.0.3.
2018-03-20 11:28:08 -07:00
Homu 70e2522306 Auto merge of #3090 - bitcartel:3084_log_expired_txid, r=bitcartel
Closes #3084.  Log txid when removing expired transactions from mempool.
2018-03-19 14:59:30 -07:00
Jack Grigg 7346f09026
Only set multicore flags if OpenMP is available 2018-03-19 17:32:21 +01:00