Obscure checkpoint/mempool interaction #2052

issue sipa opened this issue on November 29, 2012
  1. sipa commented at 10:27 PM on November 29, 2012: member

    Currently, this is possible:

    • Someone has a very old P2SH-invalid block in his block file
    • When importing this block file, it gets accepted (because script checks that would catch this are disabled before the last checkpoint)
    • It gets immediately reorganized when a later block is imported
    • When disconnecting, its transactions enter the memory pool, as again, signature checks are disabled
    • As long as not rebooted, this transaction remains in the mempool, and causes a (harmless) error to be reported when trying to construct a block

    Two solutions (and I think both are useful anyway):

    • During IBD, don't move disconnected transactions to the mempool at all
    • Do not disable signature checks from disconnected transactions entering the mempool

    Thanks to @gmaxwell for spotting a weird P2SH-invalid transaction in his mempool.

  2. gavinandresen commented at 2:04 AM on November 30, 2012: contributor

    I like the belt-and-suspenders approach of doing BOTH dropping disconnected transactions during IBD and always checking signatures when adding disconnected transactions to the memory pool.

    The second is especially important; I could imagine an edge case of a block chain re-org right at some rule-change threshold resulting in invalid-on-the-new-chain transactions in the memory pool.

  3. sipa commented at 11:47 PM on January 22, 2013: member

    Fixed by #2056

  4. sipa closed this on Jan 22, 2013

  5. MarcoFalke locked this on Sep 8, 2021

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-04-18 21:16 UTC

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