Commit Graph

14788 Commits

Author SHA1 Message Date
Jack Grigg 8cfbabd6ed Set up an mdbook in which we can document zcashd's architecture design
I've explained various parts of zcashd's node architecture enough times
now that it really should be written down!
2021-01-27 17:16:34 +00:00
Matt Corallo 8982265456 Fix unlocked access to vNodes.size() 2021-01-26 11:39:45 -07:00
Matt Corallo 6da9ecda03 Remove double brackets in addrman 2021-01-26 10:48:18 -07:00
Matt Corallo 5123af41d6 Fix AddrMan locking 2021-01-26 10:40:50 -07:00
Matt Corallo e78376b4fe Make fImporting an std::atomic 2021-01-26 10:39:37 -07:00
Matt Corallo e286250ce4 Make fDisconnect an std::atomic 2021-01-26 10:23:32 -07:00
Jack Grigg 90232f65ae Rename libzcashconsensus.la -> libzcash_script.la 2021-01-25 22:20:25 +00:00
Jack Grigg ea8065917e Rename zcashconsensus_* -> zcash_script_* in APIs 2021-01-25 22:20:25 +00:00
Jack Grigg c5e7b84e9b Rename src/script/zcashconsensus.* -> src/script/zcash_script.* 2021-01-25 22:20:25 +00:00
Jack Grigg 308bb1083a Add amount and consensus branch ID to zcashconsensus_verify_script
We didn't initially expose these because we assumed that this API was
likely being used somewhere in the ecosystem. However, the build system
for libzcashconsensus has been broken since 2018, and no issues were
raised, which strongly indicates that this API is not currently in use.
2021-01-25 22:20:25 +00:00
Jack Grigg 2e4edc507d Remove crypto/equihash from libzcashconsensus
This library (in the version we inherited from Bitcoin Core 0.11.2) is
entirely focused on transparent script verification; a full Equihash
solver is out of scope. Now that Heartwood has activated, the canonical
Equihash validator is the Rust implementation in the equihash crate.
2021-01-25 22:20:25 +00:00
Taylor Hornby 92da71b0fe Document the required .updatecheck-token file in the release docs 2021-01-25 13:48:02 -07:00
Homu ce5d8daae6 Auto merge of #4961 - str4d:leveldb-1.22-prep, r=str4d
Prepare for LevelDB 1.22 update

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#7944
- bitcoin/bitcoin#8604
  - Only the first commit (we removed the upstream build documentation).
- bitcoin/bitcoin#12294
  - Only the third commit.
- bitcoin/bitcoin#13659
- bitcoin/bitcoin#16110
2021-01-25 20:11:31 +00:00
Karel Bilek 82b40d080e scripted-diff: Use UniValue.pushKV instead of push_back(Pair())
-BEGIN VERIFY SCRIPT-
git grep -l "push_back(Pair" | xargs sed -i "s/push_back(Pair(\(.*\)));/pushKV(\1);/g"
-END VERIFY SCRIPT-
2021-01-25 19:50:54 +00:00
Jack Grigg 36e86d3c69 Merge commit '9e26ae1c78fe62e23dcca7b22e1cd1a42b45dd25' into univalue-update 2021-01-25 19:50:54 +00:00
Homu 7580890dc1 Auto merge of #4959 - str4d:dependency-updates, r=str4d
Dependency updates

Boost is reverted to 1.74 to mitigate #4945 until a fix is found.
2021-01-25 19:20:45 +00:00
Taylor Hornby 45392c2215 Move the github API token out of updatecheck.py into an untracked file. 2021-01-25 10:06:43 -07:00
Jack Grigg 9e26ae1c78 Squashed 'src/univalue/' changes from 9ef5b78c1..98fadc090
98fadc090 Merge #24: Push bool into array correctly
5f03f1f39 Push bool into array correctly
98261b1e7 Merge #22: Clamp JSON object depth to PHP limit
54c401541 Clamp JSON object depth to PHP limit
5a58a4667 Merge #21: Remove hand-coded UniValue destructor.
b4cdfc4f4 Remove hand-coded UniValue destructor.
7fba60b5a Merge #17: [docs] Update readme
4577454e7 Merge #13: Fix typo
ac7e73cda [docs] Update readme
7890db99d Merge #11: Remove deprecated std pair wrappers
40e34852a Merge #14: Cleaned up namespace imports to reduce symbol collisions
4a4964729 Fix typo
85052a481 Remove deprecated std::pair wrappers
51d3ab34b Merge #10: Add pushKV(key, boolean) function (replaces #5)
129bad96d [tests] test pushKV for boolean values
b3c44c947 Pushing boolean value to univalue correctly
07947ff2d Merge #9: [tests] Fix BOOST_CHECK_THROW macro
ec849d9a2 [tests] Fix BOOST_CHECK_THROW macro
d208f986d Cleaned up namespace imports to reduce symbol collisions
31bc9f5a4 Merge #8: Remove unused Homebrew workaround
fa042093d Remove HomeBrew workaround
a523e08ae Merge #7: Declare single-argument (non-converting) constructors "explicit"
a9e53b38b Merge #4: Pull upstream
fe805ea74 Declare single-argument (non-converting) constructors "explicit"
8a2d6f1e3 Merge pull request #41 from jgarzik/get-obj-map
ba341a20d Add getObjMap() helper method.  Also, constify checkObject().
ceb119413 Handle .pushKV() and .checkObject() edge cases.
107db9829 Add ::push_back(double) method for feature parity.
d41530031 Move one-line implementation of UniValue::read() to header.
52e85b35b Move exception-throwing get_* methods into separate implementation module.
dac529675 README.md: update code quotes
3e31dcffb README.md: close code quote
d09b8429d Update README.md
f1b86edb4 Convert README to markdown style.
1dfe464ef Import UniValue class unit tests from bitcoin project.
0d3e74dd1 operator[] takes size_t index parameter (versus unsigned int)
640158fa2 Private findKey() method becomes size_t clean, and returns bool on failure.
709913585 Merge pull request #36 from ryanofsky/pr/end-str
4fd5444d1 Reject unterminated strings
16a1f7f6e Merge #3: Pull upstream
daf1285af Merge pull request #2 from jgarzik/master
f32df99e9 Merge branch '2016_04_unicode' into bitcoin
280b191cb Merge remote-tracking branch 'jgarzik/master' into bitcoin
2740c4f71 Merge branch '2015_11_escape_plan' into bitcoin
REVERT: 9ef5b78c1 Use size_t for UniValue array indexing

git-subtree-dir: src/univalue
git-subtree-split: 98fadc090984fa7e070b6c41ccb514f69a371c85
2021-01-25 16:57:06 +00:00
Igor Cota 3e672a58ac Define TARGET_OS when host is android 2021-01-25 16:15:06 +00:00
Homu b2f9192131 Auto merge of #4754 - daira:fix-enable-debug, r=str4d
Ensure that `CONFIGURE_FLAGS=--enable-debug` correctly uses -O0 for dependencies and main build

Test plan:
* build using `zcutil/build.sh V=1` and confirm from the build log that all dependencies and the main build use `-O1`
* run `zcutil/distclean.sh` then build using `CONFIGURE_FLAGS=--enable-debug zcutil/build.sh V=1`
* confirm from the build log that all dependencies and the main build use `-O0`
* run builds with and without `--enable-debug` under `gdb`, and find a case where local variables are usually optimized out, but not with `--enable-debug`.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-01-25 16:13:50 +00:00
Daira Hopwood bd61fbf056 Ensure that `CONFIGURE_FLAGS=--enable-debug` correctly uses -O0 for dependencies and main build.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-01-25 14:32:18 +00:00
Cory Fields 959e7be477 build: add missing leveldb defines
src/leveldb/build_detect_platform shows how upstream defines them.

These platform may not be able to fully build or run Bitcoin, but defining all
known to leveldb saves future hassle.

Now that all possible platforms are enumerated, specifying an unknown one is an
error.
2021-01-25 13:21:04 +00:00
fanquake 5d8fdbf738 [build] Add NETBSD leveldb target to configure.ac 2021-01-25 13:20:46 +00:00
Wladimir J. van der Laan 5304bcd6bd build: Updates for OpenBSD
- LevelDB platform was not guessed correctly (it ended up defining
  `-DOS_OPENBSD59` instead of `-DOS_OPENBSD`)

- On OpenBSD there is no convenience link from `python3.5` to `python3`:
  add detection for other python interpreter names.

- If it has to guess the LevelDB OS, print a autoconf warning so that
  the user can check.

Zcash: Excludes the Python change.
2021-01-25 13:18:53 +00:00
randy-waterhouse f5d8c93380 Re-instate TARGET_OS=linux in configure.ac. Removed by 351abf9e035. 2021-01-25 13:14:41 +00:00
Jack Grigg 780e35419a cargo update 2021-01-25 12:10:25 +00:00
Jack Grigg 177df2c25a depends: Postpone updates that require adding CMake 2021-01-25 12:07:09 +00:00
Jack Grigg 4c7d17328a depends: ZeroMQ 4.3.4 2021-01-25 12:04:47 +00:00
Jack Grigg 07449c1a0c QA: Postpone BDB update again
It's unlikely we will ever upgrade from BDB 6; instead we will migrate
away from BDB.
2021-01-25 11:51:06 +00:00
Jack Grigg bb242b6a7b QA: Remove unused update postponements
Clang has been updated, and the Rust dependencies aren't checked by
updatecheck.py any more.
2021-01-25 11:49:37 +00:00
Jack Grigg 3e35bc8e71 qa: Postpone Boost and native_b2 updates 2021-01-25 11:49:11 +00:00
Jack Grigg c996fc1ca4 Revert "Update boost to 1.75, postpone other updates."
This reverts commit 8f4dd4460b.
2021-01-25 11:35:18 +00:00
zebambam 7f65d8fa3c Added foundation to responsible_disclosure.md 2021-01-22 12:04:22 -08:00
Homu c278705510 Auto merge of #4956 - str4d:clang-11-macos-build, r=str4d
depends: Allow per-host package download paths

Clang's download path includes its version, but LLVM doesn't always
publish every package for every version, so we need to support multiple
versions.

Fixes zcash/zcash#4954.
2021-01-21 22:55:58 +00:00
Jack Grigg d0902ab767 depends: Ensure the native_clang download path is for the builder 2021-01-21 22:55:03 +00:00
Jack Grigg c7df8445d0 depends: Allow per-host package download paths
Clang's download path includes its version, but LLVM doesn't always
publish every package for every version, so we need to support multiple
versions.

Fixes zcash/zcash#4954.
2021-01-21 15:19:02 +00:00
Homu 2de905ce87 Auto merge of #4951 - str4d:clang-11, r=nuttycom
depends: Move to Clang 11

Most platforms are on 11.0.1; Darwin and Windows are both on 11.0.0
because that is the latest that binaries are provided for.

Requires `zstd` to cross-compile Windows binaries.
2021-01-19 23:59:19 +00:00
Jack Grigg fa41e9adca depends: Fix Boost warnings under Clang 11
C++17 deprecated the two-argument version of std::allocator::allocate.
Starting with 11.0, libc++ enforces these deprecations, which causes
warnings from the Boost headers, and since we require native Linux
builds to be warning-free, this breaks CI.

Boost addressed this issue for MSVC in 1.75; the patch in this commit
forces Clang to be handled in the same way.
2021-01-18 21:55:22 +00:00
Jack Grigg a58d74c6be depends: Move to Clang 11
Most platforms are on 11.0.1; Darwin and Windows are both on 11.0.0
because that is the latest that binaries are provided for.
2021-01-16 00:45:33 +00:00
Homu a0158ce837 Auto merge of #4950 - str4d:boost-build-backports, r=str4d
Boost build backports

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#17087
- bitcoin/bitcoin#17231
- bitcoin/bitcoin#17928
- bitcoin/bitcoin#18820
- bitcoin/bitcoin#19764

Kudos to @dongcarl for all the excellent upstream depends system hackery!
2021-01-15 22:12:42 +00:00
Carl Dong 98ce8f838d depends: boost: Specify cflags+compileflags 2021-01-15 17:31:29 +00:00
Carl Dong cf70d2eb5c depends: boost: Remove unnecessary _archiver_
We already have $(package)_ar, so just use that instead
2021-01-15 17:31:10 +00:00
Carl Dong 80205dcad5 depends: boost: Cleanup toolset selection 2021-01-15 17:30:32 +00:00
Carl Dong 7f1598ad11 depends: boost: Cleanup architecture/address-model 2021-01-15 17:30:32 +00:00
Carl Dong 44f95d4043 depends: boost: Disable all compression 2021-01-15 17:30:30 +00:00
Carl Dong d5dfbe016d depends: boost: Split into non-/native packages 2021-01-15 17:29:37 +00:00
Carl Dong 63390e503c depends: boost: Refer to version in URL 2021-01-15 17:08:56 +00:00
Carl Dong 5c03db0983 depends: Propagate only specific CLI variables to sub-makes
We want to supply well-known vars to ./configure scripts to do with as
they please. However, we do _not_ want to override these well-known vars
at make-time as certain build systems expect a self-mangled version of
these well-known vars.

For example, freetype and bdb will prepend `libtool --mode=compile' to
CC and CXX, which, if we override CC on the command line at make-time,
will break the build.
2021-01-15 17:08:56 +00:00
Carl Dong 9e997afd84 depends: boost: Use clang toolset if clang in CXX 2021-01-15 17:08:56 +00:00
Carl Dong 96cf6da5b6 depends: boost: Split target-os from toolset
Previously, we specified the target-os in the toolset (and sometimes
used the wrong command line flags), now we have a clear separation,
which is favored by ./bootstrap.sh and ./b2.

This means that all supported OSes will specify the correct target-os=
and toolset= on the command line.
2021-01-15 17:08:56 +00:00