zcashd/qa/rpc-tests
Simon cc1ab2db55 For ZEC-013. Don't propagate txs which are expiring soon in p2p messages.
When responding to "mempool" message, do not include the txid of an
expiring soon transaction in the "inv" message reply.
When responding to "getdata" message, do not reply with a "tx" message
for a transaction which is expiring soon.
2018-11-17 09:02:00 -08:00
..
test_framework Add support for "notfound" message to mininode. 2018-11-17 08:27:41 -08:00
.gitignore Python-based regression tests 2014-02-28 15:24:31 -05:00
README.md Fix some typos in rpc-tests readme 2018-08-05 21:51:35 -07:00
bip65-cltv-p2p.py Fix BIP65 and BIP66 tests 2017-10-05 15:18:54 +01:00
bipdersig-p2p.py Fix BIP65 and BIP66 tests 2017-10-05 15:18:54 +01:00
blockchain.py rpc: update inline comments to refer to new file paths 2018-07-18 11:07:17 -06:00
decodescript.py Resolve issue bitcoin/bitcoin#3166. 2018-04-16 07:38:36 -06:00
disablewallet.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
finalsaplingroot.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
forknotify.py For unused variables reported by pyflakes, either remove the variable, 2017-06-22 18:09:05 +01:00
fundrawtransaction.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
getblocktemplate.py Add hashFinalSaplingRoot to getblocktemplate 2018-06-01 15:47:30 -06:00
getblocktemplate_longpoll.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
getblocktemplate_proposals.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
getchaintips.py [QA] restructure rpc tests directory 2015-05-18 15:25:45 +02:00
hardforkdetection.py For unused variables reported by pyflakes, either remove the variable, 2017-06-22 18:09:05 +01:00
httpbasics.py Cosmetics (trailing whitespace, comment conventions, etc.) 2017-06-22 18:09:05 +01:00
invalidateblock.py Cosmetics (trailing whitespace, comment conventions, etc.) 2017-06-22 18:09:05 +01:00
invalidblockrequest.py Cosmetics (trailing whitespace, comment conventions, etc.) 2017-06-22 18:09:05 +01:00
key_import_export.py Fix pyflakes warnings in RPC tests 2017-09-27 17:24:19 +01:00
keypool.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
listtransactions.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
maxblocksinflight.py Cosmetics (trailing whitespace, comment conventions, etc.) 2017-06-22 18:09:05 +01:00
mempool_nu_activation.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
mempool_reorg.py Add failing test checking timelocked-txn removal during reorg 2018-02-20 02:57:40 +00:00
mempool_resurrect_test.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
mempool_spendcoinbase.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
mempool_tx_expiry.py For ZEC-013. Mitigate potential tx expiry height related DoS vector. 2018-11-17 09:01:49 -08:00
mempool_tx_input_limit.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
mergetoaddress_helper.py Add locking for Sapling notes 2018-11-16 18:14:58 -07:00
mergetoaddress_sapling.py Add Sapling support to z_mergetoaddress 2018-11-16 18:14:58 -07:00
mergetoaddress_sprout.py Add Sapling support to z_mergetoaddress 2018-11-16 18:14:58 -07:00
merkle_blocks.py Closes #3178 by adding verbosity level improvements to getblock RPC. 2018-04-30 11:51:59 -07:00
nodehandling.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
p2p-acceptblock.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
p2p_node_bloom.py generalize mininode.py protocol versioning 2018-08-02 20:30:20 -06:00
p2p_nu_peer_management.py qa: Test both Overwinter and Sapling peer management 2018-09-12 12:15:37 +01:00
p2p_txexpiringsoon.py For ZEC-013. Don't propagate txs which are expiring soon in p2p messages. 2018-11-17 09:02:00 -08:00
p2p_txexpiry_dos.py generalize mininode.py protocol versioning 2018-08-02 20:30:20 -06:00
paymentdisclosure.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
prioritisetransaction.py Deduplicate test utility method wait_and_assert_operationid_status 2017-12-16 19:24:25 +01:00
proton_test.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
proxy_test.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
pruning.py For unused variables reported by pyflakes, either remove the variable, 2017-06-22 18:09:05 +01:00
rawtransactions.py [RPC] createrawtransaction: add option to set the sequence number per input 2018-04-12 18:10:04 -06:00
receivedby.py Cosmetics (trailing whitespace, comment conventions, etc.) 2017-06-22 18:09:05 +01:00
regtest_signrawtransaction.py Closes #3534. Do not use APPROX_RELEASE_HEIGHT to get consensus branch 2018-09-21 11:10:15 -07:00
reindex.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
reorg_limit.py pyflakes cleanups to RPC tests after Overwinter PRs. 2018-03-12 14:15:25 +00:00
rest.py Cosmetics (trailing whitespace, comment conventions, etc.) 2017-06-22 18:09:05 +01:00
rewind_index.py Add RPC test of RewindBlockIndex 2018-04-03 10:58:27 +01:00
rpcbind_test.py Cosmetics (trailing whitespace, comment conventions, etc.) 2017-06-22 18:09:05 +01:00
script_test.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
signrawtransaction_offline.py Update qa test as offline regtest nodes need branch id passed in. 2018-09-21 17:16:44 -07:00
signrawtransactions.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
smartfees.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
txn_doublespend.py For unused variables reported by pyflakes, either remove the variable, 2017-06-22 18:09:05 +01:00
wallet.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
wallet_1941.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
wallet_addresses.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
wallet_anchorfork.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
wallet_changeindicator.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
wallet_import_export.py Fix HDSeed comment 2018-10-10 16:00:59 -06:00
wallet_listnotes.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
wallet_listreceived.py update bug in wallet_listreceived.py, now it highlights the fix 2018-10-24 08:13:56 -06:00
wallet_mergetoaddress.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
wallet_nullifiers.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
wallet_overwintertx.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
wallet_persistence.py Test Sapling value pool accounting 2018-11-16 16:14:52 +00:00
wallet_protectcoinbase.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
wallet_sapling.py Adjust z_mergetoaddress assertions in Sapling rpc test 2018-11-16 18:14:58 -07:00
wallet_shieldcoinbase.py Add Sapling support to z_shieldcoinbase 2018-10-03 12:16:18 +01:00
wallet_shieldcoinbase_sapling.py Fix pyflakes warnings 2018-10-05 11:32:22 +01:00
wallet_shieldcoinbase_sprout.py Fix pyflakes warnings 2018-10-05 11:32:22 +01:00
wallet_treestate.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
walletbackup.py RPC dumpwallet and z_exportwallet updated to no longer allow 2017-11-16 22:29:37 -08:00
zapwallettxes.py Cosmetics (trailing whitespace, comment conventions, etc.) 2017-06-22 18:09:05 +01:00
zcjoinsplit.py Clean up imports to be pyflakes-checkable. fixes #2450 2017-06-22 18:09:04 +01:00
zcjoinsplitdoublespend.py Fix outdated comment about starting balance of nodes 2018-02-28 14:29:05 -08:00
zkey_import_export.py Update qa tests for new "sapling" default for z_getnewaddress. 2018-11-16 14:22:23 -08:00
zmq_test.py Cosmetics (trailing whitespace, comment conventions, etc.) 2017-06-22 18:09:05 +01:00

README.md

Regression tests of RPC interface

test_framework/test_framework.py

Base class for RPC regression tests.

test_framework/util.py

Generally useful functions.

Notes

You can run a single test by calling qa/pull-tester/rpc-tests.sh <testname>.

Run all possible tests with qa/pull-tester/rpc-tests.sh -extended.

Possible options:

-h, --help       show this help message and exit
  --nocleanup      Leave zcashds and test.* datadir on exit or error
  --noshutdown     Don't stop bitcoinds after the test execution
  --srcdir=SRCDIR  Source directory containing zcashd/zcash-cli (default:
                   ../../src)
  --tmpdir=TMPDIR  Root directory for datadirs
  --tracerpc       Print out all RPC calls as they are made

If you set the environment variable PYTHON_DEBUG=1 you will get some debug output (example: PYTHON_DEBUG=1 qa/pull-tester/rpc-tests.sh wallet).

A 200-block -regtest blockchain and wallets for four nodes is created the first time a regression test is run and is stored in the cache/ directory. Each node has the miner subsidy from 25 mature blocks (25*10=250 ZEC) in its wallet.

After the first run, the cache/ blockchain and wallets are copied into a temporary directory and used as the initial test state.

If you get into a bad state, you should be able to recover with:

rm -rf cache
killall zcashd