dash/test/functional/test_framework
pasta e2095bd68a
Merge #6488: backport: merge bitcoin#27452, #29347, #29356, #29353, #29452, #29483, #30545, #31383 (BIP324 backports: part 5)
c6f23a718c merge bitcoin#31383: Add missing node.setmocktime(self.mocktime) to p2p_ibd_stalling.py (Kittywhiskers Van Gogh)
9072a10754 merge bitcoin#30545: fix intermittent failures in feature_proxy.py (Kittywhiskers Van Gogh)
7e2d435e35 merge bitcoin#29483: add --v1transport option, add --v2transport to a CI task (Kittywhiskers Van Gogh)
7e59a965f8 merge bitcoin#29452: document that BIP324 on by default (Kittywhiskers Van Gogh)
0f3b5e081e merge bitcoin#29353: adhere to typical VERSION message protocol flow (Kittywhiskers Van Gogh)
dfdddfd2ff rpc: enable `v2transport` for `masternode connect` when capable (Kittywhiskers Van Gogh)
3c1636174b merge bitcoin#29356: make v2transport arg in addconnection mandatory and few cleanups (Kittywhiskers Van Gogh)
c53cd93aee merge bitcoin#29347: enable v2transport by default (Kittywhiskers Van Gogh)
7dcf561306 merge bitcoin#27452: cover addrv2 anchors by adding TorV3 to CAddress in messages.py (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * When backporting [bitcoin#27452](https://github.com/bitcoin/bitcoin/pull/27452) in `feature_anchors.py`, `P2P_SERVICES` (`NODE_NETWORK | NODE_HEADERS_COMPRESSED`) has been replaced with `NODE_NETWORK` as the former evaluates to a value greater than `256` (specifically `2049`), which causes test failure. The replacement value is acceptable as `NODE_NETWORK` is the desired service flag expected by Dash Core ([source](779e4295ad/src/protocol.cpp (L249-L254))).

    <details>

    <summary>Test failure:</summary>

    ```
    dash@89afd55ae77e:/src/dash$ ./test/functional/feature_anchors.py
    2024-12-14T12:31:22.244000Z TestFramework (INFO): PRNG seed is: 8365703189892653614
    2024-12-14T12:31:22.244000Z TestFramework (INFO): Initializing test directory /tmp/dash_func_test_j0ya02yu
    2024-12-14T12:31:22.776000Z TestFramework (INFO): When node starts, check if anchors.dat doesn't exist
    2024-12-14T12:31:22.776000Z TestFramework (INFO): Add 2 block-relay-only connections to node
    2024-12-14T12:31:24.781000Z TestFramework (INFO): Add 5 inbound connections to node
    2024-12-14T12:31:29.843000Z TestFramework (INFO): Check node connections
    2024-12-14T12:31:30.848000Z TestFramework (INFO): Check the addresses in anchors.dat
    2024-12-14T12:31:30.848000Z TestFramework (INFO): Perturb anchors.dat to test it doesn't throw an error during initialization
    2024-12-14T12:31:31.356000Z TestFramework (INFO): When node starts, check if anchors.dat doesn't exist anymore
    2024-12-14T12:31:31.357000Z TestFramework (INFO): Ensure addrv2 support
    2024-12-14T12:31:32.364000Z TestFramework (INFO): Add 256-bit-address block-relay-only connections to node
    2024-12-14T12:31:33.368000Z TestFramework (INFO): Check for addrv2 addresses in anchors.dat
    2024-12-14T12:31:33.369000Z TestFramework (ERROR): Unexpected exception caught during testing
    Traceback (most recent call last):
      File "/src/dash/test/functional/test_framework/test_framework.py", line 161, in main
        self.run_test()
      File "/src/dash/./test/functional/feature_anchors.py", line 135, in run_test
        new_data[services_index] = P2P_SERVICES
    ValueError: byte must be in range(0, 256)
    2024-12-14T12:31:33.870000Z TestFramework (INFO): Stopping nodes
    2024-12-14T12:31:33.871000Z TestFramework (WARNING): Not cleaning up dir /tmp/dash_func_test_j0ya02yu
    2024-12-14T12:31:33.871000Z TestFramework (ERROR): Test failed. Test logging available at /tmp/dash_func_test_j0ya02yu/test_framework.log
    ```

    </details>

  ## Breaking Changes

  None expected.

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK c6f23a718c
  PastaPastaPasta:
    utACK c6f23a718c81b7c574ba3fecbe52f342eda35a46;

Tree-SHA512: ca134432d000d521827a20c75c03913421fe52a31fda1cbf632e0b207c31728406feb090469d592d8e2fd8d64298faa2752ff703de79f737a62c276c6a231097
2024-12-14 19:41:06 -06:00
..
crypto merge bitcoin#29390: speedup bip324_cipher.py unit test 2024-10-24 14:32:04 +00:00
__init__.py
address.py merge bitcoin#24324: refactor: remove unneeded bytes<->hex conversions in byte_to_base58 2024-09-30 09:03:28 +00:00
authproxy.py Merge bitcoin/bitcoin#25950: test: fix test abort for high timeout values (and --timeout-factor 0) 2024-10-23 20:06:32 -05:00
bdb.py Merge bitcoin/bitcoin#22619: test: refactor: use consistent bytes <-> hex-string conversion in functional test framework 2024-08-25 07:55:13 +05:30
bip340_test_vectors.csv partial bitcoin#19953: Implement BIP 340-342 validation 2024-02-19 10:17:10 -06:00
blockfilter.py merge bitcoin#28374: python cryptography required for BIP 324 functional tests 2024-03-05 21:43:22 +00:00
blocktools.py merge bitcoin#23636: Remove GetAdjustedTime from init.cpp 2024-10-05 17:10:03 +00:00
coverage.py Merge bitcoin/bitcoin#22139: test: add type annotations to util.get_rpc_proxy 2023-12-03 20:13:09 -06:00
descriptors.py Merge #18032: rpc: Output a descriptor in createmultisig and addmultisigaddress 2023-04-06 20:15:47 +03:00
governance.py test: move EXPECTED_STDERR_NO_GOV{_PRUNE} and use it more 2024-09-20 12:29:02 +00:00
key.py merge bitcoin#29431: disconnection scenarios during v2 handshake 2024-10-24 14:32:05 +00:00
messages.py merge bitcoin#27452: cover addrv2 anchors by adding TorV3 to CAddress in messages.py 2024-12-14 12:00:50 +00:00
netutil.py Merge bitcoin/bitcoin#29475: doc: Fix Broken Links 2024-10-24 11:16:20 -05:00
p2p.py merge bitcoin#29353: adhere to typical VERSION message protocol flow 2024-12-14 12:00:51 +00:00
script_util.py Merge bitcoin#22593: remove hex_str_to_bytes helper 2024-08-25 07:55:20 +05:30
script.py merge bitcoin#28374: python cryptography required for BIP 324 functional tests 2024-03-05 21:43:22 +00:00
socks5.py merge bitcoin#27452: cover addrv2 anchors by adding TorV3 to CAddress in messages.py 2024-12-14 12:00:50 +00:00
test_framework.py Merge #6488: backport: merge bitcoin#27452, #29347, #29356, #29353, #29452, #29483, #30545, #31383 (BIP324 backports: part 5) 2024-12-14 19:41:06 -06:00
test_node.py merge bitcoin#29483: add --v1transport option, add --v2transport to a CI task 2024-12-14 12:00:51 +00:00
test_shell.py Merge #17378: TestShell: Fix typos & implement cleanups 2023-01-23 12:22:29 -06:00
util.py Merge bitcoin/bitcoin#23136: test: update fee rate assertion helper in the functional test framework 2024-11-24 20:31:54 +05:30
v2_p2p.py merge bitcoin#29356: make v2transport arg in addconnection mandatory and few cleanups 2024-12-14 12:00:51 +00:00
wallet_util.py Merge bitcoin#22593: remove hex_str_to_bytes helper 2024-08-25 07:55:20 +05:30
wallet.py Merge bitcoin/bitcoin#23515: test: Return the largest utxo in MiniWallet.get_utxo 2024-10-15 09:25:08 -05:00