aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/pruning.py
Commit message (Collapse)AuthorAgeFilesLines
* qa: Fix typosrht2021-05-181-2/+2
|
* Return correct error codes in blockchain.cpp.John Newbery2017-06-051-20/+11
| | | | | | | | | | | | | | | | | RPCs in blockchain.cpp were returning misleading or incorrect error codes (for example getblock() returning RPC_INTERNAL_ERROR when the block had been pruned). This commit fixes those error codes: - RPC_INTERNAL_ERROR should not be returned for application-level errors, only for genuine internal errors such as corrupted data. - RPC_METHOD_NOT_FOUND should not be returned in response to a JSON request for an existing method. Those error codes have been replaced with RPC_MISC_ERROR or RPC_INVALID_PARAMETER as appropriate. Github-Pull: #9853 Rebased-From: c1190963b388590dc0a346bf625c7e84f69cee8d
* Fix pruning test broken by 2 hour manual prune windowRussell Yanofsky2017-02-231-1/+6
| | | | | | | Regression happened in 91fb506 Add two hour buffer to manual pruning. Github-Pull: #9820 Rebased-From: 874c7363d794c18a3b46d3d2a03f19c88f3a20cf
* qa: Actually test assertions in pruning.pyMarcoFalke2017-01-261-21/+17
| | | | Also refactor to use wrapper for stop_node
* Merge #9628: qa: Increase a sync_blocks timeout in pruning.pyMarcoFalke2017-01-261-1/+1
|\ | | | | | | 2f10f06 qa: Increase a sync_blocks timeout in pruning.py (Suhas Daftuar)
| * qa: Increase a sync_blocks timeout in pruning.pySuhas Daftuar2017-01-251-1/+1
| |
* | Return height of last block pruned by pruneblockchain RPCRussell Yanofsky2017-01-111-5/+22
|/ | | | | Change suggested by Jonas Schnelli <[email protected]> in https://github.com/bitcoin/bitcoin/pull/7871#discussion_r95577623
* fixup! Add pruneblockchain RPC to enable manual block file pruning.Russell Yanofsky2017-01-101-41/+56
| | | | Extend pruneblockchain RPC to accept block timestamps as well as block indices.
* Add pruneblockchain RPC to enable manual block file pruning.mrbandrews2017-01-101-3/+110
|
* [qa] pruning: Use cached utxo set to run fasterMarcoFalke2016-12-041-4/+11
|
* [qa] Get rid of duplicate codeMarcoFalke2016-12-021-41/+4
|
* [qa] Split up slow RPC calls to avoid pruning test timeoutsSuhas Daftuar2016-09-281-1/+4
|
* Tests: Increase sync_blocks() timeouts in pruning.pySuhas Daftuar2016-06-281-2/+2
|
* Merge #8056: [qa] Remove hardcoded "4 nodes" from test_frameworkMarcoFalke2016-05-201-4/+4
|\ | | | | | | | | fad68f7 [qa] Reduce node count for some tests (MarcoFalke) fac9349 [qa] Remove hardcoded "4 nodes" from test_framework (MarcoFalke)
| * [qa] Remove hardcoded "4 nodes" from test_frameworkMarcoFalke2016-05-151-4/+4
| |
* | Increase timeout waiting for pruned blk00000.daterror102016-05-101-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In my ever-growing list of test failures, I was seeing this one intermittently. ``` Running 2nd level testscript pruning.py... Initializing test directory /tmp/testY5ypCv Warning! This test requires 4GB of disk space and takes over 30 mins (up to 2 hours) Mining a big blockchain of 995 blocks Check that we haven't started pruning yet because we're below PruneAfterHeight Success Though we're already using more than 550MB, current usage: 587 Mining 25 more blocks should cause the first block file to be pruned Assertion failed: blk00000.dat not pruned when it should be File "/home/error/bitcoinxt-0.11D/qa/rpc-tests/test_framework/test_framework.py", line 118, in main self.run_test() File "/home/error/bitcoinxt-0.11D/qa/rpc-tests/pruning.py", line 272, in run_test self.test_height_min() File "/home/error/bitcoinxt-0.11D/qa/rpc-tests/pruning.py", line 94, in test_height_min raise AssertionError("blk00000.dat not pruned when it should be") Stopping nodes Failed ``` After digging into the test, I found that the code is waiting 10 seconds for blk00000.dat to be deleted, and then throwing this failure if it still exists after 10 seconds. I increased this amount, had the script print the actual time taken, and ran the test a few more times. The time taken ranged between 8 to 12 seconds. So, I feel that this timeout is too short. After changing the timeout to 30 seconds, the test passes consistently. (cherry picked from commit 3469911c89a48dd2fefe4d1c2a0c176256e14ee0)
* [qa] Switch to py3MarcoFalke2016-05-051-34/+34
|
* [qa] py2: Unfiddle strings into bytes explicitlyMarcoFalke2016-04-101-1/+1
|
* [qa] rpc-tests: Properly use integers, floatsMarcoFalke2016-04-011-3/+3
|
* [qa] Fix pyton syntax in rpc testsMarcoFalke2016-01-131-1/+0
|
* Merge pull request #7205Wladimir J. van der Laan2016-01-051-1/+1
|\ | | | | | | | | | | fa71669 [devtools] Use git pretty-format for year parsing (MarcoFalke) fa24439 Bump copyright headers to 2015 (MarcoFalke) fa6ad85 [devtools] Rewrite fix-copyright-headers.py (MarcoFalke)
| * Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
| |
* | [qa] Move gen_return_txouts() to util.pyMarcoFalke2015-12-241-18/+1
|/
* Make fee aware of min relay in pruning.py RPC testAlex Morcos2015-10-171-1/+4
|
* [QA] restructure rpc tests directoryJonas Schnelli2015-05-181-3/+2
| | | | * move non-test classes to subdir `test-framework`
* Increase timeouts in pruning.py and modify warning language.Alex Morcos2015-05-131-9/+10
|
* Add block pruning functionalitymrbandrews2015-04-221-0/+356
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.