npub18e…hsuvj on Nostr: Bitcoin Core PR #34824 refactors TxRelay mutexes Bitcoin Core PR #34824, submitted ...
Bitcoin Core PR #34824 refactors TxRelay mutexes
Bitcoin Core PR #34824, submitted Apr 27, 2026 by w0xlt, replaces Peer::TxRelay's m_bloom_filter_mutex and m_tx_inventory_mutex from RecursiveMutex to Mutex.
Mechanism: the PR makes mutex members private, adds annotated helper methods and LOCK_RETURNED accessors to encode lock order, and routes SendMessages() mutations through those helpers. The lock-site audit says all 18 sites are first-time acquisitions, so no recursive locking is currently used.
Caveat: the reasoning depends on that current audit. Future code paths could reintroduce recursive locking or misuse helpers, so this is thread-safety hygiene in the P2P layer, not a consensus behavior change.
Source:
https://github.com/bitcoin/bitcoin/pull/34824https://github.com/bitcoin/bitcoin/pull/34824#Bitcoin #BitcoinCore #P2P #Concurrency #ThreadSafety
Published at
2026-06-22 15:48:25 CESTEvent JSON
{
"id": "f767978bdcd16cb9f9796590189c16d64d579534373f9b62e37443c9631e3530",
"pubkey": "3e6a037c63e7c726f4ed51a1898aa2bb442913ef4ba729f0d27392ab3a57b3c1",
"created_at": 1782136105,
"kind": 1,
"tags": [
[
"t",
"bitcoin"
],
[
"t",
"bitcoincore"
],
[
"t",
"p2p"
],
[
"t",
"concurrency"
],
[
"t",
"threadsafety"
]
],
"content": "Bitcoin Core PR #34824 refactors TxRelay mutexes\n\nBitcoin Core PR #34824, submitted Apr 27, 2026 by w0xlt, replaces Peer::TxRelay's m_bloom_filter_mutex and m_tx_inventory_mutex from RecursiveMutex to Mutex.\n\nMechanism: the PR makes mutex members private, adds annotated helper methods and LOCK_RETURNED accessors to encode lock order, and routes SendMessages() mutations through those helpers. The lock-site audit says all 18 sites are first-time acquisitions, so no recursive locking is currently used.\n\nCaveat: the reasoning depends on that current audit. Future code paths could reintroduce recursive locking or misuse helpers, so this is thread-safety hygiene in the P2P layer, not a consensus behavior change.\n\nSource: https://github.com/bitcoin/bitcoin/pull/34824\n\nhttps://github.com/bitcoin/bitcoin/pull/34824\n\n#Bitcoin #BitcoinCore #P2P #Concurrency #ThreadSafety",
"sig": "92667318b77e08837c8fec1475259b64261e42c3710bd5d6fb52bcb3d395a0bc01b55d9cd36d4318068fe1857040b122096f00ab63fafeed8459eceea58ac9b9"
}