Commit Graph

348 Commits

Author SHA1 Message Date
Jack Grigg 9e8f1d09ca
zkey_import_export: Synchronize mempools before mining
Resolves a race condition that caused the RPC test to intermittently fail.

Closes #2892.
2018-01-22 21:10:57 +00:00
Jack Grigg 44e5b42751
Check chainValueZat when checking value pool monitoring 2018-01-03 23:41:53 +01:00
Jack Grigg 5d9cf8ae23
Fix pyflakes warnings in zkey_import_export RPC test 2017-12-21 18:19:42 +00:00
Homu 1683c2d5bf Auto merge of #2143 - str4d:1997-viewing-keys, r=str4d
Implement incoming viewing keys

Closes #1997.
2017-12-20 14:11:05 -08:00
Jack Grigg 44e37656bf
Add watch-only support to Zcash RPC methods
Balance totals do not include spends linked to viewing key addresses, as
nullifiers cannot be calculated and therefore spends cannot be detected.
2017-12-20 00:46:37 +00:00
Homu c1b0db70e5 Auto merge of #2779 - arcalinea:2515_test_zimportkey, r=str4d
Add RPC test that exercises z_importkey

Part of #2515.
2017-12-18 08:32:28 -08:00
Homu efda4bafef Auto merge of #2796 - per-gron:less-verbose-tests, r=daira
Less verbose tests

Fixes #2453 and deduplicates some related code.
2017-12-17 00:22:38 -08:00
Per Grön d4ab94a6d9 Print result of RPC call in test only when PYTHON_DEBUG is set 2017-12-16 19:24:25 +01:00
Per Grön 8993edfb77 Deduplicate test utility method wait_and_assert_operationid_status
Strictly speaking this is not a true deduplication; the test output will be
slightly different (due to inconsistent print statements) but I think this is
close enough.
2017-12-16 19:24:25 +01:00
Homu 7888624f74 Auto merge of #2795 - str4d:2351-sprout-circuit-value, r=str4d
Track net value entering and exiting the Sprout circuit

Delta values will be stored for new blocks; old blocks can be filled in by
re-indexing. The net value currently in the Sprout circuit is only calculated
when delta values for all previous blocks are present.

Part of #2351.
2017-12-16 02:09:40 -08:00
Homu f44a4cea42 Auto merge of #2790 - bitcartel:2746_payment_disclosure_prefix, r=str4d
Closes #2746. Payment disclosure blobs now use 'zpd:' prefix.
2017-12-15 10:31:58 -08:00
Jay Graber 73b220cb0f Add rpc test that exercises z_importkey 2017-12-15 10:15:50 -08:00
Jack Grigg e319633435
Add Sprout value pool to getblock and getblockchaininfo 2017-12-14 22:06:15 +00:00
Simon 61345ae703 Closes #2746. Payment disclosure blobs now use 'zpd:' prefix. 2017-12-07 10:11:43 -08:00
Homu 019c4bddc8 Auto merge of #2741 - bitcartel:stop_dumpwallet_overwriting, r=str4d
Prevent RPC calls dumpwallet and z_exportwallet from overwriting an existing file

Closes #2740
2017-12-04 09:41:52 -08:00
Simon 159aa37fc0 Closes #2759. Fixes broken pipe error with QA test wallet.py. 2017-11-22 00:02:52 -08:00
Simon ba1dbb3040 RPC dumpwallet and z_exportwallet updated to no longer allow
overwriting an existing file.
2017-11-16 22:29:37 -08:00
Simon 45232b1961 Add payment disclosure as experimental feature. 2017-11-14 13:29:05 -08:00
Simon 337bca8125 Fix an issue where qa test wallet_shieldcoinbase could hang.
The mempool was not synced so a block could be generated and not
clear out the mempool.  This would then cause subsequent code
which expected the mempool of all nodes to be empty to hang.
2017-11-03 00:39:23 -07:00
Homu 3775ac5250 Auto merge of #2692 - bitcartel:2639_enable_z_shieldcoinbase, r=str4d
Closes #2639. z_shieldcoinbase is now supported, no longer experimental.

This reverts commit 5023af7bd5.
2017-11-02 00:18:40 -07:00
Simon c5dabd2b66 Closes #2639. Adds optional limit parameter with a default value of 50.
The new parameter is to satisfy the principle of least astonishment
by providing a sensible default for the maximum number of transparent
inputs to shield.  If users do not configure -mempooltxinputlimit
it is possible for them to create transactions with hundreds of
inputs which suffer from mining delay, due to the current state of
the network where some miners have configured -mempooltxinputlimit
as a way to deal with the problem of quadratic hashing.
2017-11-01 10:40:24 -07:00
Simon cf72e8e06e Closes #2263 fixing broken pipe error. 2017-10-30 11:58:37 -07:00
Simon c2d3bafeaa Closes #2639. z_shieldcoinbase is now supported, no longer experimental.
This reverts commit 5023af7bd5.
2017-10-26 11:29:36 -07: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
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
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
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
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