Skip to content

Conversation

@theStack
Copy link
Contributor

approaches another part of #16613 ("Functional test suite bottlenecks")

As for wallet_backup.py (Commit 581c9be), the
bottleneck is in relaying transactions. By whitelisting the peers, the
inventory is transmissioned immediately rather than on average every 5 seconds,
speeding up the test significantly:

before:

$ time ./wallet_address_types.py
real    1m30.072s
user    0m6.478s
sys     0m2.298s

with this PR:

$ time ./wallet_address_types.py
real    0m26.785s
user    0m5.525s
sys     0m1.888s

…tx relay)

approaches another part of bitcoin#16613 ("Functional test suite bottlenecks")

As for wallet_backup.py (Commit 581c9be), the
bottleneck is in relaying transactions. By whitelisting the peers, the
inventory is transmissioned immediately rather than on average every 5 seconds,
speeding up the test significantly:

before:
$ time ./wallet_address_types.py
real    1m30.072s
user    0m6.478s
sys     0m2.298s

with this PR:
$ time ./wallet_address_types.py
real    0m26.785s
user    0m5.525s
sys     0m1.888s
@theStack theStack force-pushed the 20191013-test-use_whitelist_in_wallet-address-types_to_speedup_mempool_sync branch from 0d2a94c to fba4baa Compare October 13, 2019 19:12
@fanquake fanquake added the Tests label Oct 13, 2019
Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK - fba4baa

master (4765b91):

wallet_address_types.py | ✓ Passed  | 87 s

PR (fba4baa):

wallet_address_types.py | ✓ Passed  | 37 s

maflcko pushed a commit that referenced this pull request Oct 14, 2019
…rs (immediate tx relay)

fba4baa test: speed up wallet_address_types by whitelisting peers (immediate tx relay) (Sebastian Falbesoner)

Pull request description:

  approaches another part of #16613 ("Functional test suite bottlenecks")

  As for `wallet_backup.py` (Commit 581c9be), the
  bottleneck is in relaying transactions. By whitelisting the peers, the
  inventory is transmissioned immediately rather than on average every 5 seconds,
  speeding up the test significantly:

  before:
  ```
  $ time ./wallet_address_types.py
  real    1m30.072s
  user    0m6.478s
  sys     0m2.298s
  ```

  with this PR:
  ```
  $ time ./wallet_address_types.py
  real    0m26.785s
  user    0m5.525s
  sys     0m1.888s
  ```

ACKs for top commit:
  fanquake:
    ACK - fba4baa

Tree-SHA512: 6728ae44bd8839426fa943d06af884e40c2d88de5d7807269a1e78ff987077160aa7e8d395f4468e6ca1d6f2110c7a03cd346a3339b256702f4cdabd285f7f86
@maflcko maflcko merged commit fba4baa into bitcoin:master Oct 14, 2019
deadalnix pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request May 19, 2020
Summary:
Improvements and cleanups by John Newbery

This is from [[bitcoin/bitcoin#11403 | PR11403]] : bitcoin/bitcoin@b224a47

We initially decided not to backport it because we don't have this feature, but it turns out it exercice various parts of the code and is useful. In addition, it makes backport easier.

Also include a trick similar to [[bitcoin/bitcoin#17124 | PR17124]] to significantly speedup the test.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D6131
maflcko pushed a commit that referenced this pull request Aug 16, 2020
… speedup)

9e78943 test: speedup p2p_feefilter.py by whitelisting peers (immediate tx relay) (Sebastian Falbesoner)
fe3f0cc test: use wait_until for invs matching in p2p_feefilter.py (Sebastian Falbesoner)
6d94192 test: add logging for p2p_feefilter.py (Sebastian Falbesoner)

Pull request description:

  This PR gives some love to the functional test `p2p_feefilter.py` by introducing the following changes:
  * add missing log messages for the `test_feefilter` subtest (the main one)
  * deduplicate code by using the utility function `wait_until` (already using the [recently introduced version](12410b1)) instead of a manual condition checking loop with `time.sleep`
  * improve naming of the function `matchAllInvs` (more expressive name, snake_case) and moving it from global namespace to the connection class `FeefilterConn`
  * speeding up the test significantly by the good ol' method of activating immediate tx relay (as seen on e.g. #17121, #17124, #17340, #17362, ...):
  ```
  master branch:
  $ time ./p2p_feefilter.py
  ...
  real    0m39.367s
  user    0m1.227s
  sys 0m0.571s

  PR branch:
  $ time ./p2p_feefilter.py
  ...
  real    0m9.386s
  user    0m1.120s
  sys 0m0.577s
  ```

ACKs for top commit:
  instagibbs:
    code review ACK 9e78943
  jonatack:
    re-ACK 9e78943 per `git range-diff 3ab2582 ea74a3c 9e78943`

Tree-SHA512: fe21c1c5413df9165fea916b5d5f609d3ba33e7b5c3364b38eb824fcc55d9e6abddf27116cbc0b325913d451a73c44542040fb916aec9c46f805c6e12f6f10cf
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Aug 16, 2020
…toring, speedup)

9e78943 test: speedup p2p_feefilter.py by whitelisting peers (immediate tx relay) (Sebastian Falbesoner)
fe3f0cc test: use wait_until for invs matching in p2p_feefilter.py (Sebastian Falbesoner)
6d94192 test: add logging for p2p_feefilter.py (Sebastian Falbesoner)

Pull request description:

  This PR gives some love to the functional test `p2p_feefilter.py` by introducing the following changes:
  * add missing log messages for the `test_feefilter` subtest (the main one)
  * deduplicate code by using the utility function `wait_until` (already using the [recently introduced version](bitcoin@12410b1)) instead of a manual condition checking loop with `time.sleep`
  * improve naming of the function `matchAllInvs` (more expressive name, snake_case) and moving it from global namespace to the connection class `FeefilterConn`
  * speeding up the test significantly by the good ol' method of activating immediate tx relay (as seen on e.g. bitcoin#17121, bitcoin#17124, bitcoin#17340, bitcoin#17362, ...):
  ```
  master branch:
  $ time ./p2p_feefilter.py
  ...
  real    0m39.367s
  user    0m1.227s
  sys 0m0.571s

  PR branch:
  $ time ./p2p_feefilter.py
  ...
  real    0m9.386s
  user    0m1.120s
  sys 0m0.577s
  ```

ACKs for top commit:
  instagibbs:
    code review ACK bitcoin@9e78943
  jonatack:
    re-ACK 9e78943 per `git range-diff 3ab2582 ea74a3c 9e78943`

Tree-SHA512: fe21c1c5413df9165fea916b5d5f609d3ba33e7b5c3364b38eb824fcc55d9e6abddf27116cbc0b325913d451a73c44542040fb916aec9c46f805c6e12f6f10cf
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Aug 17, 2020
Summary:
Improvements and cleanups by John Newbery

This is from [[bitcoin/bitcoin#11403 | PR11403]] : bitcoin/bitcoin@b224a47

We initially decided not to backport it because we don't have this feature, but it turns out it exercice various parts of the code and is useful. In addition, it makes backport easier.

Also include a trick similar to [[bitcoin/bitcoin#17124 | PR17124]] to significantly speedup the test.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D6131
@theStack theStack deleted the 20191013-test-use_whitelist_in_wallet-address-types_to_speedup_mempool_sync branch December 1, 2020 09:57
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants