zancas
4dce020678
enforce usage of the get_tests comptool interface as ComparisonTestFramework method
...
In practice all-and-only subclasses of ComparisonTestFramework implement get_tests.
This commit enforces this relation.
2022-02-01 10:27:10 -07:00
zancas
fbbdb23214
blake2b/s is integrated into hashlib, drop external python package dependency
2022-01-11 10:16:22 -07:00
Larry Ruane
97a76f1b61
test: Fix ZIP 244 implementation
...
Script codes must be serialized in their field encoding, which
includes the CompactSize length prefix.
Co-authored-by: Jack Grigg <jack@z.cash>
2022-01-05 12:07:46 +00:00
Larry Ruane
dfefab2f55
test: check getblocktemplate output before and after NU5
...
This test currently fails with submitblock returning the error
"bad-heartwood-root-in-block".
Added authdigest to GBT coinbasetxn field because we can't obtain this
via getrawtransaction.
Co-authored-by: Jack Grigg <jack@z.cash>
2022-01-05 12:07:46 +00:00
Larry Ruane
8c0177a507
test: fix bugs in test framework
2021-12-22 15:05:38 -07:00
Jack Grigg
6e90c84be7
Fix bugs in testnet Orchard circuit
...
The consensus branch ID is updated (as the NU5 consensus rules are
altered). The testnet NU5 activation height is also reset.
2021-09-28 22:56:37 +01:00
Jack Grigg
5a2e6183f3
net: Reject unknown CInv message types
...
Nodes will now reject messages containing unknown CInv message types,
instead of (mostly) ignoring them.
2021-09-15 20:08:01 +01:00
Jack Grigg
95280c10b0
Add named constants for legacy tx authDigest placeholder value
2021-09-14 21:26:05 +01:00
Jack Grigg
befa57d0a6
test: Fix bug in mininode.SpendDescription.deserialize
2021-09-14 21:18:06 +01:00
Jack Grigg
a97cfd241d
test: Implement CInv.__eq__() for mininode to simplify RPC test
2021-09-10 22:13:53 +01:00
Jack Grigg
de5563de71
test: Add v5 tx support to mininode
2021-09-10 21:46:05 +01:00
Jack Grigg
9047962637
test: Fix bugs in mininode transaction parser
2021-09-10 21:46:05 +01:00
Jack Grigg
d715f4ecac
Implement CInv message type MSG_WTX
...
This adds the double-hash message variant. The extra hash field is set
to null for block message types, and to all-ones for MSG_TX (to match
the legacy authHash value used for pre-v5 transactions in the Merkle
tree).
2021-09-10 21:46:05 +01:00
Jack Grigg
4c1c5f479d
test: Add NU5 test cases to existing RPC tests
2021-08-27 15:31:04 +01:00
Jack Grigg
e0f210f4fc
test: Fix pyflakes warnings
2021-08-17 18:50:54 +01:00
Jack Grigg
1e352c108c
test: Print reject reason if RPC test block rejected instead of accepted
2021-08-13 16:49:46 +01:00
MarcoFalke
b67c86abdb
[qa] py2: Unfiddle strings into bytes explicitly
...
(cherry picked from commit bitcoin/bitcoin@faa41ee204 )
Zcash: Excluding RPC tests or framework code we don't have.
2021-08-13 16:49:46 +01:00
Wladimir J. van der Laan
d9cb6b89b0
test: Add basic test for `reject` code
...
Extend P2P test framework to make it possible to expect reject
codes for transactions and blocks.
(cherry picked from commit bitcoin/bitcoin@20411903d7 )
2021-08-13 16:49:46 +01:00
str4d
92d6984842
test: Cleanups to ZIP 221 Python test code
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2021-06-20 21:25:59 +01:00
Jack Grigg
a18f8b58a9
test: Check history trees across Canopy and NU5 activations
2021-06-18 12:56:19 +01:00
Jack Grigg
2d0a8f1f3a
test: Check for valid hashBlockCommitments construction post-NU5
2021-06-18 01:05:04 +01:00
Steven Smith
48d5142dc1
Adding base NU5 declarations and logic
2021-03-06 17:35:54 -08:00
Daira Hopwood
5e84362702
Reduce the default fee for z_* operations, and the "low fee penalty" threshold for mempool limiting, to 1000 zatoshis.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2020-12-18 12:37:03 -07:00
Dimitris Apostolou
f459e43dc9
Update links
2020-12-13 11:24:44 +02:00
MarcoFalke
0a73a0fbd9
[qa] test_framework: Exit when tmpdir exists
2020-11-21 03:03:15 +00:00
MarcoFalke
b25a63593e
[qa] Use single cache dir for chains
2020-11-21 03:02:41 +00:00
MarcoFalke
dbb41d1082
[qa] Adjust timeouts for micro-optimization of run time
2020-11-21 03:02:41 +00:00
whythat
3c7f4ca809
[qa]: add parsing for '<host>:<port>' argument form to rpc_url()
2020-11-21 03:02:41 +00:00
MarcoFalke
63a3c9aceb
[qa] test_framework: Use different rpc_auth_pair for each node
2020-11-21 02:34:47 +00:00
Suhas Daftuar
2399cfc7ba
Tests: add timeout to sync_blocks() and sync_mempools()
...
Previously these functions would infinitely loop if sync failed;
now they have a default timeout of 60 seconds, after which an
AssertionError is raised.
sync_blocks() has also been improved and now compares the tip
hash of each node, rather than just using block count.
Zcash: Kept block count check for a couple of tests where we use it.
2020-11-21 02:34:47 +00:00
MarcoFalke
17caf1ddd1
[qa] test_framework: Append portseed to tmpdir
...
This makes it possible to specify a tmpdir while running tests in
parallel
2020-11-21 02:34:47 +00:00
MarcoFalke
818d2de39b
[qa] Remove hardcoded "4 nodes" from test_framework
...
Zcash: Applied changes to our RPC tests.
2020-11-21 02:34:47 +00:00
MarcoFalke
5a12bc9d83
[qa] Add option --portseed to test_framework
2020-11-21 02:33:27 +00:00
MarcoFalke
5f13446dee
[qa] Stop other nodes, even when one fails to stop
2020-11-21 02:33:27 +00:00
MarcoFalke
08256c9ec6
[qa] Refactor test_framework and pull tester
...
* log to stdout
* increase range for p2p and rpc ports
* UPPERCASE_CONSTANTS
* Stop nodes on CTRL+C
2020-11-21 02:33:27 +00:00
MarcoFalke
15721275d0
[qa] Switch to py3
...
Zcash: We already did this, so most of the backported changes are
ancillary (license header updates and style), but a few are relevant.
2020-11-21 02:33:27 +00:00
MarcoFalke
db761077e5
[qa] mininode: Catch exceptions in got_data
2020-11-21 02:33:27 +00:00
MarcoFalke
65a6249d41
[qa] Use python2/3 syntax
2020-11-21 02:33:27 +00:00
Casey Rodarmor
4761c9f2bc
Add p2p-fullblocktest.py
...
Zcash: Includes pyflakes changes.
2020-11-20 03:32:53 +00:00
Jack Grigg
a7f9365fb8
test: Set hashFinalSaplingRoot default correctly in create_block
2020-11-18 11:12:09 +00:00
Jack Grigg
030a685392
test: Fix SignatureHash RPC test helper
...
- Check validity of inIdx.
- ZIP 143 and 243 support.
2020-11-18 11:11:54 +00:00
Jack Grigg
bbed3ecc3c
test: Remove FindAndDelete from RPC test framework
2020-11-17 18:48:32 +00:00
Jack Grigg
8bc0a591a0
Revert "remove SignatureHash from python rpc tests"
...
This reverts commit 910ff448d6
.
2020-11-17 18:48:32 +00:00
Jesse Cohen
aead91419e
[doc][trivial] no retargeting in regtest mode
2020-11-17 18:48:32 +00:00
Jack Grigg
337e528d33
python: Explicitly set encoding to utf8 when opening text files
2020-11-09 23:06:21 +00:00
Wladimir J. van der Laan
5295079b2e
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.
2020-11-09 22:59:04 +00:00
Jack Grigg
ee079a683b
test: Fix various pyflakes warnings
2020-10-16 16:00:02 +01:00
Homu
3caa784970
Auto merge of #2778 - syd0:add-python-assert, r=daira
...
Add assert_raises_message to the python test framework.
2020-09-03 14:26:54 +00:00
Taylor Hornby
51b9e230d2
Add a missing % to a string interpolation in rpc test framework
2020-08-26 14:47:48 -06:00
Kris Nuttycombe
e456d87cbf
Merge remote-tracking branch 'upstream/master' into zip-207
2020-07-09 08:23:57 -06:00