536 Commits

Author SHA1 Message Date
Adrian Gallagher
d1d7fbb79e Litecoin: Additional segwit coverage 2017-01-29 07:00:00 -08:00
Adrian Gallagher
9fbcdaedb1 Litecoin: Adjust ports 2017-01-04 05:35:29 -08:00
Adrian Gallagher
769a617e58 Litecoin: Adjust maxmempool limit to 5MB 2017-01-04 05:35:24 -08:00
Adrian Gallagher
b32fef25d4 Litecoin: Adjust fee system 2017-01-04 05:15:34 -08:00
Adrian Gallagher
e121add606 Litecoin: Adjust main params 2016-12-21 21:44:15 -08:00
ultragtx
e39a79bb5d Litecoin: Use litecoin_scrypt to solve blocks in mininode.py
Also updated qa/README.md .travis.yml
2016-12-21 18:50:48 -08:00
Adrian Gallagher
761243c98c Litecoin: Fix fundrawtransaction test 2016-12-21 18:50:48 -08:00
Adrian Gallagher
7adafa43b9 0.13.2 release candidate 1
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABCgAGBQJYWS9JAAoJEHSBCwEjRsmmFJkH/0FDEd7jEInfnE5PomnZ+I0K
 NbEw6ENQoS2pcoRMHcOtNA+QTXEBGzhoQwzpqrU7zVpf22eNepPXf+PR/UTpiILo
 gqSO64+mTHRu1CbUCHuPDgz+N+qAq4MG/ynpmDaMT7WyMijWGIKUb3XVzQDuYnZl
 Tr+/pg4Se7fHfMpWYNTqNjvmPA6uPO5uOqNsN8MmJs7mDDj/gJh+ZXcpwCAWea2+
 AByAZpZtcp5NLCdKsSPOj/jbR2SmL3pnEykUbLjfl+Z707nnr/2sEfC/Rm1O4gRS
 qhYXJjT8aDFtjq7+axpl0ripBzxJEviPs42XyiPBSqiegAMxSSrtCYTkhsW4wWM=
 =iihI
 -----END PGP SIGNATURE-----

Merge tag 'v0.13.2rc1' into HEAD

0.13.2 release candidate 1
2016-12-21 01:48:39 +11:00
Gregory Sanders
4bf2bec18e Test for fix of txn chaining in wallet 2016-12-20 10:10:25 +00:00
Adrian Gallagher
718033da1d Litecoin: Fix more tests (squashme) 2016-12-19 04:03:36 -08:00
Wladimir J. van der Laan
b711390895
Merge #9347: [0.13.2] wallet/rpc backports
49a612f [qa] Don't set unknown rpcserialversion (MarcoFalke)
c365556 Complain when unknown rpcserialversion is specified (Pieter Wuille)
f5d606e Return txid even if ATMP fails for new transaction (Pieter Wuille)
35174a0 Make RelayWalletTransaction attempt to AcceptToMemoryPool. (Gregory Maxwell)
a0f7ece Update for OpenSSL 1.1 API (Gregory Maxwell)
43bcfca [Wallet] Bugfix: FRT: don't terminate when keypool is empty (Jonas Schnelli)
0cc07f8 [QA] add fundrawtransaction test on a locked wallet with empty keypool (Jonas Schnelli)
2016-12-19 09:00:02 +01:00
Wladimir J. van der Laan
03b6f621cc
Merge #9357: [0.13 backport] Attempt reconstruction from all compact block announcements
53b656f [qa] Update compactblocks test for multi-peer reconstruction (Suhas Daftuar)
4ced313 Allow compactblock reconstruction when block is in flight (Suhas Daftuar)
2016-12-19 08:59:31 +01:00
Adrian Gallagher
7ce159a482 Litecoin: Start fixing rpc-tests 2016-12-18 19:58:01 -08:00
MarcoFalke
49a612f347 [qa] Don't set unknown rpcserialversion
Github-Pull: #9322
Rebased-From: fa615d39b53a9309ef480c41ec073354c4371f40
2016-12-15 20:36:24 +01:00
Suhas Daftuar
53b656f355 [qa] Update compactblocks test for multi-peer reconstruction 2016-12-14 17:00:26 -05:00
Jonas Schnelli
0cc07f82f0 [QA] add fundrawtransaction test on a locked wallet with empty keypool
Github-Pull: #9295
Rebased-From: 1a6eacbf3b7e3d5941fec1154079bbc4678ce861
2016-12-14 12:58:11 +01:00
Gregory Sanders
21ccb9f253 Add option to return non-segwit serialization via rpc
Github-Pull: #9194
Rebased-From: 835c75acaac004c3315395dcd7d1f193dfb9e5da
2016-12-05 08:11:03 +01:00
MarcoFalke
ecd7db5767 [qa] test_framework: Exit when tmpdir exists
Github-Pull: #9098
Rebased-From: fae19aa1da0858678874815b344de83e1ee3a1bd
2016-12-02 07:58:19 +00:00
Suhas Daftuar
b96a8f7df2 [qa] Test getblocktemplate default_witness_commitment
Github-Pull: #9189
Rebased-From: 95f4a03777ec2ad82a94a3e2890192a93ad83509
2016-12-02 08:38:02 +01:00
Russell Yanofsky
e8461666ec Modify getblocktxn handler not to drop requests for old blocks
The current getblocktxn implementation drops and ignores requests for old
blocks, which causes occasional sync_block timeouts during the
p2p-compactblocks.py test as reported in
https://github.com/bitcoin/bitcoin/issues/8842.

The p2p-compactblocks.py test setup creates many new blocks in a short
period of time, which can lead to getblocktxn requests for blocks below the
hardcoded depth limit of 10 blocks. This commit changes the getblocktxn
handler not to ignore these requests, so the peer nodes in the test setup
will reliably be able to sync.

The protocol change is documented in BIP-152 update "Allow block responses
to getblocktxn requests" at https://github.com/bitcoin/bips/pull/469.

The protocol change is not expected to affect nodes running outside the test
environment, because there shouldn't normally be lots of new blocks being
rapidly added that need to be synced.

Github-Pull: #9058
Rebased-From: dac53b58b555183ccc0d5e64c428528267cd98b3
Github-Pull: #9160
Rebased-From: ec34648766c4052816e4072cc61ad429430bcfd9
2016-11-20 15:25:34 +01:00
Pieter Wuille
2cad5db6f7 Align constant names for maximum compact block / blocktxn depth
Github-Pull: #8637
Rebased-From: 3ac6de0a045cc9b2047ceb19af970e7ffbf905fa
2016-11-20 15:08:16 +01:00
Matt Corallo
76ba1c9739 More agressively filter compact block requests
Unit test adaptations by Pieter Wuille.

Github-Pull: #8637
Rebased-From: fe998e962dc015978f104b782afb7daec3c4d4df
2016-11-20 15:07:53 +01:00
Russell Yanofsky
286e548d87 [qa] Fix stale data bug in test_compactblocks_not_at_tip
Clear test_node.last_block before requesting blocks in the
compactblocks_not_at_tip test so comparisons won't fail if a blocks were received
before the test started.

The bug doesn't currently cause any problems due to the order tests run, but
this will change in the next commit.

Github-Pull: #9058
Rebased-From: 55bfddcabbf9e8a3743f77167ba4a43aaba9f948
2016-11-19 23:55:07 +01:00
Russell Yanofsky
2ba5d78427 [qa] Fix bug in compactblocks v2 merge
Bug caused the wait_for_block_announcement to be called on the wrong node,
leading to nondeterminism and occasional test failures. Bug was introduced in
merge commit:

d075479 Merge #8882: [qa] Fix race conditions in p2p-compactblocks.py and sendheaders.py

Underlying commits which conflicted were:

27acfc1 [qa] Update p2p-compactblocks.py for compactblocks v2
6976db2 [qa] Another attempt to fix race condition in p2p-compactblocks.py

The first commit changed the test_compactblock_construction function signature
and second commit added code which wasn't updated during the merge to use the
new arguments.

Suhas Daftuar <sdaftuar@chaincode.com> noticed the bug and suggested the fix.

Github-Pull: #9058
Rebased-From: 47e9659ecfbe07077a4564591095bd5510e0f917
2016-11-19 23:53:01 +01:00
Russell Yanofsky
eca9b46537 [qa] Wait for specific block announcement in p2p-compactblocks
Change check_announcement_of_new_block() to wait specifically for the
announcement of the newly created block, instead of waiting for any
announcement at all. A difficult to reproduce failure in
check_announcement_of_new_block() that happened in a travis build
(https://travis-ci.org/bitcoin/bitcoin/jobs/175198367) might have happened
because an older announcement was mistaken for the expected one. The error
looked like:

  Assertion failed: Failed

  File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 145, in main
    self.run_test()
  File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 787, in run_test
    self.test_sendcmpct(self.nodes[1], self.segwit_node, 2, old_node=self.old_node)
  File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 201, in test_sendcmpct
    check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None and p.last_inv is not None)
  File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 194, in check_announcement_of_new_block
    assert(predicate(peer))

This commit also changes the assertion failed message above to include more
detailed information for debug.

Github-Pull: #9159
Rebased-From: dfa44d1b07a6d1022005dba63dd6372739eee8a0
2016-11-19 23:34:58 +01:00
Russell Yanofsky
da4926b1d2 [qa] Add more helpful RPC timeout message
Replace previous timeout('timed out',) exception with more detailed error.

Github-Pull: #9077
Rebased-From: e89614b6abf28d7fe201c3db44a0df6e4db6de03
2016-11-19 23:21:19 +01:00
Russell Yanofsky
1d4c884cd3 [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)

Github-Pull: #9077
Rebased-From: 8463aaa63c5ac76421c4d2754ea9e17a31584c93
2016-11-19 23:21:07 +01:00
mrbandrews
3107280e14 [qa] add assert_raises_message to check specific error message
Github-Pull: #9168
Rebased-From: 307acdd3df03082295ac0f7fe9eba7dd35973bc4
2016-11-19 23:20:14 +01:00
Adrian Gallagher
ce29465eb1 Litecoin: Adjust port strings 2016-11-17 18:30:26 -08:00
Suhas Daftuar
82905069bf [qa] Test that invalid compactblocks don't result in ban 2016-10-31 10:05:29 -04:00
Johnson Lau
9777fe1272 remove redundant tests in p2p-segwit.py
Github-Pull: #8499
Rebased-From: 67d6ee1e3679504f46473fe0818970565ff3b137
2016-10-17 14:16:08 +02:00
Johnson Lau
fef7b46841 test segwit uncompressed key fixes
Github-Pull: #8499
Rebased-From: 9260085377e89e666d0cb95b462261d7e3a9c82f
2016-10-17 14:16:08 +02:00
Suhas Daftuar
908fced296 [qa] Add tests for uncompressed pubkeys in segwit
Github-Pull: #8499
Rebased-From: b811124202152424109b8e95ebe7ac25ff2e83c0
2016-10-17 14:10:58 +02:00
Johnson Lau
b4b85279a9 Make test framework produce lowS signatures
Github-Pull: #8499
Rebased-From: 9f0397aff7afa2afa9328daea0a2053122e79d44
2016-10-17 14:10:58 +02:00
Johnson Lau
540413d995 Add standard limits for P2WSH with tests
Github-Pull: #8499
Rebased-From: 3ade2f64cfe43ab53e4869ffc35d5fd23201e1c1
2016-10-17 14:10:58 +02:00
Matt Corallo
9bb2a02f0d [qa] Build v4 blocks in p2p-compactblocktests
This fixes an issue in backporting to 0.13 as 0.13 enforces SF
activation by block version lockin instead of through a hard-coded
block height.

Github-Pull: #8916
Rebased-From: a4ad37d4ef4bcd81bc9d867b277efdebc86bc2e8
2016-10-17 13:15:30 +02:00
Matt Corallo
df5069bb0e [qa] Send segwit-encoded blocktxn messages in p2p-compactblocks
Github-Pull: #8916
Rebased-From: 032e883b937a6b70d5c367fc2ee57d7eea8cb473
2016-10-17 13:15:11 +02:00
Dagur Valberg Johannsson
cc6f55191a [qa] Fix compact block shortids for a test case
Github-Pull: #8904
Rebased-From: 4cdece40419bcc97345357f9268e03b0aff400b5
2016-10-13 20:35:33 +02:00
Matt Corallo
890ac25638 Fix overly-prescriptive p2p-segwit test for new fetch logic
Github-Pull: #8393
Rebased-From: be7555f0c03057bb5537cc42ca9d4937389f0670
2016-10-13 20:15:17 +02:00
Suhas Daftuar
611cc5096e [qa] Fix bug in mininode witness deserialization
Also improve tx printing

Github-Pull: #8393
Rebased-From: f5b9b8f437c040205896ad0d7a6656efa08b5601
2016-10-13 20:09:31 +02:00
Suhas Daftuar
61e282b62d [qa] Add support for compactblocks v2 to mininode
Github-Pull: #8393
Rebased-From: 422fac649f75c907cad6ab7e2768b9032b9eae42
2016-10-13 20:09:31 +02:00
Suhas Daftuar
e47299a8f2 [qa] Update p2p-compactblocks.py for compactblocks v2
Github-Pull: #8393
Rebased-From: 27acfc1d2ee53cc52b54befd2d4bfa24a77a2eef
2016-10-13 20:09:31 +02:00
Suhas Daftuar
d6c83b95cf [qa] Fix race condition in sendheaders.py
Also de-duplicates code that has been moved to mininode

Github-Pull: #8882
Rebased-From: b55d9411e7e1aa36ddabba3b942f2e1c736c1bd9
2016-10-06 21:00:42 +02:00
Suhas Daftuar
b73f0653f3 [qa] Another attempt to fix race condition in p2p-compactblocks.py
sync_with_ping() only guarantees that the node has processed messages
it's received from the peer, not that block announcements from the node have
made it back to the peer.  Replace sync_with_ping() with an explicit check that
the node's tip has been announced.

Github-Pull: #8882
Rebased-From: 6976db2f4687d575e1b4bee5aaf1d93a794f23c3
2016-10-05 11:19:17 +02:00
Wladimir J. van der Laan
cbc3fe59c4 test: Explicitly set encoding to utf8 when opening text files
These are text files but their encoding does not depend on the locale.
Not all of them require utf8 but it is better to fix it at something
to remove potential unpredictability.

This is necessary on FreeBSD where no locale is set by default,
and apparently Python defaults not only the terminal encoding to the locale
but that of every text file. So without LOCALE environment it defaults text
file encoding to ASCII. This causes problems with e.g. `bitcoin.conf`.

Luckily the locale doesn't affect the default encoding for str.encode() and
bytes.decode() on Python 3, so this is the only change necessary.

Github-Pull: #8840
Rebased-From: 30930e847e2483c7c8163cc581b392bc288250e9
2016-10-03 11:54:29 +02:00
MarcoFalke
0bee740845 [qa] util: Move wait_bitcoinds() into stop_nodes()
Github-Pull: #8860
Rebased-From: fa7c35c4ec630838178b4674288da33561a66f08
2016-10-03 11:31:36 +02:00
MarcoFalke
794b007896 [qa] Add getinfo smoke tests and rework versionbits test
Github-Pull: #8780
Rebased-From: fa6e71b27d00766897f3e69775d450924a58a153
2016-10-03 11:31:18 +02:00
MarcoFalke
1f60d45504 [qa] mininode: Only allow named args in wait_until
Github-Pull: #8857
Rebased-From: fa666094cf5b9ac4a7c1732a7ffa001afffcd938
2016-10-03 10:59:49 +02:00
Suhas Daftuar
624a007f47 [qa] Fix race condition in p2p-compactblocks test
Also fix a bug in the sync_with_ping() helper function

Github-Pull: #8854
Rebased-From: b5fd666984fdb7125cb809c773b36034f32128cc
2016-10-03 10:57:40 +02:00
Johnson Lau
3e4abb5025 Fix nulldummy.py test
Github-Pull: #8841
Rebased-From: 46a4774d2bb9cc863e43507212ef989fa10d56d4
2016-10-03 10:57:22 +02:00