Commit Graph

14255 Commits

Author SHA1 Message Date
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
Homu 3c8ce84d24 Auto merge of #4777 - daira:fix-bind-warning, r=str4d
Fix a new warning about use of boost::bind placeholders after updating Boost

closes #4774

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-12 01:04:01 +00:00
Daira Hopwood 60164a17e6 Beef up the CoC to address use of dog-whistles.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-11 08:24:37 +01:00
Daira Hopwood acf2d07189 Fix a new warning about use of boost::bind placeholders after updating Boost. closes #4774
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-10 21:41:46 +01:00
Kris Nuttycombe 88a7dd59c0 Reject incompatible flags in "Step 2" 2020-10-09 11:54:06 -06:00
Kris Nuttycombe 8a2aaebd7e Ensure conflicting flags are reported as an error. 2020-10-09 11:48:23 -06:00
Kris Nuttycombe 2c051acae5
Apply suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2020-10-09 11:44:15 -06:00
Homu ebc8de390c Auto merge of #4776 - str4d:logging-files, r=str4d
MOVEONLY: Move logging code from util.{h,cpp} to new files

Based on bitcoin/bitcoin#13021 but implemented from scratch.

This introduces a cyclic dependency between `logging` and `util` that
should be cleaned up in a future PR.
2020-10-09 16:16:51 +00:00
Kris Nuttycombe f0c24bd9f9 -ibdskiptxverification must imply -checkpoints 2020-10-09 09:45:31 -06:00
Jack Grigg b42582395b MOVEONLY: Move logging code from util.{h,cpp} to new files
Based on bitcoin/bitcoin#13021 but implemented from scratch.

This introduces a cyclic dependency between `logging` and `util` that
should be cleaned up in a future PR.
2020-10-09 16:32:02 +01:00
Kris Nuttycombe 293af68ebb
Apply style suggestions from code review
Co-authored-by: str4d <thestr4d@gmail.com>
2020-10-09 08:54:16 -06:00
Jack Grigg cd68450174 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-09 12:42:32 +01:00
Homu e2d3533de3 Auto merge of #4773 - str4d:4651-combined-params-init, r=daira
FFI: Merge librustzcash_init_zksnark_params variants into one function

Rust 1.39.0 added support for attributes on function parameters.

Closes #4651.
2020-10-09 11:15:40 +00:00
Homu ce26c21fb4 Auto merge of #4772 - daira:log-invalid-notept, r=daira
Add logging when we receive an invalid note plaintext (using the "receiveunsafe" log category)

fixes #4735

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-08 23:35:53 +00:00
Kris Nuttycombe 91172401ac Reduce diff complexity. 2020-10-08 16:34:00 -06:00
Jack Grigg 508aadd2f3 FFI: Merge librustzcash_init_zksnark_params variants into one function
Rust 1.39.0 added support for attributes on function parameters.

Closes #4651.
2020-10-08 22:50:57 +01:00
Homu 6e4090d840 Auto merge of #4766 - str4d:update-zeromq, r=str4d
Update ZeroMQ

Includes changes cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#9254
- bitcoin/bitcoin#13578
- bitcoin/bitcoin#15844
- bitcoin/bitcoin#16370
  - Only the ZeroMQ changes.
- bitcoin/bitcoin#16949
2020-10-08 17:37:41 +00:00
Daira Hopwood 007de07745 Add logging when we receive an invalid note plaintext (using the "receiveunsafe" log category).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-08 14:29:23 +01:00
str4d a5c2daf618
depends: Update packages documentation for Zcash
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-10-08 14:15:03 +01:00
Kris Nuttycombe fd841a1b81 Remove redundant CheckBlock calls.
This change unifies handling of the -ibdskiptxverification
flag and ensures consistent handling of checkpoint heights
when evaluating whether transaction verification may be skipped.

This change also removes two redundant CheckBlock calls. This
change is consensus-critical and requires 3 reviews.
2020-10-07 13:07:34 -06:00
Aditya Kulkarni 0b4395d275 Add a config option to skip transaction verification in IBD mode 2020-10-07 10:42:15 -06:00
Jack Grigg 7c9fa28274 depends: ZeroMQ 4.3.3 2020-10-06 00:03:21 +01:00
fanquake 3c4f9d383f build: pass --enable-option-checking to applicable packages 2020-10-05 23:48:58 +01:00
fanquake 3420f0171e build: only pass --disable-dependency-tracking to packages that understand it
By blanket passing --disable-dependency-tracking to all depends packages
we end up with some warnings like:

configure: WARNING: unrecognized options: --disable-dependency-tracking

So instead, only pass it to packages that understand it.

Related to https://github.com/bitcoin/bitcoin/issues/16354.
2020-10-05 23:46:38 +01:00
fanquake 13f0e7874a depends: zeromq: disable draft classes and methods 2020-10-05 23:42:15 +01:00
Carl Dong 84dfe68465 depends: Purge libtool archives
We use pkg-config where we can, which generally replaces libtool at a
higher level and does not have the same downsides as libtool. These
archives sit in our depends tree with no purpose and pollute the final
bitcoin build with massive overlinking.
2020-10-05 23:37:09 +01:00