Commit Graph

14259 Commits

Author SHA1 Message Date
Jack Grigg 47c0c65326 Improve reject reasons for unmet shielded requirements
These reject messages end up bubbling up to users via the RPC interface.
Distinguishing between the various failure cases will help users figure
out why their transaction is being rejected.

Uses operator* instead of std::optional::value because the latter was
introduced in macOS 10.14, and our current minimum is 10.12.

Closes zcash/zcash#3114.
2020-10-23 20:16:07 +01:00
Homu 693def7bac Auto merge of #4733 - nathan-at-least:download-stamp-native_rust-fix, r=daira
depends download: fix a logging bug for multi-archive packages:

No documentation change needed.

The test plan appears below. Since this bug output should appear on all builds without a pre-existing source cache, then an easier test plan might be to verify the bug output is not present from an infrastructure build log that doesn't rely on cached sources.

# Bug Behavior

While initially fetching packages, I saw `sh: test:` error messages in the make output for only two packages. However, it appears all packages are correctly fetched.

See detailed output appendix for demonstration of the bug output and conditions compared to with this patch for the same conditions.

# Analysis

## Design Requirements

The intent of the `check_or_remove_sources` is to fetch sources if either existing archive hashes do not match or the archives aren't present.

Additionally, this should report hash mismatches and be quiet about missing files.

## Bug Source

The second design requirement goal has a bug for multi-archive packages which define `$(package)_extra_sources)` because `test -f $($(package)_all_sources)` passes more than one argument to `test -f` which is not supported. If sha256sum fails in any case for multi-archive packages, a `sh: test` error line is always printed.

Aside from this spurious output, this bug has no effect, I believe. Fortunately this bug does not bypass the hash check!

## Testing

I tested this patch manually by running the same three tests against the `v4.0.0` tag and then again repeating those same three steps with this patch. In all 6 cases I visually inspected the output.

1. Starting with a pre-downloaded source cash, run the `download` target.
2. Remove an archive from a multi-archive package, then rerun `download`.
3. Alter a hash to cause a hash mismatch condition, then rerun `download`.

I believe after each step both with and without this patch the resulting source cache should be identical (except for filesystem timestamps).

### Testing v4.0.0 without this patch

Notice in the second and third steps the same bug output:

```
/bin/sh: 1: test: rust-std-1.42.0-x86_64-apple-darwin.tar.gz: unexpected operator
```
2020-10-23 15:43:57 +00:00
Homu 888039caf1 Auto merge of #4808 - nuttycom:fix_release_notes, r=daira
Update other incorrect uses of `python` instead of `python3`

This also adds explicit replacement of invalid characters in file read/write operations.
2020-10-22 19:07:35 +00:00
Kris Nuttycombe 4567e6f5fb Replace invalid characters in log message decoding. 2020-10-22 10:20:24 -06:00
Homu d264471f2a Auto merge of #4807 - nuttycom:release-fix-updatecheck, r=nuttycom
Fix invocation of updatecheck.py in make-release.py
2020-10-22 13:54:05 +00:00
Kris Nuttycombe b28c5353e2 Fix invocation of updatecheck.py in make-release.py 2020-10-22 07:44:08 -06:00
Nate Wilcox 94fa873853 depends: fix a logging bug for multi-archive packages.
While initially fetching packages, I saw `sh: test:` error messages in the make output for only two packages.
However, it appears all packages are correctly fetched.

I tested this patch manually by running these three tests against the `v4.0.0` tag and then with this patch.
In all 6 cases I visually inspected the output.

1. Starting with a pre-downloaded source cash, run the `download` target.
2. Remove an archive from a multi-archive package, then rerun `download`.
3. Alter a hash to cause a hash mismatch condition, then rerun `download`.

I believe after each step both with and without this patch the resulting source cache should be identical
(except for filesystem timestamps).

Co-authored-by: Nathan Wilcox <nathan@electriccoin.co>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-22 14:43:22 +01:00
Homu afe85096cb Auto merge of #4803 - therealyingtong:postpone-ccache, r=therealyingtong
Postpone native_ccache 4.0
2020-10-21 23:12:45 +00:00
Homu cafc622a22 Auto merge of #4757 - str4d:update-secp256k1, r=str4d
Update secp256k1

This migrates us to the same dependency version that upstream Bitcoin
Core migrated to in bitcoin/bitcoin#19944.

Also enables the endomorphism optimization now that the patents have
expired.
2020-10-21 16:55:47 +00:00
therealyingtong d8f20860de Postpone native_ccache 4.0 2020-10-21 23:15:19 +08:00
Homu 43ab084854 Auto merge of #4611 - str4d:c++17, r=str4d
Require and build with C++17

Closes zcash/zcash#4607.
2020-10-20 14:28:42 +00:00
Jack Grigg d0cb0b74aa Switch from std::random_shuffle to std::shuffle
std::random_shuffle is removed in C++17; it is replaced by std::shuffle,
which was introduced in C++11. The new ZcashRandomEngine class provides
the Uniform Random Number Generator interface, as inferred from
std::random_device.
2020-10-20 13:58:23 +01:00
Daira Hopwood c656ae1303 Add new copyright entries for build-aux/m4/ax_cxx_compile_stdcxx.m4
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-20 13:55:14 +01:00
Jack Grigg 9052751c21 depends: Build C++ dependencies with C++ 17 2020-10-20 13:55:14 +01:00
Jack Grigg 9d1a11a0e4 build: Require and build with C++ 17 2020-10-20 13:55:14 +01:00
Jack Grigg 40a5bdfc76 build: Update AX_CXX_COMPILE_STDCXX macro 2020-10-20 13:55:14 +01:00
Homu de5c28b4b7 Auto merge of #4613 - str4d:claaaaaang, r=daira
Pin Clang for all compilation

fixes #2513, fixes #4697, fixes #4698, fixes #4699. refs #4607, #4292
2020-10-20 11:15:47 +00:00
Homu 8fa19fd50d Auto merge of #4794 - LarryRuane:allow-getaddressutxos, r=daira
allow getaddressutxos if -lightwalletd

The wallets need to be able to retrieve, via lightwalletd, the UTXO set for a given address, see https://github.com/zcash/lightwalletd/issues/312. The `getaddressutxos` rpc that was added for Insight Explorer is perfect for this, but this rpc is disabled when only `-lightwalletd` is enabled (that is, it requires `-insightexplorer`, which is a superset of `-lightwalletd`). However, the `DB_ADDRESSUNSPENTINDEX` index that supports this rpc is present when only `-lightwalletd` is enabled. This was probably a (fortuitous, as it turns out) oversight. So all that's required is to allow this rpc when `-lightwalletd` is enabled.
2020-10-20 09:31:39 +00:00
Homu 0dc05a7722 Auto merge of #4790 - therealyingtong:add-addresses-getblocksubsidy, r=daira
Add funding stream addresses to getblocksubsidy RPC output

Closes #4728.
2020-10-20 08:18:01 +00:00
str4d eaed8d5797
depends: Add untested note to FreeBSD host
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-10-19 20:19:00 +01:00
Homu 162de8b260 Auto merge of #4800 - daira:contextualchecktx-cleanups, r=str4d
Comment and error message cleanups for transaction checks

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-19 19:14:03 +00:00
Larry Ruane 083a05b04f allow getaddressutxos if -lightwalletd 2020-10-19 11:26:16 -06:00
therealyingtong 0940bc0c23 Remove void declaration of ScriptPubKeyToJSON() 2020-10-19 23:41:13 +08:00
Homu 2d2dc2c888 Auto merge of #4799 - daira:fix-gtests-displayduration, r=str4d
Fix integer types in DisplayDuration

After this, `src/zcash-gtest --gtest_filter='Metrics*'` passes on a native macOS build.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-19 15:27:40 +00:00
Daira Hopwood 72a0107708 Comment and error message cleanups for transaction checks.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-19 14:56:59 +01:00
Daira Hopwood f2d7fd6323 contrib/devtools/symbol-check.py: add info about Fedora-based distributions.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-19 14:47:29 +01:00
Daira Hopwood d54d4d083e Update contrib/devtools/symbol-check.py
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-19 14:47:29 +01:00
Daira Hopwood e0b3913356 Rename `time` to `duration` in `DisplayDuration`.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-19 12:05:47 +01:00
Daira Hopwood a6822edfd8 Fix integer types in DisplayDuration.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-19 11:51:55 +01:00
therealyingtong 6f3c29e9b7 Only return address instead of CScript 2020-10-19 10:04:19 +08:00
Homu 921e886748 Auto merge of #4797 - daira:log2-cleanup, r=str4d
log(x)/log(2.0) can be written as log2(x)

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-18 14:20:36 +00:00
Daira Hopwood 7a1ed861c2 log(x)/log(2.0) can be written as log2(x).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-18 15:03:30 +01:00
ying tong e60c2bf17c
Apply suggestions from code review
Co-authored-by: Larry Ruane <larry@z.cash>
2020-10-17 13:27:38 +08:00
Homu 1c91003a51 Auto merge of #4787 - benzcash:ci-builders-libtinfo5, r=str4d
Added libtinfo5 to ci builder containers

- Updated apt list for Debian and Ubuntu images.
- made the image creation script executable
- Fixed `bbworker-buildbot.tac` in Centos Dockerfile

This is to support Clang 8  https://github.com/zcash/zcash/pull/4613

You can test it with the images on Docker Hub now something like:
```
docker run --rm -ti --entrypoint bash electriccoinco/zcashd-bbworker-debian9
git clone https://github.com/str4d/zcash.git
cd zcash/
git checkout claaaaaang
./zcutil/build.sh -j4
```
```
docker run --rm -ti --entrypoint bash electriccoinco/zcashd-bbworker-debian10
git clone https://github.com/str4d/zcash.git
cd zcash/
git checkout claaaaaang
./zcutil/build.sh -j4
```
```
docker run --rm -ti --entrypoint bash electriccoinco/zcashd-bbworker-ubuntu18.04
git clone https://github.com/str4d/zcash.git
cd zcash/
git checkout claaaaaang
./zcutil/build.sh -j4
```
```
docker run --rm -ti --entrypoint bash electriccoinco/zcashd-bbworker-ubuntu20.04
git clone https://github.com/str4d/zcash.git
cd zcash/
git checkout claaaaaang
./zcutil/build.sh -j4
```
```
docker run --rm -ti --entrypoint bash electriccoinco/zcashd-bbworker-centos8
git clone https://github.com/str4d/zcash.git
cd zcash/
git checkout claaaaaang
./zcutil/build.sh -j4
```
```
docker run --rm -ti --entrypoint bash electriccoinco/zcashd-bbworker-arch
git clone https://github.com/str4d/zcash.git
cd zcash/
git checkout claaaaaang
./zcutil/build.sh -j4
```
2020-10-16 23:49:44 +00:00
therealyingtong 4e50b700e9 Minor cleanups 2020-10-17 03:13:19 +08:00
therealyingtong 719c117f1c Handle shielded address case 2020-10-17 03:08:37 +08:00
therealyingtong 6c41d1da05 Fix CScript encoding 2020-10-17 02:35:39 +08:00
Homu ceb642550b Auto merge of #4789 - daira:4785-macos-tests, r=str4d
Test suite portability fixes for macOS

Fixes zcash/zcash#4785
2020-10-16 17:06:40 +00:00
therealyingtong cec67e90c5 Add funding stream addresses to getblocksubsidy RPC output 2020-10-16 23:57:04 +08:00
Homu 98daea8153 Auto merge of #4791 - str4d:pyflakes-fixes, r=str4d
test: Fix various pyflakes warnings

These started being detected after updates to the CI workers.
2020-10-16 15:50:30 +00:00
Jack Grigg 11baa4d49d doc: Add Clang and libc++ migration to release notes 2020-10-16 16:48:56 +01:00
Jack Grigg ee079a683b test: Fix various pyflakes warnings 2020-10-16 16:00:02 +01:00
Jack Grigg ea7d57aa47 QA: Add native_clang and libcxx to updatecheck.py 2020-10-16 15:43:50 +01:00
Daira Hopwood c06cc5854e qa/zcash/full_test_suite.py: print immediately if a test fails.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-16 03:58:31 +01:00
Daira Hopwood f85ed2741c qa/zcash/full_test_suite.py: changes needed for macOS. fixes #4785
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-16 03:57:57 +01:00
Ben Wilson 172b26991e Build python for debian9 and ubuntu16.04 2020-10-15 19:50:29 -04:00
Ben Wilson c6f9215c04 Fixed Centos and Arch python requirements 2020-10-15 17:24:21 -04:00
Ben Wilson 1271afa354 Added Arch and Centos to script, added libtinfo5 for arch 2020-10-15 12:19:28 -04:00
Jack Grigg bf450b2607 qa: Disable FORTIFY_SOURCE checks
FORTIFY_SOURCE does mostly nothing for Clang before 10, which we don't
pin yet (and won't before we next upgrade Rust).
2020-10-14 21:52:32 +01:00
Homu 03e68a3ed8 Auto merge of #4782 - oxarbitrage:issue4769, r=str4d
simplify `TestBlockValidity()`

Closes https://github.com/zcash/zcash/issues/4769
2020-10-14 15:33:42 +00:00