#24748 added v2 transport to the python P2PConnection
, but so far each test that wants to make use of it needs to enable it on an individual basis.
This PR changes it so that if the test suite is run with --v2transport
option, v2 is used in each test by default, not only for connections between two bitcoind instances as before, but also wherever P2PConnection
is used. Individual tests can override this global option.
To do that, a few tests need to be adjusted. In addition, I added a commit to always use v1 in a few select subtests that send a large number of large messages (e.g. large reorgs). These tests don’t have a fundamental problem with v2 but become very slow due to the unoptimised python ChaCha20 implementation (~30 minutes on my computer, so probably not suitable to be run in the CI).
As a result, python3 test_runner.py --v2transport
should succeed and use v2
everywhere (unless v1 is chosen explicitly).
[Edit]: To make the “test each commit” CI pass, several test fixes were squashed into the last commit, which actually enables v2 p2p for P2PConnection
. I have an unsquashed version at https://github.com/mzumsande/bitcoin/tree/202401_bip324_alltests_unsquashed, in case that helps with review.