Skip to content

Update libmultiprocess subtree to add ThreadMap.makePool method#35661

Merged
fanquake merged 2 commits into
bitcoin:masterfrom
ryanofsky:pr/subtree-11
Jul 7, 2026
Merged

Update libmultiprocess subtree to add ThreadMap.makePool method#35661
fanquake merged 2 commits into
bitcoin:masterfrom
ryanofsky:pr/subtree-11

Conversation

@ryanofsky

Copy link
Copy Markdown
Contributor

The changes can be verified by running test/lint/git-subtree-check.sh src/ipc/libmultiprocess as described in developer notes and lint instructions.

Changes since last subtree update (#34977):

  • Adds makePool method on ThreadMap to support thread pool routing, allowing requests without a specific client thread to be dispatched to a pool using a shortest-queue strategy (#283).
  • Adds std::unordered_set support, a BuildList helper, and a ReadList helper to reduce duplication in list build and read handlers (#277, #285).
  • Adds support for translating C++ std::optional<T> struct fields to pairs of T + hasT :Bool Cap'n Proto struct fields, allowing unset optional primitive fields to be represented (#243).
  • Produces more readable log output for Proxy object lifecycle events and IPC server-side failures (#218).
  • Handles exceptions thrown by destroy methods by logging instead of aborting (#273). This can prevent server crashes when non-libmultiprocess clients disconnect without destroying objects, in the case where a server object owns client objects and the server destructor tries to call the disconnected client to free them (#219).
  • Handles unexpected exceptions thrown by callbacks (that should never happen) by logging errors instead of deadlocking (#260).
  • Fixes a rare mptest hang on musl builds caused by a lost wakeup bug in Waiter (#295).
  • Fixes a race condition in a log print detected by TSan (#286).
  • Build improvements: makes target_capnp_sources work correctly when libmultiprocess is used as a CMake subproject (#289), adds mp_headers target for better lint tool support (#291), and fixes compatibility with recent Nix and CMake 4.0 (#238).
  • Test, CI, documentation, and minor code improvements: design document corrections (#278), field constant comments (#279), clang-tidy fix (#292), new smoke test for double-precision float values (#294), new test for recursive async IPC calls (#301), removal of libevent from Core CI builds (#299), and rename of EventLoop::m_num_clients to m_num_refs (#302).

ryanofsky added 2 commits July 5, 2026 16:57
…ea02

16bf05dea02 Merge bitcoin-core/libmultiprocess#302: refactor: rename EventLoop::m_num_clients to m_num_refs
dd537da9e40 Merge bitcoin-core/libmultiprocess#301: test: recursive async IPC calls and cleanups
400291de000 Merge bitcoin-core/libmultiprocess#299: ci: remove libevent from Core CIs
092be515adf Merge bitcoin-core/libmultiprocess#285: Add ReadList helper
5b617880c51 Merge bitcoin-core/libmultiprocess#283: Add `makePool` method on `ThreadMap`
d4998304154 refactor: rename EventLoop::m_num_clients to m_num_refs
6450345c985 type: reserve first when reading std::unordered_set
4d0f8db5f99 proxy: add ReadList helper and dedup map/set/vector read handlers
0e49d911867 Add `makePool` method on `ThreadMap`
5519f7f9485 test: recursive async IPC calls
a29ceff40bc ci: remove libevent from Core CIs
8412fcdc659 Merge bitcoin-core/libmultiprocess#295: Mark Waiter m_cv as guarded by m_mutex
1593ee2d18a Merge bitcoin-core/libmultiprocess#294: test: Add passDouble smoke test
9885d7dd33c Merge bitcoin-core/libmultiprocess#286: proxy-client: fix TSan data race in clientDestroy
fa35501c4f0 Mark Waiter m_cv as guarded by m_mutex
faaedb11f8a test: Add passDouble smoke test
733c64318d1 Merge bitcoin-core/libmultiprocess#292: type-number: fix clang-tidy modernize-use-nullptr
9cc3479ab33 Merge bitcoin-core/libmultiprocess#291: cmake: Add `mp_headers` custom target
201abd9e3a5 Merge bitcoin-core/libmultiprocess#289: cmake: make target_capnp_sources use CURRENT dirs
99820c8aecb Merge bitcoin-core/libmultiprocess#279: doc: Add comments to FIELD_* constants in proxy.h
73b985540c5 Merge bitcoin-core/libmultiprocess#278: doc: Fix and expand design.md
e7e91b2e23e Merge bitcoin-core/libmultiprocess#277: Add std::unordered_set support and a helper BuildList to dedup list build handlers
91a951f59ac tidy fix: modernize-use-nullptr
16362f42d01 cmake: Add `mp_headers` custom target
615a94fe3a2 cmake: document ONLY_CAPNP option in target_capnp_sources
90982f75c6b mpgen: iwyu changes required by previous commit
25bb3e67f39 proxy-client: fix TSan data race in clientDestroy
620f297f311 cmake: make target_capnp_sources use CURRENT dirs
9de4b885aa6 test: use camelCase + $Proxy.name for FooStruct fields
011b91793dd type: add std::unordered_set support
20d19b9644e proxy: add BuildList helper and dedup map/set/vector build handlers
e863c6cdf61 doc: Add comments to FIELD_* constants in proxy.h
18db0ab9570 doc: Fix and expand design.md
61de6975362 Merge bitcoin-core/libmultiprocess#273: proxy-client: tolerate exceptions from remote destroy during cleanup
9cec9d6ca55 Merge bitcoin-core/libmultiprocess#243: mpgen: support primitive std::optional struct fields
4aaff113745 Merge bitcoin-core/libmultiprocess#238: cmake, ci: updates for recent nixpkgs
2ac55a56b58 Merge bitcoin-core/libmultiprocess#218: Better error and log messages
6de92e1c732 proxy-client: tolerate exceptions from remote destroy during cleanup
90be8354d47 test: regression for ~ProxyClient destroy after peer disconnect
3c69d125a17 Merge bitcoin-core/libmultiprocess#260: event loop: tolerate unexpected exceptions in `post()` callbacks
b8a48c65e60 event loop: tolerate unexpected exceptions in `post()` callbacks
f787863d2cd Merge bitcoin-core/libmultiprocess#270: doc: Bump version 10 > 11
a22f6029103 doc: Bump version 10 > 11
4eae445d6d8 debug: Add TypeName() function and log statements for Proxy objects being created and destroyed
f326c5b1b7b logging: Add better logging on IPC server-side failures
6dbfa56a040 mpgen: support primitive std::optional struct fields
8d1277deb55 mpgen refactor: add AccessorType function
db716bbcba7 mpgen refactor: Move field handling code to FieldList class
db7acb3ce27 ci: Fix shell.nix compatibility with CMake 4.0
91a7759a9ab cmake: Fix IWYU in nix by adding CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES

git-subtree-dir: src/ipc/libmultiprocess
git-subtree-split: 16bf05dea02651f75733ff08531181aa774fc5a8
@DrahtBot

DrahtBot commented Jul 5, 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/35661.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK fanquake, hebasto

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #35037 (ipc: support per-address max-connections options on -ipcbind by enirox001)
  • #29409 (multiprocess: Add capnp wrapper for Chain interface by ryanofsky)
  • #19461 (multiprocess: Add bitcoin-gui -ipcconnect option by ryanofsky)
  • #19460 (multiprocess: Add bitcoin-wallet -ipcconnect option by ryanofsky)
  • #10102 (Multiprocess bitcoin by ryanofsky)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@fanquake

fanquake commented Jul 6, 2026

Copy link
Copy Markdown
Member

ACK 02afa66

@hebasto hebasto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK 02afa66.

@fanquake fanquake merged commit ec5edcd into bitcoin:master Jul 7, 2026
28 checks passed
oleonardolima added a commit to oleonardolima/rust-bitcoinkernel that referenced this pull request Jul 9, 2026
…05fc7ab

81405fc7ab Merge bitcoin/bitcoin#35689: test: Inline incorrect check in `util_tests`
cd2a4bc510 test: Redeclare variable as signed in `util_tests`
6f1c56f03a Merge bitcoin/bitcoin#35670: net: optimize compact block extra tx iteration
e94fda8a40 Merge bitcoin/bitcoin#35685: doc: Archive 30.3 release notes
5223cf1795 Merge bitcoin/bitcoin#35616: refactor: Use u64 over size_t for all cache sizes to fix a 32-bit overflow
c0e91efdb3 Merge bitcoin/bitcoin#35295: validation: fetch block input prevouts in parallel during ConnectBlock
f0da26cfc8 Merge bitcoin/bitcoin#34997: p2p: Don't participate in addr relay with feelers
443179a9eb doc: Archive 30.3 release notes
fabafd91f1 refactor: Use u64 over size_t for all cache sizes to fix a 32-bit overflow
32941e1314 Merge bitcoin/bitcoin#35649: depends: move FreeBSD SDK handling to CI
f379d716b1 Merge bitcoin/bitcoin#35669: doc: archive release notes for v31.1
881bb7b355 Merge bitcoin/bitcoin#35673: refactor: Move LoadGenesisBlock to ChainstateManager
3f3e644beb Merge bitcoin/bitcoin#35678: private broadcast: define and use new RPC_LIMIT_EXCEEDED error code ( + other follow-ups)
e3b026bf56 Merge bitcoin/bitcoin#34020: mining: add getTransactions(ByWitnessID) IPC methods
62f9089343 Merge bitcoin/bitcoin#35386: doc: add an AI contribution policy
fa615bd163 refactor: Move LoadGenesisBlock to ChainstateManager
8ac222484c private broadcast: remove no-op [[nodiscard]]
191bdcba26 test: align test better with described scenario
7ad311be18 test: use BOOST_CHECK_EQUAL for PrivateBroadcast::AddResult
82a02a2a22 rpc: define and use new  RPC_LIMIT_EXCEEDED error code
a64df338e6 Merge bitcoin/bitcoin#35651: doc: Improve offline-signing-tutorial after 32489
4498fa5d5b Merge bitcoin/bitcoin#35406: private broadcast: limit outstanding txs to count of 10,000
ec5edcd72b Merge bitcoin/bitcoin#35661: Update libmultiprocess subtree to add `ThreadMap.makePool` method
ea67fea062 Merge bitcoin/bitcoin#35464: kernel: Add function for creating chainparams with a signet challenge
a7b5f23bb8 Merge bitcoin/bitcoin#35667: refactor: Use `NetworkErrorString` for macOS code in `netif.cpp`
69fc991791 Merge bitcoin/bitcoin#32606: p2p: Drop unsolicited CMPCTBLOCK from non-HB peer and when blocksonly
1a3cbf1bd2 net: optimize compact block extra tx iteration
bc33509ae2 Merge bitcoin/bitcoin#35650: doc: Add release notes for 32489 (exportwatchonlywallet RPC)
2b6e767d96 doc: archive release notes for v31.1
b0735336ee p2p: Don't participate in addr relay with feeler connections
302733fd96 Merge bitcoin/bitcoin#35652: init: fix reindex deadlock by waking cv after interrupt
c1313b199f init: wake genesis wait after ImportBlocks() returns
eccb04a321 refactor: Use `NetworkErrorString` for macOS code in `netif.cpp`
f79ecfd9c7 Merge bitcoin/bitcoin#35658: refactor: Drop unneeded `<sys/types.h>` include before `<ifaddrs.h>`
22ac4ad949 ci: ensure we use correct lld version in OpenBSD job
495f43f7b3 ci: FreeBSD 15.1
244739db9d depends: move FreeBSD SDK handling to CI
bab0120053 Merge bitcoin/bitcoin#35621: validation: Ignore eventual error message from flushing in AcceptBlock
02afa66169 Merge commit '6b0a907302364649dcaffeb0340b985f14141b4e' into pr/subtree-11
6b0a907302 Squashed 'src/ipc/libmultiprocess/' changes from 3edbe8f67c1..16bf05dea02
22c328d388 refactor: Drop unneeded `<sys/types.h>` include before `<ifaddrs.h>`
2063f02bd5 Merge bitcoin/bitcoin#35510: test: SOCKS5 proxy: expect that connection may be reset during SOCKS5 handshake or data forwarding
1360001f43 Merge bitcoin/bitcoin#34959: wallet: Enforce BDB btree levels and overflow item sizes
10ffef4b3b Merge bitcoin/bitcoin#35604: log: expose `-logratelimit` in normal help
b393985aa0 Merge bitcoin/bitcoin#35634: txospenderindex: use zero-byte entry values
1835f2fcbf Merge bitcoin/bitcoin#35653: fuzz: Remove `ConsumeUniValue`
9f3e427228 fuzz: Remove ConsumeUniValue
68cb7840d2 doc: improve offline-signing-tutorial after 32489
32ddfc92d9 Merge bitcoin/bitcoin#35599: doc: Add release notes for #33671 (getbalances nonmempool field)
f56804bcf5 Merge bitcoin/bitcoin#35640: ci: use a 8x instance over 16x for riscv job
239d6c5260 Merge bitcoin/bitcoin#35614: HTTPServer: Prevent race condition between worker thread and I/O thread
cddbad325d doc: Add release notes for 32489 (exportwatchonlywallet RPC)
0a1bbec688 Merge bitcoin/bitcoin#32489: wallet: Add `exportwatchonlywallet` RPC to export a watchonly version of a wallet
4a007126fb Merge bitcoin/bitcoin#35147: depends: Boost 1.91.0-1
31abaa264c doc: add an AI contribution policy
a15bdc0598 doc: update offline-signing-tutorial to use exportwatchonlywallet rpc
a388076401 test: Test for exportwatchonlywallet
d053e3e5c8 wallet, rpc: Add exportwatchonlywallet RPC
444878efef wallet: Add CWallet::ExportWatchOnly
f9273f01db wallet: Move listdescriptors retrieving from RPC to CWallet
a1c83789a7 wallet: Write new descriptor's cache in AddWalletDescriptor
1e996640e6 wallet: Use Descriptor::CanSelfExpand() in CanGetAddresses()
d2ee9227da descriptor: Add CanSelfExpand()
2990bd7735 Merge bitcoin/bitcoin#35118: fuzz: add ipc round-trip fuzz target
fb1d152c24 depends: Boost 1.91.0-1
ba48852f9e Merge bitcoin/bitcoin#35438: test: introduce NodeSigner, run feature_taproot.py without wallet compiled
47bbed052e ci: use true|false over "true|false"
9a25bc3989 ci: use a 8x instance over 16x
9871dc7ab4 Merge bitcoin/bitcoin#31425: CI: Add Riscv bare metal job
113402286e doc: add txospenderindex release note
ce06878288 index: shrink txospenderindex value markers
a99148d576 test kernel: Don't log on warnings change
5b4fd284f4 kernel: Generate a signet with a challenge
037ad77071 fuzz: add IPC round-trip target
a8823c0996 Merge bitcoin/bitcoin#35607: nanobench: fix performance counter buffer initialization
f26c15bdd2 Merge bitcoin/bitcoin#35397: ci: add OpenBSD Clang cross job
91586f701e test: introduce NodeSigner, run feature_taproot.py without wallet compiled
771200ca43 test: return full keypair from `getnewdestination` helper
4e29de719e private broadcast: add release note for limited cap
cbf8c107c1 Release cs_main between individual private tx re-attempts
5aea3d0373 private broadcast: limit outstanding txs to count of 10,000
dc282ff31d Merge bitcoin/bitcoin#35597: logging: More fully remove libevent log category
ec98037f7a Merge bitcoin/bitcoin#35615: fuzz: restore CreateSock in PCP targets
43d89bb6e1 Merge bitcoin/bitcoin#35610: bitcoin-util: Add netmagic command
e35c805489 Merge bitcoin/bitcoin#35129: test: add fuzz test for private broadcast
dc1c17c085 doc: add release notes
0e10937184 fuzz: add coins_view_stacked fuzz harness to test concurrent leveldb reads
ce610a6ff4 fuzz: update harnesses to cover CoinsViewOverlay::StartFetching
760fb22dc3 test: add unit tests for CoinsViewOverlay::StartFetching
d69a3b20de doc: update CoinsViewOverlay docstring to describe parallel fetching
ab2a379237 coins: fetch inputs in parallel
fdf283036a coins: add ready flag to InputToFetch
ede11b8314 validation: collect block inputs in CoinsViewOverlay before ConnectBlock
f82043af50 coins: introduce thread pool in CoinsViewOverlay
5bf1c32008 validation: add -prevoutfetchthreads configuration option
a318f43254 bitcoin-util: Add netmagic command
256482ab56 validation: In AcceptBlock, ignore flush result
3c76bd4356 Merge bitcoin/bitcoin#35603: build: QRencode cleanups
f595daf1dd test: ensure HTTPServer race condition is fixed
b98b10c072 test: introduce a worker thread in http socket error test
922b08d375 test: socket error handling in HTTPServer using ErrorSock mock socket
73da2a8a52 http: prevent race condition between worker thread and I/O thread
57b3bf8496 Merge bitcoin/bitcoin#35609: ci: Bump tsan config to ubuntu:26.04 with -U_FORTIFY_SOURCE
d64ea15824 ci: add openBSD cross CI job
5404b62074 depends: add openbsd_LDFLAGS
2a9e35d293 Merge bitcoin/bitcoin#35588: scripted-diff: Rename `Sock::{RECV,SEND,ERR}`
a0e5e30010 fuzz: restore CreateSock in PCP targets
41ceea400e scripted-diff: Rename `StatusLevel::{INFO,WARN,ERR}`
f395acdeee scripted-diff: Rename `Sock::{RECV,SEND,ERR}`
7a74f65293 Merge bitcoin/bitcoin#35536: fuzz: share a single mocked steady clock across FuzzedSock instances
e1290ce7f7 Merge bitcoin/bitcoin#35543: test: introduce ExtendedPrivateKey and ExtendedPublicKey classes
7ac25c9177 util, refactor: Rename local `ERR` in `Sock::Accept`
bbbbab86a8 ci: Bump tsan config to ubuntu:26.04 with -U_FORTIFY_SOURCE
095596ddf7 log: expose -logratelimit option
ea9afb61a1 Merge bitcoin/bitcoin#35602: doc: Clarify build docs about `pkgconf` / `pkg-config` requirements
672eedc46b Merge bitcoin/bitcoin#35220: fuzz: connman: strengthen assertions and extend coverage
0e5c718d8a Merge bitcoin/bitcoin#35506: test: ensure group data cluster pointers are live
b6b1d0653a nanobench: fix perf counter buffer init
93012d7ff9 Merge bitcoin/bitcoin#35601: wallet: remove experimental warning from send and sendall
829255c8be cmake: Remove `SelectLibraryConfigurations` from `FindQRencode` module
5c55606da9 depends: Remove unused `lib/pkgconfig` in `qrencode` package
402ba10b20 cmake: Drop optional `PkgConfig` use in `FindQRencode` module
8ebfff0f88 doc: add send RPC release note
fb8a103886 doc: Clarify build docs about `pkgconf` / `pkg-config` requirements
5884f5a4fa wallet: remove experimental warning from send RPCs
7b84e5106c Merge bitcoin/bitcoin#35595: ci: remove some packages from Chimera job
58560c281d ci: remove some packages from Chimera job
295ce6f45c Merge bitcoin/bitcoin#35576: test: raise `feature_reindex` RPC timeout
b36730a3ef  Add CI job for riscv bare metal
bfdbf513f6 Add CI job for producing a static bare metal binary
a9a1d92a1d build: Add option for building for bare metal envs
9b2ef81757 doc: add release notes for #33671 (getbalances nonmempool field)
633044f143 Merge bitcoin/bitcoin#35266: rpc, wallet: add an option to not load the wallet after migrating
d6269e2a90 Merge bitcoin/bitcoin#35594: fuzz: cover async chainstate compaction
3765b428d1 logging: More fully remove libevent log category
703a671fbc fuzz: compact coins view db during fuzzing
0868c85fd5 refactor: rename async coin compaction
6fa4132298 fuzz: share a single mocked steady clock across FuzzedSock instances
8791c4764c test: use ExtendedPrivateKey in wallet_taproot.py
89ceafafb9 test: use ExtendedPrivateKey in wallet_listdescriptors.py
bbfffcab58 test: use ExtendedPrivateKey in wallet_send.py
2ab6e590f7 test: use ExtendedPrivateKey in wallet_keypool.py
9e20118720 test: use ExtendedPrivateKey in wallet_fundrawtransaction.py
06af0cddbb test: use ExtendedPrivateKey in wallet_descriptor.py
4100fac20e test: use ExtendedPrivateKey in wallet_createwallet.py
ff3f6def9a test: use ExtendedPrivateKey in wallet_bumpfee.py
003f2a01f6 test: use ExtendedPrivateKey in feature_notifications.py
f988e6d6e6 test: use ExtendedPrivateKey in wallet_importdescriptors.py
0cdd817a82 add release note
517d37ce3e test: tests wallet migration with load_wallet disabled
b98dd63da7 rpc: Add load_wallet argument to migratewallet RPC
4acd063ba6 wallet: make loading the wallet after migrating optional
1a3cfdf1b7 fuzz: connman: cover AddLocalServices/RemoveLocalServices
c507fb3063 fuzz: connman: add outbound-bytes invariants
4a6fce43ea fuzz: connman: add AddNode/RemoveAddedNode invariants
9e6546c517 test: raise reindex mining RPC timeout
d2a03d50ac test: add extendedkey.py unit tests by using BIP32 test vectors
afdb378082 test: introduce ExtendedPrivateKey and ExtendedPublicKey classes
55e3a57f22 qa: Avoid UTXO reuse between test functions
9c5dd2926a p2p: Ignore CMPCTBLOCK from peer that hasn't sent SENDCMPCT
bf9884f4e5 p2p: make blocksonly nodes ignore CMPCTBLOCK messages
92cea63c71 test: (Un)solicited invalid cb -> get disconnected.
e845e26344 test: p2p: Nodes ignore unsolicited CMPCTBLOCK's
8313591715 p2p: Drop unsolicited CMPCTBLOCK from non-HB peer
44f377a71f refactor: test: Static assert_highbandwidth_states
25457a3272 test: Tighten getblocktxn checks in parallel cb reconstruction test.
2ee4fafa3f test: add fuzz test for private broadcast
08b7c61fc7 private broadcast: enforce sending to unique node ids
9a8ef9b0a3 test: SOCKS5 proxy: expect that connection may be reset during handshake
eb3208364a test: SOCKS5 proxy: expect that connection may be reset when forwarding
4dbaa7cc65 test: generalise byte_to_base58 utility function to allow more version types
df9eb72b12 test: ensure group data cluster pointers are live
a5859edef4 fuzz: connman: set m_local_services/m_use_addrman_outgoing/m_max_automatic_connections
4b84c9125a fuzz: connman: add network activity invariants
9784818442 mining: add getTransactionsByWitnessID() IPC method
d282ae6883 mining: add getTransactionsByTxID() IPC method
0d5e4d4712 test: restart node after IPC option override test
f16b3613cd ipc: Serialize null CTransactionRef as empty Data
0f466e1094 mempool: add lookup by witness hash
51dd90fb50 refactor: Merge announce_cmpct_block() defs into one
97d08d62ba refactor: store wallet names to MigrationResult
8a739a5510 build: allow ipc fuzz builds
b2de59d486 wallet, bdbro: Validate btree page levels
dc3a2b9c3b wallet, bdbro: Enforce overflow data lengths

git-subtree-dir: libbitcoinkernel-sys/bitcoin
git-subtree-split: 81405fc7abbd1889f3978b8924e7acbe12b3403b
fanquake added a commit that referenced this pull request Jul 10, 2026
… option

707d0de Squashed 'src/ipc/libmultiprocess/' changes from 16bf05dea02..28e056576a3 (Ryan Ofsky)

Pull request description:

  The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh).

  Change since last subtree update (#35661):

  - Adds an optional `max_connections` parameter to `ListenConnections` ([#269](bitcoin-core/libmultiprocess#269))

  This is needed for #35037 which lets the maximum number of IPC of incoming connections be configured in bitcoin core.

ACKs for top commit:
  sedited:
    ACK a9d1b65

Tree-SHA512: 1c3ec5c4eb98717c7414a32a3faf63e551b402f7318146745d840fb0e80cbd9e5006892476eb0869eb659cc551ac26d7a3fb2e43509883fb276ac0639a2a7c79
Kino1994 pushed a commit to Kino1994/bitcoin-full-history that referenced this pull request Jul 10, 2026
…hreadMap.makePool` method

6b0a907 Squashed 'src/ipc/libmultiprocess/' changes from 3edbe8f67c1..16bf05dea02 (Ryan Ofsky)

Pull request description:

  The changes can be verified by running `test/lint/git-subtree-check.sh src/ipc/libmultiprocess` as described in [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#subtrees) and [lint instructions](https://github.com/bitcoin/bitcoin/tree/master/test/lint#git-subtree-checksh).

  Changes since last subtree update (#34977):

  - Adds `makePool` method on `ThreadMap` to support thread pool routing, allowing requests without a specific client thread to be dispatched to a pool using a shortest-queue strategy ([#283](bitcoin-core/libmultiprocess#283)).
  - Adds `std::unordered_set` support, a `BuildList` helper, and a `ReadList` helper to reduce duplication in list build and read handlers ([#277](bitcoin-core/libmultiprocess#277), [#285](bitcoin-core/libmultiprocess#285)).
  - Adds support for translating C++ `std::optional<T>` struct fields to pairs of `T` + `hasT :Bool` Cap'n Proto struct fields, allowing unset optional primitive fields to be represented ([#243](bitcoin-core/libmultiprocess#243)).
  - Produces more readable log output for Proxy object lifecycle events and IPC server-side failures ([#218](bitcoin-core/libmultiprocess#218)).
  - Handles exceptions thrown by `destroy` methods by logging instead of aborting ([#273](bitcoin-core/libmultiprocess#273)). This can prevent server crashes when non-libmultiprocess clients disconnect without destroying objects, in the case where a server object owns client objects and the server destructor tries to call the disconnected client to free them ([#219](bitcoin-core/libmultiprocess#219)).
  - Handles unexpected exceptions thrown by callbacks (that should never happen) by logging errors instead of deadlocking ([#260](bitcoin-core/libmultiprocess#260)).
  - Fixes a rare mptest hang on musl builds caused by a lost wakeup bug in `Waiter` ([#295](bitcoin-core/libmultiprocess#295)).
  - Fixes a race condition in a log print detected by TSan ([#286](bitcoin-core/libmultiprocess#286)).
  - Build improvements: makes `target_capnp_sources` work correctly when libmultiprocess is used as a CMake subproject ([#289](bitcoin-core/libmultiprocess#289)), adds `mp_headers` target for better lint tool support ([#291](bitcoin-core/libmultiprocess#291)), and fixes compatibility with recent Nix and CMake 4.0 ([#238](bitcoin-core/libmultiprocess#238)).
  - Test, CI, documentation, and minor code improvements: design document corrections ([#278](bitcoin-core/libmultiprocess#278)), field constant comments ([#279](bitcoin-core/libmultiprocess#279)), clang-tidy fix ([#292](bitcoin-core/libmultiprocess#292)), new smoke test for double-precision float values ([#294](bitcoin-core/libmultiprocess#294)), new test for recursive async IPC calls ([#301](bitcoin-core/libmultiprocess#301)), removal of libevent from Core CI builds ([#299](bitcoin-core/libmultiprocess#299)), and rename of `EventLoop::m_num_clients` to `m_num_refs` ([#302](bitcoin-core/libmultiprocess#302)).

ACKs for top commit:
  fanquake:
    ACK cd09e20
  hebasto:
    ACK cd09e20.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants