Commit Graph

189 Commits

Author SHA1 Message Date
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