test: Enable noban_tx_relay in a few more tests #36624

Manually merged
maflcko merged 3 commits from 2610-test-noban-relay into master 2026-10-23 21:07:03 +00:00 AGit
maflcko commented 2026-10-23 14:50:27 +00:00 (Migrated from github.com)
For https://github.com/bitcoin/bitcoin/issues/19732 (see commit msgs for details)
DrahtBot commented 2026-10-23 14:50:38 +00:00 (Migrated from github.com)

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK ViniciusCestarii, brunoerg

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

<!--e57a25ab6845829454e8d69fc972939a--> The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. <!--006a51241073e994b41acfe9ec718e94--> ### External sites * Code coverage & benchmarks: https://corecheck.dev/bitcoin/bitcoin/pulls/36624 * Ralph review <img src=https://review.fish.foo/assets/bitcoin/bitcoin/36624.png alt="Ralph review status"> https://git.fish.foo/bitcoin/bitcoin/pulls/36624#author-ralph <!--021abf342d371248e50ceaed478a90ca--> ### Reviews See [the guideline](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#code-review) and [AI policy](https://github.com/bitcoin/bitcoin/blob/master/doc/AI_POLICY.md) for information on the review process. | Type | Reviewers | | ---- | --------- | | ACK | [ViniciusCestarii](https://github.com/bitcoin/bitcoin/pull/36624#pullrequestreview-5632711624), [brunoerg](https://github.com/bitcoin/bitcoin/pull/36624#pullrequestreview-5633473250) | If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore. <!--5faf32d7da4f0f540f40219e4f7537a3-->
First-time contributor

Base: df0dc1e2d2059213e49a9f115fd55a9f0119d26c
Head: fa704c5d3cafcd768982a02c48c7c7d96d667fa1

Design and approach

Use ordinary relay scheduling in P2P relay tests (test/functional/mempool_accept_wtxid.py:24, head)

MempoolWtxidTest checks that P2P peers receive the selected wtxid and its rebroadcast, but noban_tx_relay gives loopback peers NoBan permission and enables immediate trickle sending rather than the normal inventory schedule. The test framework warns against using this setting when testing transaction relay. PackageRBFTest also uses it while checking package propagation over P2P. Keep relay-asserting tests on ordinary scheduling, or provide separate coverage for those assertions without NoBan; where faster relay is needed, use the opt-in only for tests that do not assert relay behavior.

Review coverage was incomplete.

Review limitations
  • verifier: The issue/PR discussions and historical runtime measurements cited in the concept candidate were not independently checked; the code assessment does not rely on them.

Full review report

<!-- forgejo-review-bot:bitcoin/bitcoin --> <!-- ralph-engine:current:1e40d4c29146a38cb238a037edaa35c22b13996a5383ed7a85e089a15d569009:c9412d948811529792d161d97aa6951829440e3d548b7c576bb8d4df4183e0d0 --> Base: `df0dc1e2d2059213e49a9f115fd55a9f0119d26c` Head: `fa704c5d3cafcd768982a02c48c7c7d96d667fa1` ##### Design and approach **Use ordinary relay scheduling in P2P relay tests** (test/functional/mempool_accept_wtxid.py:24, head) `MempoolWtxidTest` checks that P2P peers receive the selected wtxid and its rebroadcast, but `noban_tx_relay` gives loopback peers `NoBan` permission and enables immediate trickle sending rather than the normal inventory schedule. The test framework warns against using this setting when testing transaction relay. `PackageRBFTest` also uses it while checking package propagation over P2P. Keep relay-asserting tests on ordinary scheduling, or provide separate coverage for those assertions without `NoBan`; where faster relay is needed, use the opt-in only for tests that do not assert relay behavior. Review coverage was incomplete. <details> <summary>Review limitations</summary> - verifier: The issue/PR discussions and historical runtime measurements cited in the concept candidate were not independently checked; the code assessment does not rely on them. </details> [Full review report](<https://review.fish.foo/traces/36624-fa704c5d3cafcd768982a02c48c7c7d96d667fa1-1226-1.html>)
fanquake commented 2026-10-23 15:27:20 +00:00 (Migrated from github.com)

cc @ViniciusCestarii

cc @ViniciusCestarii
ViniciusCestarii (Migrated from github.com) reviewed 2026-10-23 18:20:57 +00:00
ViniciusCestarii (Migrated from github.com) left a comment

ACK fa704c5d3c

Setting noban_tx_relay to these tests is correct and I also like the new more direct comment for noban_tx_relay.

I compared execution time running locally build/test/functional/test_runner.py -j=18 --randomseed=1 (median of 3):

rpc_psbt.py 18s -> 4s
mempool_accept_wtxid.py 4s -> 0s
mempool_limit.py 8s -> 4s
mempool_package_rbf.py 13s -> 4s
mempool_persist.py 12s -> 3s

Acummulated 1066s -> 1011s
Wall 76s -> 73s

This is a nice speed up :)

ACK fa704c5d3cafcd768982a02c48c7c7d96d667fa1 Setting noban_tx_relay to these tests is correct and I also like the new more direct comment for noban_tx_relay. I compared execution time running locally `build/test/functional/test_runner.py -j=18 --randomseed=1` (median of 3): rpc_psbt.py 18s -> 4s mempool_accept_wtxid.py 4s -> 0s mempool_limit.py 8s -> 4s mempool_package_rbf.py 13s -> 4s mempool_persist.py 12s -> 3s Acummulated 1066s -> 1011s Wall 76s -> 73s This is a nice speed up :)
brunoerg (Migrated from github.com) approved these changes 2026-10-23 19:30:22 +00:00
brunoerg (Migrated from github.com) left a comment
ACK fa704c5d3cafcd768982a02c48c7c7d96d667fa1
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bitcoin/bitcoin!36624
No description provided.