Bug: Race Condition in Mempool Fee Estimation Leading to Consensus Failure #34584

issue vishalharkal15 openend this issue on February 13, 2026
  1. vishalharkal15 commented at 6:10 pm on February 13, 2026: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    When transactions are re-admitted to the mempool during block reorganizations, a race condition exists between UpdateTransactionsFromBlock() and LimitMempoolSize() that causes:

    Stale UTXO cache (m_view) data used for transaction validation Valid transactions incorrectly rejected with “mempool full” Inconsistent mempool state across nodes during reorg windows Potential consensus divergence between peers Affected Code: validation.cpp lines 300-400 (MaybeUpdateMempoolForReorg) and lines 585-900 (MemPoolAccept class)

    Expected Behaviour UTXO cache should be properly synchronized after mempool state changes Transaction validation must use current, accurate coin data All nodes should reach consistent mempool state regardless of timing No race conditions between mempool trimming and transaction acceptance

    Expected behaviour

    Mempool fee calculations should remain consistent and accurate during block reorganizations UTXO cache (m_view) must be properly synchronized after any mempool state change Transaction validation should use fresh, accurate coin data No race conditions should exist between mempool trimming and fee estimation All nodes should reach consensus on mempool contents regardless of timing

    Steps to reproduce

    Run Bitcoin Core with near-full mempool: bitcoind -maxmempool=300 -debug=mempool -regtest

    2.Generate blocks and fill mempool to ~90% capacity 3.Trigger manual reorg (2-3 blocks deep): bitcoin-cli invalidateblock <block_hash> bitcoin-cli reconsiderblock <block_hash> 3.During the reorg window, broadcast transactions with borderline fees (near mempool minimum) 4.Observe inconsistent acceptance across nodes - some accept, others reject as “mempool full”

    Relevant log output

    2026-02-13T10:23:45Z [mempool] replacing mempool tx abc123… (fees=500, vsize=250) 2026-02-13T10:23:45Z [validation] AcceptToMemoryPool: tx REJECTED (reason: mempool full) 2026-02-13T10:23:45Z [validation] BUG! PLEASE REPORT THIS! CheckInputScripts failed 2026-02-13T10:23:46Z [mempool] transaction failed: mempool full (code 64)

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    Bitcoin Core version v30.99.0-dev

    Operating system and version

    Ubuntu 22.04 LTS Also reproducible on macOS 13+ and Windows 10/11

    Machine specifications

    No response

  2. vishalharkal15 referenced this in commit 646db42684 on Feb 13, 2026
  3. vishalharkal15 referenced this in commit dca622c12d on Feb 13, 2026
  4. vishalharkal15 referenced this in commit dbff2b5e77 on Feb 13, 2026
  5. bhavyagupta999 referenced this in commit e1a2e1ca93 on Feb 15, 2026
  6. fanquake closed this on Feb 16, 2026


vishalharkal15


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-02-17 06:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me