Commit Graph

1333 Commits

Author SHA1 Message Date
Jack Grigg dadb54b67b Postpone native_ccache 4.3 2021-06-08 19:30:01 +01:00
Jack Grigg e0cde186b0 Fix Rust dependency name in postponed-updates.txt 2021-06-08 19:28:05 +01:00
Jack Grigg 20c4efe1bc Postpone dependency updates until after 4.4.1 2021-06-08 19:19:20 +01:00
Jack Grigg 3cdda83868 Postpone Clang 12
We won't migrate to LLVM 12 until Rust does.
2021-04-15 12:10:50 +12:00
Jack Grigg c592bf7da0 python: Use UTF-8 encodings for opened files 2021-04-14 13:19:33 +12:00
Jack Grigg da77a3db73 qa: Postpone Boost 1.75.0
https://github.com/zcash/zcash/issues/4945 remains unresolved.
2021-04-03 17:26:16 +13:00
Jack Grigg c0e146d3f4 qa: Postpone updates that require CMake in the build system
We still aren't committing to that dependency yet.
2021-04-03 17:26:16 +13:00
Jack Grigg d1c6647934 qa: Point univalue update checker at correct upstream
Bitcoin Core doesn't actually use tags for managing versions of their
forked dependencies, so we should separately rework this logic for all
of the subtree-managed dependencies. But this at least prevents false
positives.
2021-04-03 17:15:24 +13:00
Jack Grigg f7c7e0ee13 qa: Update BerkeleyDB downloads page URL 2021-03-27 11:47:34 +13:00
Jack Grigg 2e12078cfc depends: Update Rust to 1.51.0 2021-03-27 11:47:34 +13:00
Steven Smith 48d5142dc1 Adding base NU5 declarations and logic 2021-03-06 17:35:54 -08:00
Homu 89a4ab2ce9 Auto merge of #4993 - therealyingtong:postpone-depends-v4.3.0, r=str4d
Update/postpone dependencies for v4.3.0
2021-02-19 14:24:28 +00:00
therealyingtong eb351e485b Postpone dependencies 2021-02-18 20:50:39 +08:00
Kris Nuttycombe 676d302008 Update the maxuploadtarget.py tests to accommodate zcash.
Co-authored-by: str4d <thestr4d@gmail.com>
2021-02-17 17:00:18 -07:00
Jack Grigg 1eb7bbc6be Fix some typos 2021-02-17 13:35:11 -07:00
Jack Grigg 2f24abe457 test: Migrate maxuploadtarget.py to Python 3 2021-02-17 13:35:00 -07:00
Jonas Schnelli 385719c632 don't enforce maxuploadtargets disconnect for whitelisted peers 2021-02-17 13:34:41 -07:00
MarcoFalke 72fbeae94e [net] Cleanup maxuploadtarget
* log: nMaxOutboundLimit is in bytes
* log: Hide misleading -maxuploadtarget=0 warning
* qa : Minor cleanup to maxuploadtarget rpc tests
* net: Use DEFAULT_MAX_UPLOAD_TARGET = 0
2021-02-17 19:23:38 +00:00
Suhas Daftuar a0ca4116c1 Add RPC test for -maxuploadtarget 2021-02-17 19:23:38 +00:00
Jonas Schnelli 68066648a9 [QA] fix netbase tests because of new CSubNet::ToString() output 2021-02-16 18:02:25 +00:00
Jonas Schnelli fa9fcfea60 banlist.dat: store banlist on disk 2021-02-16 18:02:24 +00:00
Homu cc5574b819 Auto merge of #4963 - defuse:fix-updatecheck-token, r=nuttycom
Move the github API token out of updatecheck.py into an untracked file.
2021-01-28 16:38:34 +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 177df2c25a depends: Postpone updates that require adding CMake 2021-01-25 12:07:09 +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
Homu 06d234d774 Auto merge of #4934 - oxarbitrage:issue4917, r=nuttycom
Split wallet.py

Split some of the tests from `wallet.py` into its own files to make it easier to debug.
Some of the tests moved where depending(specially in balance amounts) on previous code. As standalone, some of the hardcoded balances needed some changes. No further modifications to tests are done in this PR.

We can split more but i think is a good start.

If this is merged it will close https://github.com/zcash/zcash/issues/4917

-----------------------
Please ensure this checklist is followed for any pull requests for this repo. This checklist must be checked by both the PR creator and by anyone who reviews the PR.
* [ ] Relevant documentation for this PR has to be completed and reviewed by @mdr0id before the PR can be merged
* [ ] A test plan for the PR must be documented in the PR notes and included in the test plan for the next regular release

As a note, all buildbot tests need to be passing and all appropriate code reviews need to be done before this PR can be merged
2021-01-14 17:49:12 +00:00
Kris Nuttycombe ada04aa01d Fix pyflakes complaints 2021-01-14 07:34:40 -07:00
Homu feadf83de9 Auto merge of #4942 - str4d:rust-1.49, r=str4d
depends: Update Rust to 1.49.0

Also updates our `Cargo.lock`.
2021-01-06 00:09:41 +00:00
Homu 5094a8b634 Auto merge of #4924 - daira:update-updatecheck, r=str4d
qa/zcash/updatecheck.py: remove dead code; print instructions to run `cargo outdated` and `cargo update`

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2021-01-05 19:58:34 +00:00
Jack Grigg 070d4720eb depends: Update Rust to 1.49.0 2021-01-04 16:31:11 +00:00
Alfredo Garcia 77db54764a split wallet.py tests 2020-12-29 14:42:46 -03:00
Daira Hopwood 66fe7a3782 Revert changes in #4916 that assumed arguments represent fees, when they are actually number of confirmations.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-21 16:08:58 +00:00
Daira Hopwood 86aa5d3873 qa/zcash/updatecheck.py: remove dead code; print instructions to run `cargo outdated` and `cargo update`.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-19 17:20:26 +00:00
Homu 2c0f6df168 Auto merge of #4916 - daira:reduce-fee, r=nuttycom
Reduce default fee to 1000 zatoshis

Per ZIP 313. This also ensures that transactions that pay the default fee will always be relayed, and not rate-limited.
2020-12-19 00:02:44 +00:00
Kris Nuttycombe 8f4dd4460b Update boost to 1.75, postpone other updates.
This removes the paches iostreams-106.patch and signals2-noise.patch
which have been incorporated into boost 1.75. Also, this further
postpones updates to native_clank, libcxx and native_ccache.
2020-12-18 14:13:42 -07:00
Daira Hopwood 5e84362702 Reduce the default fee for z_* operations, and the "low fee penalty" threshold for mempool limiting, to 1000 zatoshis.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-18 12:37:03 -07:00
Dimitris Apostolou f459e43dc9
Update links 2020-12-13 11:24:44 +02:00
Josh Ellithorpe efb603557a
Include transaction hex in verbose getblock output 2020-12-03 14:18:17 -10:00
Jack Grigg a7370b112e test: Run shielding-heavy RPC tests in serial 2020-12-02 13:52:08 +00:00
Jack Grigg 3a91bcfac5 test: Silence pyflakes unused import warning
rpc-tests.py trial-imports zmq to determine whether it is available.
2020-12-02 01:01:50 +00:00
Jack Grigg 21a7ec8bfb test: Run rpc-tests.py in full_test_suite.py 2020-11-21 03:03:58 +00:00
Jack Grigg 891fbff5b9 test: Adjust some Zcash RPC tests to work with parallel runner 2020-11-21 03:03:58 +00:00
MarcoFalke 01449d8a3d qa: Set correct path for binaries in rpc tests 2020-11-21 03:03:58 +00:00
John Newbery bc644280bf Add exclude option to rpc-tests.py 2020-11-21 03:03:58 +00:00
fanquake 32249fb5b2 [qa][doc] Correct rpc test options in readme 2020-11-21 03:03:55 +00:00
John Newbery 4f4f8d5ad7 Various review markups for rpc-tests.py improvements 2020-11-21 03:03:15 +00:00
John Newbery 6aad43b63f Refactor rpc-tests.py
- add main()
- remove global variables
2020-11-21 03:03:15 +00:00
John Newbery cc099b3b7b Improve rpc-tests.py arguments
A few miscellaneous improvements to rpc-tests.py command line arguments:

 - make all arguments start with double dash for consistency
 - improve help text and output
 - add nozmq argument to explicitly exclude the ZMQ tests
 - change 'parallel' to 'jobs'
2020-11-21 03:03:15 +00:00
John Newbery 389b70cafe Use argparse in rpc_tests.py
This commit replaces the roll-your-own argument parsing in rpc_tests.py
with Python's standard library argparse.
2020-11-21 03:03:15 +00:00
John Newbery 41c2bc1e05 Use configparser in rpc-tests.py
Remove the use of wildcard imports in rpc-tests.py and replace with
configparser.
2020-11-21 03:03:15 +00:00
Alex Morcos 2eab4f7503 remove obsolete run-bitcoind-for-test.sh 2020-11-21 03:03:15 +00:00
Alex Morcos 3accdb2fc7 Reorder RPC tests for running time 2020-11-21 03:03:15 +00:00
MarcoFalke 8b3c39ea80 [qa] rpc-tests: Apply random offset to portseed
This helps to skip over resources, which are blocked by regtest bitcoind
zombie nodes
2020-11-21 03:03:15 +00:00
MarcoFalke 0a73a0fbd9 [qa] test_framework: Exit when tmpdir exists 2020-11-21 03:03:15 +00:00
MarcoFalke d014a30566 [qa] pull-tester: Only print output when failed 2020-11-21 03:03:15 +00:00
MarcoFalke bcbf03ebe9 [qa] Refactor RPCTestHandler to prevent TimeoutExpired 2020-11-21 03:03:15 +00:00
MarcoFalke 352f2dc54b [qa] create_cache: Delete temp dir when done 2020-11-21 03:03:15 +00:00
isle2983 2d90c8f0d8 [doc] - clarify statement about parallel jobs in rpc-tests.py 2020-11-21 03:03:12 +00:00
MarcoFalke 4500a75346 [qa] pull-tester: Don't mute zmq ImportError
Zcash: We didn't backport the mute, so this is just conflict removal.
2020-11-21 03:02:41 +00:00
MarcoFalke e4d1dcc753 [qa] Remove unused code 2020-11-21 03:02:41 +00:00
MarcoFalke b25a63593e [qa] Use single cache dir for chains 2020-11-21 03:02:41 +00:00
MarcoFalke dbb41d1082 [qa] Adjust timeouts for micro-optimization of run time 2020-11-21 03:02:41 +00:00
whythat 1b3866fd0e [qa]: enable rpcbind_test 2020-11-21 03:02:41 +00:00
whythat 3c7f4ca809 [qa]: add parsing for '<host>:<port>' argument form to rpc_url() 2020-11-21 03:02:41 +00:00
fanquake 2fc450d94e [doc] Add OS X ZMQ requirement to QA readme 2020-11-21 03:02:37 +00:00
MarcoFalke 7366e81375 [qa] pull-tester: Start longest test first 2020-11-21 02:34:47 +00:00
MarcoFalke fd7689ff07 [qa] pull-tester: Fix assertion and check for run_parallel 2020-11-21 02:34:47 +00:00
MarcoFalke 63a3c9aceb [qa] test_framework: Use different rpc_auth_pair for each node 2020-11-21 02:34:47 +00:00
Cory Fields ecf9d8eb2b build: a few ugly hacks to get the rpc tests working out-of-tree
- Link pull-tester/rpc-tests.py to the build dir
- Add the build-dir's config to the python path so that tests can find it
- The tests themselves are in srcdir
- Clean up __pycache__ in 'make clean'
2020-11-21 02:34:47 +00:00
Suhas Daftuar 2399cfc7ba Tests: add timeout to sync_blocks() and sync_mempools()
Previously these functions would infinitely loop if sync failed;
now they have a default timeout of 60 seconds, after which an
AssertionError is raised.

sync_blocks() has also been improved and now compares the tip
hash of each node, rather than just using block count.

Zcash: Kept block count check for a couple of tests where we use it.
2020-11-21 02:34:47 +00:00
MarcoFalke 17caf1ddd1 [qa] test_framework: Append portseed to tmpdir
This makes it possible to specify a tmpdir while running tests in
parallel
2020-11-21 02:34:47 +00:00
MarcoFalke 818d2de39b [qa] Remove hardcoded "4 nodes" from test_framework
Zcash: Applied changes to our RPC tests.
2020-11-21 02:34:47 +00:00
MarcoFalke 5a12bc9d83 [qa] Add option --portseed to test_framework 2020-11-21 02:33:27 +00:00
MarcoFalke cbe91ea855 [qa] pull-tester: Run rpc test in parallel 2020-11-21 02:33:27 +00:00
MarcoFalke 0d8a62925a [qa] pull-tester: Adjust comment 2020-11-21 02:33:27 +00:00
MarcoFalke 5f13446dee [qa] Stop other nodes, even when one fails to stop 2020-11-21 02:33:27 +00:00
MarcoFalke 065255d3cb [qa] Update README.md 2020-11-21 02:33:27 +00:00
MarcoFalke 08256c9ec6 [qa] Refactor test_framework and pull tester
* log to stdout
* increase range for p2p and rpc ports
* UPPERCASE_CONSTANTS
* Stop nodes on CTRL+C
2020-11-21 02:33:27 +00:00
MarcoFalke 15721275d0 [qa] Switch to py3
Zcash: We already did this, so most of the backported changes are
ancillary (license header updates and style), but a few are relevant.
2020-11-21 02:33:27 +00:00
MarcoFalke d362b632bf [qa] rpc-tests: Fix link in comment and label error msg 2020-11-21 02:33:27 +00:00
MarcoFalke cc44368315 [qa] pull-tester: Exit early when no tests are run 2020-11-21 02:33:27 +00:00
MarcoFalke e7a6c49c00 [qa] pull-tester: Don't mute zmq ImportError 2020-11-21 02:33:27 +00:00
MarcoFalke db761077e5 [qa] mininode: Catch exceptions in got_data 2020-11-21 02:33:27 +00:00
MarcoFalke 7108d6aaa6 [qa] rpc-tests: Properly use integers, floats 2020-11-21 02:33:27 +00:00
MarcoFalke 65a6249d41 [qa] Use python2/3 syntax 2020-11-21 02:33:27 +00:00
Elliot Olds 845b31a760 Check if zmq is installed in tests, update docs
If ZMQ is enabled, check whether it's installed before running ZMQ tests.
If it isn't, disable ZMQ and print a warning.

Also add dependency info to test docs, so users know ZMQ is required
before running tests, and so they know how to install it.

When following the build instructions before this change then trying
to run the RPC tests, a unix user would get an error when python
tried to import zmq.

There may be other dependencies that should be added to the docs,
particularly ones for non-unix systems. This is the only unlisted
dependency I encountered using linux.
2020-11-21 02:33:27 +00:00
Wladimir J. van der Laan 239857d7d9 test: don't override BITCOIND and BITCOINCLI if they're set
In rpc-tests.py, don't override BITCOIND and BITCOINCLI if they're
already set. Makes it possible to run the tests with either another tree
or the GUI.
2020-11-21 02:33:27 +00:00
MarcoFalke fb1f76f330 [qa] pull-tester: Cleanup (run keypool, tidy stdout)
* Run keypool (takes 6 seconds)
* Print duration of each rpc test
* Structure output (bold, new lines)
2020-11-21 02:33:27 +00:00
MarcoFalke db27db2e43 [qa] keypool: DRY: Use test framework 2020-11-21 02:33:27 +00:00
MarcoFalke fa44509d6c [qa] keypool: Fix white space to prepare transition to test framework 2020-11-21 02:33:27 +00:00
MarcoFalke 01c36295c4 [qa] Extend README.md 2020-11-21 02:33:27 +00:00
MarcoFalke 80b2274ddf [qa] Split README.md to /qa and /qa/rpc-tests
+ Update with new -help message
2020-11-21 02:33:27 +00:00
Suhas Daftuar 800bf0a45f Remove unmaintained example test script_test.py 2020-11-21 02:33:27 +00:00
James O'Beirne eaf4dfe280 Add basic coverage reporting for RPC tests
Thanks to @MarcoFalke @dexX7 @laanwj for review.

Zcash: Just the --coverage flag for rpc-tests.py, as we backported the
rest of the coverage backend in zcash/zcash#4411.
2020-11-21 02:33:27 +00:00
MarcoFalke 760e500811 [rpc-tests] Check return code 2020-11-20 03:32:53 +00:00
MarcoFalke 6aa4f19e87 [rpc-tests] fundrawtransaction: Update fee after minRelayTxFee increase
Zcash: Added floor, since our minRelayTxFee is actually lower.
2020-11-20 03:32:53 +00:00
James O'Beirne 480f1bf43e Add tests for gettxoutsetinfo, CLevelDBBatch, CLevelDBIterator
Thanks @dexX7.

Zcash: Rest of this commit was cherry-picked in zcash/zcash#2598.
2020-11-20 03:32:53 +00:00
MarcoFalke 8e58eddab1 [doc] trivial: fix markdown syntax in qa/rpc-tests/README.md 2020-11-20 03:32:53 +00:00
Jeff Garzik 6618580194 qa/pull-tester/rpc-tests.py: chmod 0755
Fix file mode to be executable.

Include dummy whitespace change to force git to change mode.
2020-11-20 03:32:53 +00:00
ptschip 772d780730 Migrated rpc-tests.sh to all python rpc-tests.py
1) created rpc-tests.py
2) deleted rpc-tests.sh
3) travis.yml points to rpc-tests.py
4) Modified Makefile.am
5) Updated README.md
6) Added tests_config.py and deleted tests-config.sh
7) Modified configure.ac with script to set correct path in tests_config.py

Zcash: Migrated our test list over, and other necessary modifications.
The UI changes were not migrated.
2020-11-20 03:32:53 +00:00
Casey Rodarmor 4761c9f2bc Add p2p-fullblocktest.py
Zcash: Includes pyflakes changes.
2020-11-20 03:32:53 +00:00
Daniel Kraft 95d1f887ca Fix crash when mining with empty keypool.
Since the introduction of the ScriptForMining callback, the mining
functions (setgenerate and generate) crash with an assertion failure
(due to a NULL pointer script returned) if the keypool is empty.  Fix
this by giving a proper error.

Zcash: Adapted to our MinerAddress type.

Co-authored-by: Jack Grigg <jack@electriccoin.co>
2020-11-20 03:30:37 +00:00
Homu 10b09d483e Auto merge of #4793 - str4d:faster-rpc-tests, r=str4d
test: Use default shielded address in RPC tests where the type is irrelevant

This means we are running these tests against the recommended functionality,
and that these RPC tests will now use the faster Sapling addresses.
2020-11-19 14:15:08 +00:00
Homu 949fdca3a6 Auto merge of #4873 - str4d:rpc-test-blocks, r=str4d
Enable mininodes to construct blocks in RPC tests

Includes changes to disable difficulty adjustment on regtest, cherry-picked from:
- bitcoin/bitcoin#6853
- bitcoin/bitcoin#13046

The ZIP 143/243 logic is ported from https://github.com/zcash-hackworks/zcash-test-vectors
2020-11-18 15:11:49 +00:00
Homu 2cc836680a Auto merge of #4843 - furszy:2020_improving_sendmany_redudant_loops_first_round, r=daira
Improving asyncOp_sendmany redundancies (first round)

Work over async sendmany operation flow. Specifically on the utxo finding, utxo selection, total amount calculation and the tx inputs appending process.  Removed several unneeded for loops over the entire utxo set, re structuring and cleaning the flow.
2020-11-18 13:54:13 +00:00
Jack Grigg a7f9365fb8 test: Set hashFinalSaplingRoot default correctly in create_block 2020-11-18 11:12:09 +00:00
Jack Grigg 030a685392 test: Fix SignatureHash RPC test helper
- Check validity of inIdx.
- ZIP 143 and 243 support.
2020-11-18 11:11:54 +00:00
Jack Grigg bbed3ecc3c test: Remove FindAndDelete from RPC test framework 2020-11-17 18:48:32 +00:00
Jack Grigg 8bc0a591a0 Revert "remove SignatureHash from python rpc tests"
This reverts commit 910ff448d6.
2020-11-17 18:48:32 +00:00
Jesse Cohen aead91419e [doc][trivial] no retargeting in regtest mode 2020-11-17 18:48:32 +00:00
mdr0id 4dc94c954f Update expected fails for Sprout txns flows on Canopy 2020-11-16 15:57:49 -08:00
furszy ca9fc49fc4
rpc_wallet_tests: changed "Insufficient funds" error message to a proper "Insufficient transparent funds". This is because we are now throwing the insufficient transparent balance rpc error inside load_utxo. 2020-11-13 10:23:59 -03:00
Jack Grigg 6c43a57e78 test: Use default shielded address in RPC tests where the type is irrelevant
This means we are running these tests against the recommended functionality,
and that these RPC tests will now use the faster Sapling addresses.
2020-11-11 22:43:26 +00:00
Homu 60331b9e83 Auto merge of #4574 - oxarbitrage:issue4475, r=daira
Add blockhash parameter to getrawtransaction

Code ported manually from https://github.com/bitcoin/bitcoin/pull/10275 in attempt to fix https://github.com/zcash/zcash/issues/4475
2020-11-10 15:52:11 +00:00
Jack Grigg dbfb3565d6 lint: Opt out of locale dependence in Zcash shell scripts 2020-11-09 23:06:21 +00:00
Jack Grigg 7c4b19fa4d lint: Use consistent shebangs 2020-11-09 23:06:21 +00:00
Jack Grigg 337e528d33 python: Explicitly set encoding to utf8 when opening text files 2020-11-09 23:06:21 +00:00
Wladimir J. van der Laan 5295079b2e test: Explicitly set encoding to utf8 when opening text files
These are text files but their encoding does not depend on the locale.
Not all of them require utf8 but it is better to fix it at something
to remove potential unpredictability.

This is necessary on FreeBSD where no locale is set by default,
and apparently Python defaults not only the terminal encoding to the locale
but that of every text file. So without LOCALE environment it defaults text
file encoding to ASCII. This causes problems with e.g. `bitcoin.conf`.

Luckily the locale doesn't affect the default encoding for str.encode() and
bytes.decode() on Python 3, so this is the only change necessary.
2020-11-09 22:59:04 +00:00
Daira Hopwood 90493623a0
Fix a comment about postponement of Clang upgrade 2020-11-03 09:55:02 +00:00
Sean Bowe 34c2a4b380
Postpone clang and libc++ dependency updates until after the 4.1.0 release. 2020-11-02 13:36:34 -07:00
Larry Ruane a91a7d37cf add z_gettreestate rpc 2020-10-26 23:08:47 -06:00
therealyingtong d8f20860de Postpone native_ccache 4.0 2020-10-21 23:15:19 +08:00
Homu de5c28b4b7 Auto merge of #4613 - str4d:claaaaaang, r=daira
Pin Clang for all compilation

fixes #2513, fixes #4697, fixes #4698, fixes #4699. refs #4607, #4292
2020-10-20 11:15:47 +00:00
Homu 8fa19fd50d Auto merge of #4794 - LarryRuane:allow-getaddressutxos, r=daira
allow getaddressutxos if -lightwalletd

The wallets need to be able to retrieve, via lightwalletd, the UTXO set for a given address, see https://github.com/zcash/lightwalletd/issues/312. The `getaddressutxos` rpc that was added for Insight Explorer is perfect for this, but this rpc is disabled when only `-lightwalletd` is enabled (that is, it requires `-insightexplorer`, which is a superset of `-lightwalletd`). However, the `DB_ADDRESSUNSPENTINDEX` index that supports this rpc is present when only `-lightwalletd` is enabled. This was probably a (fortuitous, as it turns out) oversight. So all that's required is to allow this rpc when `-lightwalletd` is enabled.
2020-10-20 09:31:39 +00:00
Larry Ruane 083a05b04f allow getaddressutxos if -lightwalletd 2020-10-19 11:26:16 -06:00
Homu ceb642550b Auto merge of #4789 - daira:4785-macos-tests, r=str4d
Test suite portability fixes for macOS

Fixes zcash/zcash#4785
2020-10-16 17:06:40 +00:00
Jack Grigg ee079a683b test: Fix various pyflakes warnings 2020-10-16 16:00:02 +01:00
Jack Grigg ea7d57aa47 QA: Add native_clang and libcxx to updatecheck.py 2020-10-16 15:43:50 +01:00
Daira Hopwood c06cc5854e qa/zcash/full_test_suite.py: print immediately if a test fails.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-16 03:58:31 +01:00
Daira Hopwood f85ed2741c qa/zcash/full_test_suite.py: changes needed for macOS. fixes #4785
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-10-16 03:57:57 +01:00
Jack Grigg bf450b2607 qa: Disable FORTIFY_SOURCE checks
FORTIFY_SOURCE does mostly nothing for Clang before 10, which we don't
pin yet (and won't before we next upgrade Rust).
2020-10-14 21:52:32 +01: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
Jack Grigg 7c9fa28274 depends: ZeroMQ 4.3.3 2020-10-06 00:03:21 +01:00
Jack Grigg a9f62bdda0 depends: Boost 1.74.0
- The old patch is no longer necessary because of this upstream fix:
    https://github.com/boostorg/build/pull/560

- Boost 1.72 removed a <deque> from an include, which exposed a missing
  include in src/httpserver.cpp.

- Boost 1.73 moved function placeholders into the boost::placeholders
  namespace.

- The new patch is a fix from just after Boost 1.74 was released, fixing
  a warning that was missed.
2020-10-05 19:48:46 +01:00
Homu ce44f60c26 Auto merge of #4758 - str4d:depends-updates, r=str4d
Update dependencies
2020-10-01 16:34:04 +00:00
Homu a983344931 Auto merge of #4752 - str4d:small-httpserver-backports, r=daira
Small httpserver.cpp backports

Also includes a change to the `uiInterface.NotifyBlockTip` signal API.
These remove merge conflicts from subsequent backports for `sync.h`.

Cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#6859
- bitcoin/bitcoin#7112
  - Only the non-QT changes.
- bitcoin/bitcoin#7966
- bitcoin/bitcoin#8421
  - We already backported the second commit in zcash/zcash#2555
2020-10-01 12:48:58 +00:00
Jack Grigg e15eaf0343 QA: Fix backporting bugs in httpbasics.py 2020-10-01 13:44:21 +01:00
Jack Grigg 076c1af55c depends: utfcpp 3.1.2 2020-10-01 11:10:33 +01:00
Jack Grigg 78a7230f50 depends: googletest 1.8.1 2020-10-01 10:57:57 +01:00
Jack Grigg 7725f66051 depends: ccache 3.7.11 2020-10-01 10:57:26 +01:00
Jack Grigg 96da9c2c00 depends: libevent 2.1.12
This includes https://github.com/libevent/libevent/pull/637 which fixes
a problem we encounter during cross-compilation with clang.
2020-10-01 10:56:42 +01:00
Jack Grigg bab853748e QA: Remove OpenSSL from updatecheck.py 2020-09-30 00:40:12 +01:00
Wladimir J. van der Laan 23556e690e http: Restrict maximum size of request line + headers
Prevent memory exhaustion by sending lots of data.
Also add a test to `httpbasics.py`.

Closes #6425
2020-09-30 00:35:32 +01:00
Homu 9245388bbc Auto merge of #4749 - str4d:update-config-guess-and-sub, r=str4d
depends: Update to latest config.guess & config.sub
2020-09-29 02:17:39 +00:00
Jack Grigg f52793d0d0 QA: Switch to x86_64-pc-linux-gnu for hard-coded Linux HOST
The change to config.guess for x86_64:Linux was made here:
    http://git.savannah.gnu.org/cgit/config.git/commit/?id=ca9bfb8cc75a2be1819d89c664a867785c96c9ba
2020-09-28 21:28:43 +01:00
Homu 514d868179 Auto merge of #4739 - str4d:update-leveldb, r=str4d
Update LevelDB to upstream commit f545dfabf

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#7911
- bitcoin/bitcoin#7982
- bitcoin/bitcoin#8133
- bitcoin/bitcoin#8784
  - Only the missing changes.
- bitcoin/bitcoin#8826
- bitcoin/bitcoin#8613
- bitcoin/bitcoin#10544
- bitcoin/bitcoin#10633
  - Only the changes to files and code we have.
- bitcoin/bitcoin#10806
- bitcoin/bitcoin#10958
- bitcoin/bitcoin#12451
- bitcoin/bitcoin#13925
- bitcoin/bitcoin#15270

This upgrades LevelDB in the exact same commit progression as upstream, up to January 2019.
2020-09-25 16:16:37 +00:00
Dimitris Apostolou 67ffb189b7
Fix typos 2020-09-25 10:49:57 +03:00
Homu 49fc20aced Auto merge of #4720 - ebfull:fix-perf-regressions, r=str4d
Address some performance regressions

@str4d identified and fixed some performance regressions in our elliptic curve and proving crates, and we also changed to complete formulas in `bls12_381` to get some better performance in some cases. The result:

```
v3.1.0
"runningtime": 0.59883

before upgrading rust:
"runningtime": 0.823932

after upgrading rust:
"runningtime": 0.83004

after upgrading rust packages:
"runningtime": 0.763065
```

which gets us some of the way back to where we were.
2020-09-23 01:36:00 +00:00
Dimitris Tsapakidis b892fe13f8 Fixed multiple typos
A few "a->an" and "an->a".
"Shows, if the supplied default SOCKS5 proxy" -> "Shows if the supplied default SOCKS5 proxy". Change made on 3 occurrences.
"without fully understanding the ramification of a command" -> "without fully understanding the ramifications of a command".
Removed duplicate words such as "the the".

Zcash: Only the changes to files and code that we have.
2020-09-23 00:07:48 +01:00
Sean Bowe 03ce24013a
Update Rust to 1.44.1. 2020-09-22 15:06:01 -06:00
Homu c9672a49c2 Auto merge of #4696 - str4d:3640-z_sendmany-any-taddr, r=str4d
wallet: Add ANY_TADDR special string to z_sendmany

When using this special string as the from address, non-coinbase UTXOs
from any transparent addresses within the wallet will be used to fund the
transaction. Change outputs will be sent to a new transparent address,
as with any other spend of transparent funds.

Closes zcash/zcash#3640.
2020-09-22 18:09:58 +00:00
Jack Grigg e33f530a65 wallet: Ignore coinbase UTXOs with z_sendmany ANY_TADDR
Coinbase UTXOs from multiple transparent addresses may be shielded
together using z_shieldcoinbase.
2020-09-22 17:45:09 +01:00
Homu 35bb61be39 Auto merge of #4725 - str4d:cargo-vendor, r=str4d
depends: Switch to `cargo vendor` for Rust dependencies

When we first integrated Rust into our build system, we had two
limitations:

- We were building the `librustzcash` FFI library as a dependency, and
  therefore needed access to its crate dependencies in the depends
  system.
- Gitian builds happen offline, so we needed to fetch any crate
  dependencies ahead of time, and then configure cargo to use these in
  an offline environment.

At the time, `cargo` already had support for "Source Replacement", but
there was no easy way to package the dependencies in the necessary way.
What we implemented was effectively the `cargo-vendor` tool, built using
Makefiles. A noticeable downside was that we were pinning dependencies
twice: once in the `Cargo.lock` for the FFI library, and again in our
depends system.

Since then, `cargo-vendor` has been upstreamed into `cargo` itself, and
we have moved `librustzcash` into this repository. We can therefore use
`cargo vendor` directly from our pinned Rust compiler to fetch the
dependencies, and rely on our local `Cargo.lock` to pin the specific
crates we are relying on.
2020-09-19 12:37:51 +00:00
Jack Grigg c36ad21e74 QA: Comment out Rust crate checks in updatecheck.py
https://github.com/zcash/zcash/issues/4726 has been opened to track
fixing this.
2020-09-19 13:35:36 +01:00
zebambam 0314ad1a53 Postponed dependency updates, refer to core team sync meeting. 2020-09-16 09:48:55 -07:00
Homu f8e1a02bbe Auto merge of #4561 - oxarbitrage:issue1873, r=daira
Allow full and relative path wallet database location

Closes https://github.com/zcash/zcash/issues/1873
2020-09-04 14:49:50 +00:00
Daira Hopwood fbe68913bd Ensure that the absolute path used in the test definitely does not exist.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-09-04 14:52:11 +01:00
Daira Hopwood 21fee305a2 Fix grammar in error messages.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-09-04 14:52:05 +01:00
Alfredo Garcia 6a7cfdea54 allow wallet file to be outside datadir 2020-09-04 14:50:17 +01:00
Homu 7e958be2cb Auto merge of #4300 - oxarbitrage:issue3939, r=nuttycom
add shielded balance to getwalletinfo

Closes zcash/zcash#3939

It is based on the definition that unconfirmed balance has 0 confirmations; anything else is regular balance.

Implementation:

1. `getBalanceZaddr` uses one version of `GetFilteredNotes`, we want to use the other version that allow us to get balances inside min and max confirmations.
2. `shielded_unconfirmed_balance`, and `shielded_balance` are obtained by calling `getBalanceZaddr` with different min and max confirmations according to the definitions from above.
2020-09-04 13:29:58 +00:00
Homu 3caa784970 Auto merge of #2778 - syd0:add-python-assert, r=daira
Add assert_raises_message to the python test framework.
2020-09-03 14:26:54 +00:00
Daira Hopwood bd4469339a
Rename z_*_balance fields of getwalletinfo output to shielded_*_balance 2020-09-03 14:43:10 +01:00
Homu ef62a1c5e4 Auto merge of #4688 - defuse:fix-rpc-test-string-interpolation, r=daira
Add a missing % to a string interpolation in rpc test framework
2020-09-03 13:06:45 +00:00
Sean Bowe 539e487a31
Postpone updates for dependencies until after 4.0.0 release. 2020-09-01 13:24:08 -06:00
Jack Grigg 06d44392be wallet: Add ANY_TADDR special string to z_sendmany
When using this special string as the from address, UTXOs from any
transparent addresses within the wallet will be used to fund the
transaction. Change outputs will be sent to a new transparent address,
as with any other spend of transparent funds.

Closes zcash/zcash#3640.
2020-08-29 01:39:30 +01:00
Taylor Hornby 51b9e230d2 Add a missing % to a string interpolation in rpc test framework 2020-08-26 14:47:48 -06:00
Sean Bowe 104cc4dc77
Postpone rust updates 2020-08-26 10:08:35 -06:00
Sean Bowe 651721dcd8
Postpone boost 1.74.0 update 2020-08-26 10:04:20 -06:00
Jack Grigg 0ac2261b7a qa: Update list of postponed crate versions 2020-08-25 13:07:22 +01:00
Jack Grigg f0babb8356 depends: cargo update 2020-08-25 13:07:22 +01:00
Jack Grigg c10ba7da41 depends: Migrate to zcash_* 0.3.0 Rust crates 2020-08-25 13:07:22 +01:00
Alfredo Garcia 35961c4ee2 add shielded balance to getwalletinfo 2020-08-24 14:42:19 -03:00
Daira Hopwood 57a0418fbb Repair full_test_suite.py for new checksec.sh.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-08-14 18:02:27 +01:00
Daira Hopwood eea06658f4 Newer version of checksec.sh from a6df608ac0
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-08-14 17:49:16 +01:00
Jack Grigg 2a3770cfbf depends: Rework Rust integration
The Rust toolchain is now a native dependency, and the vendored crates
no longer depend on the native toolchain.
2020-08-10 22:52:23 +01:00
Homu d36718542c Auto merge of #4597 - str4d:rust-tracing, r=str4d
Use the Rust tracing crate for C++ logging

This PR swaps in the `tracing` crate (via FFI) for logging to either standard
output or `debug.log`. It transparently maps all existing `LogPrintf` and
`LogPrint` invocations to info-level `tracing` events, and passes through
correct file and line information. `error` invocations are mapped to error-level
`tracing` events, currently without line information (due to the way that
`error` is used in the codebase; swapping individual callsites to the new
`LogError` macro will provide that information).

The end-goal for this change is that we don't need to make any disruptive
changes to the codebase, but we can start to leverage `tracing`-specific
functionality where we want to, such as providing extra fields on certain log
lines (that can be filtered for), adding spans to record the flow of execution
through `zcashd`, and logging within C++ and Rust simultaneously. Support
for extra fields on spans and events will be added in a subsequent PR.

The `-debug` config options are converted at launch into their corresponding
directives for tracing's `EnvFilter`. The new `setlogfilter` RPC method allows
this filter to be reloaded dynamically. The syntax is documented in the
`setlogfilter` help text, as well as here:

https://docs.rs/tracing-subscriber/0.2.7/tracing_subscriber/filter/struct.EnvFilter.html#directives

When `-printtoconsole` is specified, the output now includes timestamps and
ANSI encoding :)
2020-08-07 21:54:46 +00:00
Jack Grigg 5ada9230af Revert "Add check-depends step to STAGE_COMMANDS list"
This reverts commit d4f70e5536.
2020-08-07 17:03:50 +01:00
Jack Grigg c9ca74fb34 qa: Add tracing dependencies to updatecheck.py
A new safe_depends() checker is added, which allows the '.' character on
top of the existing safe() characters.

The time crate is postponed to 2021-02-01, by which time hopefully the
chrono crate will have figured out what it is doing with that dependency.
2020-08-07 15:26:28 +01:00
Taylor Hornby 902bf838af Add new dependencies to updatecheck.py, add a flag we can use to have our CI test it. 2020-08-03 15:01:01 -06:00
Taylor Hornby 88082c4a56 Extend deadline for postponing dependency updates 2020-08-03 15:00:22 -06:00
Kris Nuttycombe 0391809da1 Remove amqp code and Proton library depenencies & flags. 2020-07-31 13:08:18 -06:00
Homu f39e4dbaf1 Auto merge of #4627 - LarryRuane:issue4596-flush-wallet-db, r=str4d
flush witness cache (SetBestChain()) on clean shutdown

Closes #4596, follow-on to #4573. In addition to flushing witness data on shutdown, fix the RPC test that was preventing this change from being part of #4573.
2020-07-29 13:12:04 +00:00
Homu 615efd2a52 Auto merge of #4584 - defuse:update-ignore, r=str4d
Block release when we haven't checked dependency updates for security fixes
2020-07-29 10:45:44 +00:00
Larry Ruane a65ecaad54 flush wallet db (SetBestChain()) on clean shutdown 2020-07-20 20:04:48 -06:00
Homu 959f5b09d0 Auto merge of #4560 - str4d:zip-207, r=nuttycom
[ZIP 207] Funding Streams + [ZIP 214] Dev Fund Recipients

Closes #4554. Closes #4555.
2020-07-10 22:45:11 +00:00
Kris Nuttycombe e456d87cbf Merge remote-tracking branch 'upstream/master' into zip-207 2020-07-09 08:23:57 -06:00
Homu 3f4a532588 Auto merge of #4573 - LarryRuane:issue4301-CopyPreviousWitnesses, r=daira
Flush witness data to disk only when it's consistent

Closes #4301. Running this PR's code will not repair a data directory that has been affected by this problem; that requires starting zcashd with the `-rescan` or `-reindex` options.
2020-07-09 11:50:41 +00:00
Larry Ruane 4811dcc426 sync before stopping nodes
This makes the test more deterministic. When the nodes are split, and
partition B (node 1) mines a joinsplit transaction, that block only
sometimes appears on the blockchain after the nodes are all reconnected.
2020-07-08 20:48:50 -06:00
Homu 701adc38cb Auto merge of #4578 - therealyingtong:zip212-impl, r=str4d
ZIP212 implementation

Closes #4557.
(description by @ebfull, taken from #4575)

* The `SaplingNote` structure has a new enum called `zip212Enabled`. This
  member is private and reflects whether the note was or is being created
  using the derivation method of ZIP 212 (i.e., `BeforeZip212` or `AfterZip212`).
* The `SaplingNotePlaintext` structure has a new unsigned char member
  `leadbyte`. This member is private and contains the leading byte of the
  plaintext (e.g. `0x01`, `0x02`).
* The serialization of `SaplingNotePlaintext` sets `zip212Enabled` to
  `BeforeZip212` iff the serialized note plaintext version is not `0x01`.
* The `r`/`rcm` fields have been removed and replaced with a private field
  `rseed`. `SaplingNote` and `SaplingNotePlaintext` now have a helper method
  `rcm()` which returns the `rcm` either by deriving it with `rseed`
  (if `zip212Enabled` is `AfterZip212`) or returning `rseed` by interpreting
  `rseed` as `rcm`.
* All the methods of obtaining a `SaplingNote` account for these changes:
  - The `SaplingNote` constructor that is used by e.g. the transaction builder,
    and internally samples random `rcm`, now takes a `zip212Enabled` argument
    to decide whether to sample `rcm` the "old" way or the "new" way.
  - The bare constructor for `SaplingNote` is removed.
  - The other constructor which takes the raw contents of the note is only used
    in tests or in `Note.cpp`, but now also takes a `zip212Enabled` argument.
  - The other way of obtaining a note, by calling `SaplingNotePlaintext::note()`,
    has been adjusted.
* The `SaplingNotePlaintext` class now has an `generate_or_derive_esk()` method
  that either samples a random `esk` or derives it using the local `rseed`
  depending on the value of `leadbyte`.
* The encryption routine is modified to consult `generate_or_derive_esk()` and
  provide it to the note encryption object.
* The note encryption objects now take an optional `esk` as input and otherwise
  sample a random `esk` internally. This API functionality is preserved to allow
  for testing.
* The `SaplingNotePlaintext` decryption routines are modified:
  - The out and enc decryption routines now check that `epk` is consistent with
    the derived `esk`.
  -  The out decryption routine for plaintexts also checks that `esk` is
    consistent with what is derived by the note.
* The miner and transaction builder consult the activation of Canopy when
  creating `SaplingNote`s.
* The consensus rules are modified so that shielded outputs (miner rewards)
  must have `v2` note plaintexts after Canopy has activated.
2020-07-09 00:29:07 +00:00
Kris Nuttycombe 436dee90de Merge remote-tracking branch 'upstream/master' into zip-207 2020-07-08 15:04:32 -06:00
Kris Nuttycombe fccf37844b Fix pyflakes. 2020-07-02 16:54:49 -06:00
Homu 602e88ddb9 Auto merge of #4489 - therealyingtong:4479-remove-sprout-shielding, r=str4d
[ZIP 211] Disabling Addition of New Value to the Sprout Value Pool

Disables Sprout outputs after NU4 by checking for nonzero `vpub_old` in transactions after NU4 activation height.

Adds gtests to check expected behaviour before and after NU4 activation height.

edit:
Also modifies `z_` methods in `rpcwallet`, and adds a matching RPC test.

Implements [ZIP 211](https://zips.z.cash/zip-0211), closes #4479
2020-07-02 21:53:51 +00:00
Larry Ruane bf568273a7 fix pyflakes CI errors 2020-07-02 14:32:48 -06:00
Kris Nuttycombe 4d223f9797 Merge remote-tracking branch 'upstream/master' into zip-207 2020-07-02 13:24:45 -06:00
Sean Bowe 14a09a5fd6
Remove unused imports from remove_sprout_shielding RPC test. 2020-07-02 11:09:22 -06:00
therealyingtong f24e706079 Replace leadByte in SaplingNote with is_zip_212 2020-07-02 15:37:32 +08:00
Larry Ruane 5b7fed5bbf self.sync_all(), not time.sleep(4) 2020-07-01 10:28:15 -06:00