test: speedup wallet tests by whitelisting peers (immediate tx relay) #25865

pull theStack wants to merge 1 commits into bitcoin:master from theStack:202208-test-speedup_wallet_tests_immediate_tx_relay changing 9 files +23 −1
  1. theStack commented at 11:01 PM on August 17, 2022: contributor

    In the course of testing #25297 by running all wallet-related functional tests (see #25297 (comment)), I noticed that the run-time of those tests vary a lot between runs, in fact too much for a useful comparison. This PR fixes this by making the tests both more deterministic and also faster, using the good ol' immediate tx relay trick (parameter -whitelist=noban@127.0.0.1).

    master branch:

    wallet_abandonconflict.py --descriptors   | ✓ Passed  | 7 s
    wallet_abandonconflict.py --legacy-wallet | ✓ Passed  | 23 s
    wallet_balance.py --descriptors           | ✓ Passed  | 17 s
    wallet_balance.py --legacy-wallet         | ✓ Passed  | 21 s
    wallet_basic.py --descriptors             | ✓ Passed  | 32 s
    wallet_basic.py --legacy-wallet           | ✓ Passed  | 56 s
    wallet_bumpfee.py --descriptors           | ✓ Passed  | 44 s
    wallet_bumpfee.py --legacy-wallet         | ✓ Passed  | 45 s
    wallet_groups.py --descriptors            | ✓ Passed  | 89 s
    wallet_groups.py --legacy-wallet          | ✓ Passed  | 94 s
    wallet_hd.py --descriptors                | ✓ Passed  | 7 s
    wallet_hd.py --legacy-wallet              | ✓ Passed  | 13 s
    wallet_importdescriptors.py --descriptors | ✓ Passed  | 26 s
    wallet_listreceivedby.py --descriptors    | ✓ Passed  | 28 s
    wallet_listreceivedby.py --legacy-wallet  | ✓ Passed  | 18 s
    
    ALL                                       | ✓ Passed  | 520 s (accumulated)
    Runtime: 526 s
    

    PR branch:

    wallet_abandonconflict.py --descriptors   | ✓ Passed  | 7 s
    wallet_abandonconflict.py --legacy-wallet | ✓ Passed  | 11 s
    wallet_balance.py --descriptors           | ✓ Passed  | 8 s
    wallet_balance.py --legacy-wallet         | ✓ Passed  | 8 s
    wallet_basic.py --descriptors             | ✓ Passed  | 29 s
    wallet_basic.py --legacy-wallet           | ✓ Passed  | 36 s
    wallet_bumpfee.py --descriptors           | ✓ Passed  | 39 s
    wallet_bumpfee.py --legacy-wallet         | ✓ Passed  | 32 s
    wallet_groups.py --descriptors            | ✓ Passed  | 39 s
    wallet_groups.py --legacy-wallet          | ✓ Passed  | 41 s
    wallet_hd.py --descriptors                | ✓ Passed  | 8 s
    wallet_hd.py --legacy-wallet              | ✓ Passed  | 11 s
    wallet_importdescriptors.py --descriptors | ✓ Passed  | 17 s
    wallet_listreceivedby.py --descriptors    | ✓ Passed  | 7 s
    wallet_listreceivedby.py --legacy-wallet  | ✓ Passed  | 9 s
    
    ALL                                       | ✓ Passed  | 302 s (accumulated)
    Runtime: 309 s
    

    Note that an alternative approach could be to whitelist peers by default for nodes in the functional test framework and only enable the trickle relay for the few tests where it's really needed.

  2. test: speedup wallet tests by whitelisting peers (immediate tx relay) b21e522ce4
  3. DrahtBot added the label Tests on Aug 17, 2022
  4. furszy commented at 1:49 PM on August 18, 2022: member

    Concept ACK on disabling the trickle mechanism on tests that aren't related to network gossip.

    The mechanism is specific to the network layer, shouldn't be adding extra noise and indeterminism (time wise) to tests that cover layers that live on top of it.

  5. naumenkogs commented at 8:24 AM on August 24, 2022: member

    utACK b21e522ce47a13e024488e43f1cd33a0f1769197

  6. MarcoFalke merged this on Aug 24, 2022
  7. MarcoFalke closed this on Aug 24, 2022

  8. theStack deleted the branch on Aug 24, 2022
  9. sidhujag referenced this in commit 01e96c29e7 on Aug 24, 2022
  10. Fabcien referenced this in commit 62d8c7fdf7 on Aug 30, 2022
  11. stickies-v referenced this in commit 82e7d7b202 on Sep 2, 2022
  12. MarcoFalke referenced this in commit dd3ada6ec4 on Sep 9, 2022
  13. sidhujag referenced this in commit 9bac3956f4 on Sep 11, 2022
  14. bitcoin locked this on Aug 24, 2023

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 21:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me