test: speedup wallet_backup by whitelisting peers (immediate tx relay) #17121

pull theStack wants to merge 1 commits into bitcoin:master from theStack:20191013-test-use_whitelist_in_wallet-backup_to_speedup_mempool_sync changing 1 files +7 −1
  1. theStack commented at 1:15 am on October 13, 2019: member

    approaches part of #16613 (“Functional test suite bottlenecks”)

    The majority of the test time is spent in sync_mempools() after sending to addresses, i.e. the bottleneck is in relaying transactions. By whitelisting the peers via -whitelist, the inventory is transmissioned immediately rather than on average every 5 seconds, speeding up the test by at least a factor of two:

    before:

    0$ time ./wallet_backup.py
    1real    2m2.523s
    2user    0m6.093s
    3sys 0m2.454s
    

    with this PR:

    0$ time ./wallet_backup_with_whitelist.py
    1real    0m36.570s
    2user    0m5.365s
    3sys 0m1.696s
    

    Note that the test is not deterministic (the sendtoaddress RPC in function one_send() is executed with a probability of 50%), hence the times could vary between individual runs.

  2. test: speedup wallet_backup by whitelisting peers (immediate tx relay)
    approaches part of #16613 ("Functional test suite bottlenecks")
    
    The majority of the test time is spent in sync_mempools() after sending to
    addresses, i.e. the bottleneck is in relaying transactions. By whitelisting the
    peers via -whitelist, the inventory is transmissioned immediately rather than
    on average every 5 seconds, speeding up the test by at least a factor of two:
    
    before:
    $ time ./wallet_backup.py
    real    2m2.523s
    user    0m6.093s
    sys 0m2.454s
    
    with this PR:
    $ time ./wallet_backup_with_whitelist.py
    real    0m36.570s
    user    0m5.365s
    sys 0m1.696s
    
    Note that the test is not deterministic (the sendtoaddress RPC in function
    one_send() is executed with a probability of 50%), hence the times could vary
    between individual runs.
    581c9be0d8
  3. fanquake added the label Tests on Oct 13, 2019
  4. MarcoFalke commented at 2:24 pm on October 13, 2019: member
    ACK 581c9be0d8bff46cd68bd6a3bf72f22d11c09aea, this test is testing the backup behaviour, not the tx relay behaviour
  5. fanquake approved
  6. fanquake commented at 3:37 pm on October 13, 2019: member

    ACK 581c9be0d8bff46cd68bd6a3bf72f22d11c09aea

    master (561a7d30478b82f5d46dcf0f16e864a9608004f4):

    0time test/functional/test_runner.py wallet_backup.py
    1...
    2wallet_backup.py | ✓ Passed  | 115 s
    

    PR (581c9be0d8bff46cd68bd6a3bf72f22d11c09aea):

    0time test/functional/test_runner.py wallet_backup.py
    1...
    2wallet_backup.py | ✓ Passed  | 57 s
    
  7. fanquake referenced this in commit e82f874a23 on Oct 13, 2019
  8. fanquake merged this on Oct 13, 2019
  9. fanquake closed this on Oct 13, 2019

  10. deadalnix referenced this in commit 501a8f0d1e on Apr 15, 2020
  11. MarcoFalke referenced this in commit a57af897ec on Aug 16, 2020
  12. sidhujag referenced this in commit 9f7e4e2bb0 on Aug 16, 2020
  13. ftrader referenced this in commit 923bd22ab1 on Aug 17, 2020
  14. theStack deleted the branch on Dec 1, 2020
  15. PastaPastaPasta referenced this in commit 2b1b020dd2 on Dec 22, 2021
  16. PastaPastaPasta referenced this in commit 5201f45782 on Dec 22, 2021
  17. DrahtBot locked this on Feb 15, 2022

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: 2024-11-17 15:12 UTC

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