Fix reorganization crash #2876

pull sipa wants to merge 2 commits into bitcoin:master from sipa:fixreorgcrash changing 4 files +61 −8
  1. sipa commented at 6:49 PM on August 3, 2013: member

    This is a potential fix for the bug that causes several miner nodes to crash a few days ago.

    The problem: when a block is disconnected, the transactions in it are attempted to be moved to the mempool; if some of these are non-standard, this will fail. If there were transactions in the mempool already that depended one or more of those, they become orphan transactions - which breaks the mempool's consistency assumption.

    In addition, this pull request adds a CTxMempool::check() method which runs an extensive consistency check on the mempool, and is called from several places when -checkmempool is passed (a non-documented flag).

  2. sipa commented at 8:50 PM on August 3, 2013: member

    Small update: made -checkmempool default in regtest mode.

  3. BitcoinPullTester commented at 9:28 PM on August 3, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/97bf6a7aef976cee0200c11f3915b4d7c0f33c10 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  4. gavinandresen commented at 11:08 PM on August 3, 2013: contributor

    ACK; logic looks good, compiles and runs on OSX.

  5. Fix non-standard disconnected transactions causing mempool orphans f0784ac470
  6. Mempool consistency check 2461aba1ac
  7. sipa commented at 9:56 PM on August 15, 2013: member

    Rebased.

  8. gmaxwell commented at 10:01 PM on August 15, 2013: contributor

    ACK. I think we should pull this, but I also think pulltester should gain a reproduction of it. @bluematt where are we keeping issues for the pulltester?

  9. BitcoinPullTester commented at 12:36 AM on August 16, 2013: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/2461aba1ac4e0673ed0568713b48e4bb37c8b041 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  10. gavinandresen referenced this in commit 9be4cff5f6 on Aug 16, 2013
  11. gavinandresen merged this on Aug 16, 2013
  12. gavinandresen closed this on Aug 16, 2013

  13. DrahtBot 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-19 09:15 UTC

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