Commit Graph

13294 Commits

Author SHA1 Message Date
Wladimir J. van der Laan 11240d0928 test_framework: detect failure of bitcoind startup
Replace the `bitcoin-cli -rpcwait` after spawning bitcoind
with our own loop that detects when bitcoind exits prematurely.

And if one node fails to start, stop the others.

This prevents a hang in such a case (see #7463).
2020-03-24 21:55:08 +13:00
James O'Beirne d38a012970 Add basic coverage reporting for RPC tests
Thanks to @MarcoFalke @dexX7 @laanwj for review.

Zcash: Includes all the backend changes, but excludes the --coverage flag
added to rpc-tests.py as we have not yet migrated away from rpc-tests.sh.
2020-03-24 21:51:51 +13:00
ptschip 8f863b2817 Enable python tests for Native Windows
1) Multiplatorm support for devnull
2) Fixed a bug in the handling of cache files
3) Deleted run-bitcoin-cli as no longer needed
2020-03-24 18:05:30 +13:00
Homu c3df71a8e9 Auto merge of #4386 - oxarbitrage:issue4385, r=daira
add check_node_log utility function

Closes https://github.com/zcash/zcash/issues/4385
2020-03-19 13:26:42 +00:00
Alfredo Garcia 77219bdc6c remove unused import 2020-03-19 08:46:33 -03:00
Alfredo Garcia 2707e6ff6c preserve test semantics
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2020-03-18 22:49:44 -03:00
Homu 08993dcb93 Auto merge of #4408 - oxarbitrage:patch-3, r=daira
Fix comment in rpc_wallet_tests

Address a small comment issue in `rpc_z_shieldcoinbase_parameters` rpx wallet tests.
2020-03-19 00:03:55 +00:00
Homu 2dd4721f84 Auto merge of #4365 - oxarbitrage:issue1361, r=daira
Replace tuples by classes in asyncoperation_sendmany

Close https://github.com/zcash/zcash/issues/1361
2020-03-17 23:56:02 +00:00
Homu d78fabaab3 Auto merge of #4407 - defuse:fix-updatecheck-newrust, r=str4d
Update updatecheck.py with the new Rust dependencies
2020-03-17 20:58:07 +00:00
Alfredo Garcia 0636fbabbd
minor comment fix 2020-03-17 17:56:25 -03:00
Taylor Hornby acdad52602 Update updatecheck.py with the new Rust dependencies and improve the error message in case the untracked dependency list becomes out of date. 2020-03-17 14:05:50 -06:00
Daira Hopwood 9526e13a02
Make the memo a mandatory argument for SendManyRecipient 2020-03-17 13:41:09 +00:00
Homu a125f3f5f8 Auto merge of #4403 - ebfull:rust-tests, r=str4d
Additional librustzcash integration

This adds librustzcash tests to the full test suite, and brings in the release profile configurations that are currently present in the librustzcash workspace on the other repository. It's very important that we build librustzcash with panic=abort because otherwise the unwinding panics across FFI boundaries could cause undefined behavior.
2020-03-17 07:50:48 +00:00
Homu 52f4794055 Auto merge of #4395 - defuse:fix-updatecheck, r=daira
Fix bug in updatecheck.py and add utfcpp to its dependency list
2020-03-16 19:14:48 +00:00
Homu fc9d0fa72f Auto merge of #4404 - daira:fix-reindex-divby0, r=ebfull
Avoid a theoretical possibility of division-by-zero introduced in #4368

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-16 17:13:39 +00:00
Homu 5a626317c7 Auto merge of #4390 - daira:fix-chaintip-race-condition, r=ebfull
Fix race conditions during init

Fix race conditions due to accessing `chainActive.Tip()` during init, and other minor cleanups.
Includes backport of https://github.com/bitcoin/bitcoin/pull/8063 .
2020-03-16 15:11:43 +00:00
Daira Hopwood b49cdee878 Avoid a theoretical possibility of division-by-zero introduced in #4368.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-03-16 14:56:38 +00:00
Sean Bowe 81a633c9c3
Simplification for MacOS in rust-test. 2020-03-14 11:06:13 -06:00
Sean Bowe 531c7c2881
Minor typo fixes. 2020-03-14 11:04:39 -06:00
Sean Bowe bd84d4fdb8
Add release profile optimizations and turn off panic unwinding in librustzcash. 2020-03-14 10:58:31 -06:00
Sean Bowe 7767f8e9e0
Add librustzcash tests to the full test suite. 2020-03-14 10:58:09 -06:00
Homu c7f1ec471e Auto merge of #4401 - str4d:4397-rust-darwin-target, r=str4d
depends: Hard-code Rust target for all Darwin hosts

Closes #4397.
2020-03-13 17:28:53 +00:00
Homu f8aba7f668 Auto merge of #4400 - str4d:sync-librustzcash, r=ebfull
Synchronize Rust code with librustzcash crate

This PR pulls in all changes made since librustzcash 0.2.0 (merged in #4160).

All future changes to the librustzcash crate will be made in this repository.
2020-03-13 14:48:27 +00:00
Jack Grigg 1ce96648ad depends: Hard-code Rust target for all Darwin hosts
GCC Darwin hosts include a version number, but Rust only has a single
Darwin target.
2020-03-13 22:27:14 +13:00
Jack Grigg 1bb543414a depends: Define Rust target in a single location 2020-03-13 22:27:14 +13:00
Jack Grigg c7b2fc101d Bring in updates to librustzcash crate
Source: https://github.com/zcash/librustzcash.git
Revision: 53bd5d4724c96374c4bf94068207fcc362b01ac7
2020-03-13 14:16:45 +13:00
Jack Grigg 11d257bd72 depends: Use Rust 1.42.0 toolchain 2020-03-13 13:47:56 +13:00
Homu 54af6cd781 Auto merge of #4398 - mdr0id:rpc_cross_platform_updates, r=str4d
Update RPCs to support cross platform testing

This PR is used to add support for cross platform testing per host. Specifically, Windows RPCs.

Notes from upstream on dbm.dumb : https://github.com/bitcoin/bitcoin/pull/8834/files
2020-03-12 23:17:52 +00:00
mdr0id e5e639ae22 Update RPCs to support cross platform paths and libs 2020-03-12 10:27:12 -07:00
Alfredo Garcia 3dfcf027e3 change constructors 2020-03-12 09:39:19 -03:00
Homu 8b600df660 Auto merge of #4396 - daira:minimize-zip207-diff, r=str4d
Fix typos/minor error 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-12 10:51:55 +00:00
Homu c0802cccac Auto merge of #4368 - gladcow:issue3813_reindex_in_metrics, r=str4d
Shows reindex progress in metrics screen

Resolves issue #3813.

The "Downloading blocks" message is changed to "Reindexing blocks" during reindex, after reindex is completed the text is reverted back to the first variant.

Reindex progress is shown as a sum of processed file size (we can't use reindexed block number as a progress because we can't predict how many blocks to process at all, we don't know the size of the block before we process it), the result looks like
```
Reindexing blocks | 22.64 MiB / 336.00 MiB (6%, 13583 blocks)
```
2020-03-12 09:28:35 +00:00
Homu ac4e91c6f4 Auto merge of #4343 - oxarbitrage:issue3083, r=str4d
Add expired transaction notifications

Closes https://github.com/zcash/zcash/issues/3083
2020-03-12 06:35:04 +00: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
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