Skip to content

[31.x] Backports - #35046

Merged
achow101 merged 10 commits into
bitcoin:31.xfrom
fanquake:31_1_backports
May 6, 2026
Merged

achow101 merged 10 commits into
bitcoin:31.xfrom
fanquake:31_1_backports

Conversation

@fanquake fanquake added this to the 31.1 milestone Apr 10, 2026
@DrahtBot

DrahtBot commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

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

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/35046.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK achow101
Stale ACK optout21

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

LLM Linter (✨ experimental)

Possible places where comparison-specific test macros should replace generic comparisons:

  • [test/functional/test_framework/test_framework.py] assert(conn.handler_index < len(self._handlers)) -> assert_greater_than(len(self._handlers), conn.handler_index)

2026-05-05 13:15:17

vasild and others added 2 commits April 16, 2026 09:10
It is best if the internal addrman database is not modified with
information coming from private broadcast connections because that
information can potentially later be sent via other connections.

Co-authored-by: Greg Sanders <[email protected]>
Co-authored-by: Lőrinc <[email protected]>

Github-Pull: bitcoin#35032
Rebased-From: 1ed1a12
…hainstate.py

Apply the timeout factor inside the add_block function.

Also, force named args for the two expected strings.

Also, add trailing comma for style.

Github-Pull: bitcoin#35080
Rebased-From: fa02eb8

@optout21 optout21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

crACK 39455140b92a5a27307ff33b12b72eb43440b6b1

Looked through all 4 commits (as of 39455140b92a5a27307ff33b12b72eb43440b6b1), LGTM.

Comment thread doc/release-notes.md Resolved
optout21 and others added 5 commits April 21, 2026 11:07
The `Socks5Server` utility handles multiple incoming connections,
which are handled in separate background threads.
The `stop()` method unblocks and waits for the main background thread
cleanly, but it doesn't attempt to wait for any handler threads.
This change stores handler threads and connections, and attempts
to shut them down before `stop()` returns.

Co-authored-by: vasild <[email protected]>
Co-authored-by: w0xlt <[email protected]>

Github-Pull: bitcoin#34863
Rebased-From: 6ac4937
Needed in the next commit.

Co-Authored-By: David Gumberg <[email protected]>

Github-Pull: bitcoin#34425
Rebased-From: faa404e
Make the checks stricter and easier to follow:
* Fix a typo.
* After the first ban from node 1 wait until node 0 "sees" the ban.
* Move the restart_node out of the debug log context, to avoid bloat.
* Removed the timeout from the outer/lower exit stack to check "dropped
  (banned)\n" on node 1, because the inner/top exit stack waits longer.
* The inner/top exit stack checks for the both disconnections peer=2 and
  possibly peer=3 (for v2->v1 retry).
* And finally, add a redundant assert to confirm once more that node 0
  is has "seen" the ban.

Github-Pull: bitcoin#34425
Rebased-From: fa21edd
This waits for any disconnect (e.g. from a restart of one of the nodes)
to fully happen before the next connect.

Can be reviewed with the git option:

--color-moved=dimmed-zebra

Github-Pull: bitcoin#34425
Rebased-From: fab2772
…nect

The option is unused since the last removals in:
* 4c40a92, and
* 81bf3eb

It was brittle and lead to intermittent test issues. Generally, it is
also confusing, because if a test wanted to connect nodes without
checking their connection, it can use `addnode`, like the rpc_setban.py
test.

So fix all issues by removing it.

Github-Pull: bitcoin#34425
Rebased-From: fae807e
This effectively reverts a3cb309 from PR bitcoin#30194.

That PR reduced the multi_index type signatures as recommended upstream, but
this is no longer supported as of boost 1.91 because it is no longer necessary.
1.91 drops support for the pre-c++11 work-arounds that bloated the type
signatures to begin with.

The upstream `BOOST_MULTI_INDEX_ENABLE_MPL_SUPPORT` define is meant to provide
compatibility with removed features, but it does not work for this case. Using
`indexed_by` directly when defining the `multi_index` (as opposed to inheriting
from it) works with all versions, and avoids the use of the back-compat define.

This is a slight regression when building against boost < 1.91 because the
bloated type signatures are reintroduced in that case, but it's not significant
enough to go to the trouble of introducing version detection and ifdefs.

Github-Pull: bitcoin#35175
Rebased-From: 0bc9d35
l0rinc and others added 2 commits May 5, 2026 15:14
Docker 29.4.2 blocks `socketcall(2)` in the default seccomp profile:
https://docs.docker.com/engine/release-notes/29/#2942
https://github.com/moby/profiles/releases/tag/seccomp%2Fv0.2.2
moby/moby#52501

That affects the `i686, no IPC` job because it runs 32-bit Linux test binaries inside Docker.

Add Docker's documented `--security-opt seccomp=unconfined` workaround to this job's `CI_CONTAINER_CAP` - the hook `ci/test/02_run_container.py` already appends to `docker run`.

This restores socket availability for the 32-bit test binaries throughout the job:
https://docs.docker.com/engine/security/seccomp/#run-without-the-default-seccomp-profile

Github-Pull: bitcoin#35202
Rebased-From: 11c9ef9
@fanquake
fanquake requested a review from marcofleon May 5, 2026 13:24
@DrahtBot DrahtBot removed the CI failed label May 5, 2026
@achow101

achow101 commented May 6, 2026

Copy link
Copy Markdown
Member

ACK 6bb2b07

@DrahtBot
DrahtBot requested a review from optout21 May 6, 2026 09:13
@achow101
achow101 merged commit 42800d9 into bitcoin:31.x May 6, 2026
26 checks passed
@fanquake
fanquake deleted the 31_1_backports branch May 6, 2026 10:49
morozow pushed a commit to morozow/bitcoin_rd that referenced this pull request May 8, 2026
9cd0420 doc: update release notes for v31.x (fanquake)
f97d891 ci: unconfine seccomp for i686 no IPC (Lőrinc)
08b2435 multi_index: fix compilation failure with boost >= 1.91 (Cory Fields)
6b35260 test: Remove unused, confusing and brittle connect_nodes.wait_for_connect (MarcoFalke)
19e4dea test: Fix all races after a socket is closed gracefully (MarcoFalke)
fec034c test: Stricter checks in rpc_setban.py (MarcoFalke)
ebd0221 test: Add is_connected_to helper (MarcoFalke)
bd521c7 test: Add clean shutdown to Socks5Server (optout)
ef9e6c4 test: Add missing self.options.timeout_factor scale in tool_bitcoin_chainstate.py (MarcoFalke)
b462cc9 net_processing: don't modify addrman for private broadcast connections (Vasil Dimov)

Pull request description:

  Backports:
  * bitcoin#34425
  * bitcoin#34863
  * bitcoin#35032
  * bitcoin#35080
  * bitcoin#35175
  * bitcoin#35202

ACKs for top commit:
  achow101:
    ACK 9cd0420

Tree-SHA512: ea6827e7a1643f96e27ab5f26621f9d4c137df2cb03938d96f7bee82d11f66a61757c609a604653469a4699b3417a1659395d039bbf4348988c2ea4a34a26418
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants