Commit graph

178 commits

Author SHA1 Message Date
Ross Nicoll 9c6af6d841 Reduce recommended fees
* Reduce DEFAULT_FALLBACK_FEE to 1,000,000 Koinu. Note this by itself has no effect as the required fee is higher.
* Reduce wallet minimum fees to 0.01 DOGE
* Update DEFAULT_DUST_LIMIT
* Revise derived values after updating recommended fees
* Remove fee rounding from RPC tests
* Revert tests back to Bitcoin originals where possible
2021-09-03 10:52:24 +01:00
Ross Nicoll 59da28cb06
Merge pull request #2458 from patricklodder/1.14.4-disconnect-bad-node-test
Test that peers building on invalid blocks get disconnected
2021-08-18 00:41:27 +01:00
Patrick Lodder caf26b77ab
fixup p2p-acceptblock and mininode to test disconnects
without partially backporting a new testframework.

- Adds a condition to NodeConn that when asyncore calls handle_read
  without any data, this must be a disconnect and closes the socket
- Adds a little loop in the p2p-acceptblock client that waits for
  the socket to be in a closed state
- Makes expected disconnects non-optional in p2p-acceptblock
- Syncs the test descriptions and outputs with reality
2021-08-17 20:15:30 +02:00
Ross Nicoll ce6e3d8137 Remove relay-only rounding
Remove rounding of transaction sizes when calculating fee minimums for relaying,
to simplify fee logic.
2021-08-17 08:50:42 +01: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
Michi Lumin 575f734eec Initial back end framework to separate wallet and relay fees + dust. 2021-07-30 16:07:22 -06:00
Patrick Lodder 89c01f3866
rpc-tests: don't use binary.hex() or binary.fromhex()
To retain compatibility with multiple python3 versions
2020-07-22 13:51:27 +02:00
Patrick Lodder d0afe42ed2
rpc-tests: fix auxpow calls to use .target instead of ._target
Tests weren't adapted to reflect RPC output
2020-07-22 13:49:05 +02:00
Patrick Lodder e896e90e6e
rpc-tests: revert from litecoin_scrypt to ltc_scrypt
This reflects the dependency installed in the dep script at
qa/pull-tester/install-deps.sh
2020-07-22 13:47:33 +02:00
Ross Nicoll 776c2b3d2c Update to litecoin_scrypt
The old ltc_scrypt module works on systems it is installed on, but does not
install on new systems it appears. Our README says to use litecoin_scrypt,
so updating the code to match.
2019-07-12 01:26:11 +00:00
Ross Nicoll 4dd8838b3a Rename binaries to match Dogecoin 2019-03-25 05:36:11 +00: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
Ross Nicoll bc8cca4896 Merge AuxPoW support from Namecore
Changes are as below:

Wrap CBlockHeader::nVersion into a new class (CBlockVersion).  This allows to take care of interpreting the field into a base version, auxpow flag and the chain ID.

Update getauxblock.py for new 'generate' RPC call.

Add 'auxpow' to block JSON.

Accept auxpow as PoW verification.

Add unit tests for auxpow verification.

Add check for memory-layout of CBlockVersion.

Weaken auxpow chain ID checks for the testnet.

Allow Params() to overrule when to check the auxpow chain ID and for legacy blocks.  Use this to disable the checks on testnet.

Introduce CPureBlockHeader.

Split the block header part that is used by auxpow and the "real" block header (that uses auxpow) to resolve the cyclic dependency between the two.

Differentiate between uint256 and arith_uint256.

This change was done upstream, modify the auxpow code.

Add missing lock in auxpow_tests.

Fix REST header check for auxpow headers.

Those can be longer, thus take that into account.  Also perform the check actually on an auxpow header.

Correctly set the coinbase for getauxblock results.

Call IncrementExtraNonce in getauxblock so that the coinbase is actually initialised with the stuff it should be.  (BIP30 block height and COINBASE_FLAGS.)

Implement getauxblock plus regression test.

Turn auxpow test into FIXTURE test.

This allows using of the Params() calls.

Move CMerkleTx code to auxpow.cpp.

Otherwise we get linker errors when building without wallet.

Fix rebase with BIP66.

Update the code to handle BIP66's nVersion=3.

Enforce that auxpow parent blocks have no auxpow block version.

This is for compatibility with namecoind.  See also https://github.com/namecoin/namecoin/pull/199.

Move auxpow-related parameters to Consensus::Params.
2018-09-19 19:22:45 +01:00
MarcoFalke 260c71cbb8
qa: Check return code when stopping nodes
This includes work by jnewbery

Github-Pull: #9824
Rebased-From: fa4cd2e998
2017-02-23 10:40:55 +01:00
Wladimir J. van der Laan b08656e343
Merge #9715: Disconnect peers which we do not receive VERACKs from within 60 sec
66f861a Add a test for P2P inactivity timeouts (Matt Corallo)
b436f92 qa: Expose on-connection to mininode listeners (Matt Corallo)
8aaba7a qa: mininode learns when a socket connects, not its first action (Matt Corallo)
2cbd119 Disconnect peers which we do not receive VERACKs from within 60 sec (Matt Corallo)
2017-02-14 14:35:15 +01:00
Matt Corallo b436f92f72 qa: Expose on-connection to mininode listeners 2017-02-08 12:05:13 -05:00
Matt Corallo 8aaba7a6b7 qa: mininode learns when a socket connects, not its first action 2017-02-08 12:05:13 -05:00
John Newbery 9db8eecac1 Fix RPC failure testing
Make sure that RPC tests are actually checking failures correctly by:

- Catching JSON RPC exceptions and verifying the error codes and messages.
- Failing the test case if the JSON RPC exception isn't raised.
2017-02-08 10:24:02 -05:00
Wladimir J. van der Laan 7cb024eba6
Merge #9222: Add 'subtractFeeFromAmount' option to 'fundrawtransaction'.
453bda6 Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. (Chris Moore)
2017-01-12 12:49:10 +01: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
Wladimir J. van der Laan 5865d41f88 authproxy: Add support for RPC named arguments 2017-01-05 11:30:20 +01:00
Chris Moore 453bda63dd Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. 2016-12-13 13:36:23 -08:00
MarcoFalke fa2ecc48fb [qa] pruning: Use cached utxo set to run faster 2016-12-04 21:30:20 +01:00
MarcoFalke 9e4bb312e6
Merge #9221: [qa] Get rid of duplicate code
facbfa5 [qa] Get rid of duplicate code (MarcoFalke)
2016-12-02 20:17:51 +01:00
MarcoFalke facbfa5816 [qa] Get rid of duplicate code 2016-12-02 16:32:00 +01:00
Suhas Daftuar 0828619e96 [qa] Dump debug logs on travis failures. 2016-11-30 11:35:31 -05:00
fsb4000 15fa95d7e5 Fix some typos 2016-11-28 16:16:37 +07:00
MarcoFalke 0de7fd36de
Merge #9139: Change sync_blocks to pick smarter maxheight (on top of #9196)
1126c85 [qa] Change sync_blocks to pick smarter maxheight (Russell Yanofsky)
2016-11-23 13:01:53 +01:00
BtcDrak 09dc4064ac Make test constant consistent with consensus.h 2016-11-21 21:30:53 +00:00
Wladimir J. van der Laan 0c577f2638
Merge #8872: Remove block-request logic from INV message processing
037159c Remove block-request logic from INV message processing (Matt Corallo)
3451203 [qa] Respond to getheaders and do not assume a getdata on inv (Matt Corallo)
d768f15 [qa] Make comptool push blocks instead of relying on inv-fetch (mrbandrews)
2016-11-21 15:41:32 +01:00
mrbandrews 307acdd3df [qa] add assert_raises_message to check specific error message 2016-11-15 15:37:46 -05:00
Russell Yanofsky 7943b13ab3 [qa] Avoid 2 list comprehensions in sync_blocks 2016-11-14 12:02:33 -05:00
Russell Yanofsky 05e57ccd74 [qa] Fix sync_blocks timeout argument
Motivation for this change is mainly to make sync_blocks behavior easier to
understand. Behavior is unchanged in the normal case when there are only 2
nodes in the rpc_connections set. When there are more than 2 nodes, the
previous "timeout -= wait" statement wouldn't take into account time spent
waiting for all nodes and as a result could lead to blocking for longer than
the requested timeout.
2016-11-14 12:02:31 -05:00
Russell Yanofsky fd6bb700b7 [qa] Improve sync_blocks error messages. 2016-11-14 12:01:51 -05:00
Russell Yanofsky 1126c853d9 [qa] Change sync_blocks to pick smarter maxheight
Instead of syncing to max height returned by the waitforblockheight RPC, sync
to the max height returned by the getblockcount RPC.

This change was suggested by Suhas Daftuar <sdaftuar@chaincode.com>.
2016-11-11 15:46:14 -05:00
MarcoFalke e5364991da
Merge #9097: [qa] Rework sync_* and preciousblock.py
fa97ccb [qa] util: Rework sync_*() (MarcoFalke)
fac1141 [qa] preciousblock: Use assert_equal and BitcoinTestFramework.__init__ (MarcoFalke)
2016-11-10 11:23:40 +01:00
Wladimir J. van der Laan faec09bc7f
Merge #8894: [Testing] Include fRelay in mininode version messages
e5d682f Fix mininode version message format (jnewbery)
2016-11-09 22:06:57 +01:00
jnewbery e5d682faa3 Fix mininode version message format 2016-11-09 02:34:30 +00:00
mrbandrews d768f151f6 [qa] Make comptool push blocks instead of relying on inv-fetch 2016-11-07 17:38:22 -05:00
MarcoFalke fae19aa1da [qa] test_framework: Exit when tmpdir exists 2016-11-07 22:55:27 +01:00
MarcoFalke fa97ccb06d [qa] util: Rework sync_*()
* Only allow named args in sync_*()
* Make sync_* fails more verbose
* Add timeout to sync_chain()
2016-11-07 20:42:21 +01:00
MarcoFalke 1253f8692f
Merge #9077: [qa] Increase wallet-dump RPC timeout
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky)
8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
2016-11-07 18:31:36 +01:00
Russell Yanofsky e89614b6ab [qa] Add more helpful RPC timeout message
Replace previous timeout('timed out',) exception with more detailed error.
2016-11-07 12:04:19 -05:00
Russell Yanofsky 8463aaa63c [qa] Increase wallet-dump RPC timeout
Increase wallet-dump RPC timeout from 30 seconds to 1 minute. This avoids a
timeout error that seemed to happen regularly (around 50% of builds) on a
particular jenkins server during the first getnewaddress RPC call made by the
test.

The failing stack trace looked like:

    Unexpected exception caught during testing: timeout('timed out',)

    File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 146, in main
      self.run_test()
    File ".../bitcoin/qa/rpc-tests/wallet-dump.py", line 73, in run_test
      addr = self.nodes[0].getnewaddress()
    File ".../bitcoin/qa/rpc-tests/test_framework/coverage.py", line 49, in __call__
      return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
    File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 145, in __call__
      response = self._request('POST', self.__url.path, postdata.encode('utf-8'))
    File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 121, in _request
      return self._get_response()
    File ".../bitcoin/qa/rpc-tests/test_framework/authproxy.py", line 160, in _get_response
      http_response = self.__conn.getresponse()
    File "/usr/lib/python3.4/http/client.py", line 1171, in getresponse
      response.begin()
    File "/usr/lib/python3.4/http/client.py", line 351, in begin
      version, status, reason = self._read_status()
    File "/usr/lib/python3.4/http/client.py", line 313, in _read_status
      line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
    File "/usr/lib/python3.4/socket.py", line 374, in readinto
      return self._sock.recv_into(b)
2016-11-07 12:04:01 -05:00
isle2983 4b04e32c20 [copyright] copyright header style uniform
Three categories of modifications:

1)

1 instance of 'The Bitcoin Core developers \n',
1 instance of 'the Bitcoin Core developers\n',
3 instances of 'Bitcoin Core Developers\n', and
12 instances of 'The Bitcoin developers\n'

are made uniform with the 443 instances of 'The Bitcoin Core developers\n'

2)

3 instances of 'BitPay, Inc\.\n' are made uniform with the other 6
instances of 'BitPay Inc\.\n'

3)

4 instances where there was no '(c)' between the 'Copyright' and the year
where it deviates from the style of the local directory.
2016-11-06 10:12:50 -07: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
Johnson Lau 9260085377 test segwit uncompressed key fixes 2016-10-17 00:34:37 +08:00
Johnson Lau 9f0397aff7 Make test framework produce lowS signatures 2016-10-16 23:53:35 +08:00
Suhas Daftuar 422fac649f [qa] Add support for compactblocks v2 to mininode 2016-10-04 19:10:49 +02:00
Suhas Daftuar f5b9b8f437 [qa] Fix bug in mininode witness deserialization
Also improve tx printing
2016-10-04 19:10:49 +02:00