bitcoin/test/functional/test_framework
fanquake 2fa60f0b68
Merge bitcoin/bitcoin#27452: test: cover addrv2 anchors by adding TorV3 to CAddress in messages.py
ba8ab4fc54 test: cover addrv2 support in anchors.dat with a TorV3 address (Matthew Zipkin)
b4bee4bbf4 test: add keep_alive option to socks5 proxy in test_framework (Matthew Zipkin)
5aaf988ccc test: cover TorV3 address in p2p_addrv2_relay (Matthew Zipkin)
80f64a3d40 test: add support for all networks in CAddress in messages.py (brunoerg)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/27140

  Adds test coverage for https://github.com/bitcoin/bitcoin/pull/20516 to ensure that https://github.com/bitcoin/bitcoin/issues/20511 is completed and may be closed.

  This PR adds a test case to `feature_anchors.py` where an onion v3 address is set as a blocks-only relay peer and then shutdown, ensuring that the address is saved to anchors.dat in addrv2 format. We then ensure that bitcoin attempts to reconnect to that anchor address on restart.

  To compute the addrv2 serialization of the onion v3 address, I added logic to `CAddress` in `messages.py`. This new logic is covered by extending `p2p_addrv2_relay.py` to include an onion v3 address. Future work will be adding coverage for ipv6, torv2 and cjdns in these modules and also `feature_proxy.py`

  Also includes de/serialization unit test for `CAddress` in test framework.

ACKs for top commit:
  jonatack:
    ACK ba8ab4fc54
  brunoerg:
    crACK ba8ab4fc54
  willcl-ark:
    ACK ba8ab4fc54

Tree-SHA512: 7220e30d7cb975903d9ac575a7215a08e8f784c24c5741561affcbde12fb92cbf8704cb42e66494b788ba6ed4bb255fb0cc327e4f2190fae50c0ed9f336c0ff0
2023-08-02 12:57:30 +01:00
..
__init__.py Rename rpc-tests directory to functional 2017-03-20 10:40:31 -04:00
address.py refactor: move address_to_scriptpubkey to address.py 2023-03-28 16:54:28 +01:00
authproxy.py test: Rename EncodeDecimal to serialization_fallback 2023-06-29 19:51:43 +02:00
bdb.py scripted-diff: Bump copyright headers 2021-11-10 11:10:24 +01:00
bip340_test_vectors.csv tests: add BIP340 Schnorr signature support to test framework 2020-10-12 17:18:47 -07:00
blockfilter.py test: add compact block filter (BIP158) helper routines 2022-10-20 01:33:17 +02:00
blocktools.py refactor: use address_to_scriptpubkey to retrieve addresses scriptpubkey 2023-03-28 16:58:16 +01:00
coverage.py test: fix PEP484 no implicit optional argument types errors 2023-06-29 16:14:07 -06:00
descriptors.py Output a descriptor in createmultisig and addmultisigaddress 2020-01-30 23:55:36 -05:00
ellswift.py test: add ellswift test vectors from BIP324 2023-06-29 23:32:56 +05:30
ellswift_decode_test_vectors.csv test: add ellswift test vectors from BIP324 2023-06-29 23:32:56 +05:30
key.py test: add secp256k1 module with FE (field element) and GE (group element) classes 2023-06-27 09:34:48 -04:00
messages.py test: add support for all networks in CAddress in messages.py 2023-07-10 10:07:40 -04:00
muhash.py test: remove modinv python util helper function 2023-04-28 14:19:18 +02:00
netutil.py scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
p2p.py test: Use self.wait_until over wait_until_helper 2023-03-08 11:31:56 +01:00
psbt.py test: PSBT: eliminate magic numbers for global unsigned tx key (0) 2023-03-04 12:43:38 +01:00
ripemd160.py Add pure Python RIPEMD-160 2021-12-08 14:29:34 -05:00
script.py test: refactor: deduplicate legacy ECDSA signing for tx inputs 2023-07-03 17:33:41 +02:00
script_util.py scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
secp256k1.py test: EC: optimize scalar multiplication of G by using lookup table 2023-06-27 09:34:52 -04:00
segwit_addr.py Use Bech32m encoding for v1+ segwit addresses 2021-03-16 10:48:36 -07:00
siphash.py test: python E721 updates 2023-07-31 12:13:46 -06:00
socks5.py test: add keep_alive option to socks5 proxy in test_framework 2023-07-10 10:07:45 -04:00
test_framework.py script, test: add missing python type annotations 2023-06-29 16:13:51 -06:00
test_node.py Merge bitcoin/bitcoin#28144: test: fix intermittent failure in p2p_getaddr_caching.py 2023-08-01 16:59:37 +01:00
test_shell.py scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
util.py test: fix PEP484 no implicit optional argument types errors 2023-06-29 16:14:07 -06:00
wallet.py test: refactor: deduplicate legacy ECDSA signing for tx inputs 2023-07-03 17:33:41 +02:00
wallet_util.py test: refactor: introduce generate_keypair helper with WIF support 2023-06-19 17:38:14 +02:00
xswiftec_inv_test_vectors.csv test: add ellswift test vectors from BIP324 2023-06-29 23:32:56 +05:30