Commit Graph

13474 Commits

Author SHA1 Message Date
Jack Grigg 6bec5685b6 mempool: Check transparent signatures against the previous network upgrade
This change improves usability across network upgrades, by informing
users when their new transactions are being created with the consensus
branch ID from the previous epoch.

We only check failing signatures against the previous epoch to minimise
the extra computational load on nodes.
2020-03-12 17:14:39 +13:00
Jack Grigg 7647f58c3d test: Add missing parameter selection to Validation.ReceivedBlockTransactions
This wasn't breaking CI because earlier tests selected parameters, but
running just the Validation group caused a crash.
2020-03-12 17:14:39 +13:00
Jack Grigg c4ca7e8730 test: Modify ValidationFakeCoinsViewDB to optionally contain a coin 2020-03-12 17:14:39 +13:00
Jack Grigg 28ea36b412 test: Rename FakeCoinsViewDB -> ValidationFakeCoinsViewDB
This ensures we are using the correct test class.
2020-03-12 17:14:39 +13:00
Homu fa67c4e148 Auto merge of #4293 - oxarbitrage:issue2671, r=str4d
Refactor experimental feature handling

Adds new rpc call `getexperimentalfeatures` and also adds experimental features to `getblockchaininfo` output.

Closes #2671.
2020-03-12 02:09:12 +00:00
Alfredo Garcia b7c8ee64d7 minor cleanup style, var names 2020-03-11 13:43:47 -03:00
Daira Hopwood 5d5e6a6762 Fix typos/minor errors in comments, and wrap some lines.
This minimizes the diff in the example implementation of funding streams in ZIP 207.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-11 16:41:31 +00:00
Taylor Hornby 11470a3107 Fix typo in updatecheck.py 2020-03-11 10:07:13 -06:00
Taylor Hornby d582270abb Fix bug in updatecheck.py and add utfcpp to its dependency list 2020-03-11 09:11:28 -06:00
Homu 4eb3dc7ec6 Auto merge of #4321 - str4d:internalise-rust, r=str4d
Bring the librustzcash crate into this repository

Rust dependencies are now canonically pinned within this repository by
`Cargo.lock`. We continue to use the depends system for vendoring the
dependencies, to ensure our Gitian builds continue to function (which have
no network access at build time, and fetch dependencies separately).

The `--enable-online-rust` configure flag replicates the behaviour of the
`LIBRUSTZCASH_OVERRIDE` environment variable (enabling the build system to
use https://crates.io instead of vendored dependencies).

This pulls in the exact version of `librustzcash` that we currently depend on
(corresponding to the `0.1.0` tag in https://github.com/zcash/librustzcash).
The changes to the crate since then will be pulled in as a separate PR.

Part of zcash/librustzcash#155.
Part of #4230.
2020-03-11 14:20:17 +00:00
Jack Grigg 684e62e903 Fix Rust static library linking for Windows builds
The library renaming step is necessary because the naming convention
used by rustc does not match the naming convention for libtool/MinGW.
2020-03-12 00:50:45 +13:00
Daira Hopwood 0de0105c80 Exit init early if we request shutdown before having loaded the genesis block.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-10 17:57:52 +00:00
Daira Hopwood 3c573f2485 Add comment to `MilliSleep` documenting that it is an interruption point.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-10 17:57:52 +00:00
Daira Hopwood 99dc6de485 Setting a std::atomic variable in a signal handler only has defined behaviour if it is lock-free.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-10 17:57:52 +00:00
Daira Hopwood 74467f8f02 Resolve a race condition on `chainActive.Tip()` in initialization (introduced in #4379).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-10 17:57:52 +00:00
Patrick Strateman 82e641f3cc Acquire lock to check for genesis block. 2020-03-10 17:57:52 +00:00
Alfredo Garcia 1485c596e7 add stop_node argument to check_node_log, use it in shieldingcoinbase 2020-03-10 14:21:05 -03:00
Alfredo Garcia 1aae365438 use check_node_log in turnstile.py 2020-03-10 11:06:56 -03:00
Alfredo Garcia 461047ac99 move check_node_log framework test to a new file 2020-03-10 11:05:49 -03:00
gladcow fc2501b63e Move reindex progress globals to metrics.h/cpp 2020-03-10 09:33:35 +03:00
gladcow 003cd8fd8f Byte sizes format 2020-03-10 09:33:35 +03:00
gladcow e72885b690 Use processed file size as progress in metrics during reindex 2020-03-10 09:33:35 +03:00
gladcow 7bdf64f319 Show reindex state in metrics 2020-03-10 09:33:35 +03:00
Homu 2a6be9fd19 Auto merge of #4384 - str4d:issue-templates, r=str4d
Migrate to new GitHub issue template workflow

New templates are added for feature requests and UX reports.
2020-03-10 04:49:03 +00:00
Homu dcd3614de4 Auto merge of #4359 - str4d:2872-upgrade-libsodium, r=str4d
Upgrade libsodium to 1.0.18

Includes patches that maintain consensus compatibility with libsodium 1.0.15 for Ed25519 pubkey and signature validation.

Replaces #4239. Closes #2872.
2020-03-10 03:10:01 +00:00
Homu ccd10d54b3 Auto merge of #4388 - oxarbitrage:minor_spacing, r=mdr0id
Minor spacing fix in test

Output will look a bit better.
2020-03-09 23:45:50 +00:00
Homu ca668cf666 Auto merge of #4374 - daira:rewrite-addtimedata, r=daira
Remove time adjustment; instead warn if peer clocks are too different

The policy is: warn if we have seen at least 8 (TIMEDATA_WARNING_SAMPLES) peer times, in the version messages of the first 20 (TIMEDATA_MAX_SAMPLES) unique (by IP address) peers that connect, that are more than 10 minutes (TIMEDATA_WARNING_THRESHOLD seconds) but less than 10 days (TIMEDATA_IGNORE_THRESHOLD seconds) away from local time.

fixes #4338
2020-03-09 21:15:34 +00:00
Homu 8c48786d7d Auto merge of #4387 - gladcow:issue3813_backport_upstream_11107, r=daira
Fix races in AppInitMain and others with lock and atomic bools (Bitcoin backport)

Backport bitcoin https://github.com/bitcoin/bitcoin/pull/11107 (excluding the last commit,  it was fixed in Zcash before).

This functionality is required for https://github.com/zcash/zcash/pull/4368 (details https://github.com/zcash/zcash/pull/4368#issuecomment-595284681) as part of the issue https://github.com/zcash/zcash/issues/3813 resolution.
2020-03-09 19:52:20 +00:00
Alfredo Garcia 9f71fbecca remove space after new line 2020-03-07 09:26:25 -03:00
MeshCollider d7c62cdd4f Consistent parameter names in txdb.h 2020-03-07 10:21:59 +03:00
MeshCollider e4b66f565a Make fReindex atomic to avoid race 2020-03-07 10:21:59 +03:00
MeshCollider cb8de0395f Fix race for mapBlockIndex in AppInitMain 2020-03-07 10:21:59 +03:00
Alfredo Garcia aa89d3c342 add check_node_log utility function 2020-03-06 19:17:18 -03:00
Alfredo Garcia aa24f921e8 make fInsightExplorer a local 2020-03-06 08:49:16 -03:00
Alfredo Garcia 04012a62c1 refactor experimental features 2020-03-06 07:48:33 -03:00
Alfredo Garcia 92bf83c4bb add getexperimentalfeatures rpc call 2020-03-06 07:48:24 -03:00
Homu 35bff6ac7c Auto merge of #4256 - str4d:zip-213-shielded-coinbase, r=daira
[NU3 Heartwood] Shielded Coinbase

Implements [ZIP 213](https://github.com/zcash/zips/pull/217).
2020-03-06 10:19:13 +00:00
Jack Grigg a04acde970 depends: Remove unused vendored crates 2020-03-06 16:49:03 +13:00
Jack Grigg 5fe41654bf Move root of Rust crate into repo root
This enables IDE integration to work (which requires the Cargo.toml to
be in the repo root).

"make clean" no longer runs "cargo clean", because IDE integrations hold
locks on files within the Rust build directory, and an error inside
"cargo clean" error would prevent "make clean" from completing (and
removing other files).
2020-03-06 16:49:03 +13:00
Jack Grigg 90f7234136 Replace librustzcash from depends system with src/rust
The --enable-online-rust configure flag replicates the behaviour of the
LIBRUSTZCASH_OVERRIDE environment variable (enabling the build system to
use crates.io instead of vendored dependencies).
2020-03-06 16:49:03 +13:00
Jack Grigg 72ab00fdee Update .gitignore for Rust code 2020-03-06 16:24:14 +13:00
Jack Grigg 62d0af94cf rust: Adjust Cargo.toml so that it compiles
The Cargo.lock is updated to account for the Zcash Rust crates no longer
being in the same workspace. Dependencies that were not transitive
dependencies of librustzcash are also removed, but no versions change.
2020-03-06 16:24:14 +13:00
Jack Grigg 28b2a65c64 rust: Pin toolchain to 1.36.0, matching depends system 2020-03-06 16:24:14 +13:00
Jack Grigg ef81abdde3 Bring in Cargo.lock from librustzcash repo
Source: https://github.com/zcash/librustzcash.git
Revision: a57dc7f47807ea50cb0a5deec9b84b3e7da11bc0
2020-03-06 16:24:14 +13:00
Jack Grigg 443fe7d092 Bring in librustzcash crate
Source: https://github.com/zcash/librustzcash.git
Revision: a57dc7f47807ea50cb0a5deec9b84b3e7da11bc0
2020-03-06 16:24:14 +13:00
Jack Grigg 0cca79a2d8 depends: Remove comments from libsodium signature validation patch
Some of the comments in the 1.0.15 code were incorrect.
2020-03-06 16:19:23 +13:00
Jack Grigg 972917ee7b Add GitHub issue templates for feature requests and UX reports 2020-03-06 16:12:28 +13:00
Jack Grigg 3ff8f0b4a3 Migrate GitHub issue template to new format 2020-03-06 16:06:11 +13:00
Jack Grigg 06bd43b53c test: Explicitly check Sapling consensus rules apply to shielded coinbase 2020-03-06 15:24:38 +13:00
Jack Grigg d8f0bc9e21 init: Inform on error that -mineraddress must be Sapling or transparent 2020-03-06 13:18:04 +13:00