Commit Graph

14330 Commits

Author SHA1 Message Date
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
Ben Wilson b598691668 Added libtinfo5 to ci builder containers 2020-10-14 10:55:08 -04:00
Alfredo Garcia 52270f60ee
update function comment
Co-authored-by: str4d <thestr4d@gmail.com>
2020-10-14 11:08:21 -03:00
Homu 5bd2df92a5 Auto merge of #4784 - LarryRuane:auto-GetConsensus, r=str4d
performance: auto params = CChainParams::GetConsensus()

Closes #4676
For consistency, this PR fixes all occurrences (most are in test code).
2020-10-14 12:11:51 +00:00
Alfredo Garcia ea4c665daf simplify TestBlockValidity 2020-10-14 08:14:18 -03:00
Homu fb24911c55 Auto merge of #4570 - oxarbitrage:issue2783, r=daira
Add timestamp to warnings

Closes https://github.com/zcash/zcash/issues/2783 by adding timestamp to warnings.
2020-10-14 09:16:45 +00:00
Larry Ruane fbf2743163 performance: auto params = CChainParams::GetConsensus()
Co-authored-by: Kris Nuttycombe <kris@electriccoin.co>
No functional change.
Assignments from CChainParams::GetConsensus() shouldn't
be auto, or else the copy constructor runs, which is
slow for this structure. Where possible, replace auto
with const Consensus::Params&
2020-10-13 15:49:55 -06:00
Jack Grigg 5a1e6853c1 build: Add -lpthread to univalue test LDFLAGS
Fixes missing symbols when running the univalue test suite.
2020-10-13 19:38:40 +01:00
Jack Grigg e917cb614f build: Compile secp256k1 with C99
The secp256k1 library is intended to be C89-compatible. Targeting both
C89 and MinGW with Clang triggers this bug that is fixed in MinGW 8.0.0:
    bedff472af

Rather than requiring MinGW 8, we compile secp256k1 targeting C99.
2020-10-13 17:17:26 +01:00
Jack Grigg ab4033c49c depends: Fix boost::iostreams usage on Windows with libc++
Fixed upstream (but not yet in a Boost release):
    https://github.com/boostorg/iostreams/pull/106
2020-10-13 16:33:25 +01:00
Jack Grigg c691a8413f depends: Rename Boost libraries to follow MinGW/GCC convention
Boost uses the MSVC naming convention when building Windows libraries,
which causes issues with lld.
2020-10-13 15:29:01 +01:00
Homu b076c8dfc5 Auto merge of #4770 - nuttycom:fastsync, r=nuttycom
Add -ibdskiptxverification flag to allow faster synchronization.

Subsumes #4037
2020-10-13 13:54:05 +00:00
Daira Hopwood c6abcc4386
Use the current time as the timestamp if we override a misc warning. 2020-10-13 14:52:47 +01:00
Kris Nuttycombe a75c613ade Fix command-line help for -ibdskiptxverification 2020-10-13 07:18:51 -06:00
Jack Grigg 3973a16358 depends: Fix "unused variables" warning when compiling zeromq for Windows
Clang triggers that warning, which becomes an error due to -Werror.
2020-10-13 14:12:41 +01:00
Jack Grigg 2ca72adf8b build: Add missing LIBUNIVALUE to Makefile.bench.include LDADD 2020-10-13 14:12:41 +01:00
Jack Grigg 5ca4fbf8f6 build: Statically link libc++ 2020-10-13 14:12:41 +01:00
Jack Grigg fa54a1661a depends: Add multilib paths for Linux cross-compile 2020-10-13 14:12:41 +01:00
Jack Grigg 0887f64c90 depends: Don't replace default CXXFLAGS in C++ dependencies 2020-10-13 14:12:41 +01:00
Jack Grigg 1b96347867 depends: Add libc++ as a dependency
For mingw32:

- We use the binaries provided by MSYS2, which do not go back as far as
  libc++ 8. We use libc++ 9 here, matching the LLVM version we will be
  switching to in a subsequent commit (to match the LLVM version used by
  Rust 1.44). We manually specify the path to the libc++ headers,
  because they don't match the headers used by Clang itself.

- We now require at least mingw-w64 6.0.0, which fixes two Clang
  compilation bugs:
  - 1bd66b53be
  - 82b169c573

Darwin is ignored, as the Xcode SDK includes libc++.

For all other targets, we use the static libraries included in Clang
releases. We reuse the files we downloaded in native_clang for native
compilation, instead of fetching the archive twice.
2020-10-13 14:12:41 +01:00
Kris Nuttycombe 95e38235c7
Rename IBDSkipTxVerification back to ShouldCheckTransaction
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-10-12 15:38:07 -06:00
Homu acfa675941 Auto merge of #4778 - daira:no-nazis, r=daira
Beef up the CoC to address use of dog-whistles

This will make it easier to put a stop to the shitty alt-right memes (for example, [Clown World](https://rationalwiki.org/wiki/Clown_World) and similar memes) posted by a small minority of forum users. The problem is that these memes are specifically designed for plausible deniability. Therefore it may be difficult to prove intent — and the harm to contributors from affected groups is done regardless of intent.

Note: use of alt-right dog-whistles is a problem that we actually have. Memes used by tankies aren't great either but that's not a problem we have (and we could add something to address that if we ever did).

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-12 18:32:21 +00:00
Jack Grigg ff4cb00cb2 depends: Vendor LLD and use it for linking
We don't specify it for macOS, as we already pin a specific SDK there.
2020-10-12 18:10:16 +01:00
Jack Grigg 4abd76f70e depends: Use vendored Clang for macOS cross-compilation 2020-10-12 17:55:12 +01:00
Daira Hopwood d3330ab797 Fix warnings surfaced by compiling with clang++.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-12 17:55:12 +01:00
Jack Grigg d306b72be4 depends: Use vendored Clang for native compilation
Clang is used for compiling C/C++ dependencies, as well as the Zcash
binaries themselves. GCC is still required for compiling native
toolchain dependencies (such as ccache).
2020-10-12 17:55:12 +01:00
Jack Grigg d071e316e5 depends: Add Clang 8.0.0
We vendor only the subset of the Clang tarball that we require.
2020-10-12 17:55:12 +01:00
Homu 48d975f953 Auto merge of #4775 - str4d:postpone-rustc-updates, r=str4d
depends: Postpone current and scheduled Rust releases until 2021

We don't currently have a need for newer releases, and will likely be
pinning Rust for longer periods of time once we are also pinning Clang.
Rust releases occur every six weeks, so we can pre-emptively postpone
releases through the end of this year.
2020-10-12 16:02:22 +00:00
Homu a2f85199f0 Auto merge of #4779 - nathan-at-least:static-patchfile-bdb, r=str4d
depends: Use patch rather than sed in bdb package

This converts a sed command within a makefile into a static patch file in the
`./depends` system for `bdb`. We use `sed` in some dependencies to replace
some "dynamic" stuff, where regular expressions are necessary (such as to
remove build-non-reproducibility, I believe). However, whenever we can use a
patchfile, I feel that's superior because it's easier to manually read a patch
file and it's known that the change is "static".

Equivalent to the first commit in https://github.com/bitcoin/bitcoin/pull/19761
2020-10-12 10:55:23 +00:00
Nate Wilcox 5a47aa5350 Convert a sed command to a static patch file. 2020-10-12 11:58:28 +09:00