Commit Graph

712 Commits

Author SHA1 Message Date
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
zkbot ab3c2fe7b0 Auto merge of #2265 - daira:2263.fix-rpc-error-reporting, r=daira
Fix an error reporting bug due to BrokenPipeError and ConnectionResetError not existing in Python 2

refs #2263

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-16 16:56:16 +00:00
zkbot f7f764e0b2 Auto merge of #2189 - bitcartel:1.0.7_with_apache_qpid, r=bitcartel
Add AMQP 1.0 support via Apache Qpid Proton C++ API 0.17.0

Closes #2188
2017-04-16 15:09:19 +00:00
Jay Graber 0a56135336 Poll on getblocktemplate result rather than use bare sleep to avoid race condition. 2017-04-14 17:31:35 -07:00
Daira Hopwood 80cbdbc749 Fix an error reporting bug due to BrokenPipeError and ConnectionResetError not existing in Python 2.
refs #2263

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-04-14 21:40:30 +01:00
Jack Grigg 338ff45787
Use a larger -rpcclienttimeout for slow performance measurements
Closes #2238.
2017-04-07 15:03:25 +12:00
Simon 99eb947a98 Add AMQP 1.0 support via Apache Qpid Proton C++ API 0.17.0 2017-03-25 08:51:40 -07:00
Wladimir J. van der Laan f3e1770cfb
tests: Disable Tor interaction
This is unnecessary during the current tests (any test for Tor
interaction can explicitly enable it) and interferes with the proxy
test.
2017-03-25 20:25:38 +13:00
zkbot f9f48667be Auto merge of #2176 - str4d:1593-libevent, r=bitcartel
libevent-based http server

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#5677
- bitcoin/bitcoin#6695
- bitcoin/bitcoin#6899
- bitcoin/bitcoin#7016
- bitcoin/bitcoin#7964
- bitcoin/bitcoin#8722
- bitcoin/bitcoin#8730
- bitcoin/bitcoin#9073
- bitcoin/bitcoin#9265
- bitcoin/bitcoin#9387
- bitcoin/bitcoin#9471
- bitcoin/bitcoin#9647
- bitcoin/bitcoin#9903
- bitcoin/bitcoin#6640
- bitcoin/bitcoin#8139
- bitcoin/bitcoin#8839

Closes #1593 and #1856.
2017-03-25 04:52:16 +00:00
Jack Grigg 47855b599d
Revert "Revert "rpc-tests: re-enable rpc-tests for Windows""
This reverts commit 7fd5d4e30e.

We need to un-revert this before pulling in
https://github.com/bitcoin/bitcoin/pull/6616
2017-03-25 17:37:18 +13:00
Wladimir J. van der Laan e93a3e1945
test: Avoid ConnectionResetErrors during RPC tests
This is necessary on FreeBSD and MacOSX, at least.

See https://github.com/bitcoin/bitcoin/pull/8834#issuecomment-250450213
2017-03-24 18:43:40 +13:00
Pieter Wuille 2edad86b2d
Fix interrupted HTTP RPC connection workaround for Python 3.5+ 2017-03-24 18:43:21 +13:00
zkbot 6344719817 Auto merge of #2052 - str4d:2032-z_importkey-partial-rescan, r=bitcartel
Usability improvements for z_importkey

- Add height parameter to z_importkey to reduce rescan range
- Change semantics of rescan parameter, so users can explicitly force a rescan
  for existing keys.

Closes #2032
2017-03-24 03:47:11 +00:00
Jack Grigg 53c96bfa6c
Test boolean fallback in z_importkey 2017-03-24 09:23:11 +13:00
Wladimir J. van der Laan 7b41e725d0
Make RPC tests cope with server-side timeout between requests
Python's httplib does not graciously handle disconnections from the http server, resulting in BadStatusLine errors.
See https://bugs.python.org/issue3566 "httplib persistent connections violate MUST in RFC2616 sec 8.1.4."

This was fixed in Python 3.5.

Work around it for now.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan 7fd5d4e30e
Revert "rpc-tests: re-enable rpc-tests for Windows"
This reverts commit bd30c3dced21fca869a14c75081f15195762afe1.

Disable windows RPC tests for now. These should be re-enabled once a
suitable Wine version is used on Travis.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan cc14ac45f4
tests: GET requests cannot have request body, use POST in rest.py
Sending a request body with GET request is not valid in HTTP spec, and
not compatible with evhttpd.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan 14dcc6ab96
qa: Remove -rpckeepalive tests from httpbasics
This option was a temporary workaround, and is no longer necessary
with the new web server.
2017-03-24 09:03:59 +13:00
Jack Grigg bec25c91cb
Revert "Closes #1680, temporary fix for rpc deadlock inherited from upstream."
This reverts commit f4404d7b5b.
2017-03-24 09:03:59 +13:00
Jack Grigg dec148f498
Fix prioritisetransaction RPC test
Part of #1884.
2017-03-23 18:57:46 +13:00
Jack Grigg b7e5b7d5ee
Simplify z_importkey by making rescan a string
Transparently handles older boolean values as well.
2017-03-23 15:57:11 +13:00
Jack Grigg a31ba7a0cb
Usability improvements for z_importkey
- Add height parameter to z_importkey to reduce rescan range
- Change semantics of rescan parameter, so users can explicitly force a rescan
  for existing keys.

Closes #2032
2017-03-16 19:34:41 +13:00
Jack Grigg 542a7a40f1
Add tests for getmempoolinfo 2017-03-16 14:30:16 +13:00
Pavel Janík 30c163d99d
Implement REST mempool API, add test and documentation. 2017-03-14 13:52:06 +13:00
zkbot a7cf698873 Auto merge of #2100 - str4d:2074-rpc, r=arcalinea
Bitcoin 0.12 RPC PRs 1

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6266
- bitcoin/bitcoin#6257
- bitcoin/bitcoin#6271
- bitcoin/bitcoin#6158
- bitcoin/bitcoin#6307
- bitcoin/bitcoin#6290
- bitcoin/bitcoin#6262
- bitcoin/bitcoin#6088
- bitcoin/bitcoin#6339
- bitcoin/bitcoin#6299 (partial, remainder in #2099)
- bitcoin/bitcoin#6350
- bitcoin/bitcoin#6247
- bitcoin/bitcoin#6362
- bitcoin/bitcoin#5486
- bitcoin/bitcoin#6417
- bitcoin/bitcoin#6398 (partial, remainder was included in #1950)
- bitcoin/bitcoin#6444
- bitcoin/bitcoin#6456 (partial, remainder was included in #2082)
- bitcoin/bitcoin#6380
- bitcoin/bitcoin#6970

Part of #2074.
2017-03-04 02:57:46 +00:00
zkbot dadb1ab74c Auto merge of #2101 - str4d:2074-tests, r=arcalinea
Bitcoin 0.12 test PRs 1

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6337
- bitcoin/bitcoin#6390
- bitcoin/bitcoin#5515
- bitcoin/bitcoin#6287 (partial, remainder included in bitcoin/bitcoin#6703)
- bitcoin/bitcoin#6465

Part of #2074.
2017-03-03 21:25:03 +00:00
Casey Rodarmor df8f8095b6
Don't share objects between TestInstances 2017-03-03 11:47:12 -08:00
Wladimir J. van der Laan 7cc6648341
tests: Extend RPC proxy tests
Also test -noonion
2017-03-03 10:57:13 -08:00
Jack Grigg 25b8f796ff
Re-encode t-addrs in disablewallet.py with Zcash prefixes 2017-03-02 13:26:34 -08:00
Jack Grigg 5329495fe4
Adjust fundrawtransaction RPC test for Zcash
- Enable wallet encryption
- Correct block reward
2017-03-02 13:26:34 -08:00
Wladimir J. van der Laan 56215c77d8
Fix crash in validateaddress with -disablewallet
Fix a null pointer dereference in validateaddress with -disablewallet. Also add a regression testcase.
2017-03-02 13:26:34 -08:00
Jonas Schnelli c2616abb3c
[QA] add testcases for parsing strings as values 2017-03-02 13:26:34 -08:00
Wladimir J. van der Laan d101d7b8e6
univalue: Avoid unnecessary roundtrip through double for numbers
JSON makes no distinction between numbers and reals, and our code
doesn't need to do so either.

This removes VREAL, as well as its specific post-processing in
`UniValue::write`. Non-monetary amounts do not need to be forcibly
formatted with 8 decimals, so the extra roundtrip was unnecessary
(and potentially loses precision).

Zcash: cherry-picked from commit 7650449a6777710cf818d41862626164da0cd412
Left over from 2aee461930
2017-03-02 13:26:34 -08:00
zathras-crypto a11c4bbd26
Exempt unspendable transaction outputs from dust checks
Since unspendable outputs can't be spent, there is no threshold at which it would be uneconomic to spend them.

This primarily targets transaction outputs with `OP_RETURN`.

---

Initially based on:

commit 9cf0ae26350033d43d5dd3c95054c0d1b1641eda
Author: zathras-crypto <zathrasc@gmail.com>
Date:   Wed Mar 25 02:04:02 2015 -0700

Changes:

- cherry-picked on top of bitcoin:master
- added RPC test for fundrawtransaction
2017-03-02 13:26:34 -08:00
Jonas Schnelli 5bfd954fc6
[QA] remove rawtransactions.py from the extended test list
rawtransactions.py is already in the standard test list
2017-03-02 13:23:03 -08:00
Jonas Schnelli 897a370c39
[QA] fix possible reorg issue in rawtransaction.py/fundrawtransaction.py RPC test
- added missing mempool sync between block generations
2017-03-02 13:23:03 -08:00
Jonas Schnelli 81eb80d841
[REST] add JSON support for /rest/headers/ 2017-03-02 13:23:03 -08:00
mruddy 81ae51c883
add tests for the decodescript rpc. add mention of the rpc regression tests to the testing seciton of the main readme. 2017-03-02 13:23:03 -08:00
Wladimir J. van der Laan bf890b6518
test: Move reindex test to standard tests
This test finishes very quickly, so it should be part of the default set
of tests in rpc-tests.
2017-03-02 13:23:03 -08:00
Jonas Schnelli 788d8e6a6f
fundrawtransaction tests 2017-03-02 13:23:03 -08:00
Jonas Schnelli 2ab237a088
add RPC tests for setban & disconnectnode 2017-03-02 13:23:03 -08:00
Jonas Schnelli e521939942
[RPC] extend setban to allow subnets 2017-03-02 13:23:03 -08:00
Jonas Schnelli 962ec4b5e4
[QA] add setban/listbanned/clearbanned tests 2017-03-02 13:23:03 -08:00
Stephen 6699b42518
Add paytxfee to getwalletinfo, warnings to getnetworkinfo 2017-03-02 13:23:03 -08:00
zkbot 6ee75b3b7b Auto merge of #2014 - arcalinea:test-prioritisetransaction, r=arcalinea
Test prioritisetransaction

After talking with @str4d about #1884 , I wrote a test for prioritisetransaction. It uses small blocks (11kb), and checks whether a transaction makes it into the next block after being prioritized by that node.

Should this be improved with a larger number of txs in the mempool, or by testing over multiple runs?

As for getblocktemplate(), it seems to return the prioritized transaction within the block size set by the node (about 50 txs fit in an 11kb block), but the block "sizelimit" it displays is set at 2 MB in `rpcmining.cpp` line 690:
```
result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SIZE));
```

This was quite confusing, I didn't think the `-blockmaxsize` parameter I was setting was working for awhile.
2017-03-02 06:47:04 +00:00
Simon 85c9ecb846 Part of #1969. Update tests to avoid error 'absurdly high fee' from change in min fee calc. 2017-02-28 11:44:51 -08:00
Simon ebe750a882 Part of #1969. Changing min fee calculation also changes the dust threshold. 2017-02-28 11:44:07 -08:00
Jay Graber 8d2dac6e3f Inc num of txs in test mempool 2017-02-27 14:11:09 -08:00
Jay Graber cc64e2ccc8 Add rpc test for prioritisetransaction 2017-02-12 11:01:45 -08:00
Simon 238fec642d Update test to check for updated error messages in AmountFromValue(). 2017-02-09 23:32:15 -08:00
zkbot 7d4ced95ed Auto merge of #2056 - str4d:2035-experimental-mode, r=bitcartel
Add a flag for enabling experimental features

Closes #2035.
2017-02-09 23:39:02 +00:00
zkbot d32511c72c Auto merge of #2054 - str4d:2030-decoderawtransaction-joinsplit-fields, r=bitcartel
Show all JoinSplit components in getrawtransaction and decoderawtransaction

Closes #2030.
2017-02-09 22:56:01 +00:00
Simon 91270dcfbc Update test to check for more joinsplit related fields in getrawtransaction 2017-02-09 14:48:58 -08:00
Jack Grigg b8eb37757b
Require -experimentalmode for wallet encryption 2017-02-09 22:10:58 +00:00
zkbot 253c610783 Auto merge of #2050 - str4d:2020-zmq, r=bitcartel
Add ZeroMQ notifications

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6103
- bitcoin/bitcoin#6684
- bitcoin/bitcoin#6686
- bitcoin/bitcoin#6736
- bitcoin/bitcoin#6739
- bitcoin/bitcoin#6743
- bitcoin/bitcoin#6768
- bitcoin/bitcoin#6779
- bitcoin/bitcoin#6810
- bitcoin/bitcoin#6927
- bitcoin/bitcoin#6980 (only upgrading zeromq)
- bitcoin/bitcoin#6680
- bitcoin/bitcoin#7058
- bitcoin/bitcoin#7621
- bitcoin/bitcoin#7335 (only parts affecting `zmq_test.py`)
- bitcoin/bitcoin#7853 (only parts affecting `zmq_test.py`)
- bitcoin/bitcoin#7762
- bitcoin/bitcoin#7993 (only upgrading zeromq)
- bitcoin/bitcoin#8238
- bitcoin/bitcoin#8701
- bitcoin/bitcoin#6685

Closes #2020.
2017-02-09 20:08:15 +00:00
zkbot b2e2dccc64 Auto merge of #2068 - bitcartel:2045_sendmany_fee_zero, r=bitcartel
Closes #2045 by allowing z_sendmany with 0 fee
2017-02-09 18:56:44 +00:00
Jack Grigg 8db0dd93e4
Add test to check for presence of vpub_old & vpub_new in getrawtransaction 2017-02-09 16:38:01 +00:00
Jonas Schnelli 9bbc220641
fix rpc-tests.sh
`${testScripts[@]}` now does split up `testscript --agument` in two elements pushed to the array (`testscript` and `--agument`).
2017-02-09 11:53:51 +00:00
Simon 75bb764bb8 Add test for z_sendmany with fee of 0 2017-02-08 15:26:33 -08:00
Jonas Schnelli 3ba2e19e2b
[ZMQ] append a message sequence number to every ZMQ notification 2017-02-08 22:11:53 +00:00
Jack Grigg c7cb3c13ea
[qa] py2: Unfiddle strings into bytes explicitly in ZMQ RPC test
Extracted from bitcoin/bitcoin#7853
commit faa41ee204124da19dcf1e5b8a3aef1e216bf5e6
2017-02-08 22:11:53 +00:00
Jack Grigg a9445db62f
Fix python syntax in ZMQ RPC test
Extracted from bitcoin/bitcoin#7335
commit 7777994846cdb9b9cf69e391a33eeed30393bbcf
2017-02-08 22:11:53 +00:00
Cory Fields 5088de4bb8
travis: install a recent libzmq and pyzmq for tests 2017-02-08 22:10:42 +00:00
Jonas Schnelli 5c7f84cf26
[travis] add zmq python module 2017-02-08 22:10:42 +00:00
Jonas Schnelli da0e7aa1d7
QA: Add ZeroMQ RPC test 2017-02-08 22:10:42 +00:00
Cory Fields cce7754eb8
Depends: Add ZeroMQ package 2017-02-08 22:10:42 +00:00
Simon aa0ab69a15 Closes #2024 by documenting and testing method field in z_getoperationstatus 2017-02-06 14:53:56 -08:00
Simon a45d2ec79c Update test to verify order of zrpcunsafe log messages 2017-02-01 14:41:35 -08:00
Simon a1477f6fac Add test to verify z_sendmany logging 2017-02-01 11:02:03 -08:00
zkbot 0edb3c0f16 Auto merge of #1978 - str4d:1941-scan-whole-chain-on-zkey-import, r=ebfull
Scan the whole chain whenever a z-key is imported

Closes #1941.
2017-01-20 00:02:12 +00:00
Sean Bowe 620c0e2845 Add test for z_importkey rescanning from beginning of chain. 2017-01-19 16:59:29 -07:00
zkbot 78674ca79e Auto merge of #2007 - bitcartel:1097_copyright_notice_and_date, r=bitcartel
Closes #1097 so that zcash-cli displays license info like zcashd.

LicenseInfo is refactored from init.cpp to util.cpp so that the
bitcoin-cli makefile target does not need to be modified.
2017-01-19 00:56:47 +00:00
Simon 774489569a Increase timeout for z_sendmany transaction in wallet.py qa test 2017-01-18 16:54:39 -08:00
zkbot 63e0e895a5 Auto merge of #2006 - bitcartel:1497_destination_path_validation_when_exporting, r=bitcartel
Fixes #1497 ZCA-009 by restricting export to a user defined folder and sanitizing filenames
2017-01-18 18:19:50 +00:00
Simon bab89e35c7 Update walletbackup.py qa test to use -exportdir option 2017-01-18 10:05:49 -08:00
Jack Grigg 9847bc870d
Create empty zcash.conf during coverage checks
Fixes regression caused by #2013.
2017-01-18 12:11:50 +01:00
zkbot ee2f1ebb9d Auto merge of #1942 - str4d:1940-threaded-createjoinsplit, r=ebfull
Extend createjoinsplit to benchmark parallel JoinSplits

Closes #1940
2017-01-18 01:04:05 +00:00
zkbot 4169cddd64 Auto merge of #1991 - bitcartel:1960_z_getoperation_include_call_details, r=ebfull
Fixes #1960: z_getoperationstatus/result now includes operation details.
2017-01-17 19:24:07 +00:00
Jack Grigg 336fa63020
Create empty zcash.conf during performance measurements 2017-01-17 13:19:49 +01:00
Simon 8aa7937d44 Fixes #1960: z_getoperationstatus/result now includes operation details. 2017-01-16 16:45:27 -08:00
Jack Grigg 4082dcb10f
Extend createjoinsplit to benchmark parallel JoinSplits
Closes #1940
2016-12-14 15:28:00 +13:00
zkbot 02bb4df58d Auto merge of #1918 - bitcartel:timeout_cpu_throttling, r=str4d
Increase timeout as laptops on battery power have cpu throttling.

Merge this last as other PRs also update the test file `wallet_protectcoinbase.py`.
2016-12-09 09:03:37 +00:00
zkbot 0617e428e2 Auto merge of #1895 - bitcartel:1857_tx_priority, r=str4d
Closes #1857. Fixes bug where a transaction sending from a zaddr would have a priority of zero.

Transactions sent from a zaddr should now be mined sooner as they no longer have a priority of zero
2016-12-09 08:10:21 +00:00
zkbot 8a6c070bfa Auto merge of #1870 - str4d:1749-benchmark-rescanning, r=str4d
Add benchmarks for rescan components

Part of #1749.
2016-12-09 07:12:22 +00:00
Jack Grigg 88b7f3c28b
Generate JS for trydecryptnotes, make number of addresses a variable 2016-12-09 16:59:39 +13:00
zkbot e68e26c208 Auto merge of #1911 - bitcartel:1823_witness_does_not_have_same_anchor_as_change_input, r=str4d
With chained joinsplits, witness anchors for input notes no longer cross block boundaries

Closes #1823
2016-12-08 01:23:40 +00:00
Simon f3c4919027 Increase timeout as laptops on battery power have cpu throttling. 2016-12-05 10:46:12 -08:00
Simon 2d931e905b Fixes #1823. Witness anchors for input notes no longer cross block boundaries. 2016-12-03 00:22:42 -08:00
Simon af53da0225 Closes #1903. Add fee parameter to z_sendmany. 2016-11-30 14:23:35 -08:00
Simon 520ced1405 Closes #1857. Fixes bug where tx spending only notes had priority of 0. 2016-11-28 22:54:49 -08:00
Jack Grigg 0bb3d40f90
Add benchmark for incrementing note witnesses 2016-11-17 22:26:46 +13:00
Jack Grigg 0fbab55b1b
Add benchmark for attempting decryption of notes 2016-11-17 19:09:45 +13:00
Simon 0afd3687c8 Closes #1854. z_sendmany selects more utxos to avoid dust change output. 2016-11-15 17:12:37 -08:00
Simon 9ddb6ad028 Mempool will accept tx with joinsplits and the default z_sendmany fee.
Issue #1851 shows that a zaddr->taddr can be rejected from mempools
due to not meeting fee requirements given the size of the transaction.
Fee calculation for joinsplit txs has not yet been agreed upon, so
during this interim period, this patch ensures  joinsplit txs using
the default fee are not rejected due to an insufficient fee.
2016-11-15 11:32:59 -08:00
zkbot 4e72614fb0 Auto merge of #1847 - bitcartel:1680_rpckeepalive_deadlock, r=ebfull
Closes #1680, temporary fix for rpc deadlock inherited from upstream.
2016-11-15 10:25:24 +00:00
Simon f4404d7b5b Closes #1680, temporary fix for rpc deadlock inherited from upstream. 2016-11-15 00:31:24 -08:00
Simon 9384e74c50 Closes #1833. Format currency amounts in z_sendmany error message.
Improve coverage of possible error states from z_sendmany.
Refactor qa test for z_sendmany operations.
2016-11-10 16:57:36 -08:00
Simon 3920292b43 Add transaction size and zaddr output limit checks to z_sendmany. 2016-11-07 09:29:56 -08:00
Simon 7c463780cf Fixes #1779 so that sending to multiple zaddrs no longer fails.
Commit 2eeb6b randomized the order of input and output notes,
but this is now known to prevent the chaining of multiple joinsplits
in a single transaction.  The root cause has yet to be determined.

This patch is a temporary fix and disables the shuffling of input
and output notes.  It also adds a chained joinsplit test to the
python qa test suite.
2016-11-04 23:23:48 -07:00
Sean Bowe 52676958d1 Test that a pure joinsplit will mine if other transactions are in the mempool. 2016-11-02 14:25:07 -06:00
zkbot 489f1d38ee Auto merge of #1629 - bitcartel:1616_wallet_disallow_coinbase_change, r=daira
Add z_sendmany rule that when coinbase utxos must be spent in their entirety, with no change

See #1616 - coinbase utxos must be consumed entirely, without any change, since there
is currently no way to specify a change address in z_sendmany.
2016-10-25 15:40:36 -04:00
Simon db026807b8 Add z_sendmany rule that when sending coinbase utxos to a zaddr
they must be consumed entirely, without any change, since there
is currently no way to specify a change address in z_sendmany.
2016-10-24 21:34:16 -07:00
Jack Grigg dfe29d5988
Disable metrics screen in performance-measurements.sh 2016-10-23 20:41:18 -05:00
zkbot a294b26db7 Auto merge of #1375 - str4d:1331-node-metrics, r=daira
Add node metrics screen

Continuation of #1336
Closes #1331
2016-10-22 20:21:11 -04:00
Daira Hopwood 02a4ace02c Disable metrics screen in RPC tests
Author: Jack Grigg <jack@z.cash>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-23 01:05:57 +01:00
zkbot 026c3f784f Auto merge of #1602 - str4d:1424-minimal-getblocktemplate, r=daira
Minimal modifications to getblocktemplate

A simpler alternative to #1435 that ensures Zcash GBT will remain compatible with BIP 22.

Closes #1424
2016-10-22 16:40:59 -04:00
Jack Grigg bc54cf06cc
Fix RPC test 2016-10-22 15:36:38 -05:00
Jack Grigg 07064ea2d1
GBT: Add RPC tests 2016-10-21 23:38:37 -05:00
Jack Grigg 1628efedaf
GBT: Correct block header in proposals RPC test 2016-10-21 23:36:35 -05:00
zkbot 48888b67c9 Auto merge of #1599 - daira:1597.fix-other-potential-race-conditions, r=daira
Fix other potential race conditions similar to ref #1597 in RPC tests.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-22 00:15:32 -04:00
zkbot 71043784dd Auto merge of #1586 - bitcartel:z_sendmany_amount_too_strict, r=daira
Fix issue where z_sendmany amount parameter is too strict

Upstream treats an amount parameter of `1` the same as `1.0`.  Third-party would like this fixed.
2016-10-21 22:10:41 -04:00
zkbot 10ad093bbb Auto merge of #1567 - str4d:rename-binaries, r=daira
Rename binaries

This ensures that our installs don't clash with existing Bitcoin binaries and libraries.

Closes #1563 and #1565
2016-10-21 20:48:11 -04:00
Daira Hopwood deba66ca55 Fix other potential race conditions similar to ref #1597 in RPC tests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-22 00:37:14 +01:00
Daira Hopwood f0f838f081 Fix race condition in rpc-tests/wallet_protectcoinbase.py. closes #1597
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-21 17:20:36 +01:00
Daira Hopwood 5d985da5c1 Repair check-security-hardening.sh.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-21 02:34:13 +01:00
Simon 5eed758493 Update test to use integer amount as well as decimal amount when calling z_sendmany 2016-10-20 17:10:25 -07:00
Jack Grigg 2b499f4386
Fix RPC tests that require wallet encryption 2016-10-20 14:35:41 -05:00
zkbot ec8dc3a88a Auto merge of #1431 - bitcartel:master_1373_taddr_coinbase_error, r=bitcartel
Return a more informative error message when trying to spend coinbase; select non-coinbase inputs when sending to a transparent output if needed

For #1373 and #1519

Code change:
- Extra parameter added to AvailableCoins to include or exclude Coinbase coins.  Default value of parameter is 'true' as current behaviour is to include Coinbase coins.
- SelectCoins, used for sending taddr->taddr, will now exclude Coinbase coins.

Unit test:
Tried to write a test to focus on the extra parameter added to AvailableCoins but could not.

Empirical testing on Testnet:
Current behaviour is that upstream RPC commands sendfrom and sendtoaddress try to spend coinbase coins returned by AvailableCoins.  So the user will see:

```
./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."}

./zcash-cli sendfrom "" mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here."}
```

After fix is applied:

```
./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
error: {"code":-4,"message":"Coinbase funds can only be sent to a zaddr"}
```

When non-coinbase UTXOs exist, they will now be selected and used:

```
./zcash-cli z_sendmany tnPJZHeVxegCg91utaquBRPEDBGjozfz9iLDHt7zvphFbZdspNgkTVLCGjDcadQBKNyUwKs8pNjDXuEZKrE1aNLpFwHgz4t '[{"address":"mx5fTRhLZwbYE7ZqhAPueZgQGSnwTbdvKU", "amount":0.01}]'

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 1000.0
error: {"code":-6,"message":"Insufficient funds"}

./zcash-cli sendtoaddress mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
9818e543ac2f689d4ce8b52087607d73fecd771d45d316a1d9db092f0485aff2

./zcash-cli sendfrom "" mrEGRmGJhmwAa4MQjzGd86ry63vrvovu9b 0.00003000
899f2894823f51f15fc73b5e0871ac943edbe0ff88e1635f86906087b72caf30
```
2016-10-16 22:08:07 -04:00
Simon 2b1cda3b6a Return improved error message when trying to spend Coinbase coins (#1373).
Extra parameter added to AvailableCoins to include or exclude Coinbase coins.
SelectCoins, used for sending taddr->taddr, will exclude Coinbase coins.

Added qa rpc test and a runtime parameter -regtestprotectcoinbase to enforce
the coinbase->zaddr consensus rule in regtest mode.
2016-10-16 19:05:56 -07:00
Jack Grigg ddea44a27e
Update comments 2016-10-14 17:16:09 -05:00
Jack Grigg 1a62587e9a
Delay caching of nullifiers when wallet is locked
Closes #1502
2016-10-14 17:16:09 -05:00
Jack Grigg 8f445ee774
Break the RPC test by encrypting the mirroring wallet 2016-10-14 17:14:13 -05:00
Jack Grigg 52fdce985f
Add RPC test showing correct handling of JS txns from blockchain
For unencrypted wallets, the wallet correctly tracks JoinSplits made for their
zkey in a different wallet.
2016-10-14 17:14:13 -05:00
zkbot 7dc49cbc6a Auto merge of #1490 - str4d:1454-deprecate-accounts, r=bitcartel
Throw an RPC error for all accounts except the default

Closes #1454
2016-10-10 23:55:02 -04:00
Daira Hopwood 3040239e2a Cosmetics in RPC tests.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-10 20:27:16 +01:00
Daira Hopwood 218ded68f3 Fix RPC tests to not rely on accounts.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-10 20:26:52 +01:00
Simon f7cfb52d3c Add vjoinsplit to JSON output of RPC call gettransaction 2016-10-06 19:53:46 -07:00
Daira Hopwood db5dd18c16 Repair rpc-tests/signrawtransactions.py.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2016-10-04 23:04:19 +01:00
Jack Grigg f92f004714 Fix zkey test 2016-10-04 11:05:57 -07:00
zkbot 4f49d32a28 Auto merge of #1427 - bitcartel:master_1345_getbalance, r=bitcartel
Fixes #1345 so that RPC getbalance star calculates balance of UTXOs correctly.
2016-10-04 01:20:12 -04:00
Simon 86cf60b5c8 Fixes #1345 so that UTXO debit and credits are computed correctly for a transaction. 2016-10-03 11:06:43 -07:00
Daira Hopwood 65b502aa98 Benchmark 50 iterations of solveequihash
Since the parameters changed in z8, the benchmark on speed.z.cash is showing misleading results due to variability. (The quartile and extrema bars will still show the variability with 50 runs, they just won't jump around as much between benchmark data points.)
2016-09-19 19:08:24 +01:00
Jack Grigg 5be6abbf84 Store the Equihash solution in minimal representation in the block header
The genesis blocks and miner tests have been regenerated, because changing the
block header serialisation format changes the block hash, and thus validity.

The Equihash solutions have been removed from the bloom test inputs for
simplicity (block validity is not checked there; only a valid serialisation is
necessary).
2016-08-16 16:02:39 +12:00
Jack Grigg 649be423f8 Fix previous commit 2016-08-06 02:03:08 +12:00
Jack Grigg 6609813753 Simplify optional parameters 2016-08-06 00:36:33 +12:00
Jack Grigg f7478de67f Add thread parameter to solveequihash benchmark
Closes #1147
2016-08-05 15:05:38 +12:00
zkbot abd4c16ae9 Auto merge of #1064 - ThisIsNotOfficialCodeItsJustForks:t915-enable-security-hardening, r=bitcartel
Verify security hardening features are turned on
2016-08-03 23:57:05 +00:00
Taylor Hornby 88325d8abb Add more commands to run unit tests under valgrind. 2016-07-28 14:43:36 -06:00
Taylor Hornby 56734f4b27 Pull in upstream's make check-security, based on upstream PR #6854 and #7424. 2016-07-21 20:45:10 -06:00
Taylor Hornby 1327d1915a Add tests for security hardening features 2016-07-21 20:45:07 -06:00
Taylor Hornby effd7ca1d8 Add checksec.sh from http://www.trapkit.de/tools/checksec.html 2016-07-21 20:45:07 -06:00
Sean Bowe 1737627c4e Introduce `zcsamplejoinsplit` for creating a raw joinsplit description, and use it to construct the joinsplit for the performance tests that verify joinsplits. 2016-07-19 15:49:11 -06:00
Sean Bowe d36098f873 Rename `pour` in RPC tests. 2016-07-18 10:43:17 -06:00
Sean Bowe 22de160219 Fixes for indentation and local variable names. 2016-07-18 10:07:29 -06:00
Sean Bowe fd933ed05e Fix tests 2016-07-18 10:06:18 -06:00
Sean Bowe 6e33353ea2 Rename pour RPC tests 2016-07-18 10:06:18 -06:00
Sean Bowe ffcfe76d4f Change encryptedbucket1 to encryptednote1. 2016-07-18 10:06:18 -06:00
Sean Bowe b7e4abd6f7 Rename some usage of 'pour'. 2016-07-18 10:06:18 -06:00
zkbot 04932a64e8 Auto merge of #1080 - ebfull:performance-check-valid-pour, r=ebfull
Always check valid joinsplits during performance tests

This will generate a valid joinsplit instead of using one from an environment variable.
2016-07-11 22:38:25 +00:00
zkbot ecef582339 Auto merge of #1061 - ebfull:remove-libzerocash-completely, r=ebfull
Remove the rest of libzerocash.

Closes #510.
2016-07-11 16:17:35 +00:00
Sean Bowe 92b73b0dbb Remove zerocash tests from full-test-suite. 2016-07-11 10:05:55 -06:00
Sean Bowe 2fbbde597c Always check valid joinsplits during performance tests, and avoid recomputing them every time we change the circuit. 2016-07-09 14:31:43 -06:00
Sean Bowe 9c45b501ad Make `validatelargetx` test more accurate, reduce block size limit to 1MB for now. 2016-07-06 12:07:50 -06:00
Sean Bowe 2ba9641767 Fix performance test for block verification. 2016-07-05 07:55:35 -06:00
Jack Grigg f5edc37f3f Add performance tests for creating and validating a MAX_BLOCK_SIZE transaction 2016-06-21 13:48:04 +12:00
Jack Grigg 3985a40d1f Change default ports 2016-06-17 00:21:58 +12:00
zkbot fe97a405e3 Auto merge of #994 - ebfull:remove-redundant-constraints, r=ebfull
Final changes to the circuit

* Remove [redundant](https://github.com/scipr-lab/libsnark/issues/37) bitness constraints that I pointed out in #908.
* The depth is increased from 20 to 29. I chose 29 because the QAP degree ends up being a power of two, which is probably going to be useful for the FFT in our MPC. (Closes #16)

If we're happy with depth 29 (over 268 million possible joinsplits), this will probably be the final change to the constraint system before 1.0.
2016-06-15 21:39:32 +00:00
zkbot 47e6645005 Auto merge of #1009 - ThisIsNotOfficialCodeItsJustForks:t171-hard-fork-alerts-and-tests, r=ebfull
Enable -alertnotify for hard fork detection. Test it.

Closes #171. Closes #131.
2016-06-12 18:04:53 +00:00
Jack Grigg 3fe29eab90 Fix failing tests 2016-06-10 16:16:33 +12:00
Jack Grigg 196cf25d5b Update RPC tests to account for decreased block interval 2016-06-10 12:02:49 +12:00
Taylor Hornby 57c074e1e4 Enable -alertnotify for hard fork detection. Test it. 2016-06-09 13:48:04 -06:00
Jack Grigg 9378a04f1b Update RPC tests to account for reserved field 2016-06-07 22:45:41 +12:00
Sean Bowe 1744fec274 Update the zkSNARK parameters. 2016-06-03 21:04:07 -06:00
Sean Bowe 3960e14d91 Update performance measurement transaction. 2016-05-31 13:17:55 -06:00
Taylor Hornby fc8c101acf Enable -v for valgrind so we can see counts for each error. 2016-05-25 16:42:39 -06:00
Taylor Hornby 0af5e31282 Pass -DPURIFY to OpenSSL so it doesn't clutter valgrind output. 2016-05-25 16:42:39 -06:00
Taylor Hornby d578de8e27 Add ability to run things under valgrind. 2016-05-25 16:42:36 -06:00
Sean Bowe 6b5d608899 Update proving key and tests that depend on transaction structure changes 2016-05-24 11:09:17 -06:00
Sean Bowe 3e0af61b86 Update zkSNARK proving/verifying keys. 2016-05-12 16:45:12 -06:00
Sean Bowe 0cdfab1d92 Remove the zerocash tests from the full test suite. 2016-05-12 16:44:49 -06:00
Sean Bowe ddb03c3e8d Fix performance measurements due to modified transaction structure. 2016-05-12 16:44:49 -06:00
zkbot c9a2eea5e2 Auto merge of #905 - ebfull:test-suite-fixes, r=ebfull
Run `zcash-gtest` in `make check` and fix performance tests.

* gtest tests weren't being run by make check
* performance tests were broken
* We need to automatically upload graphs of performance, [see this PR](https://github.com/Electric-Coin-Company/bbotzc/pull/15).
* Moves zerocash tests into `zcash`'s full test suite, we're removing them anyway later and it'd be nice to remove them in the PR instead of from buildbot
2016-05-05 23:29:34 +00:00
zkbot 87485d5ff3 Auto merge of #907 - DoNotUseThisCodeJUSTFORKS:t844-rename-bitcoin-conf, r=defuse
Rename bitcoin.conf and bitcoind.pid

This leaves the mentions of those files in `doc/` and `contrib/` unchanged.

**FORCE PUSHED**
2016-05-04 00:55:10 +00:00
Taylor Hornby aaf6495948 Rename bitcoin.conf and bitcoind.pid to zcash.conf and zcashd.pid in qa/ and src/ 2016-05-03 14:01:01 -06:00
Sean Bowe 956dcdde80 Perform zerocash tests as part of full-test-suite, in preparation for removal of zerocash waterfall. 2016-05-03 06:49:15 -06:00
Sean Bowe 6bd8e46922 Run `zcash-gtest` in `make check` and fix performance tests. 2016-05-02 23:14:53 -06:00
Sean Bowe 1760b3cd88 Deprecate the old tree and remove old tree tests from the test suite. 2016-04-28 16:07:52 -06:00
Taylor Hornby b2cf9ba300 Fix RPC tests 2016-04-28 13:35:47 -06:00
zkbot f2e157ab25 Auto merge of #846 - DoNotUseThisCodeJUSTFORKS:automated-performance-measurement-zcash-cli-method, r=ebfull
Automated performance measurement

Supersedes #843 because that one would have merged into the wrong branch. (Oh yeah and I rebased).

**REBASED AND FORCE PUSHED**
2016-04-11 21:56:12 +00:00
Sean Bowe 6ca317e1cc Fix remaining RPC tests. 2016-04-11 12:46:46 -06:00
Taylor Hornby 36b1269bc3 Make benchmark specified by command-line arguments 2016-04-11 10:54:55 -06:00
Taylor Hornby 51c8c56b4a Use a separate datadir for the benchmarks 2016-04-11 10:20:42 -06:00
Taylor Hornby a0be8e262a Don't leave massif.out lying around after the benchmarks 2016-04-11 10:05:16 -06:00
Taylor Hornby a1cd1a27ac Add verify equihash benchmark 2016-04-11 10:03:31 -06:00
Taylor Hornby d44feea44c Add JoinSplit verification benchmarks 2016-04-11 10:03:17 -06:00
Taylor Hornby bf8def9749 Add equihash solving benchmarks 2016-04-11 10:02:59 -06:00
Taylor Hornby 6962bb3df0 Add automated performance measurement system. 2016-04-11 08:15:25 -06:00
Nathan Wilcox ad56edf7d4 Fix (most) rpc tests by updating balances. zcpour, zcpourdoublespend, and txn_doublespend currently fail. 2016-04-08 18:05:51 -07:00
Nathan Wilcox 349a7b3714 Apply a patch from Sean to update wallet to use our new founders-reward aware balances. 2016-04-08 16:27:27 -07:00
Nathan Wilcox 4259e1e3dd Log all failing rpc tests concisely. 2016-04-08 14:50:52 -07:00
Sean Bowe abc1c352c9 Add missing synchronization that causes race condition in test. 2016-04-08 13:54:44 -06:00
Jack Grigg cf00c47d5b Fix tests that depend on old block header format
Changes to bloom tests were done by running the following commands:

sed -i 's/\(CDataStream stream(ParseHex(".\{152\}\)\(.\{8\}\)/\100000000000000000000000000000000000000000000000000000000\200/' src/test/bloom_tests.cpp
sed -i 's/\(vector<unsigned char> vch = ParseHex(".\{152\}\)\(.\{8\}\)/\100000000000000000000000000000000000000000000000000000000\200/' src/test/bloom_tests.cpp

and then reverting the single change to the transaction line.
2016-04-08 14:50:56 +12:00
Nathan Wilcox bb9f19b487 Run all RPC tests, even when they fail. 2016-04-07 17:13:29 -07:00
Taylor Hornby 3af297cc57 Remove unnecessary comment. 2016-03-03 16:02:35 -07:00
Sean Bowe 25f0e1072e Fix test paths. 2016-02-17 14:54:48 -07:00
Sean Bowe 0b43e787e0 Add merkleTest and utilTest to test suite. 2016-02-17 13:35:40 -07:00
Taylor Hornby dba05929e7 Fix broken build because of zerocash->zcash rename. 2016-02-03 13:57:34 -07:00
ebfull 0294f34d15 Merge pull request #698 from Electric-Coin-Company/fix-pour-rpc-tests
Fixed RPC tests for Pours.
2016-02-03 13:07:53 -07:00
Taylor Hornby 21328e97cd Fix bad merge due to qa/zerocash->qa/zcash rename. 2016-02-03 13:04:23 -07:00
Taylor Hornby 1ffb5eb04f Rename qa/zerocash to qa/zcash. 2016-02-03 12:55:02 -07:00
Taylor Hornby eed49655f3 Add documentation to test-depends-sources-mirror.py 2016-02-03 12:53:20 -07:00
Sean Bowe a5cbd56a3a Fixed RPC tests for Pours. 2016-01-29 19:40:05 -07:00
Taylor Hornby ba083f083c Add a test for our depends-sources mirror. 2016-01-28 20:18:52 -07:00
Sean Bowe d66877afb3 Added mapSerials consensus rules to prohibit double-spending. 2016-01-19 14:36:09 -07:00
Sean Bowe 0a87fc4ad0 Increase timeouts for comparison utility. 2016-01-19 14:36:09 -07:00
Sean Bowe 6674f41c1a Fixed system test. 2016-01-19 14:36:09 -07:00
Sean Bowe a8ac403db0 Added mapAnchors consensus rules, finished zcrawpour/zcrawreceive.
Some specifics on consensus changes:
* Transactions must be anchored to a real anchor in the chain.
* Anchors are pushed and popped during ConnectBlock/DisconnectBlock as appropriate.
* DisconnectTip triggers evictions, under some circumstances, of transactions in the
  mempool which are anchored to roots that are no longer valid.
* Commitments append to the tree at the current best root during ConnectBlock.
2016-01-19 14:36:04 -07:00
Sean Bowe 730790f7a4 Added primitive zcrawkeygen/zcrawpour implementations 2016-01-19 14:36:04 -07:00
Nathan Wilcox 5b7a710ea3 Show test-suite.sh log on errors in full-test-suite.sh. 2015-12-22 09:20:42 -08:00
Taylor Hornby 9d69acabed Rename zerocash to Zcash. 2015-12-22 00:49:17 -07:00
Taylor Hornby 8a18333567 Rename .bitcoin (DataDir), bitcoind, and bitcoin-cli. 2015-11-30 13:03:21 -07:00
Taylor Hornby e3524c66b2 Add zerocash-specific tests. 2015-11-24 14:36:46 -07:00
Wladimir J. van der Laan fc7f0ee28c
Merge pull request #6707
6af25b0 Add BIP65 to getblockchaininfo softforks list (Peter Todd)
ba1da90 Show softfork status in getblockchaininfo (Wladimir J. van der Laan)
70a427b CLTV: Add more tests to improve coverage (Esteban Ordano)
c5a27f4 Add RPC tests for the CHECKLOCKTIMEVERIFY (BIP65) soft-fork (Peter Todd)
5e82e1c Add CHECKLOCKTIMEVERIFY (BIP65) soft-fork logic (Peter Todd)
6ea5ca4 Enable CHECKLOCKTIMEVERIFY as a standard script verify flag (Peter Todd)
4fa7a04 Replace NOP2 with CHECKLOCKTIMEVERIFY (BIP65) (Peter Todd)
6ec08db Move LOCKTIME_THRESHOLD to src/script/script.h (Peter Todd)
684636b Make CScriptNum() take nMaxNumSize as an argument (Peter Todd)
2015-10-23 13:35:06 +02:00
Alex Morcos 072032448b
Make fee aware of min relay in pruning.py RPC test
Rebased-From: b6d5e32e0e5b038c6ff7e2ab5221b10727722341
Github-Pull: #6841
2015-10-20 13:35:24 +02:00
Peter Todd c5a27f4fb3 Add RPC tests for the CHECKLOCKTIMEVERIFY (BIP65) soft-fork
bip65-cltv.py is based on the earlier BIP66 soft-fork RPC test
implemented by Pieter Wuille's 819bcf9b99

bip65-cltv-p2p.py is based on the earlier BIP66 P2P test by Suhas
Daftuar's d76412b068

Rebased-From: 308257856099e82e91881ba97f741d840184727c
2015-10-08 17:49:00 +02:00
Wladimir J. van der Laan 1cd7952dde
Merge pull request #6703
45bfa13 PARTIAL: typofixes (found by misspell_fixer) (Veres Lajos)
21c406e add support for miniupnpc api version 14 (Pavel Vasin)
13bd5a7 rpc-tests: re-enable rpc-tests for Windows (Cory Fields)
ccc4ad6 net: Set SO_REUSEADDR for Windows too (Cory Fields)
1f6772e add unit test for CNetAddr::GetGroup. (Alex Morcos)
13642a5 Fix masking of irrelevant bits in address groups. (Alex Morcos)
6b51b9b Replace boost::reverse_lock with our own. (Casey Rodarmor)
626c5e6 Make sure we re-acquire lock if a task throws (Casey Rodarmor)
4877053 Add missing files to files.md (fanquake)
f171fee Handle leveldb::DestroyDB() errors on wipe failure (Adam Weiss)
c5b89fe Fix race condition on test node shutdown (Casey Rodarmor)
4a37410 Handle no chain tip available in InvalidChainFound() (Ross Nicoll)
f6d29a6 Use unique name for AlertNotify tempfile (Casey Rodarmor)
e6adac7 Delay initial pruning until after wallet init (Adam Weiss)
e0020d4 Make sure LogPrint strings are line-terminated (J Ross Nicoll)
7ff9d12 Make sure LogPrintf strings are line-terminated (Wladimir J. van der Laan)
5a39133 build: fix libressl detection (Cory Fields)
f6355e6 Avoid leaking file descriptors in RegisterLoad (Casey Rodarmor)
60457d3 locking: fix a few small issues uncovered by -Wthread-safety (Cory Fields)
a496e11 Remove bash test note from rpc-tests readme (fanquake)
49c6a64 tests: Remove old sh-based test framework (Wladimir J. van der Laan)
a37567d Add autogen.sh to source tarball. (randy-waterhouse)
1f4d7cf travis: for travis generating an extra build (Cory Fields)
2015-09-23 14:12:55 +02:00
Veres Lajos 45bfa137ef PARTIAL: typofixes (found by misspell_fixer)
Upstream: 9f68ed6b6d1a9c6436ce37913666165f2b180ee3 (PR #6539)
2015-09-22 00:43:15 +00:00
Cory Fields 13bd5a75b5 rpc-tests: re-enable rpc-tests for Windows 2015-09-22 00:43:14 +00:00
Casey Rodarmor c5b89fe44e Fix race condition on test node shutdown 2015-09-22 00:43:12 +00:00
fanquake a496e11d7c Remove bash test note from rpc-tests readme 2015-09-22 00:43:10 +00:00
Wladimir J. van der Laan 49c6a64202 tests: Remove old sh-based test framework
This removes the `conflictedbalance.sh` test as well, but that test has
been broken for a long time and isn't part of any scripts.
What it does is, IMO, sufficiently tested by other tests.
2015-09-22 00:43:10 +00:00
Suhas Daftuar 93b606aee4 Be even stricter in processing unrequested blocks
Github-Pull: #6224
Rebased-From: bfc30b34374d71928acee5ff41282f09cedfd5e4 6b1066fab41523d25d75b45a10e4b0f61d7c61d0 04b5d235f1560b8285591b963d3636f7ddf74563 59b49cd07482494d9a99068af502be9ceda41ed2
2015-07-29 20:11:52 +02:00
Suhas Daftuar 2edec4fe68
P2P regression test for new AcceptBlock behavior
Github-Pull: #5875
Rebased-From: aa8c827968a68a3adc4df5f126635e37a71a7fbb
2015-06-03 16:24:14 +02:00
Wladimir J. van der Laan 42746b0476
Merge pull request #6193
6e71efa [REST] remove json input for getutxos, limit to query max. 15 outpoints (Jonas Schnelli)
64b8027 rest.cpp: strip whitespace (Jonas Schnelli)
2015-06-01 09:48:17 +02:00
Jonas Schnelli 6e71efa9f0 [REST] remove json input for getutxos, limit to query max. 15 outpoints
Remove possibility to send json encoded parameters to `/rest/getutxos/` to avoid possible DoS scenarios.

The JSON output option is untouched.
2015-05-27 20:10:02 +02:00
Suhas Daftuar ee9a2e4271 Fix walletbackup.py after directory restructuring
Also add walletbackup.py to rpc-tests.sh
2015-05-27 10:00:15 -04:00
Jonas Schnelli 7b7f258396 rpc-tests: remove python-bitcoinrpc directory
place authproxy.py at same level as other utility classes
2015-05-21 21:22:22 +02:00
Jonas Schnelli a85b2e221b pull-tester/rpc-tests.sh: disable script_test.py test 2015-05-19 16:41:17 +02:00
Jonas Schnelli 3e875b1bef pull-tester/rpc-tests.sh: allow passing throug of arguments 2015-05-18 15:29:20 +02:00
Jonas Schnelli 00706a5436 update rpc-tests readme.md 2015-05-18 15:25:45 +02:00
Jonas Schnelli 344e08ed16 extend rpc-tests.sh control script with non-travis tests 2015-05-18 15:25:45 +02:00
Jonas Schnelli 64937fe51a [QA] restructure rpc tests directory
* move non-test classes to subdir `test-framework`
2015-05-18 15:25:45 +02:00
Alex Morcos 8f0947be34 Increase timeouts in pruning.py and modify warning language. 2015-05-13 15:02:36 -04:00
Wladimir J. van der Laan 2cc1372190
Merge pull request #5159
b649e03 Create new BlockPolicyEstimator for fee estimates (Alex Morcos)
2015-05-13 17:10:02 +02:00
Alex Morcos b649e03954 Create new BlockPolicyEstimator for fee estimates
This class groups transactions that have been confirmed in blocks into buckets, based on either their fee or their priority.  Then for each bucket, the class calculates what percentage of the transactions were confirmed within various numbers of blocks.  It does this by keeping an exponentially decaying moving history for each bucket and confirm block count of the percentage of transactions in that bucket that were confirmed within that number of blocks.

-Eliminate txs which didn't have all inputs available at entry from fee/pri calcs

-Add dynamic breakpoints and tracking of confirmation delays in mempool transactions

-Remove old CMinerPolicyEstimator and CBlockAverage code

-New smartfees.py

-Pass a flag to the estimation code, using IsInitialBlockDownload as a proxy for when we are still catching up and we shouldn't be counting how many blocks it takes for transactions to be included.

-Add a policyestimator unit test
2015-05-13 10:36:24 -04:00
Wladimir J. van der Laan c1409d11ad
Merge pull request #6073
a681663 clarify that there are only two nodes (Jameson Lopp)
2015-05-11 13:41:03 +02:00
Wladimir J. van der Laan 9ef00c363d
Merge pull request #5958
231072f [QA] add multisig rpc tests (Jonas Schnelli)
2015-05-07 13:18:43 +02:00
Jonas Schnelli 231072fe7b [QA] add multisig rpc tests 2015-05-07 11:05:23 +02:00
Wladimir J. van der Laan 1fd2d39529
Merge pull request #5420
6b4feb8 [QA] rest.py RPC test: change setgenerate() to generate() (Jonas Schnelli)
97ee866 [REST] getutxos REST command (based on Bip64) (Jonas Schnelli)
2015-05-06 16:50:05 +02:00
dexX7 a71ab10f99
QA: add RPC tests for error reporting of "signrawtransaction"
Tests error reporting of transaction signing via RPC call "signrawtransaction".

Expected results:

Test 1: create and sign a valid raw transaction with one input:
- 1) The transaction has a complete set of signatures
- 2) No script verification error occurred

Test 2: create and sign a raw transaction with one valid, one invalid and one missing input script:
- 3) The transaction has no complete set of signatures
- 4) Two script verification errors occurred
- 5) Script verification errors have certain properties ("txid", "vout", "scriptSig", "sequence", "error")
- 6) The verification errors refer to the invalid (vin 1) and missing input (vin 2)
2015-05-05 10:09:39 +02:00
Wladimir J. van der Laan 16341cc15c
Merge pull request #5418
bba2216 RPC test for "#5418 Report missing inputs in sendrawtransaction" (Jonas Schnelli)
de8e801 Report missing inputs in sendrawtransaction (Pieter Wuille)
2015-05-04 12:42:26 +02:00
Wladimir J. van der Laan 00e76db8c2
Merge pull request #6085
b05a89b Non-grammatical language improvements (Luke Dashjr)
7e6d23b Bugfix: Grammar fixes (Corinne Dashjr)
2015-05-04 08:01:58 +02:00
Suhas Daftuar 2a22d4be9b Fix comptool send_message call when MAX_INV_SZ reached 2015-05-01 15:32:24 -04:00
Suhas Daftuar 574db4816f Fix potential race conditions in p2p testing framework
Previously, each NodeConnCB had its own lock to synchronize data structures
used by the testing thread and the networking thread, and NodeConn provided a
separate additional lock for synchronizing access to each send buffer.  This
commit replaces those locks with a single global lock (mininode_lock) that we
use to synchronize access to all data structures shared by the two threads.

Updates comptool and maxblocksinflight to use the new synchronization
semantics, eliminating previous race conditions within comptool, and re-enables
invalidblockrequest.py in travis.
2015-05-01 15:32:24 -04:00
Jonas Schnelli bba2216fc1 RPC test for "#5418 Report missing inputs in sendrawtransaction" 2015-05-01 15:30:10 +02:00
Corinne Dashjr 7e6d23b171 Bugfix: Grammar fixes 2015-05-01 11:21:27 +00:00
Suhas Daftuar 5487975ca3 Don't run invalidblockrequest.py in travis until race condition is fixed 2015-04-30 16:40:36 -04:00
Suhas Daftuar ef3281750d Fix mininode disconnections to work with select 2015-04-30 16:40:22 -04:00
Wladimir J. van der Laan da38dc696c
Merge pull request #5981
2703412 Fix default binary in p2p tests to use environment variable (Suhas Daftuar)
29bff0e Add some travis debugging for python scripts (Suhas Daftuar)
d76412b Add script manipulation tools for use in mininode testing framework (Suhas Daftuar)
b93974c Add comparison tool test runner, built on mininode (Suhas Daftuar)
6c1d1ba Python p2p testing framework (Suhas Daftuar)
2015-04-30 14:49:24 +02:00
Suhas Daftuar 2703412a39 Fix default binary in p2p tests to use environment variable 2015-04-29 09:18:33 -04:00
Wladimir J. van der Laan e08886d8a3
Merge pull request #6032
688da79 QA: add --noshutdown option to prevent stopping nodes (dexX7)
2eadeb2 QA: stop nodes after RPC tests, even with --nocleanup (dexX7)
2015-04-29 10:04:33 +02:00
Suhas Daftuar 29bff0e684 Add some travis debugging for python scripts
Adds printing to the console before/after calls to bitcoin-cli -rpcwait,
if the PYTHON_DEBUG environment variable is initialized.
2015-04-28 16:51:46 -04:00
Suhas Daftuar d76412b068 Add script manipulation tools for use in mininode testing framework
script.py is modified from the code in python-bitcoinlib, and provides tools
for manipulating and creating CScript objects.

bignum.py is a dependency for script.py

script_test.py is an example test that uses the script tools for running a test
that compares the behavior of two nodes, in a comptool- style test, for each of
the test cases in the bitcoin unit test script files, script_valid.json and
script_invalid.json.  (This test is very slow to run, but is a proof of concept
for how we can write tests to compare consensus-critical behavior between
different versions of bitcoind.)

bipdersig-p2p.py is another example test in the comptool framework, which tests
deployment of BIP DERSIG for a single node.  It uses the script.py tools for
manipulating signatures to be non-DER compliant.
2015-04-28 15:09:29 -04:00
Suhas Daftuar b93974c3f3 Add comparison tool test runner, built on mininode
comptool.py creates a tool for running a test suite on top of the mininode p2p
framework.  It supports two types of tests: those for which we expect certain
behavior (acceptance or rejection of a block or transaction) and those for
which we are just comparing that the behavior of 2 or more nodes is the same.

blockstore.py defines BlockStore and TxStore, which provide db-backed maps
between block/tx hashes and the corresponding block or tx.

blocktools.py defines utility functions for creating and manipulating blocks
and transactions.

invalidblockrequest.py is an example test in the comptool framework, which
tests the behavior of a single node when sent two different types of invalid
blocks (a block with a duplicated transaction and a block with a bad coinbase
value).
2015-04-28 12:40:56 -04:00
Suhas Daftuar 6c1d1ba6fc Python p2p testing framework
mininode.py provides a framework for connecting to a bitcoin node over the p2p
network. NodeConn is the main object that manages connectivity to a node and
provides callbacks; the interface for those callbacks is defined by NodeConnCB.
Defined also are all data structures from bitcoin core that pass on the network
(CBlock, CTransaction, etc), along with de-/serialization functions.

maxblocksinflight.py is an example test using this framework that tests whether
a node is limiting the maximum number of in-flight block requests.

This also adds support to util.py for specifying the binary to use when
starting nodes (for tests that compare the behavior of different bitcoind
versions), and adds maxblocksinflight.py to the pull tester.
2015-04-28 12:38:29 -04:00
Wladimir J. van der Laan 6364408122
Merge pull request #5199
1ec900a Remove broken+useless lock/unlock log prints (Matt Corallo)
352ed22 Add merkle blocks test (Matt Corallo)
59ed61b Add RPC call to generate and verify merkle blocks (Matt Corallo)
30da90d Add CMerkleBlock constructor for tx set + block and an empty one (Matt Corallo)
2015-04-28 10:07:25 +02:00
Jameson Lopp a681663e28 clarify that there are only two nodes 2015-04-27 20:22:06 -04:00
Wladimir J. van der Laan 585b5dba74
Merge pull request #6036
f89b092 add rpc test for listunspents support for zero value txouts (Jonas Schnelli)
219953c Show zero value txouts in listunspent. (Gregory Maxwell)
2015-04-24 14:57:43 +02:00
Matt Corallo 352ed22c2c Add merkle blocks test 2015-04-23 21:19:15 -07:00
dexX7 688da79e4a
QA: add --noshutdown option to prevent stopping nodes
With `--noshutdown`, the nodes are not stopped explicitly. `--noshutdown` implies `--nocleanup`, to prevent removing datadirs, which are still in use.
2015-04-23 14:19:00 +02:00
mrbandrews f9ec3f0fad Add block pruning functionality
This adds a -prune=N option to bitcoind, which if set to N>0 will enable block
file pruning. When pruning is enabled, block and undo files will be deleted to
try to keep total space used by those files to below the prune target (N, in
MB) specified by the user, subject to some constraints:

- The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP),
- N must be at least 550MB (chosen as a value for the target that could
  reasonably be met, with some assumptions about block sizes, orphan rates,
  etc; see comment in main.h),
- No blocks are pruned until chainActive is at least 100,000 blocks long (on
  mainnet; defined separately for mainnet, testnet, and regtest in chainparams
  as nPruneAfterHeight).

This unsets NODE_NETWORK if pruning is enabled.

Also included is an RPC test for pruning (pruning.py).

Thanks to @rdponticelli for earlier work on this feature; this is based in
part off that work.
2015-04-22 15:53:48 -04:00
Jonas Schnelli 6b4feb89a8 [QA] rest.py RPC test: change setgenerate() to generate() 2015-04-21 20:33:02 +02:00
Jonas Schnelli 97ee866549 [REST] getutxos REST command (based on Bip64)
has parts of @mhearn #4351
* allows querying the utxos over REST
* same binary input and outputs as mentioned in Bip64
* input format = output format
* various rpc/rest regtests
2015-04-21 20:26:49 +02:00
Jonas Schnelli f89b092d75 add rpc test for listunspents support for zero value txouts 2015-04-21 02:25:35 -07:00
Wladimir J. van der Laan 6be3562e50 rpc-tests: Add proxy test
Add test for -proxy, -onion and -proxyrandomize.
2015-04-20 15:04:33 +02:00
dexX7 2eadeb27ed
QA: stop nodes after RPC tests, even with --nocleanup
`--nocleanup` should provide a way to preserve test data, but should not have an impact on whether nodes are to be stopped after the test execution.

In particular, when currently running RPC tests with `--nocleanup`, then it may result in several active `bitcoind` processes, which are not terminated properly.
2015-04-20 13:09:29 +02:00
mrbandrews 0421c18f3a Fix CheckBlockIndex for reindex.
Some tests in CheckBlockIndex require chainActive.Tip(), but when reindexing, chainActive has not been set on the first call to CheckBlockIndex.

reindex.py starts a node, mines 3 blocks, stops, and reindexes with CheckBlockIndex enabled.
2015-04-14 14:10:19 -04:00
Wladimir J. van der Laan 4ac79f99b0
Fix travis after merging #5957
New wallet tests have been added in the meantime and need to be updated
to use `generate` instead of `setgenerate`.
2015-04-09 17:36:10 +02:00
Wladimir J. van der Laan 57026a29bc
Merge pull request #5957
e2edf95 Bugfix: make CreateNewBlock return pindexPrev (Pieter Wuille)
6b04508 Introduce separate 'generate' RPC call (Pieter Wuille)
0df67f1 Simplify hash loop code (Pieter Wuille)
2015-04-09 15:23:09 +02:00
Pieter Wuille 6b04508e37 Introduce separate 'generate' RPC call 2015-04-01 11:47:10 -07:00
Jonas Schnelli 77650cc9f4 add -walletbroadcast=0 rpc test 2015-04-01 13:03:39 +02:00
Gavin Andresen 0f5954c434
Regression test for ResendWalletTransactions
Adds a regression test for the wallet's ResendWalletTransactions function, which uses a new, hidden RPC command "resendwallettransactions."

I refactored main's Broadcast signal so it is passed the best-block time, which let me remove a global variable shared between main.cpp and the wallet (nTimeBestReceived).

I also manually tested the "rebroadcast unconfirmed every half hour or so" functionality by:

1. Running bitcoind -connect=0.0.0.0:8333
2. Creating a couple of send-to-self transactions
3. Connect to a peer using -addnode
4. Waited a while, monitoring debug.log, until I see:
```2015-03-23 18:48:10 ResendWalletTransactions: rebroadcast 2 unconfirmed transactions```

One last change: don't bother putting ResendWalletTransactions messages in debug.log unless unconfirmed transactions were actually rebroadcast.
2015-03-24 15:29:20 -04:00
Wladimir J. van der Laan 22cfe23196
Merge pull request #5890
cd3d67c Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates (Alex Morcos)
2015-03-24 14:50:54 +01:00
Wladimir J. van der Laan df5c246ba3
Merge pull request #5831
1d9b378 qa/rpc-tests/wallet: Tests for sendmany (Luke Dashjr)
40a7573 rpcwallet/sendmany: Just take an array of addresses to subtract fees from, rather than an Object with all values being identical (Luke Dashjr)
292623a Subtract fee from amount (Cozz Lovan)
90a43c1 [Qt] Code-movement-only: Format confirmation message in sendcoinsdialog (Cozz Lovan)
2015-03-16 12:23:14 +01:00
Alex Morcos cd3d67cf3b Fix InvalidateBlock to add chainActive.Tip to setBlockIndexCandidates 2015-03-13 13:11:11 -04:00
Luke Dashjr 1d9b378c30 qa/rpc-tests/wallet: Tests for sendmany 2015-03-13 11:04:25 +01:00
Cozz Lovan 292623adf5 Subtract fee from amount
Fixes #2724 and #1570.

Adds the
automatically-subtract-the-fee-from-the-amount-and-send-whats-left
feature to the GUI and RPC (sendtoaddress,sendmany).
2015-03-13 11:04:18 +01:00
Alex Morcos 88f6c8c365 add RPC test for InvalidateBlock 2015-03-12 10:15:33 -04:00
Wladimir J. van der Laan d48ce48093
Merge #5548: [REST] add /rest/chaininfos
2c0f901 [REST] rest/chaininfos add documentation (Jonas Schnelli)
59582c8 [REST] add /rest/chaininfos (Jonas Schnelli)
2015-02-10 12:08:07 +01:00
Suhas Daftuar 1cb2a00cb8 Fix getblocktemplate_proposals test by mining one block
This triggers the tested node to no longer be in initial
download, allowing the call to getblocktemplate() to succeed.
2015-02-04 12:04:49 -05:00
Wladimir J. van der Laan 41e6e4caba
Merge pull request #5713
bf6cdeb Increase coverage of DERSIG edge cases (Pieter Wuille)
819bcf9 Add RPC test for DERSIG BIP switchover logic (Pieter Wuille)
5a47811 BIP66 changeover logic (Pieter Wuille)
092e9fe Example unit tests from BIP66 (Pieter Wuille)
80ad135 Change IsDERSignature to BIP66 implementation (Pieter Wuille)
2015-02-03 10:34:53 +01:00
Pieter Wuille 819bcf9b99 Add RPC test for DERSIG BIP switchover logic 2015-02-01 17:51:24 -04:00
bikinibabe ee932025c1 Changed pronouns for correctness and inclusivity 2015-01-31 17:38:28 -05:00
Matt Bogosian 34c61813a4 Fix README link from util.sh -> util.py. 2015-01-31 17:38:28 -05:00
Jonas Schnelli 1a25a7edf8 [QA] fix httpbasic keep-alive test 2015-01-17 08:56:55 -08:00
Jonas Schnelli 1dd8ee72af improve tests for #5655 2015-01-14 09:50:00 -08:00
Wladimir J. van der Laan 56c1093dae fix tests for #5655 2015-01-14 09:50:00 -08:00
Wladimir J. van der Laan e3f5727590
Merge pull request #5612
84d9199 [QA] fix zapwallettxes test (Jonas Schnelli)
2015-01-08 11:51:51 +01:00
Jonas Schnelli 84d919974b [QA] fix zapwallettxes test
- remove shell test script and add a python equivalent
2015-01-07 16:41:12 +01:00
Suhas Daftuar 1eb1e65f09 Fix smartfees test for change to relay policy 2015-01-07 10:11:23 -05:00
Wladimir J. van der Laan d79adc1ab1
Merge pull request #5535
1c52aad Require sufficent priority for relay of free transactions (Pieter Wuille)
2015-01-07 13:01:56 +01:00
Pieter Wuille 1c52aad540 Require sufficent priority for relay of free transactions 2014-12-30 02:03:29 +01:00
Jonas Schnelli 59582c8b8d [REST] add /rest/chaininfos 2014-12-29 20:19:48 +01:00
Jonas Schnelli 12d927a391 RPC test for immature balance 2014-12-25 20:15:10 -08:00
Wladimir J. van der Laan 111a7d45f1
Merge pull request #5470
78253fc Remove references to X11 licence (Michael Ford)
2014-12-19 19:23:23 +01:00
Jonas Schnelli 7a3b83269e [QA] fix httpbasics RPC test typo 2014-12-17 22:40:20 +01:00
Jonas Schnelli 1340f00200 [RPC-TESTS] ability to run single test manually
adds possibility to run ./qa/pull-tester/rpc-tests.sh <TESTNAME>
2014-12-16 11:06:17 +01:00
Michael Ford 78253fcbad Remove references to X11 licence 2014-12-16 15:56:50 +08:00
Pieter Wuille f676c80f43 Add /rest/headers 2014-12-12 16:37:00 +01:00
Wladimir J. van der Laan 41cced2106
Merge pull request #5267
34318d7 RPC-test based on invalidateblock for mempool coinbase spends (Gavin Andresen)
7fd6219 Make CTxMemPool::remove more effecient by avoiding recursion (Matt Corallo)
b7b4318 Make CTxMemPool::check more thourough by using CheckInputs (Matt Corallo)
723d12c Remove txn which are invalidated by coinbase maturity during reorg (Matt Corallo)
868d041 Remove coinbase-dependant transactions during reorg. (Matt Corallo)
2014-12-11 15:24:00 +01:00
Jonas Schnelli 73351c3686 [REST] /rest/block response with full tx details
- rest block request returns full unfolded tx details
- /rest/block/notxdetails/<HASH> returns block where transactions are only represented by its hash
2014-12-09 16:05:50 +01:00
mrbandrews 1577df986e Port of walletbackup.sh to Python. 2014-12-09 10:57:51 +01:00
Gavin Andresen 34318d7fad RPC-test based on invalidateblock for mempool coinbase spends 2014-12-08 14:09:58 -08:00
Jonas Schnelli 11d7a7d505 [RPC] add rpc-test for http keep-alive (persistent connections) 2014-12-06 23:15:22 +01:00
Matt Corallo db0916bd13 Fix missing python2 in rpc-tests 2014-12-05 16:04:05 -08:00
Wladimir J. van der Laan c2d7c6134e
Merge pull request #5407
9e56532 Coinbases-in-mempool regression test (Gavin Andresen)
2014-12-03 10:51:36 +01:00
Gavin Andresen 9e56532959
Coinbases-in-mempool regression test
Immature coinbase spends are allowed in the memory pool if they can be mined in the next block.
They are not allowed in the memory pool if they cannot be mined in the next block.

This regression test tests those edge cases.
2014-12-02 19:07:39 -05:00
Gavin Andresen 1c7e09f0b9
Merge pull request #5369
b2d0162 Test resurrecting memory pool transactions during chain re-org (Gavin Andresen)
3dd8ed7 Delay writing block indexes in invalidate/reconsider (Pieter Wuille)
798faec Add 'invalidateblock' and 'reconsiderblock' RPC commands. (Pieter Wuille)
2014-12-02 11:59:41 -05:00
Gavin Andresen b2d0162ba4
Test resurrecting memory pool transactions during chain re-org
Builds on #5316.
2014-12-02 11:09:25 -05:00
Wladimir J. van der Laan 90f7aa7778
Fix rest.py test after #5376 2014-12-02 15:57:20 +01:00
Jonas Schnelli 01dc2d83f8 [REST] add REST interface tests in rpc-test section 2014-12-01 12:52:21 +01:00
Wladimir J. van der Laan 0ddf4416cc
Merge pull request #5386
1b91be4 Report status of chain tips (Pieter Wuille)
2014-12-01 11:49:35 +01:00
Pieter Wuille 1b91be49f5 Report status of chain tips 2014-11-27 11:50:14 +01:00
Matt Corallo e3f315a0a5 Fix python usage for arch's broken maintainers 2014-11-27 00:02:28 -05:00
Gavin Andresen fe042dbe9f
Merge pull request #5335
7e615f5 Fixed mempool sync after sending a transaction (Suhas Daftuar)
2014-11-24 10:27:37 -05:00
Wladimir J. van der Laan f24bcce2ac
Merge pull request #1816
b867e40 CreateNewBlock: Stick height in coinbase so we pass template sanity check (Luke Dashjr)
60755db submitblock: Check for duplicate submissions explicitly (Luke Dashjr)
bc6cb41 QA RPC tests: Add tests block block proposals (Luke Dashjr)
9765a50 Implement BIP 23 Block Proposal (Luke Dashjr)
3dcbb9b Abstract DecodeHexBlk and BIP22ValidationResult functions out of submitblock (Luke Dashjr)
132ea9b miner_tests: Disable checkpoints so they don't fail the subsidy-change test (Luke Dashjr)
df08a62 TestBlockValidity function for CBlock proposals (used by CreateNewBlock) (Luke Dashjr)
4ea1be7 CreateNewBlock and miner_tests: Also check generated template is valid by CheckBlockHeader, ContextualCheckBlockHeader, CheckBlock, and ContextualCheckBlock (Luke Dashjr)
a48f2d6 Abstract context-dependent block checking from acceptance (Luke Dashjr)
2014-11-24 14:43:10 +01:00
Wladimir J. van der Laan 37c47e1809
Merge pull request #5333
e4ef724 Edited rpc-tests to run python script not shell script. (mrbandrews)
189fb52 Port of wallet.sh to python (wallet.py). (mrbandrews)
2014-11-21 13:48:41 +01:00
Suhas Daftuar 7e615f5228 Fixed mempool sync after sending a transaction 2014-11-20 15:49:07 -05:00
mrbandrews e4ef724493 Edited rpc-tests to run python script not shell script. 2014-11-20 15:36:34 -05:00
mrbandrews 189fb526f1 Port of wallet.sh to python (wallet.py).
Also included are minor edits to util.py to create a clean blockchain and add a parameter to gather_inputs to specify number of confirmations.
2014-11-20 14:11:44 -05:00
Luke Dashjr bc6cb4177b QA RPC tests: Add tests block block proposals 2014-11-20 00:15:17 +00:00
Gavin Andresen 8656dbb095
Port/fix txnmall.sh regression test
Ported txnmall.sh to Python, and updated to match
recent transaction malleability changes.

I also modified it so it tests both double-spending
confirmed and unconfirmed (only-in-mempool) transactions.

Renamed to txn_doublespend, since that is really what is
being tested. And told the pull-tester to run both
variations on this test.
2014-11-19 15:36:10 -05:00
Gavin Andresen fd3777b0b2
Merge pull request #5280
3c30f27 travis: disable rpc tests for windows until they're not so flaky (Cory Fields)
daf03e7 RPC tests: create initial chain with specific timestamps (Gavin Andresen)
a8b2ce5 regression test only setmocktime RPC call (Gavin Andresen)
2014-11-18 14:31:29 -05:00
Cory Fields 3c30f27f34
travis: disable rpc tests for windows until they're not so flaky 2014-11-17 14:17:04 -05:00
Gavin Andresen daf03e7c92
RPC tests: create initial chain with specific timestamps
Use setmocktime to create the initial block chain with
10-minute-apart-blocks starting 1 Jan 2014.
2014-11-17 14:13:32 -05:00
Wladimir J. van der Laan 20e4f654f5
Merge pull request #5237
2db4c8a Fix node ranges in the test framework. (Daniel Kraft)
2014-11-17 17:20:32 +01:00
Bryan Bishop a7af9839d6 don't override dir() in qa rpc tests
Replace "dir" with "dirname" in util.py in qa/rpc-tests/ because "dir"
is the name of a function in python.
2014-11-14 09:12:41 -06:00
Cory Fields c8b115e20b travis: temporarily disable the forknotify test
It appears to be breaking randomly on Windows
2014-11-13 04:09:19 -05:00
dexX7 5e2dcaebc4
gather_inputs: use correct variable in error message
"amount" and "fee" do not exist (anymore?).
2014-11-07 15:47:29 +01:00
Daniel Kraft 2db4c8a24d Fix node ranges in the test framework. 2014-11-07 10:23:21 +01:00
Cory Fields 7667850dbf tests: replace the old (unused since Travis) tests with new rpc test scripts 2014-10-31 00:05:55 -04:00
Cory Fields fa7f8cdc1a tests: remove old pull-tester scripts
They're unused since the switch to Travis
2014-10-31 00:05:55 -04:00
Cory Fields 5122ea7190 tests: fix forknotify.py on windows
Windows interprets 'foo.txt' as a literal filename while "foo.txt" is treated
as expected.
2014-10-31 00:05:55 -04:00
Cory Fields 7a41614aa2 tests: allow rpc-tests to get filenames for bitcoind and bitcoin-cli from the environment
This will allow for windows tests to run with bitcoind.exe and bitcoin-cli.exe
2014-10-31 00:05:55 -04:00
Gavin Andresen e4f79c0219
Merge pull request #5139
9f87325 Start with tidier cache directories (Gavin Andresen)

Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
2014-10-27 13:39:25 -04:00
Wladimir J. van der Laan b6c99efe9c
Merge pull request #5121
214091d Update license in pull-tester and rpc-tests (Michael Ford)
2014-10-27 13:48:45 +01:00
Gavin Andresen 9f87325b22
Start with tidier cache directories
Remove more files from the cached, 200-block-chain data directories.
2014-10-24 15:48:06 -04:00
Gavin Andresen e401a2c557
Merge pull request #5132
2290ed0 Work around #5113. (Daniel Kraft)
dcb9846 Extend getchaintips RPC test. (Daniel Kraft)

Signed-off-by: Gavin Andresen <gavinandresen@gmail.com>
2014-10-24 15:13:41 -04:00
Gavin Andresen ec01243c14
--tracerpc option for regression tests
Run tests with --tracerpc and all RPC calls will dump to the console.
Very helpful for debugging.
2014-10-24 11:27:22 -04:00
Daniel Kraft 2290ed01bc Work around #5113. 2014-10-24 09:06:37 +02:00
Daniel Kraft dcb98466b4 Extend getchaintips RPC test.
Add the capability to simulate network splits to the RPC test framework
and use it to do more extensive testing of 'getchaintips'.
2014-10-24 08:53:04 +02:00
Michael Ford 214091d584 Update license in pull-tester and rpc-tests
Add missing copyright/license header where necessary
2014-10-23 09:48:19 +08:00