Commit Graph

453 Commits

Author SHA1 Message Date
Jack Grigg f8ef223ce3
Un-indent RPC test output in test runner
The indentation caused the test stdout to be buffered and only printed at the
end of the test, which makes it harder to diagnose hanging tests.
2017-10-05 15:18:58 +01:00
Jack Grigg 5455ca0d0e
Fix BIP65 and BIP66 tests
Blocks were being created that didn't satisfy the regtest consensus rules.
2017-10-05 15:18:54 +01:00
Jack Grigg c10c40779d
[Test] MiniNode: Implement Zcash coinbase 2017-10-05 15:18:53 +01:00
Jack Grigg 7596a4922d
[Test] MiniNode: Coerce OP_PUSHDATA bytearrays to bytes
If a bytearray is passed in as part of an iterable, the CScript constructor
fails because b''.join() cannot be used to join a bytearray to a bytes or str in
Python 2.
2017-10-05 15:18:31 +01:00
Jack Grigg 643235859a
[Test] MiniNode: Fix coinbase creation
CScriptNum is only used for heights > 16.
2017-10-05 15:18:27 +01:00
Jack Grigg e68c3ec188
[Test] MiniNode: Use Zcash PoW
Equihash solver code extracted from https://github.com/str4d/zcash-pow

RPC tests now require pyblake2 to be installed
2017-10-05 15:15:10 +01:00
Jack Grigg 0de9a481ab
[Test] MiniNode: Update protocol version and network magics 2017-10-05 15:15:10 +01:00
Jack Grigg 31bc3d2581
[Test] MiniNode: Implement Zcash block parsing 2017-10-05 15:15:10 +01:00
Jack Grigg c47dc872a7
[Test] MiniNode: Implement v2 CTransaction parsing 2017-10-05 15:15:10 +01:00
Jack Grigg 13ca1e8011
[Test] MiniNode: Implement JSDescription parsing 2017-10-05 15:15:06 +01:00
Jack Grigg 243b6a9d4b
Add connections in BIP65 and BIP66 tests to the test manager
Fixes a bug in the tests causing them to silently pass instead of correctly
reporting other errors. Introduced in 4a785b0a5b
during the test rewrites.
2017-10-03 17:41:37 +01:00
Homu e806f9c603 Auto merge of #2638 - bitcartel:2637_experimental_feature_z_shieldcoinbase, r=str4d
Closes #2637. Make z_shieldcoinbase an experimental feature.

Can be enabled with: `zcashd -experimentalfeatures -zshieldcoinbase`
2017-09-27 16:09:54 -07:00
Jack Grigg 091c089d03
Fix incorrect failure in memory benchmark 2017-09-27 19:42:39 +01:00
Jack Grigg 72b4f0b3e6
Individualise performance-measurements.sh errors for debugging 2017-09-27 19:41:54 +01:00
Simon 5023af7bd5 Closes #2637. Make z_shieldcoinbase an experimental feature where it
can be enabled with: zcashd -experimentalfeatures -zshieldcoinbase.
2017-09-27 10:43:54 -07:00
Jack Grigg f897e075c2
Fix pyflakes warnings in RPC tests 2017-09-27 17:24:19 +01:00
Homu f34c60de37 Auto merge of #2615 - bitcartel:2448_shield_coinbase, r=bitcartel
Add RPC command shield_coinbase #2448.

Shield transparent coinbase funds by sending to a shielded z address. Closes #2448.
2017-09-22 12:04:31 -07:00
Simon 06c19063bb Implement RPC shield_coinbase #2448. 2017-09-21 15:04:12 -07:00
Homu 8f16b27304 Auto merge of #2616 - nathan-at-least:importprivkey-shows-address.4, r=str4d
Importprivkey shows address

Scratching an itch: make `importprivkey` output the corresponding address.

Without this PR, `importprivkey` shows no output. Because we're moving towards an "address-based" RPC interface, rather than "account-based", there's a gap when using `importprivkey` because there's no way to assign it to a specific account, but also no easy way to determine the address. This change fixes that wart.
2017-09-21 14:29:03 -07:00
Jack Grigg 109fed51ff
Additional test cases for importprivkey RPC test 2017-09-21 22:21:44 +01:00
Homu 60b4a79000 Auto merge of #2620 - bitcartel:2583_watch_only_fspendable, r=str4d
Closes #2583. Exclude watch-only utxos from coin selection.
2017-09-20 04:49:48 -07:00
Simon 5a0721f0fe Set up a clean chain.
Delete redundant method wait_until_miner_sees() via use of sync_all().
2017-09-19 20:42:53 -07:00
Simon b17e1b4080 Closes #2583. Exclude watch-only utxos from z_sendmany coin selection. 2017-09-19 19:42:48 -07:00
Ariel Gabizon 2e8aefdce1 add load-wallet benchmark 2017-09-18 21:54:53 +02:00
Nathan Wilcox 3e92c028ce Add a new requirement that `importprivkey` API is idempotent. 2017-09-18 15:30:42 +09:00
Nathan Wilcox 63cdea4233 Add a new rpc-test-specified requirement: `importprivkey` outputs the associated address. (Test fails.) 2017-09-18 15:30:42 +09:00
Nathan Wilcox d29b6b042f key_import_export rpc-test: verify that UTXO view co-evolves for nodes sharing a key. 2017-09-18 15:30:42 +09:00
Jack Grigg e719bf75d4
Adjust instructions for UTXO dataset creation
--nocleanup is sufficient to leave the data directories behind. --noshutdown is
only useful if you want to inspect the nodes afterwards, and you'd need to
manually shut down both nodes before copying the data directories.
2017-09-11 21:53:35 +01:00
Jack Grigg d669871e8b
Fix bug in benchmark data generation script 2017-09-06 19:52:35 +01:00
Jack Grigg a76174b76b
Benchmark time to call sendtoaddress with many UTXOs 2017-08-31 02:15:06 +01:00
Homu 1738e6957f Auto merge of #2458 - daira:2450.pyflakes-cleanup, r=str4d
pyflakes cleanup

Make the RPC tests pyflakes-clean. fixes #2450

Includes a fix that upstream had in https://github.com/bitcoin/bitcoin/pull/7802
2017-07-14 18:03:03 -07:00
Simon d77a0ac4a0 Closes #2446 by adding generated field to listunspent.
If generated is true, the unspent transaction output is from a
coinbase transaction and can only be sent to a shielded address.
2017-07-11 10:44:36 -07:00
Daira Hopwood ff0f305497 Cosmetics (trailing whitespace, comment conventions, etc.)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-22 18:09:05 +01:00
Daira Hopwood 811b36ba80 For unused variables reported by pyflakes, either remove the variable,
suppress the warning, or fix a bug (if the wrong variable was used).
refs #2450

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-22 18:09:05 +01:00
Daira Hopwood aff0bf7fa1 Clean up imports to be pyflakes-checkable. fixes #2450
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-22 18:09:04 +01:00
Homu 59de56eeca Auto merge of #2342 - bitcartel:1081__mempoolpatch, r=str4d
Add ability for node to reject tx from mempool by number of tx inputs

Implement short-term solution described in #2343 so that users can respond promptly to critical short-term problems caused by quadratic validation scaling, such as the getblocktemplate latency, block propagation latency, and mempool size inflation issues described in #2333.
2017-06-21 14:42:13 -07:00
Jack Grigg 6ea58d1531
Use sendfrom for both t-addr calls 2017-06-22 09:34:10 +12:00
Simon 99f6d5da6c Fix #b1eb4f2 so test checks sendfrom as originally intended.
Also reduce number of z_sendmany calls made so test runs quicker.
2017-06-20 22:49:47 +00:00
Daira Hopwood 193b3e8b28 Delete test that is redundant and inapplicable to Zcash.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-20 10:03:17 +01:00
Jack Grigg b1eb4f251a
Fix comment 2017-06-20 19:54:11 +12:00
Jack Grigg 4ef014151d
Additional testing of -mempooltxinputlimit 2017-06-20 15:58:46 +12:00
Daira Hopwood 4a785b0a5b Repair tests for strict DER signatures.
While we're at it, repair a similar test for CLTV, and make the repaired RPC tests run by default.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-06-19 16:32:15 +01:00
Nathan Wilcox 5a027a4a6e Do not use `-rpcwait` on all `zcash_rpc` invocations, only block when starting zcashd. 2017-05-22 17:51:23 -07:00
Nathan Wilcox 4e47698633 Reuse zcash_rpc. 2017-05-22 17:47:36 -07:00
Nathan Wilcox 453c74743c Fix a variable name typo. 2017-05-22 17:46:26 -07:00
Nathan Wilcox 0cfc9d65fa Enable set -u mode. 2017-05-22 17:46:13 -07:00
Jack Grigg 08dc7889d2
Remove additional sources of determinism from benchmark archive
The archive has also been moved from .tar.gz to .tar.xz for a
33% reduction in size.

Closes #2388.
2017-05-20 11:59:16 +12:00
Homu 8214ebc61c Auto merge of #2372 - str4d:2355-connectblock-bench, r=nathan-at-least
Benchmark for calling ConnectBlock on a block with many inputs

Requires placing `block-107134.tar.gz` (containing the block, and a fake CoinsDB containing its inputs) into the base directory of the repository.

To facilitate generation of the fake CoinsDB, an additional field `valuesZat` has been added to `getrawtransaction` containing the integer number of zatoshis instead of a decimal number of ZEC.

Closes #2355.
2017-05-18 20:13:26 -07:00
Jack Grigg c66c731adf
Add a benchmark for calling ConnectBlock on a block with many inputs
Requires placing block-107134.tar.gz (containing the block, and a fake CoinsDB
containing its inputs) into the base directory of the repository. This can be
generated using qa/zcash/create_benchmark_archive.py (see the script for usage
details).

To facilitate generation of the fake CoinsDB, an additional field 'valueZat' has
been added to 'getrawtransaction' containing the integer number of zatoshis
instead of a decimal number of ZEC.

Closes #2355.
2017-05-18 11:03:46 +12:00
Homu 73676ce6d6 Auto merge of #2200 - str4d:1884-tx-priority-test, r=nathan-at-least
Fix prioritisetransaction RPC test

Part of #1884.
2017-05-16 11:54:49 -07:00