BitDevs Wiki

Source

Transcript

Inventory Send Queue Rework (Bitcoin Core Dev Tech, May 2026)

Bitcoin Core Dev Tech 2026 (notes via Bitcoin Transcripts)May 6, 2026

Added to the wiki June 17, 2026 at 06:14 PM UTC · full text archived June 17, 2026 at 06:14 PM UTC

Bitcoin Core keeps a per-peer queue of transactions to announce (invs_to_send). Because inbound transactions are not rate-limited (only outbound announcements are), these queues can grow large, and memory usage scales with the number of peers — a problem that worsens as peer counts increase.

PR #34628 proposes a global backlog queue that is used when traffic grows too large, falling back to the per-peer queues under normal conditions. The backlog is sorted by feerate once rather than per peer, and draining is governed by token buckets. The tradeoffs are added complexity (more data structures) and no deduplication in the backlog, plus extra latency for low-feerate transactions (which must wait for the backlog to clear), while top-of-mempool transactions see little delay. Room sentiment was "ship it."

Appears in