Commit Graph

13625 Commits

Author SHA1 Message Date
Jack Grigg 4498eb26db qa: Remove unused timeout configuration from wait_for_balance 2020-05-28 23:04:58 +12:00
Jack Grigg c2144f7af7 qa: Add --use-faucet flag to smoke tests 2020-05-28 23:04:58 +12:00
Jack Grigg 96681695c9 metrics: Don't show "not mining" text for mainnet
Mining with the zcashd built-in CPU miner is not useful work on mainnet
at the current network difficulty.
2020-05-28 22:21:40 +12:00
Jack Grigg eb4ada98d2 metrics: Draw IBD progress bar showing headers and blocks 2020-05-28 22:21:40 +12:00
Jack Grigg 3a1b1a2fa2 metrics: Fix indents 2020-05-28 22:21:40 +12:00
Homu 68d25c9259 Auto merge of #3936 - solardiz:report-headers-download, r=str4d
Report headers download

With current compile-time defaults, a Zcash node prefetches up to 160 block headers per request without a limit on how far it can prefetch, but only up to 16 full blocks at a time. For this and other reasons, it can get very far ahead in headers prefetch (and PoW verification on those, so it's quite some processing too) over full blocks fetch (such as 10x ahead) during initial blocks download. Let's report to the user on how many headers the node has fetched, and let's also use this information as additional input on estimating the total number of blocks to fetch: it can't be less than the number of headers already fetched.

While at it, also fix typos in related code.
2020-05-28 09:08:44 +00:00
Solar Designer fad004114a During initial blocks download, also report the number of headers 2020-05-28 20:34:31 +12:00
Solar Designer ed3b473ec6 Fix typos in ProcessMessage() "headers" 2020-05-28 20:26:00 +12:00
Homu 804125cc20 Auto merge of #4543 - defuse:fix-invalid-argument, r=str4d
Add missing <stdexcept> header for std::invalid_argument

Closes #1703.
2020-05-28 08:06:06 +00:00
mdr0id a63c1d6279 Add helpers for tapping and donating to the testnet faucet 2020-05-28 19:10:32 +12:00
Eirik Ogilvie-Wigley b21fcf37cb Various improvements
- Print time since start for each operation
- Print traceback for any raised exceptions
- Improve messages to user
- Warning cleanups
2020-05-28 19:01:52 +12:00
Eirik Ogilvie-Wigley aa4b98a7c3 Resolve decimal vs float issues 2020-05-28 18:59:20 +12:00
Homu 1d7574eb7b Auto merge of #4488 - oxarbitrage:issue4315, r=str4d
Add options and help to AFL scripts

Closes https://github.com/zcash/zcash/issues/4315

For reference here is how the help of each command is script:

**afl-get.sh**:
```
$ ./zcutil/afl/afl-get.sh --help
Obtains and builds a copy of AFL from source.

Usage:
    ./zcutil/afl/afl-get.sh --afl-install=AFL_INSTALL_DIR

    OPTIONS:
        -h, --help              Print this help message
        -i, --afl-install       Directory where AFL is going to be installed
    EXAMPLE:
        ./zcutil/afl/afl-get.sh -i /tmp/afl

$
```

**afl-build.sh**:

```
$ ./zcutil/afl/afl-build.sh --help
A wrapper around ./zcutil/build.sh for instrumenting the build with AFL.
You may obtain a copy of AFL using ./zcutil/afl/afl-get.sh.
Additional arguments are passed-through to build.sh.

Usage:
    ./zcutil/afl/afl-build.sh --afl-install=AFL_INSTALL_DIR --fuzz-case=FUZZ_CASE [ OPTIONS ... ] [ ARGUMENTS ... ]

    OPTIONS:
        -a, --harden            Turn off AFL_HARDEN. Default: 1
        -c, --configure-flags   Pass this flags to ./configure. Default: --enable-tests=no --enable-fuzz-main
        -f, --fuzz-case         Options are: CheckBlock, DecodeHexTx, DeserializeAddrMan, DeserializeTx or ReadFeeEstimates
        -h, --help              Print this help message
        -l, --afl-log           Directory to save AFL logs. Default: /home/oxarbitrage/zcash/zcash4/zcash
        -i, --afl-install       Directory where AFL is installed
        -z, --zcutil            The zcutil directory. Default /home/oxarbitrage/zcash/zcash4/zcash/zcutil
    ARGUMENTS:
        By default we are passing to build.sh the following flags:
            CC=/home/oxarbitrage/zcash/zcash4/zcash/zcutil/afl/zcash-wrapper-gcc
            CXX=/home/oxarbitrage/zcash/zcash4/zcash/zcutil/afl/zcash-wrapper-g++
    EXAMPLE:
        ./zcutil/afl/afl-build.sh -i /tmp/afl -f DecodeHexTx

$
```

**afl-run.sh**:

```
$ ./zcutil/afl/afl-run.sh --help
Start fuzzing a case in a previously zcashd built for AFL.
Additional arguments are passed-through to AFL.

Usage:
    ./zcutil/afl/afl-run.sh --afl-install=AFL_INSTALL_DIR --fuzz-case=FUZZ_CASE [ ARGUMENTS... ]

    OPTIONS:
        -f, --fuzz-case         Options are: CheckBlock, DecodeHexTx, DeserializeAddrMan, DeserializeTx or ReadFeeEstimates
        -h, --help              Print this help message
        -i, --afl-install       Directory where AFL is installed
    EXAMPLE:
        ./zcutil/afl/afl-run.sh -i /tmp/afl -f DecodeHexTx

$
```

**afl-getbuildrun.sh**:

```
$ ./zcutil/afl/afl-getbuildrun.sh --help
Builds AFL and an instrumented zcashd, then begins fuzzing.
This script must be run from within the top level directory of a zcash clone.
Additional arguments are passed-through to AFL.

Usage:
    ./zcutil/afl/afl-getbuildrun.sh --fuzz-case=FUZZ_CASE [ OPTIONS ... ] [ ARGUMENTS... ]

    OPTIONS:
        -f, --fuzz-case         Options are: CheckBlock, DecodeHexTx, DeserializeAddrMan, DeserializeTx or ReadFeeEstimates
        -h, --help              Print this help message
        -i, --afl-install       Directory where AFL is installed. Default: /home/oxarbitrage/zcash/zcash4/zcash/afl-temp
    EXAMPLE:
        ./zcutil/afl/afl-getbuildrun.sh -f DecodeHexTx

$
```
2020-05-28 04:01:05 +00:00
Homu 9bf8443c16 Auto merge of #4504 - str4d:disconnectblock-fixes, r=str4d
Use the cached consensusBranchId in DisconnectBlock

If a node is started with a set of network upgrades that don't match the
serialized chain (such as when we implement NU rollbacks on testnet),
RewindBlockIndex will disconnect each block in the chain until it
reaches the most recent block that agrees with the node's set of network
upgrades. However, the blocks themselves should be disconnected using
the consensus branch ID that they were connected with, which is
persisted alongside the chain and reconstructed in LoadBlockIndex.
2020-05-28 02:51:34 +00:00
Jack Grigg a2db35137b qa: Improve reliability of smoke test cleanup 2020-05-28 13:15:55 +12:00
Jack Grigg a2ba414d69 qa: Improve reliability of smoke tests 2020-05-28 13:15:55 +12:00
Jack Grigg 0261ccbbe8 qa: Don't allow smoke tests with mainnet wallet.dat 2020-05-28 13:15:55 +12:00
Jack Grigg a6ff0a0794 qa: Use slick-bitcoinrpc for smoke tests 2020-05-28 13:15:55 +12:00
Jack Grigg eeecb3bf8c qa: Transaction chain smoke test 2020-05-28 13:15:55 +12:00
Jack Grigg 01757cff23 qa: Simple smoke tests 2020-05-28 13:15:55 +12:00
Jack Grigg 6d1563d7a3 qa: Run Zcash node for smoke tests 2020-05-28 13:15:55 +12:00
Jack Grigg 6470237c09 qa: Smoke test driver 2020-05-28 13:15:55 +12:00
Homu 4907a31302 Auto merge of #4242 - oxarbitrage:issue3726, r=str4d
Add estimatedheight to rpc getblockchaininfo response

Fixes https://github.com/zcash/zcash/issues/3726

Ported from https://github.com/zcash/zcash/pull/3727 with comments addressed.
2020-05-28 00:49:49 +00:00
Homu 72edd11bd9 Auto merge of #4486 - defuse:fix-undefined-behavior-in-gtest, r=daira
Fix undefined behavior in gtest tests
2020-05-27 23:47:58 +00:00
therealyingtong 06ddf659a7 Add RPC tests for post-Heartwood rollback 2020-05-28 09:54:42 +12:00
Jack Grigg 27b2ce3468 Use the cached consensusBranchId in DisconnectBlock
If a node is started with a set of network upgrades that don't match the
serialized chain (such as when we implement NU rollbacks on testnet),
RewindBlockIndex will disconnect each block in the chain until it
reaches the most recent block that agrees with the node's set of network
upgrades. However, the blocks themselves should be disconnected using
the consensus branch ID that they were connected with, which is
persisted alongside the chain and reconstructed in LoadBlockIndex.
2020-05-28 09:50:08 +12:00
Homu 8c778c9c0d Auto merge of #4527 - dannywillems:librustzcash/c-header-compatibility, r=str4d
librustzcash: make the header C compatible

The `librustzcash.h` file is compatible with both languages. However, only C++ is supported at the moment. By relying on the preprocessor to include or not the `extern "C"` piece, the interface becomes compatible with both.
2020-05-27 21:23:08 +00:00
Homu de2e1160db Auto merge of #4541 - ebfull:release-v3.0.0, r=ebfull
Release v3.0.0
2020-05-26 21:32:20 +00:00
Taylor Hornby 08662fa09a Add missing <stdexcept> header for std::invalid_argument 2020-05-24 16:49:13 -06:00
Sean Bowe 7a0a5a4d71
make-release.py: Updated release notes and changelog for 3.0.0. 2020-05-22 11:48:24 -06:00
Sean Bowe 5614085790
make-release.py: Updated manpages for 3.0.0. 2020-05-22 11:48:23 -06:00
Sean Bowe 306a336a0a
make-release.py: Versioning changes for 3.0.0. 2020-05-22 11:46:19 -06:00
Homu 743f6d436b Auto merge of #4515 - nuttycom:hotfix-v2.1.2-2-golden, r=nuttycom
Golden testing to verify no-reindex network upgrades.

This test was introduced to provide us a way to test network upgrades against previously-serialized versions of block and block-index data. At present the only thing that is checked is that the nodes start correctly after upgrading.

The commit history of this branch is built such that each persisted database artifact is constructed in a commit which has the correct history for constructing that particular artifact - basically, you get that artifact (disregarding randomness) by checking out that commit and creating it using the zcashd built from that commit.
2020-05-21 22:49:58 +00:00
Kris Nuttycombe 86d631bf36 Merge remote-tracking branch 'upstream/master' into hotfix-v2.1.2-2-golden 2020-05-21 16:49:24 -06:00
Homu 1b195476fd Auto merge of #4539 - ebfull:release-v3.0.0-rc1, r=daira
Release v3.0.0-rc1

This is the release candidate for 3.0.0 Heartwood.

EOS halt manually configured to be (roughly) September 15, which is 2808 hours away (at the time of writing this) so with 48 blocks per hour, 2808 * 48 plus the current height 838929 equals 973713.
2020-05-21 19:34:28 +00:00
Sean Bowe 61aee9ec9c
Set deprecation of 3.0.0 to target EOS halt mid-September. 2020-05-21 07:35:09 -06:00
Sean Bowe a6403c80b4
make-release.py: Updated release notes and changelog for 3.0.0-rc1. 2020-05-21 07:34:53 -06:00
Sean Bowe 957cbb68f1
make-release.py: Updated manpages for 3.0.0-rc1. 2020-05-21 07:34:53 -06:00
Sean Bowe 7000f452fa
make-release.py: Versioning changes for 3.0.0-rc1. 2020-05-21 07:32:25 -06:00
Homu 3860e7cae7 Auto merge of #4533 - ebfull:heartwood-activation, r=ebfull
Enable Heartwood activation on mainnet

This sets the Heartwood activation height to `903000`, which follows the deprecation height of `v2.1.2-3` (which is set to deprecate on block `901475`, roughly 31 hours earlier, sometime mid-July).
2020-05-20 21:36:27 +00:00
Alfredo Garcia e7edfefce7 change name of harden option 2020-05-20 09:32:41 -03:00
Homu bfb1bfd9d6 Auto merge of #4534 - ebfull:fix-chainwork, r=daira
Update minimum chain work on testnet to reflect Heartwood activation.
2020-05-20 06:45:44 +00:00
Sean Bowe 5a955674a5
Bump the protocol version, as this node supports Heartwood on mainnet. 2020-05-19 14:38:53 -06:00
Sean Bowe d0c96683bf
Set the Heartwood activation height to 903000. 2020-05-19 14:38:49 -06:00
Homu ed9537f9dd Auto merge of #4529 - daira:fix-abort-on-reindex, r=daira
Fix a null pointer dereference that occurs when formatting an error message

This fixes a bug in the error message printout for the case when we have sufficient chain work, but an expected network upgrade has not activated.
2020-05-19 19:33:31 +00:00
Daira Hopwood cb7c90522d Explicitly assert that chainActive[upgrade.nActivationHeight] is non-null at this point.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-05-19 20:13:37 +01:00
Alfredo Garcia d42e0a433c remove additional not needed casts from py tests 2020-05-18 18:09:07 -03:00
Alfredo Garcia 1805466d5c add MINOR_CURRENCY_UNIT 2020-05-18 16:53:01 -03:00
Alfredo Garcia 26e4889f87 Fix casting in listtransactions.py 2020-05-18 16:53:01 -03:00
Alfredo Garcia 507e1623f9 simplify inzat balances logic
Co-Authored-By: Daira Hopwood <daira@jacaranda.org>
2020-05-18 16:53:01 -03:00