aboutsummaryrefslogtreecommitdiff
path: root/test/functional
AgeCommit message (Collapse)Author
2018-09-06Merge #14105: util: Report parse errors in configuration fileWladimir J. van der Laan
ed2332aeffb071a3404be9cff8f9fb8a81a9fbfb test: Add test for config file parsing errors (MarcoFalke) a66c0f78a941968340f030911765a84219908c4d util: Report parse errors in configuration file (Wladimir J. van der Laan) Pull request description: Report errors while parsing the configuration file, instead of silently ignoring them. $ src/bitcoind -regtest Error reading configuration file: parse error on line 22: nodebuglogfile, if you intended to specify a negated option, use nodebuglogfile=1 instead $ src/bitcoind -regtest Error reading configuration file: parse error on line 22: sdafsdfafs $ src/bitcoind -regtest Error reading configuration file: parse error on line 24: -nodebuglogfile=1, options in the configuration file must be specified without leading - (inspired by https://github.com/bitcoin/bitcoin/pull/14100#issuecomment-417264823) Tree-SHA512: d516342b65db2969edf200390994bbbda23654c648f85dcc99f9f2d217d3d59a72e0f58227be7b4746529dcfa54ba26d8188ba9f14a57c9ab00015d7283fade2
2018-09-06test: Add test for config file parsing errorsMarcoFalke
2018-09-05Merge #13954: Warn (don't fail!) on spelling errors. Fix typos reported by ↵MarcoFalke
codespell. f8a81f73ac lint: Add spell check linter (codespell) (practicalswift) ada356208e Fix typos reported by codespell (practicalswift) Pull request description: * Check for common misspellings using `codespell`. * Fix recently introduced typos reported by `codespell`. Tree-SHA512: 9974c0e640b411c7d0ebc5b45de253c19bac7fe3002cd98601ff8da8db584224c2fd7d331aee3df612c9f2cfef540d647a9b4c5a1a73fd208dc93ce4bf9e5e3e
2018-09-04Fix typos reported by codespellpracticalswift
2018-09-01Test rpc_help.py failed: Check whether ZMQ is enabled or not.Kvaciral
2018-08-29qa: Use named args in some testsMarcoFalke
2018-08-29scripted-diff: Use named arguments in feature_blockMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e "s/sync_blocks\((.*?), (True|False), (1.?), /sync_blocks(\1, success=\2, reject_code=\3, reject_reason=/g" ./test/functional/feature_block.py -END VERIFY SCRIPT-
2018-08-29scripted-diff: Pass node into p2p_segwit acceptance testsMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/(test_witness_block|test_transaction_acceptance)\((self\.nodes\[.\])\.rpc/\1(\2/g' test/functional/p2p_segwit.py -END VERIFY SCRIPT-
2018-08-29Merge #14020: Add tests for RPC helpMarcoFalke
6af6d9b23d test: Add tests for RPC help (João Barbosa) Pull request description: At the moment the new test checks for: - invalid usages - expected output for unknown command - current RPC command titles (derived from command categories) — this prevents adding wrong RPC categories and new categories must be added to the test Tree-SHA512: f987535d001b1cd300656588602b1634099ea68a1dd2282180c30fa56caf7f990be9e2dc86c7431dfcf7fd686d0299a8d4935df178a2c9f0fb6fbebcba748eb5
2018-08-28Merge #14055: fix walletcreatefundedpsbt deriv paths, add testWladimir J. van der Laan
61fe653bd919cb0533b2b9d6259bc86a4b2975c0 fix walletcreatefundedpsbt deriv paths, add test (Gregory Sanders) Pull request description: Added the regression in #13968 Tree-SHA512: a31290b57ed80a8486925e562ca5412500d4215a238de7e448f48edfa671c87aebd79ee179a8340b289d9811ae6fa30ef75eefd5f5890fb6285174c5db72ff65
2018-08-28Merge #14052: qa: Add some actual witness in rpc_rawtransactionMarcoFalke
fae040010d qa: Add some actual witness in rpc_rawtransaction (MarcoFalke) Pull request description: The transaction was serialized with the witness flag but didn't include any witness, so add some dummy witness... Tree-SHA512: fe71167c16e9b0053110be7c544e1ea08868f04ffee8d4c74887c9bcdcd5b59d5e8dd53c67e104a1bdbbf606202bc3fbef6017f402f2c75bdb2ebd9f7aabb2b1
2018-08-28Merge #14051: [Tests] Make combine_logs.py handle multi-line logsWladimir J. van der Laan
16e288acdd61fa5fa5e39f3936fb50499f82c085 test padding non micro timestamps (John Newbery) 995dd89d884bda3fb5ca1885c5887d989cd2cad3 [Tests] Make combine_logs.py handle multi-line logs (John Newbery) Pull request description: combine_logs.py currently inserts additional newlines into multi-line log messages, and doesn't color them properly. Fix both of those. Tree-SHA512: dbe2f3ecc7cfbc95ee4350e648d127538c79cb6555257d4aeec12fe3d159366742b68e90e620c8ed7219a44b973395c7e5929ba374fae115fbee25560db645f6
2018-08-27test padding non micro timestampsJohn Newbery
2018-08-27[wallet] Remove wallet account RPCsJohn Newbery
Also remove the RPC deprecation tests for accounts, and make one small change to another wallet test that relies on account behaviour.
2018-08-27[tests] Remove wallet accounts testJohn Newbery
The accounts API will be removed in the next commit. Remove all functional tests for the accounts API.
2018-08-27Merge #13987: Report minfeefilter value in getpeerinfo rpcMarcoFalke
5778bf95d9 Report minfeefilter value in getpeerinfo rpc (Anthony Towns) Pull request description: Lowering the minimum relay fee is only useful when many nodes in the p2p network also lower the fee, so to make it easier to understand progress on that front, this includes the value of the minfeefilter in getpeerinfo, so you at least have visibility to what fees your neighbours are currently accepting. Tree-SHA512: 059f01bf2a32c98fce1648a13b7898701203b354d0209ee34e6683994b720eb594cf24968e66b699caae5e17e53d351e73281f042dd094decde14d3a318e9fb3
2018-08-27Report minfeefilter value in getpeerinfo rpcAnthony Towns
Lowering the minimum relay fee is only useful when many nodes in the p2p network also lower the fee, so to make it easier to understand progress on that front, this includes the value of the minfeefilter in getpeerinfo, so you at least have visibility to what fees your neighbours are currently accepting.
2018-08-26Merge #12676: Show "bip125-replaceable" flag, when retrieving mempool entriesWladimir J. van der Laan
870bd4c73ddf494dc23c658bf0fb672ee0109158 Update functional RBF test to check replaceable flag (dexX7) 820d31f95fb6b886b38dab5d378825bea7edd49e Add "bip125-replaceable" flag to mempool RPCs (dexX7) Pull request description: This pull request adds a flag "bip125-replaceable" to the mempool RPCs getrawmempool, getmempoolentry, getmempoolancestors and getmempooldescendants, which indicates whether an unconfirmed transaction might be replaced. Initially the flag was added to the raw transaction RPCs, but thanks to @conscott, it was moved to the mempool RPCs, which actually have access to the mempool. ~~This pull request adds a flag "bip125-replaceable" to the RPCs "getrawtransaction" and "decoderawtransaction", which indicates, whether a transaction signals BIP 125 replaceability.~~ There was some discussion in #7817, whether showing replaceability in the UI could lead to the false assumption that transactions that don't signal BIP 125 are truely non-replaceable, but given that this PR tackles the raw transaction interface, which is a rather low level tool, I believe having this extra piece of information isn't bad. Tree-SHA512: 1f5511957af2c20a9a6c79d80a335c3be37a2402dbf829c40cceaa01a24868eab81a9c1cdb0b3d77198fa3bb82799e3540a5c0ce7f35bbac80d73f7133ff7cbc
2018-08-24fix walletcreatefundedpsbt deriv paths, add testGregory Sanders
2018-08-24Merge #14024: qa: Add TestNode::assert_debug_logMarcoFalke
fa3e9f7627 qa: Add TestNode::assert_debug_log (MarcoFalke) Pull request description: Closes #13006 Tree-SHA512: 8e2d2331039d70525a425aad65a4eaf9b83fb1f85a4260d69453176f04dbede6dd9b7bb4d5f089b46cf8f8c98571aa6ba7fac8fa6847bb3bdf6a6ad21a27b1a7
2018-08-24qa: Add some actual witness in rpc_rawtransactionMarcoFalke
2018-08-24qa: Add TestNode::assert_debug_logMarcoFalke
2018-08-24[Tests] Make combine_logs.py handle multi-line logsJohn Newbery
combine_logs.py currently inserts additional newlines into multi-line log messages, and doesn't color them properly. Fix both of those.
2018-08-23qa: Remove unused deserialization code in msg_versionMarcoFalke
2018-08-23test: Add tests for RPC helpJoão Barbosa
2018-08-22p2p: Remove dead code for nVersion=10300MarcoFalke
2018-08-22Merge #13988: Add checks for settxfee reasonablenessWladimir J. van der Laan
317f2cb3f4499afbaa63e3cac80567744f12c95b test: Check RPC settxfee errors (João Barbosa) 48618daf262b84c2e2f7322b5ca14375d7d68b64 Add checks for settxfee reasonableness (Anthony Towns) Pull request description: When using the `settxfee` RPC, the value is silently ignored if it is less than either than minrelaytxfee or the wallet's mintxfee. This adds an error response if that's going to happen, but still allows "settxfee 0" to deliberately default to the minimum value. Tree-SHA512: ce685584cf8d6b9ca2cc97196d494220e3892b6a804a458086e04b3a23df281da432ad0a3053106a064c90c541ddb6f6b96a27cf8376d45af1e44449baf88456
2018-08-21Merge #13968: [wallet] couple of walletcreatefundedpsbt fixesWladimir J. van der Laan
faaac5caaab4d5131040292f4ef2404074ad268b RPCTypeCheck bip32derivs arg in walletcreatefunded (Gregory Sanders) 1f0c4282e961baea85d5f74d7493bd7459784391 QA: add basic walletcreatefunded optional arg test (Gregory Sanders) 1f18d7b591ffcc8bb9422a9b728bd9a0d8da6a2a walletcreatefundedpsbt: remove duplicate replaceable arg (Gregory Sanders) 2252ec50085c151e7998ca9a30cda6a33ee862b6 Allow ConstructTransaction to not throw error with 0-input txn (Gregory Sanders) Pull request description: 1) Previously an empty input argument transaction that is marked for replaceability fails to pass the `SignalsOptInRBF` check right before funding it. Explicitly check for that condition before throwing an error. 2) The rpc call had two separate `replaceable` arguments, each of which being used in mutually exclusive places. I preserved the `options` version to retain compatability with `fundtransaction`. Tree-SHA512: 26eb0c9e2d38ea51d11f741d61100223253271a084adadeb7e78c6d4e9004636f089e4273c5bf64a41bd7e9ff795317acf30531cb36aeb0d8db9304b3c8270c3
2018-08-21test: Check RPC settxfee errorsJoão Barbosa
2018-08-20QA: add basic walletcreatefunded optional arg testGregory Sanders
2018-08-15Fix typo in feature_blocksdir.py log messageAlexander Leishman
2018-08-15Merge #13399: rpc: Add submitheaderWladimir J. van der Laan
fa091b001605c4481fb4eca415929a98d3478549 qa: Add tests for submitheader (MarcoFalke) 36b1b63f20cc718084971d2cadd04497a9b72634 rpc: Expose ProcessNewBlockHeaders (MarcoFalke) Pull request description: This exposes `ProcessNewBlockHeaders` as an rpc called `submitheader`. This can be used to check for invalid block headers and submission of valid block headers via the rpc. Tree-SHA512: a61e850470f15465f88e450609116df0a98d5d9afadf36b2033d820933d8b6a4012f9f2b3246319c08a0e511bef517f5d808cd0f44ffca91d10895a938004f0b
2018-08-14Merge #13917: Additional safety checks in PSBT signerWladimir J. van der Laan
5df6f089b53c5b5859e5a3454c026447e4752f82 More tests of signer checks (Andrew Chow) 7c8bffdc24e005c3044a9a80bbc227b2a39b8605 Test that a non-witness script as witness utxo is not signed (Andrew Chow) 8254e9950f67d750c7f5905bfdef526d825965ed Additional sanity checks in SignPSBTInput (Pieter Wuille) c05712cb590c8c76729a71d75a290c67ae9e3c06 Only wipe wrong UTXO type data if overwritten by wallet (Pieter Wuille) Pull request description: The current PSBT signing code can end up producing a non-segwit signature, while only the UTXO being spent is provided in the PSBT (as opposed to the entire transaction being spent). This may be used to trick a user to incorrectly decide a transaction has the semantics he intends to sign. Fix this by refusing to sign if there is any mismatch between the provided data and what is being signed. Tree-SHA512: b55790d79d8166e05513fc4c603a982a33710e79dc3c045060cddac6b48a1be3a28ebf8db63f988b6567b15dd27fd09bbaf48846e323c8635376ac20178956f4
2018-08-14Merge #13960: Fix PSBT deserialization of 0-input transactionsWladimir J. van der Laan
bd19cc78cfc455cf06e120adb0d12c2f96ba8fca Serialize non-witness utxo as a non-witness tx but always deserialize as witness (Andrew Chow) 43811e63380d803e037de69dc0567aae590fa109 Fix PSBT deserialization of 0-input transactions (Andrew Chow) Pull request description: 0-input transactions can be ambiguously deserialized as being witness transactions. Since the unsigned transaction is never serialized as a witness transaction as it has no witnesses, we should always deserialize it as a non-witness transaction and set the serialization flags as such. When a transaction is serliazed for the non-witness-utxo, it is always a valid network transaction and thus it should be always be deserialized as a witness transaction and the deserialzation flags are set as such. Fixes #13958 Tree-SHA512: 1937b3cb2618534478d4f533541fb9efce3cb5badb5d1964bfe19400f4aacc6c8ecedaf1f20d26b20baf94f81fd07dfb15b3b08089ecbd63aeecbc18c7c48086
2018-08-14Import CInv from correct moduleChun Kuan Lee
2018-08-13tests: Replace usage of tostring() with tobytes()Carl Dong
tostring() is deprecated as of python 3.7 and results in stderr output causing tests to fail
2018-08-13Fix PSBT deserialization of 0-input transactionsAndrew Chow
0-input transactions can be ambiguously deserialized as being witness transactions. Since the unsigned transaction is never serialized as a witness transaction as it has no witnesses, we should always deserialize it as a non-witness transaction and set the serialization flags as such. Also always serialize the unsigned transaction as a non-witness transaction.
2018-08-13qa: Add tests for submitheaderMarcoFalke
2018-08-13More tests of signer checksAndrew Chow
2018-08-13Test that a non-witness script as witness utxo is not signedAndrew Chow
2018-08-13Merge #13054: tests: Enable automatic detection of undefined names in Python ↵MarcoFalke
tests scripts. Remove wildcard imports. 68400d8b96 tests: Use explicit imports (practicalswift) Pull request description: Enable automatic detection of undefined names in Python tests scripts. Remove wildcard imports. Wildcard imports make it unclear which names are present in the namespace, confusing both readers and many automated tools. An additional benefit of not using wildcard imports in tests scripts is that readers of a test script then can infer the rough testing scope just by looking at the imports. Before this commit: ``` $ contrib/devtools/lint-python.sh | head -10 ./test/functional/feature_rbf.py:8:1: F403 'from test_framework.util import *' used; unable to detect undefined names ./test/functional/feature_rbf.py:9:1: F403 'from test_framework.script import *' used; unable to detect undefined names ./test/functional/feature_rbf.py:10:1: F403 'from test_framework.mininode import *' used; unable to detect undefined names ./test/functional/feature_rbf.py:15:12: F405 bytes_to_hex_str may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util ./test/functional/feature_rbf.py:17:58: F405 CScript may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util ./test/functional/feature_rbf.py:25:13: F405 COIN may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util ./test/functional/feature_rbf.py:26:31: F405 satoshi_round may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util ./test/functional/feature_rbf.py:26:60: F405 COIN may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util ./test/functional/feature_rbf.py:30:41: F405 satoshi_round may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util ./test/functional/feature_rbf.py:30:68: F405 COIN may be undefined, or defined from star imports: test_framework.mininode, test_framework.script, test_framework.util $ ``` After this commit: ``` $ contrib/devtools/lint-python.sh | head -10 $ ``` Tree-SHA512: 3f826d39cffb6438388e5efcb20a9622ff8238247e882d68f7b38609877421b2a8e10e9229575f8eb6a8fa42dec4256986692e92922c86171f750a0e887438d9
2018-08-13tests: Use explicit importspracticalswift
2018-08-13Merge #13928: qa: blocktools enforce named args for amountMarcoFalke
cf9ed307e6 qa: blocktools enforce named args for amount (MarcoFalke) Pull request description: Since #13669 changed some signatures, I think it might be worthwhile to enforce named args for primitive types such as amounts. Tree-SHA512: 2733e7b6a20590b54bd54e81a09e3f5e2fadf4390bed594916b70729bcf485b048266012c1203369e0968032a2c6a2719107ac17ee925d8939af3df916eab1a6
2018-08-13Merge #13918: rpc: Replace median fee rate with feerate percentiles in ↵MarcoFalke
getblockstats 4b7091a842 Replace median fee rate with feerate percentiles (Marcin Jachymiak) Pull request description: Currently, the `medianfeerate` statistic is calculated from the feerate of the middle transaction of a list of transactions sorted by feerate. This PR instead uses the value of the 50th percentile weight unit in the block, and also calculates the feerate at the 10th, 25th, 75th, and 90th percentiles. This more accurately corresponds with what is generally meant by median feerate. Tree-SHA512: 59255e243df90d7afbe69839408c58c9723884b8ab82c66dc24a769e89c6d539db1905374a3f025ff28272fb25a0b90e92d8101103e39a6d9c0d60423a596714
2018-08-13Merge #13666: Always create signatures with Low R valuesWladimir J. van der Laan
e306be742932d4ea5aca0ea4768e54b2fc3dc6a0 Use 72 byte dummy signatures when watching only inputs may be used (Andrew Chow) 48b1473c898129a99212e2db36c61cf93625ea17 Use 71 byte signature for DUMMY_SIGNATURE_CREATOR (Andrew Chow) 18dfea0dd082af18dfb02981b7ee1cd44d514388 Always create 70 byte signatures with low R values (Andrew Chow) Pull request description: When creating signatures for transactions, always make one which has a 32 byte or smaller R and 32 byte or smaller S value. This results in signatures that are always less than 71 bytes (32 byte R + 32 byte S + 6 bytes DER + 1 byte sighash) with low R values. In most cases, the signature will be 71 bytes. Because R is not mutable in the same way that S is, a low R value can only be found by trying different nonces. RFC 6979 for deterministic nonce generation has the option to specify additional entropy, so we simply use that and add a uin32_t counter which we increment in order to try different nonces. Nonces are sill deterministically generated as the nonce used will the be the first one where the counter results in a nonce that results in a low R value. Because different nonces need to be tried, time to produce a signature does increase. On average, it takes twice as long to make a signature as two signatures need to be created, on average, to find one with a low R. Having a fixed size signature makes size calculations easier and also saves half a byte of transaction size, on average. DUMMY_SIGNATURE_CREATOR has been modified to produce 71 byte dummy signatures instead of 72 byte signatures. Tree-SHA512: 3cd791505126ce92da7c631856a97ba0b59e87d9c132feff6e0eef1dc47768e81fbb38bfbe970371bedf9714b7f61a13a5fe9f30f962c81734092a4d19a4ef33
2018-08-12Ported usage of deprecated optparse module to argparse moduleKvaciral
2018-08-11Replace median fee rate with feerate percentilesMarcin Jachymiak
Removes medianfeerate result from getblockstats. Adds feerate_percentiles which give the feerate of the 10th, 25th, 50th, 75th, and 90th percentile weight unit in the block.
2018-08-11Merge #13867: qa: Make extended tests pass on native WindowsMarcoFalke
fafe73a626 qa: Raise feature_help timeout to 5s (MarcoFalke) faabd7bc47 qa: Use files for stdout/stderr to support Windows (MarcoFalke) facb56ffaf qa: Run gen_rpcauth with sys.executable (MarcoFalke) fada8966c5 qa: Close stdout and stderr file when node stops (MarcoFalke) Pull request description: ### qa: Close stdout and stderr file when node stops Since these files are potentially deleted by the test framework for cleanup, they should be closed first. Otherwise this will lead to errors on Windows when the tests finish successfully. Side note: After the patch, it is no longer possible to reopen the file on Windows (see https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile) ### qa: Run gen_rpcauth with sys.executable Similar to `test_runner.py`, the `sys.executable` needs to be passed down into subprocesses to pass on native Windows. (Should have no effect on Linux) ### qa: Use files for stdout/stderr to support Windows It seems that using PIPE is not supported on Windows. Also, it is easier to just use the files that capture the stdout and stderr within the test node class. Tree-SHA512: ec675012b10705978606b7fcbdb287c39a8e6e3732aae2fa4041d963a3c6993c6eac6a9a3cbd5479514e7d8017fe74c12235d1ed6fed2e8af8f3c71981e91864
2018-08-11Merge #13915: [qa] Add test for max number of entries in locatorMarcoFalke
fa85c985ed qa: Add p2p_invalid_locator test (MarcoFalke) Pull request description: Should not be merged *before* #13907 Tree-SHA512: a67ca407854c421ed20a184d0b0dc90085aed3e3431d9652a107fa3022244767e67f67e50449b7e95721f56906836b134615875f28a21e8a012eb22cfe6a66a5
2018-08-11Merge #13913: qa: Remove redundant checkmempool/checkblockindex extra_argsMarcoFalke
fa31ca0c22 qa: Remove redundant checkmempool/checkblockindex extra_args (MarcoFalke) Pull request description: They are already enabled by default for regtest: https://github.com/bitcoin/bitcoin/blob/df9f71274645a917e2578c52a1c59745bce8112d/src/init.cpp#L1002-L1007 Closes #13912. CC #12138 Tree-SHA512: b11a3e8cc4715569f917ab89132f8c8dcae64aebcd7a34182675f86cf7f6e207e3187b7ea01a56c92c8c3af76122b6b995e84f533e134676863f8953dc1f0574