Commit graph

105 commits

Author SHA1 Message Date
Patrick e90d4437a2
qa: add qa test for createauxblock 2021-10-30 15:59:45 -04:00
Patrick Lodder b945c0b208
qa: Rework dustlimit test
Test both hard and soft dust limits for a range of configurations,
making sure that the dust limit parameters work as expected.

Currently implements commonly seen client configurations:
- a 1.10.0-like node that has only a 1 DOGE soft dust limit
- a 1.14.2-like node that has only a 1 DOGE hard dust limit
- a 1.14.5-like node that has a 0.01 soft and 0.001 hard dust limit
- a node that accepts everything standard

Other changes:
- renamed the test to better reflect the test subject
- made sure that all nodes reject non-standard transactions
2021-10-12 17:42:49 +02:00
Patrick Lodder c05cd54411
qa: Test relay and mempool policies for fees and dust
Creates a new functional test that ensures relay logic regarding
fee and dust levels
2021-10-10 20:35:54 +02:00
Ed e90e8e5cba Create feelimit.py test
Create feelimit.py test to verify the updated fee values now rounding has been eliminated.
2021-08-17 08:51:18 +01:00
Patrick Lodder 2370fc5701
qa: add -paytxfee and -mintxfee interaction test
Test that the interaction between the wallet parameters
-paytxfee and -mintxfee function as intended. This has to
be done using rpc tests rather than unit tests because it
tests the actual parameters passed to the executables.
2021-08-16 00:16:51 +02:00
Patrick Lodder 1374bb47c2
Merge pull request #2450 from xanimo/1.14.4-txn_doublespend
qa: txn_dblspend - fix arithmetic
2021-08-14 21:19:15 +02:00
Dakoda Greaves 1c32538089 fix arithmetic; adds to standard testing 2021-08-13 19:12:16 -07:00
Patrick Lodder 6aff1141f4
qa: fix p2p-acceptblock
This test failed because the sheer number of blocks required to
trigger the max length of a fork we'd keep, exceed the v4 fork
height on regtest.

- Adapted the blocktools.py miner to mine 0x00620004 blocks as done
  elsewhere too (be it suboptimal, but at least consistent)
- Adapted the test to work with 1440 blocks (Dogecoin limit)
  instead of 288 (Bitcoin limit)
- Made p2p-acceptblock a standard test instead of an extended test
2021-08-13 03:44:02 +02:00
Patrick Lodder 4c46af0483
[fees] introduce configurable hard dust limit
Co-authored-by: Ross Nicoll <rnicoll@rnicoll.name>
2021-08-05 18:24:17 +02:00
Michi Lumin 1d2380df56 p2p: Reduce BIP125 replace by fee increment value 2021-08-04 09:29:35 +01:00
Ross Nicoll 9362186ba7
tests: Fix replace-by-fee values for Dogecoin 2021-07-25 19:48:53 +01:00
Ross Nicoll a4638bb50f Adapt block download timeouts to Dogecoin
Block download timeouts are expressed as a fraction of block interval time, so Dogecoin values have been too aggressive.
Matching Bitcoin values as a starting point.
2021-02-05 23:36:38 +00:00
Patrick Lodder 294d408d70
pull-tester: don't hard depend on python 3.6
every script depends on "python3" not "python3.6"
2020-07-22 13:46:52 +02:00
Ross Nicoll 9c3a11b248 Clean up RPC tests (#1465)
* Enable full block tests
* Fix invalidblocktest
* Move watch only address funding to immediately before it's used, so node 0 doesn't spend the output before it checks it later.
* Fix `fundrawtransaction` tests and sanitize fee calculation at the same time
* Correct resolution of chain parameters when validating tx inputs, especially from previous coinbase transactions
* Set block versions on full block tests so that the generated blocks are AuxPoW compatible
2018-09-19 22:11:47 +01:00
Ross Nicoll b6b5ee7502 Update RPC tests for Dogecoin (#1431)
* Make most of the RPC tests pass
* Add AUXPoW rpc tests
- Tests the auxpow rpc interface `getauxblock`
- Tests consensus constraints for auxpow:
  - Minimum block height
  - Valid scrypt proof of work
  - Foreign chain ID
2018-09-19 22:11:47 +01:00
Wladimir J. van der Laan e87ce95fbd
Merge #9720: net: fix banning and disallow sending messages before receiving verack
d943491 qa: add a test to detect leaky p2p messages (Cory Fields)
8650bbb qa: Expose on-connection to mininode listeners (Matt Corallo)
5b5e4f8 qa: mininode learns when a socket connects, not its first action (Matt Corallo)
cbfc5a6 net: require a verack before responding to anything else (Cory Fields)
8502e7a net: parse reject earlier (Cory Fields)
c45b9fb net: correctly ban before the handshake is complete (Cory Fields)
2017-02-14 14:42:29 +01:00
Cory Fields d9434918d2 qa: add a test to detect leaky p2p messages
This is certainly not exhaustive, but it's better than nothing. Adds checks
for:

- Any message received before sending a version
- Any message received other than version/reject before sending a verack

It also tries to goad the remote into sending a pong, address, or block
announcement.
2017-02-13 18:56:03 -05:00
Matt Corallo 66f861ade9 Add a test for P2P inactivity timeouts 2017-02-09 17:34:03 -05:00
Wladimir J. van der Laan 727a798360
Merge #9516: Bug-fix: listsinceblock: use fork point as reference for blocks in reorg'd chains
7ba0a00 Testing: listsinceblock should not use orphan block height. (Karl-Johan Alm)
ee5c1ce Bug-fix: listsinceblock: use closest common ancestor when a block hash was provided for a chain that was not the main chain. (Karl-Johan Alm)
2017-01-23 16:16:37 +01:00
mrbandrews cc0243ad32 [RPC] bumpfee
This command allows a user to increase the fee on a wallet transaction T, creating a "bumper" transaction B.
T must signal that it is BIP-125 replaceable.
T's change output is decremented to pay the additional fee.  (B will not add inputs to T.)
T cannot have any descendant transactions.
Once B bumps T, neither T nor B's outputs can be spent until either T or (more likely) B is mined.

Includes code by @jonasschnelli and @ryanofsky
2017-01-19 11:29:29 -05:00
Karl-Johan Alm 7ba0a00aae Testing: listsinceblock should not use orphan block height. 2017-01-18 12:31:20 +09:00
Wladimir J. van der Laan 2ca9dcd5b9 test: Add test for RPC named arguments
Add RPC testcase for RPC named arguments.
2017-01-05 11:30:20 +01:00
Russell Yanofsky d8c0b9f525 [qa] Add test for rescan feature of wallet key import RPCs
Covers importaddress, importpubkey, importprivkey, and importmulti RPCs.
2016-12-12 10:18:11 -05:00
Alex Morcos e2184ccc1d Reorder RPC tests for running time 2016-12-03 15:46:33 -05:00
MarcoFalke fab0f07dec [qa] rpc-tests: Apply random offset to portseed
This helps to skip over resources, which are blocked by regtest bitcoind
zombie nodes
2016-11-08 10:50:31 +01:00
Pedro Branco cb08fdbf78 Add importmulti rpc call 2016-10-19 15:17:13 +01:00
Wladimir J. van der Laan 7f71a3c591
Merge #6996: Add preciousblock RPC
5805ac8 Add preciousblock tests (Pieter Wuille)
5127c4f Add preciousblock RPC (Pieter Wuille)
2016-10-18 21:36:38 +02:00
MarcoFalke e31a43c725
Merge #8789: [qa] pull-tester: Only print output when failed
fa427ce [qa] pull-tester: Only print output when failed (MarcoFalke)
2016-09-24 15:35:35 +02:00
MarcoFalke fa427cef13 [qa] pull-tester: Only print output when failed 2016-09-22 12:39:39 +02:00
Wladimir J. van der Laan 26b370a937
Merge #8636: Implement NULLDUMMY softfork (BIP147)
482f852 Implement NULLDUMMY softfork (Johnson Lau)
2016-09-22 10:58:00 +02:00
MarcoFalke dddd04f979 [qa] Refactor RPCTestHandler to prevent TimeoutExpired 2016-09-17 11:49:43 +02:00
Johnson Lau 482f852da6 Implement NULLDUMMY softfork 2016-08-31 19:38:23 +08:00
Wladimir J. van der Laan a5bb6387f7
Merge #8607: [doc] Fix doxygen off-by-one comments, fix typos
fafe7b3 contrib: Make fix-copyright-headers.py more portable (MarcoFalke)
fa27c0a [doc] Fix typos in comments, doxygen: Fix comment syntax (MarcoFalke)
fabfd5d [qa] pull-tester: Don't mute zmq ImportError (MarcoFalke)
67a5502 init: Fix typo in help message for -whitelistforcerelay (Wladimir J. van der Laan)
2016-08-28 16:06:03 +02:00
Pieter Wuille 5805ac836c Add preciousblock tests
Rebased, improved and extended by Luke-Jr.
2016-08-26 23:06:09 +02:00
Wladimir J. van der Laan 21857d2bf7
Merge #8450: [Test] Replace rpc_wallet_tests.cpp with python RPC unit tests
9578333 Remove rpc_wallet_tests.cpp (Patrick Strateman)
25400c4 Account wallet feature RPC tests. (Patrick Strateman)
2016-08-24 12:10:42 +02:00
MarcoFalke fabfd5dae2 [qa] pull-tester: Don't mute zmq ImportError 2016-08-22 10:51:40 +02:00
MarcoFalke faaec1377c [qa] Remove unused code 2016-08-19 22:43:05 +02:00
Wladimir J. van der Laan 740cff5808
Merge #8482: [qa] Use single cache dir for chains
fad8cf6 [qa] Use single cache dir for chains (MarcoFalke)
fa2d68f [qa] Adjust timeouts for micro-optimization of run time (MarcoFalke)
fae596f [qa] Sort scripts by time for pull_tester and don't overwrite setup_chain (MarcoFalke)
2016-08-17 12:23:45 +02:00
Patrick Strateman 25400c4de1 Account wallet feature RPC tests. 2016-08-07 19:30:16 -07:00
MarcoFalke fad8cf63e5 [qa] Use single cache dir for chains 2016-08-07 23:13:22 +02:00
Wladimir J. van der Laan 63c03dd41c
Merge #8418: Add tests for compact blocks
45c7ddd Add p2p test for BIP 152 (compact blocks) (Suhas Daftuar)
9a22a6c Add support for compactblocks to mininode (Suhas Daftuar)
a8689fd Tests: refactor compact size serialization in mininode (Suhas Daftuar)
9c8593d Implement SipHash in Python (Pieter Wuille)
56c87e9 Allow changing BIP9 parameters on regtest (Suhas Daftuar)
2016-08-02 08:26:57 +02:00
MarcoFalke cf2cecb187
Merge #8400: [qa]: enable rpcbind_test
9bbb414 [qa]: enable rpcbind_test (whythat)
0ff4375 [qa]: add parsing for '<host>:<port>' argument form to rpc_url() (whythat)
2016-07-31 17:22:30 +02:00
Suhas Daftuar 45c7ddd109 Add p2p test for BIP 152 (compact blocks) 2016-07-29 09:41:58 -04:00
Jonas Schnelli 54af51d98d
[QA] Add walletdump RPC test (including HD- & encryption-tests) 2016-07-28 15:05:35 +02:00
whythat 9bbb414b80 [qa]: enable rpcbind_test 2016-07-25 01:31:05 +03:00
MarcoFalke fae596f0e4 [qa] Sort scripts by time for pull_tester and don't overwrite setup_chain 2016-07-15 20:18:11 +02:00
MarcoFalke fade505e8b [qa] Add wallet-hd test 2016-07-07 22:19:35 +02:00
Suhas Daftuar 330b0f31ee [qa] p2p segwit tests
mininode now supports witness transactions/blocks, blocktools
has a helper for adding witness commitments to blocks, and script
has a function to calculate hashes for signature under sigversion
1, used by segwit.

Py3 conversion by Marco Falke

Test to make sure upgraded nodes don't ask for non-wit blocks by
Gregory Sanders.
2016-06-22 15:43:02 +02:00
Alex Morcos 4f7ff00497 [qa] Add rpc test for segwit
Amended by Pieter Wuille to use multisig 1-of-1 for P2WSH tests, and BIP9
based switchover logic.

Fixes and py3 conversion by Marco Falke.
2016-06-22 15:43:01 +02:00
MarcoFalke fa58f94ff7 [qa] pull-tester: Start longest test first 2016-06-20 11:19:34 +02:00