Commit graph

39308 commits

Author SHA1 Message Date
fanquake
08ea835220
Merge bitcoin/bitcoin#28583: refactor: [tidy] modernize-use-emplace
fa05a726c2 tidy: modernize-use-emplace (MarcoFalke)

Pull request description:

  Constructing a temporary unnamed object only to copy or move it into a container seems both verbose in code and a strict performance penalty.

  Fix both issues via the `modernize-use-emplace` tidy check.

ACKs for top commit:
  Sjors:
    re-utACK fa05a726c2
  hebasto:
    ACK fa05a726c2.
  TheCharlatan:
    ACK fa05a726c2

Tree-SHA512: 4408a094f406e7bf6c1468c2b0798f68f4d952a1253cf5b20bdc648ad7eea4a2c070051fed46d66fd37bce2ce6f85962484a1d32826b7ab8c9baba431eaa2765
2023-10-16 15:35:50 +01:00
MarcoFalke
faa5e061c2
fuzz: Allow multiple --m_dir args 2023-10-16 16:04:02 +02:00
Hennadii Stepanov
92704535f6
Merge bitcoin-core/gui#765: Fix wallet list hover crash on shutdown
8b6470a906 gui: disable top bar menu actions during shutdown (furszy)
7066e8996d gui: provide wallet controller context to wallet actions (furszy)

Pull request description:

  Small follow-up to #751.

  Fixes another crash cause during shutdown. Which occurs when the user hovers over the wallets list.

  Future Note:
  This surely happen in other places as well, we should re-work the way we connect signals. Register
  lambas without any precaution can leave dangling pointers.

ACKs for top commit:
  hebasto:
    ACK 8b6470a906, I've tested each commit separately on macOS Sonoma 14.0 (Apple M1).

Tree-SHA512: 6fbd1bcd6717a8c1633beb9371463ed22422f929cccf9b791ee292c5364134c501e099329cf77a06b74a84c64c1c3d22539199ec49ccd74b3950036316c0dab3
2023-10-16 13:37:35 +01:00
Vasil Dimov
0e6f6ebc06
net: remove unused CConnman::FindNode(const CSubNet&) 2023-10-16 12:59:47 +02:00
Vasil Dimov
9482cb780f
netbase: possibly change the result of LookupSubNet() to CJDNS
All callers of `LookupSubNet()` need the result to be of CJDNS type if
`-cjdnsreachable` is set and the address begins with `fc`:

* `NetWhitelistPermissions::TryParse()`: otherwise `-whitelist=` fails
  to white list CJDNS addresses: when a CJDNS peer connects to us, it
  will be matched against IPv6 `fc...` subnet and the match will never
  succeed.

* `BanMapFromJson()`: CJDNS bans are stored as just IPv6 addresses in
  `banlist.json`. Upon reading from disk they have to be converted back
  to CJDNS, otherwise, after restart, a ban entry like (`fc00::1`, IPv6)
  would not match a peer (`fc00::1`, CJDNS).

* `setban()` (in `rpc/net.cpp`): otherwise `setban fc.../mask add` would
  add an IPv6 entry to BanMan. Subnetting does not make sense for CJDNS
  addresses, thus treat `fc.../mask` as invalid `CSubNet`. The result of
  `LookupHost()` has to be converted for the case of banning a single
  host.

* `InitHTTPAllowList()`: not necessary since before this change
  `-rpcallowip=fc...` would match IPv6 subnets against IPv6 peers even
  if they started with `fc`. But because it is necessary for the above,
  `HTTPRequest::GetPeer()` also has to be adjusted to return CJDNS peer,
  so that now CJDNS peers are matched against CJDNS subnets.
2023-10-16 12:57:49 +02:00
fanquake
22fa1f4702
Merge bitcoin/bitcoin#28565: rpc: getaddrmaninfo followups
e6e444c06c refactor: add and use EnsureAnyAddrman in rpc (stratospher)
bf589a50a0 doc: add release notes for #27511 (stratospher)
3931e6abc3 rpc: `getaddrmaninfo` followups (stratospher)

Pull request description:

  - make `getaddrmaninfo` RPC public since it's not for development purposes only and regular users might find it useful. [#26988 (comment)](https://github.com/bitcoin/bitcoin/pull/26988#issuecomment-1738371584)
  - add missing `all_networks` key to RPC help. [#27511 (comment)](https://github.com/bitcoin/bitcoin/pull/27511#discussion_r1335084087)
  - fix clang format spacing
  - add and use `EnsureAddrman` in RPC code. [#27511 (comment)](https://github.com/bitcoin/bitcoin/pull/27511#discussion_r1331501491)

ACKs for top commit:
  0xB10C:
    Code Review re-ACK e6e444c06c
  theStack:
    Code-review ACK e6e444c06c
  pablomartin4btc:
    tested ACK e6e444c06c

Tree-SHA512: c14090d5c64ff15e92d252578de2437bb2ce2e1e431d6698580241a29190f0a3528ae5b013c0ddb76a9ae538507191295c37cab7fd93469941cadbde44587072
2023-10-16 11:21:45 +02:00
Sebastian Falbesoner
1b672eb766 doc: add release note for #27460 (new importmempool RPC)
Co-authored-by: glozow <gloriajzhao@gmail.com>
2023-10-15 18:14:43 +02:00
fanquake
ab2f531b78
Merge bitcoin/bitcoin#28650: fuzz: Merge with -set_cover_merge=1
fa858d63a0 fuzz: Merge with -set_cover_merge=1 (MarcoFalke)

Pull request description:

  This should be less controversial than commit 151a2b189c. The overall size of the qa-assets repo is reduced further from 1.9GB to 1.6GB. Also, the runtime to iterate on the resulting folder is reduced further from ~1699s to ~1149s (N=1).

ACKs for top commit:
  murchandamus:
    crACK fa858d63a0
  dergoegge:
    ACK fa858d63a0

Tree-SHA512: e23fa93bd48f01d11c551b035004c678bd6d76bc24ac7d0d0a7883060804e6711763cbd0cd0ded3aad3e4c40da764decae81c2703388cc11961def3c89a4f9ba
2023-10-15 11:08:31 +02:00
fanquake
cee39d0628
Merge bitcoin/bitcoin#27793: ci: label docker images and prune dangling images selectively
e44c574650 ci: always prune all dangling bitcoin-ci-test images (stickies-v)
ce1699706e ci: add label to docker images (stickies-v)

Pull request description:

  Follow-up from https://github.com/bitcoin/bitcoin/pull/27777#discussion_r1210209382.

  Labeling the docker images produced by the CI allows us/the user to apply batch operations to all images (including dangling ones) produced by the ci without affecting other, non-bitcoin-ci images. With labeling, we can safely always prune dangling bitcoin-ci-test images without checking for `RESTART_CI_DOCKER_BEFORE_RUN`, which we enable on our persistent runners.

ACKs for top commit:
  fanquake:
    utACK e44c574650

Tree-SHA512: 1009fb1be78fbc80b5341ba92eac2991e77d050e1ab6048d1d9a65af73413a6be7afc1e1c764eb3f347f363af31245b93fdb38f6ac016d775aad4a0f36e4c98f
2023-10-15 10:48:37 +02:00
furszy
8b6470a906
gui: disable top bar menu actions during shutdown
Opening the top bar menu when the app is being destroyed
freezes the GUI shutdown process for no reason. No menu
action can be executed.

Note:
This behavior is consistent with how the tray icon menu
is cleared too.
2023-10-13 17:40:32 -03:00
furszy
7066e8996d
gui: provide wallet controller context to wallet actions
Addressing potential crashes during shutdown. The most
noticeable one can be triggered by hovering over the
wallet list as the app shuts down.
2023-10-13 17:40:32 -03:00
Pieter Wuille
b22810887b miniscript: make GetWitnessSize accurate for tapscript 2023-10-13 15:28:38 -04:00
Pieter Wuille
8be9851408 test: add tests for miniscript GetWitnessSize 2023-10-13 14:57:03 -04:00
Pieter Wuille
7ed2b2d430 test: remove mutable global contexts in miniscript fuzzer/test 2023-10-13 14:34:02 -04:00
Andrew Chow
78b7e95518
Merge bitcoin/bitcoin#28645: test: fix assert_debug_log call-site bugs, add type checks
ac4caf3366 test: fix `assert_debug_log` call-site bugs, add type checks (Sebastian Falbesoner)

Pull request description:

  Two recently added tests (PR #28625 / commit 2e31250027 and PR #28634 / commit 3bb51c29df) introduced bugs by wrongly using the `assert_debug_log` helper:

  5ea4fc05ed/test/functional/feature_assumeutxo.py (L84-L85) (already fixed in https://github.com/bitcoin/bitcoin/pull/28639)

  5ea4fc05ed/test/functional/p2p_v2_transport.py (L148)
  5ea4fc05ed/test/functional/p2p_v2_transport.py (L159)

  Instead of passing the expected debug string in a list as expected, it was passed as bare string, which is then interpretered as a list of characters, very likely leading the debug log assertion pass even if the intended message is not appearing. Thanks to maflcko for discovering: https://github.com/bitcoin/bitcoin/pull/28625#discussion_r1356489861

  In order to avoid bugs like this in the future, enforce that the `{un}expected_msgs` parameters are lists, as discussed in https://github.com/bitcoin/bitcoin/pull/28625#discussion_r1356864233. Using mypy might be an alternative, but I guess it takes quite a bit of effort to properly integrate this into CI for the whole functional test suite (including taking care of false-positives), so I decided to go with the simpler "manual asserts" hack. Suggestions are very welcome of course.

ACKs for top commit:
  achow101:
    ACK ac4caf3366
  maflcko:
    lgtm ACK ac4caf3366
  dergoegge:
    ACK ac4caf3366

Tree-SHA512: a9677af76a0c370e71f0411339807b1dc6b2a81763db4ec049cd6d766404b916e2bdd002883db5a79c9c388d7d8ebfcbd5f31d43d50be868eeb928e3c906a746
2023-10-13 12:32:01 -04:00
MarcoFalke
fa858d63a0
fuzz: Merge with -set_cover_merge=1 2023-10-13 18:09:29 +02:00
ismaelsadeeq
81dfeddea7 refactor: update MAX_DISCONNECTED_TX_POOL from kb to bytes 2023-10-13 14:25:37 +01:00
Fabian Jahr
348e79f7c6
lint: Include test_utxo_snapshots in lint_shell 2023-10-13 14:06:06 +02:00
brunoerg
ff8e2fc2e2 fuzz: add coverage for bitcoinconsensus_verify_script_with_spent_outputs
Co-authored-by: Antonie Poinsot <darosior@protonmail.com>
2023-10-13 08:55:12 -03:00
brunoerg
c5f2a757d7 docs: add release notes for #28539 2023-10-13 08:55:12 -03:00
Jake Rawsthorne
de54882348 docs: add docs for additional libconsensus functions
Co-authored-by: Bruno Garcia <brunoely.gc@gmail.com>
2023-10-13 08:55:12 -03:00
Jake Rawsthorne
70106e0689 docs: link to rust-bitcoinconsensus 2023-10-13 08:55:12 -03:00
Jake Rawsthorne
fb0db07e41 lib: add Taproot support to libconsensus
Co-authored-by: Bruno Garcia <brunoely.gc@gmail.com>
2023-10-13 08:55:07 -03:00
Sebastian Falbesoner
ac4caf3366 test: fix assert_debug_log call-site bugs, add type checks
Two recently added tests (PR #28625 / commit 2e31250027
and PR #28634 / commit 3bb51c29df)
introduced a bug by wrongly using the `assert_debug_log` helper.
Instead of passing the expected debug string in a list as expected, it
was passed as bare string, which is then interpretered as a list of
characters, very likely leading the debug log assertion pass even if the
intended message is not appearing.

In order to avoid bugs like this in the future, enforce that the
`{un}expected_msgs` parameters are lists.
2023-10-13 12:42:49 +02:00
stickies-v
e44c574650
ci: always prune all dangling bitcoin-ci-test images
Since all bitcoin-ci-test images are now labeled, we can always
prune all dangling images, regardless of whether we are in
RESTART_CI_DOCKER_BEFORE_RUN.

To be safe, still prune all images if RESTART_CI_DOCKER_BEFORE_RUN
in case the filtering doesn't work, or if images were created on
an earlier version that did not assign labels.
2023-10-13 11:23:30 +01:00
MarcoFalke
6889a80766
ci: Add missing CI_RETRY_EXE before git clone 2023-10-13 10:37:34 +01:00
Hennadii Stepanov
b705bade44
ci: Export IN_GETOPT_BIN on macOS
This variable is required for the `retry` script.
2023-10-13 10:37:34 +01:00
Hennadii Stepanov
1c2132ddd9
Revert "ci: Upgrading pip version in macos environment"
This reverts commit 057750c09d.

It is not needed anymore in the GHA CI.
This change will make the code much simpler in the following commit.
2023-10-13 10:37:28 +01:00
stickies-v
ce1699706e
ci: add label to docker images
This allows us or the user to perform batch operations on all
images produced by the ci, e.g. to prune all dangling images,
without affecting non-ci images.
2023-10-13 10:17:21 +01:00
fanquake
73dfa6da08
Merge bitcoin/bitcoin#28631: devtools: test_utxo_snapshots.sh sleep cleanup and documentation
36a3004a41 devtools: test_utxo_snapshots.sh sleep cleanup and documentation (Fabian Jahr)

Pull request description:

  There were bare sleep statements in the script where it was unclear why they were needed and I think they could also be replaced by existing helpers.

ACKs for top commit:
  Sjors:
    utACK 36a3004a41
  pablomartin4btc:
    utACK 36a3004a41

Tree-SHA512: b6e2fc69cd7babcfa7f413f11304f4d648d6d64b3b526862664ccedb0016ad182b9e886aa4e8c33315e4c18824512e11a4fd6365f9c3c95093967d3ef7687e62
2023-10-13 11:16:33 +02:00
fanquake
448790c00a
Merge bitcoin/bitcoin#28639: refactor: Remove unused nchaintx from SnapshotMetadata constructor, fix test, add test
fafde92f84 test: Check snapshot file with wrong number of coins (MarcoFalke)
faa90f6e7b refactor: Remove unused nchaintx from SnapshotMetadata constructor (MarcoFalke)

Pull request description:

  See commit messages

ACKs for top commit:
  Sjors:
    utACK fafde92f84
  theStack:
    ACK fafde92f84

Tree-SHA512: 9ed2720b50d1c0938f30543ba143e1a4c6af3a0ff166f8b3eb452e1d99ddee6e3443a4c99f77efe94b8c3eb2feff984bf5259807ee8085e1e0e1e0d1de98227e
2023-10-13 11:14:54 +02:00
fanquake
9e068f9612
Merge bitcoin/bitcoin#28459: build: add -mbranch-protection=bti (aarch64) to hardening flags
61a6c3b0e9 build: add `-mbranch-protection=bti` to aarch64 hardening flags (fanquake)

Pull request description:

  This is a simpler (less hardening) version of https://github.com/bitcoin/bitcoin/pull/24123.

  You can inspect binaries using `readelf -n`, and look for BTI in a `.note.gnu.property`. i.e
  ```bash
  readelf -n src/bitcoin-cli

  Displaying notes found in: .note.gnu.property
    Owner                Data size Description
    GNU                  0x00000010NT_GNU_PROPERTY_TYPE_0
        Properties: AArch64 feature: BTI
  ```

  Related to https://github.com/bitcoin/bitcoin/issues/19075.

ACKs for top commit:
  TheCharlatan:
    utACK 61a6c3b0e9

Tree-SHA512: 64504de44e91d853165daf4111dca905d8eb9ef3f4bfb0d447c677b02c9100dbd56f13e6fe6539fb06c2343a094229591ac5d1bd9e184b32b512c0ac3f9bac36
2023-10-13 10:59:57 +02:00
MarcoFalke
ffffb4af83
scripted-diff: Use ser params operator
-BEGIN VERIFY SCRIPT-
 sed -i 's|WithParams(\([a-zA-Z:._]\+\), |\1(|g' $( git grep -l WithParams )
-END VERIFY SCRIPT-
2023-10-13 10:30:49 +02:00
MarcoFalke
fae9054793
test: Use SER_PARAMS_OPFUNC in serialize_tests.cpp 2023-10-13 10:30:42 +02:00
fanquake
504f1f30ed
Merge bitcoin/bitcoin#28547: ci: Work around podman stop intermittent failure
fa2c894cbb ci: move-only CI_CONTAINER_ID to 02_run_container.sh (MarcoFalke)
fa695b4df0 ci: Work around podman stop bug (MarcoFalke)
fa09a031c1 ci: Add set -ex to 02_run_container.sh (MarcoFalke)
fac9abbf47 ci: Rename 04_install to 02_run_container (MarcoFalke)

Pull request description:

  Sometimes, it seems that `podman stop` does not work. Presumably, it falls back to `podman kill`, which is async.

  Try to work around this intermittent issue by using the `rm --force` over `stop`.

  Example failing log https://cirrus-ci.com/task/4549784611061760?logs=ci#L238:

  ```
  Restart docker before run to stop and clear all containers started with --rm
  ++ podman container stop --all
  e4eca0766f87864d89fc230aa884a238c214cfbcd44cf76a4dbdb2a30c982009
  ++ echo 'Prune all dangling images'
  Prune all dangling images
  ++ docker image prune --force
  Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
  +++ docker run --cap-add LINUX_IMMUTABLE --rm --interactive --detach --tty --mount type=bind,src=/tmp/cirrus-build-1970593815,dst=/tmp/cirrus-build-1970593815,readonly --mount type=volume,src=ci_macos_cross_ccache,dst=/tmp/ccache_dir --mount type=volume,src=ci_macos_cross_depends,dst=/ci_container_base/depends --mount type=volume,src=ci_macos_cross_previous_releases,dst=/ci_container_base/prev_releases --env-file /tmp/env --name ci_macos_cross ci_macos_cross
  Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
  time="2023-09-27T20:55:39Z" level=warning msg="The input device is not a TTY. The --tty and --interactive flags might not work properly"
  Error: creating container storage: the container name "ci_macos_cross" is already in use by e4eca0766f87864d89fc230aa884a238c214cfbcd44cf76a4dbdb2a30c982009. You have to remove that container to be able to reuse that name: that name is already in use

ACKs for top commit:
  hebasto:
    ACK fa2c894cbb, I have reviewed the code and tested it locally.

Tree-SHA512: 31fca340c6bedaadf4dd51fa745d9b3969042cebc0c7c904ef18af3f2f986039ec4354ccdff1422fbf77cf223e4423857368dce53cfa67ef15c76b78d007eace
2023-10-13 10:24:07 +02:00
fanquake
151a2b189c
Merge bitcoin/bitcoin#28644: test: Fuzz merge with -use_value_profile=0 for now
faa190b1ef test: Fuzz merge with -use_value_profile=0 for now (MarcoFalke)

Pull request description:

  Seems odd that this has to be done, but for now there are (unknown) size limits on the qa-assets repo. Also, a larger size means that cloning and iterating over the files takes a longer time.

  Not sure how to measure the net impact of this, but with some backups reverting this commit, it can be limited on the downside?

ACKs for top commit:
  dergoegge:
    ACK faa190b1ef

Tree-SHA512: 9f8b3f4526f60e4ff6fca97859a725d145a8339c216bd15c92fad7e53f84308745fee47727527de459c0245ef9d474a9dc836fee599ab2b556b519bd900b9a33
2023-10-13 10:16:38 +02:00
fanquake
5ea4fc05ed
Merge bitcoin/bitcoin#28640: ci: Use clang-17 in Asan task
fa2843eba4 ci: Bump asan (MarcoFalke)

Pull request description:

  Needed to bump the EOL date and unlock clang-17.

ACKs for top commit:
  fanquake:
    ACK fa2843eba4

Tree-SHA512: 7d8b3b30ed65bd26f9640db8d06de8c27a9ad8a8160f9e645a97b99df867aa30508491dd8957a54edad724f8672ef1054041106d90ee826ba3e856176ab52afc
2023-10-12 17:18:00 +02:00
fanquake
bf8c41d251
Merge bitcoin/bitcoin#28641: ci: Drop no longer needed NOLINTNEXTLINE
79789ccafe ci: Drop no longer needed `NOLINTNEXTLINE` (Hennadii Stepanov)

Pull request description:

  After recent tool updates in the "tidy" CI task, the one instance of `NOLINTNEXTLINE` is not required anymore.

ACKs for top commit:
  fanquake:
    ACK 79789ccafe

Tree-SHA512: 382f3e0570f36a481498ac118ee30a34aabfd6285b21a67c19c74b240305315c5a118fb70f172b843a086262433462d45998e78306697be0ddfb20094733ee98
2023-10-12 17:04:24 +02:00
MarcoFalke
faa190b1ef
test: Fuzz merge with -use_value_profile=0 for now 2023-10-12 16:44:41 +02:00
MarcoFalke
fa2843eba4
ci: Bump asan 2023-10-12 13:07:06 +02:00
dergoegge
940a49978c Use type-safe txid types in orphanage 2023-10-12 11:56:37 +01:00
dergoegge
ed70e65016 Introduce types for txids & wtxids 2023-10-12 11:56:37 +01:00
Hennadii Stepanov
79789ccafe
ci: Drop no longer needed NOLINTNEXTLINE 2023-10-12 11:01:47 +01:00
fanquake
06d469c26b
Merge bitcoin/bitcoin#28629: test: fix usdt undeclared function errors on mantis
4077e43bf6 test: fix usdt undeclared function errors on mantis (willcl-ark)

Pull request description:

  This is one way to fix #28600

  Recently usage of undeclared functions became an error rather than a warning, in C2x. https://reviews.llvm.org/D122983?id=420290

  This change has migrated into the build tools of Ubuntu 23.10 which now causes the USDT tests to fail to compile, see
  https://github.com/bitcoin/bitcoin/issues/28600

  I think there are various potential fixes:

  1. Manually declare the functions we use
  2. Fix imports so that manual declarations aren't needed
  3. Revert the new C2X behaviour and don't error on implicit function declarations

  I would have preferred solution 2, but I believe this will require changes to the upstream bcc package. Having played with the imports I can get things working in a standalone C program, using system headers, but when building the program from a python context as we do in the test it uses its own headers (bundled with the python lib) rather than the system ones, and manually importing (some) system headers results in definition mismatches. I also investigated explicitly importing required headers from the package, which use paths like `#import </virtual/bcc/bcc_helpers.h>`, but this seems more obtuse and brittle than simply ignoring the warning.

  Therefore I think that until the upstream python pacakge fixes their declarations, we should fix this by setting `-Wno-error=implicit-function-declaration` for the tracing programs.

  cc maflcko 0xB10C

ACKs for top commit:
  maflcko:
    lgtm ACK 4077e43bf6

Tree-SHA512: 8368bb1155e920a95db128dc893267f8dab64f1ae53f6d63c6d9294e2e4e92bef8515e3697e9113228bedc51c0afdbc5bbcf558c119bf0eb3293dc2ced86b435
2023-10-12 12:00:12 +02:00
fanquake
a927d5cabe
Merge bitcoin/bitcoin#27228: test: exempt previous release binaries from valgrind
850670e3d6 test: don't run old binaries under valgrind (Sjors Provoost)

Pull request description:

  Some, but not all, backward compatibility tests fail for me and it seems useless to run old release binaries under valgrind anyway.

  Can be tested by running `test/functional/feature_txindex_compatibility.py --valgrind --timeout-factor=10` with and without this PR.

  —
  The previous version of this PR disabled these test entirely under valgrind. The current version does run the test, but starts the old binaries without valgrind.

ACKs for top commit:
  maflcko:
    lgtm ACK 850670e3d6

Tree-SHA512: ebdf461083f1292528e6619963b910f486b60b4f6b183f0aea2c8bfcafa98caeb204d138700cd288450643bcec5e49e12b89f2f7537fccdf495a2a33acd9cea0
2023-10-12 11:53:15 +02:00
MarcoFalke
fa05a726c2
tidy: modernize-use-emplace 2023-10-12 11:27:19 +02:00
MarcoFalke
fafde92f84
test: Check snapshot file with wrong number of coins
Also, fix a bug in an assert_debug_log call.
2023-10-12 11:14:56 +02:00
MarcoFalke
faa90f6e7b
refactor: Remove unused nchaintx from SnapshotMetadata constructor
Also, remove wrong nChainTx comment and cast.
2023-10-12 11:14:32 +02:00
fanquake
4a5aae9330
Merge bitcoin/bitcoin#28634: test: BIP324: add check for detection of missing garbage terminator
3bb51c29df test: BIP324: add check for missing garbage terminator detection (Sebastian Falbesoner)

Pull request description:

  This PR adds test coverage for the "missing garbage terminator" detection on incoming v2 transport (BIP324) connections:
  04265ba937/src/net.cpp (L1205-L1209)

  Note that this always happens at the same exact amount of bytes sent in (after 64 + 4095 + 16 = 4175 bytes), if at no point, the last 16 bytes of potential authentication data match the garbage, i.e. all the previous bytes after the ellswift pubkey. To keep it simple, we just send in zero-value bytes here and verify that the detection hits exactly after the last bytes is sent.

  AFAICT, with this PR all the v2 transport errors that can be triggered in this simple way of "just open a socket and send in a fixed byte-string" are covered. For more advanced test, we need BIP324 cryptography in the test framework in order to perform a v2 handshake etc. (PRs #28374, #24748).

ACKs for top commit:
  sipa:
    utACK 3bb51c29df
  laanwj:
    ACK 3bb51c29df

Tree-SHA512: f88275061c7c377a3d9f2608452671afc26deb6d5bd5be596de987c7e5042555153ffe681760c33bce2b921ae04e50f349ea0128a677e6443a95a079e52cdc5f
2023-10-12 09:35:07 +02:00
Sjors Provoost
850670e3d6
test: don't run old binaries under valgrind
This is unnecessary and caused test failures. The backward
compatibility tests are meant to find regressions in the
current codebase, not to detect bugs in older releases.
2023-10-12 09:25:44 +02:00