Add autoprune functionality #5863

pull sdaftuar wants to merge 1 commits into bitcoin:master from sdaftuar:autoprune changing 7 files +744 −37
  1. sdaftuar commented at 10:40 pm on March 6, 2015: member

    Continuing the work of @rdponticelli, this is an implementation of the autoprune functionality (see #4701). Thanks to @rdponticelli for doing a lot of prior work on this topic; we used his work and the discussion of it as our starting point (though we found it easier to base this pull off of master). @mrbandrews, @morcos, @ajweiss, and @sdaftuar collaborated on this pull.

    To summarize autoprune: this adds a -prune=N option to bitcoind, which if set to N>0 will enable autoprune. When autopruning is enabled, block and undo files will be deleted to try to keep total space used by those files to below the prune target (N, in MB) specified by the user, subject to some constraints:

    • The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP),
    • N must be at least 550MB (chosen as a value for the target that could reasonably be met, with some assumptions about block sizes, orphan rates, etc; see comment in main.h),
    • No blocks are pruned until chainActive is at least 100,000 blocks long (on mainnet; defined separately for mainnet, testnet, and regtest in chainparams as nAutopruneAfterHeight).

    We’ve attempted to address the comments raised in the prior conversations; here are a few things worth noting:

    1. Handling reorgs greater than the data stored on disk is not yet implemented. Currently, bitcoind will exit with a message indicating that it failed to read the block on disk – suggestions for a better error message are welcome.
    2. We’ve disabled block relay (with a check to see if we’re NODE_NETWORK or not). In the future when we have worked out the service bit to use for an autopruned node and the behavior for block requests, we can re-enable this appropriately. (This differs from the behavior of #4701 .)
    3. PruneOneBlockFile currently iterates mapBlockIndex each time to determine which entries to update; we can optimize this by maintaining a reverse lookup table so that the blocks in each blockfile are known.
    4. One open question is what to do if we’ve pruned before, and then are running a -reindex: what do we do with the leftover files? In this case, the first N files will have been deleted by the pruning code, which won’t be processed in the reindex loop, but later we may try overwriting the remaining files in place. Would it be better to, say, delete the files preemptively to prevent potential file corruption?
    5. RPC/REST interfaces currently do not distinguish between unknown blocks/tx and pruned blocks/tx. It’s unclear if a specific error should be returned, or perhaps the block/tx query interfaces be disabled for pruned nodes.
    6. Tests and a test plan will be forthcoming.

    (Though this pull still needs more work to address some of the above items, we thought we’d open it now to keep review momentum on this feature moving…)

  2. in src/main.cpp: in 715bc7a244 outdated
    2145+            // which block files have been deleted.  Remove those as candidates
    2146+            // for the most work chain if we come across them; we can't switch
    2147+            // to a chain unless we have all the non-active-chain parent blocks.
    2148+            bool fFailedChain = pindexTest->nStatus & BLOCK_FAILED_MASK;
    2149+            if (fFailedChain || !(pindexTest->nStatus & BLOCK_HAVE_DATA)) {
    2150                 // Candidate has an invalid ancestor, remove entire chain from the set.
    


    sipa commented at 1:17 pm on March 7, 2015:
    Comment is outdated now.
  3. in src/main.cpp: in 715bc7a244 outdated
    2278@@ -2268,6 +2279,9 @@ bool ActivateBestChain(CValidationState &state, CBlock *pblock) {
    2279             uint256 hashNewTip = pindexNewTip->GetBlockHash();
    2280             // Relay inventory, but don't relay old inventory during initial block download.
    2281             int nBlockEstimate = Checkpoints::GetTotalBlocksEstimate();
    2282+            // Don't relay blocks if autopruning -- could cause a peer to try to download, resulting
    2283+            // in a stalled download if the block file is pruned before the request.
    2284+            if (nLocalServices & NODE_NETWORK)
    


    sipa commented at 1:20 pm on March 7, 2015:
    Style nit: { on the same line.
  4. in src/main.cpp: in 715bc7a244 outdated
    2854+ */
    2855+
    2856+/* Calculate the amount of disk space the block & undo files currently use */
    2857+uint64_t CalculateCurrentUsage()
    2858+{
    2859+    uint64_t retval=0;
    


    sipa commented at 1:20 pm on March 7, 2015:
    Style nit: spaces around =
  5. in src/main.cpp: in 715bc7a244 outdated
    2909+    if (chainActive.Tip() == NULL || nAutopruneTarget == 0) {
    2910+        LogPrintf("Autoprune: No chain, or called when target=0.\n");
    2911+        return;
    2912+    }
    2913+    if (chainActive.Tip()->nHeight <= Params().AutopruneAfterHeight()) {
    2914+        LogPrintf("Autoprune: current height less than minimum height for pruning (%d).\n", Params().AutopruneAfterHeight());
    


    sipa commented at 1:22 pm on March 7, 2015:
    This seems like a pretty normal condition during initial sync; does that require an unconditional log message?
  6. sipa commented at 1:30 pm on March 7, 2015: member
    Looks good, overall. I wouldn’t worry about the inefficient mapBlockIndex iteration for now, that can be improved later. I haven’t tested yet.
  7. in src/chainparams.cpp: in 715bc7a244 outdated
    200@@ -200,6 +201,7 @@ class CTestNetParams : public CMainParams {
    201         nMinerThreads = 0;
    202         nTargetTimespan = 14 * 24 * 60 * 60; //! two weeks
    203         nTargetSpacing = 10 * 60;
    204+        nAutopruneAfterHeight = 1000; // low since testnet can be reset in future
    


    fanquake commented at 7:09 am on March 8, 2015:
    Can you use //! so it will get picked up by doxygen
  8. laanwj added the label Feature on Mar 9, 2015
  9. laanwj added this to the milestone 0.11.0 on Mar 9, 2015
  10. morcos commented at 5:24 pm on March 13, 2015: member
    We’ve added 6 new commits. 1 addresses some of the feedback so far (will be squashed) 2,3 are already in master and will be dropped when we rebase 4 adds an RPC test. It is very expensive, so please be wary running it. 5 fixes a bug that was preventing us from reorg’ing to a chain for which we needed to redownload pruned blocks. (will be squashed) 6 is the code change from #5890 and can be dropped if that’s merged
  11. morcos commented at 3:43 pm on March 19, 2015: member
    Addressed some of the feedback and made a few other slight improvements. Of note, as discussed on IRC, passing -prune=N and -reindex will cause all block and undo files to be deleted. This happens regardless of whether you were previously pruned and actually needed to do this or not. This was added in the last commit.
  12. rustyrussell commented at 11:21 am on March 25, 2015: contributor

    v0.9.0rc2-2621-g40ba177. Bootstrapping with “prune=1000”, (and some minor added debug prints which shouldn’t have affected anything, but never know):

    bitcoind: coins.cpp:150: virtual bool CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion `it->second.flags & CCoinsCacheEntry::FRESH’ failed.

    Unf. didn’t have ulimit -c unlimited. Rerunning, it seems be gathering blocks like normal…

  13. ajweiss commented at 3:05 pm on March 25, 2015: contributor

    Hey Rusty,

    You don’t happen to have the debug.log laying around from when it crashed, do you? Would you be willing to share it?

    Thanks! –adam

    On Wed, Mar 25, 2015 at 7:21 AM, Rusty Russell notifications@github.com wrote:

    Hmm, bootstrapping with “prune=1000”, (and some minor added debug prints which shouldn’t have affected anything, but never know):

    bitcoind: coins.cpp:150: virtual bool CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion `it->second.flags & CCoinsCacheEntry::FRESH’ failed.

    Unf. didn’t have ulimit -c unlimited. Rerunning, it seems be gathering blocks like normal…

    — Reply to this email directly or view it on GitHub #5863 (comment).

  14. ajweiss commented at 3:24 pm on March 25, 2015: contributor

    Also, what version are you running? If you’re running this pull, you should see a version string like this:

    02015-03-25 15:22:05 Bitcoin version v0.10.99.0-40ba177-dirty (2015-03-19 11:28:32 -0400)
    

    The “v0.9.0rc2-2621-g40ba177” that appears in your comment references a version that is quite old. Also, did you update your comment after the fact? For some reason, github never included that part in the original email.

    Thanks!

  15. rustyrussell commented at 0:28 am on March 26, 2015: contributor

    https://github.com/sdaftuar/bitcoin/tree/autoprune == 40ba177 which is what I was running (and, AFAICT, what is proposed in this pull request).

    Unf. I didn’t save debug.log :(

  16. rustyrussell commented at 0:35 am on March 26, 2015: contributor
    Hmm, next run got killed by the OOM killer. Perhaps this first assert() was due to OOM (512M mem, 512M swap).
  17. ajweiss commented at 0:52 am on March 26, 2015: contributor

    I see an 0.9.0rc2 in the version string you posted. Did you back port or rebase?

    On Wed, Mar 25, 2015, 8:35 PM Rusty Russell notifications@github.com wrote:

    Hmm, next run got killed by the OOM killer. Perhaps this first assert() was due to OOM (512M mem, 512M swap).

    — Reply to this email directly or view it on GitHub #5863 (comment).

  18. rustyrussell commented at 1:45 am on March 26, 2015: contributor

    Neither. git describe uses the previous tag it knows about. For some reason it doesn’t know about more recent tags. But I’m on commit 40ba177537a6cb032a03648208add12695c635e8.

    The good news: it happened again! bitcoind: coins.cpp:150: virtual bool CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion `it->second.flags & CCoinsCacheEntry::FRESH’ failed.

    Here’s the last 100 lines of debug.log (can’t figure out how to attach the whole thing):

    2015-03-26 01:12:46 UpdateTip: new best=000000000000002a45bf369333c2daa0555e8e6f064cbd6bd1ff1a5d06980d82 height=256222 log2_work=71.679906 tx=23298335 date=2013-09-05 08:23:11 progress=0.164551 cache=48753 2015-03-26 01:12:46 UpdateTip: new best=000000000000000753309260f94ad504e02cfc39bbd27864572d935b1aea715d height=256223 log2_work=71.680048 tx=23298379 date=2013-09-05 08:24:21 progress=0.164551 cache=48814 2015-03-26 01:12:46 UpdateTip: new best=0000000000000022474ef8062a2b3ffac71dba34f4713e4320cb03ab2a8b4f27 height=256224 log2_work=71.680191 tx=23298647 date=2013-09-05 08:31:51 progress=0.164553 cache=49002 2015-03-26 01:12:46 UpdateTip: new best=000000000000000d93e092f11fbffe4cf51b3230b85429126fd59fdc4a658711 height=256225 log2_work=71.680333 tx=23298903 date=2013-09-05 09:02:55 progress=0.164555 cache=49232 2015-03-26 01:12:46 UpdateTip: new best=000000000000000b82f040c3342eb73532a6124efc40b024fdad513e05fd0bd5 height=256226 log2_work=71.680475 tx=23299531 date=2013-09-05 09:10:09 progress=0.164559 cache=49832 2015-03-26 01:12:46 UpdateTip: new best=000000000000002a6ecdbe7fbfa95c3506f1453577a683a79da81098e7905584 height=256227 log2_work=71.680618 tx=23300084 date=2013-09-05 09:16:24 progress=0.164563 cache=50243 2015-03-26 01:12:46 UpdateTip: new best=000000000000002c6fa89ede90bbc722936a218850ce5f6376edb2ea00a7fa05 height=256228 log2_work=71.68076 tx=23300099 date=2013-09-05 09:16:32 progress=0.164563 cache=50271 2015-03-26 01:12:47 UpdateTip: new best=00000000000000101ce20a35d1ddcae106b960d6e785104426f8d0bdd2017bf2 height=256229 log2_work=71.680902 tx=23300780 date=2013-09-05 09:35:11 progress=0.164568 cache=50989 2015-03-26 01:12:47 UpdateTip: new best=0000000000000020c9620a098f464ca259dfb49e0d58ac6e8072fb9ebf01aa22 height=256230 log2_work=71.681045 tx=23301155 date=2013-09-05 09:43:39 progress=0.164571 cache=51343 2015-03-26 01:12:47 UpdateTip: new best=000000000000002ff0c69115a9a7ec287f2eb1e7aaf5fcd8e570523c6d0e35da height=256231 log2_work=71.681187 tx=23301803 date=2013-09-05 10:08:04 progress=0.164575 cache=51839 2015-03-26 01:12:48 UpdateTip: new best=0000000000000012934a060e2f39186df3576919488f578142ac0b39f40eb016 height=256232 log2_work=71.681329 tx=23302097 date=2013-09-05 10:11:37 progress=0.164577 cache=52213 2015-03-26 01:12:48 UpdateTip: new best=0000000000000001fd0e62b6be598ed76515a2044941efdffaa6cffbaedf6be9 height=256233 log2_work=71.681472 tx=23302512 date=2013-09-05 10:23:50 progress=0.164580 cache=52519 2015-03-26 01:12:48 UpdateTip: new best=000000000000003040c350eb9968ddd8d465c02d3b8c08a57092d648d84e81fb height=256234 log2_work=71.681614 tx=23303160 date=2013-09-05 10:56:06 progress=0.164585 cache=53021 2015-03-26 01:12:48 UpdateTip: new best=0000000000000004e00a510cb0eb701049eab4ffa7f5ae0cb35166012f206735 height=256235 log2_work=71.681756 tx=23303555 date=2013-09-05 10:58:04 progress=0.164588 cache=53195 2015-03-26 01:12:48 UpdateTip: new best=0000000000000001d5cb5a162b017593ea700796346fc4ad2878317f88639558 height=256236 log2_work=71.681898 tx=23303687 date=2013-09-05 10:59:25 progress=0.164589 cache=53329 2015-03-26 01:12:49 UpdateTip: new best=00000000000000132059570a30473e9a66082f15a3587f46674e2868e42c1717 height=256237 log2_work=71.68204 tx=23304007 date=2013-09-05 11:07:52 progress=0.164591 cache=53593 2015-03-26 01:12:49 UpdateTip: new best=0000000000000022e8d500382e2890c4188afbac95bd96b28badeb40535a2d62 height=256238 log2_work=71.682183 tx=23304182 date=2013-09-05 11:13:55 progress=0.164592 cache=53742 2015-03-26 01:12:49 UpdateTip: new best=00000000000000153e89df838e32e1d69f44352582b7e916779a4c81f5c87fc8 height=256239 log2_work=71.682325 tx=23304295 date=2013-09-05 11:16:07 progress=0.164593 cache=53864 2015-03-26 01:12:49 UpdateTip: new best=000000000000001c4c2ae705ca273cabbb7881587eee17d65e97872f6d32e3dd height=256240 log2_work=71.682467 tx=23304658 date=2013-09-05 11:30:15 progress=0.164596 cache=54138 2015-03-26 01:12:49 UpdateTip: new best=00000000000000094943a4f8db9e6e3c7693fda19a87e0c6311cbff6af5e30ed height=256241 log2_work=71.682609 tx=23304712 date=2013-09-05 11:31:46 progress=0.164596 cache=54188 2015-03-26 01:12:49 UpdateTip: new best=00000000000000240151486223bec38ac2efd88b06358ed808b7650ca2d4e7b9 height=256242 log2_work=71.682751 tx=23305195 date=2013-09-05 11:53:06 progress=0.164599 cache=54500 2015-03-26 01:12:49 UpdateTip: new best=000000000000000b204f319b88cb7ada312006cff24259767ce543590376916b height=256243 log2_work=71.682893 tx=23305205 date=2013-09-05 11:53:17 progress=0.164599 cache=54510 2015-03-26 01:12:49 UpdateTip: new best=000000000000002fe406df0a623d0552973f7455aff2866b400492e7b964905d height=256244 log2_work=71.683035 tx=23305255 date=2013-09-05 11:54:08 progress=0.164600 cache=54530 2015-03-26 01:12:49 UpdateTip: new best=0000000000000004760b054428b39113e0a27e08cce9a98cd27c4dbee3ea3f05 height=256245 log2_work=71.683178 tx=23305450 date=2013-09-05 12:00:16 progress=0.164601 cache=54716 2015-03-26 01:12:50 UpdateTip: new best=000000000000000c5a4a7971338e3b2226b4697035455b1f10c8db8806241ecd height=256246 log2_work=71.68332 tx=23306018 date=2013-09-05 12:08:59 progress=0.164605 cache=55351 2015-03-26 01:12:50 UpdateTip: new best=000000000000001bb68eb99892b94fa8b33da6be1e52afe17920e05bea0528b0 height=256247 log2_work=71.683462 tx=23307265 date=2013-09-05 12:33:09 progress=0.164614 cache=56346 2015-03-26 01:12:51 UpdateTip: new best=00000000000000178f4cf7cef8941844bd72d1435f4cf5e61cfe066311f7807a height=256248 log2_work=71.683604 tx=23307913 date=2013-09-05 12:45:14 progress=0.164619 cache=56992 2015-03-26 01:12:51 UpdateTip: new best=00000000000000176e15e4fb8f59e2b65407afa87af9af2f2a3ad31a215b5049 height=256249 log2_work=71.683746 tx=23308112 date=2013-09-05 12:48:01 progress=0.164620 cache=57097 2015-03-26 01:12:51 UpdateTip: new best=000000000000001f1d84edf1d8901ed8a3b4415c0ae71faea14902a0cb12eb2c height=256250 log2_work=71.683888 tx=23308762 date=2013-09-05 13:07:00 progress=0.164625 cache=57724 2015-03-26 01:12:51 UpdateTip: new best=0000000000000021843eb11fc9e41c9f6b8403166d485259acd04f6349a15368 height=256251 log2_work=71.68403 tx=23309579 date=2013-09-05 13:35:58 progress=0.164630 cache=58350 2015-03-26 01:12:52 UpdateTip: new best=000000000000001be38f4d3d802a0c4f53aa250ade35ef562858df8f4459143a height=256252 log2_work=71.684172 tx=23310617 date=2013-09-05 13:44:30 progress=0.164638 cache=59410 2015-03-26 01:12:52 UpdateTip: new best=0000000000000016f9e206d675a4806a56889b4dad5bc8101458a67caae8fec5 height=256253 log2_work=71.684314 tx=23310937 date=2013-09-05 13:53:32 progress=0.164640 cache=59760 2015-03-26 01:12:53 UpdateTip: new best=00000000000000167d0798f1c90a8b032608b2bfec24e9338046f0458f889050 height=256254 log2_work=71.684456 tx=23311912 date=2013-09-05 14:11:04 progress=0.164647 cache=60417 2015-03-26 01:12:53 UpdateTip: new best=000000000000002c615c4e75ed0e3cd5fdf8c784ed70f994f6b8dd170491052b height=256255 log2_work=71.684598 tx=23312598 date=2013-09-05 14:25:07 progress=0.164652 cache=61044 2015-03-26 01:12:53 UpdateTip: new best=00000000000000294c1570b253f58ae84bb3436f27dc341e01ec98b12ffb4457 height=256256 log2_work=71.68474 tx=23312983 date=2013-09-05 14:38:18 progress=0.164654 cache=61382 2015-03-26 01:12:53 UpdateTip: new best=0000000000000013ef06f2beede29fc3544553f88da16e56be374b98bf8378cc height=256257 log2_work=71.684882 tx=23313815 date=2013-09-05 14:51:12 progress=0.164660 cache=61964 2015-03-26 01:12:54 UpdateTip: new best=000000000000000120c0962bfabb16f454d619b081dabd5f593bdec041fdb04c height=256258 log2_work=71.685023 tx=23314011 date=2013-09-05 14:53:04 progress=0.164662 cache=62117 2015-03-26 01:12:54 UpdateTip: new best=0000000000000030465e2521d48854fd32e22fb56a4d23383215eeef5cec71ad height=256259 log2_work=71.685165 tx=23314390 date=2013-09-05 14:59:37 progress=0.164664 cache=62420 2015-03-26 01:12:54 UpdateTip: new best=0000000000000015f00b818ec4d3cd84c7efe492c19042e8d41aa1d88220fcca height=256260 log2_work=71.685307 tx=23314668 date=2013-09-05 15:03:44 progress=0.164666 cache=62627 2015-03-26 01:12:54 UpdateTip: new best=0000000000000021f9c19ee0a908e5e8467a3135ca017778fa0b6fe205858e86 height=256261 log2_work=71.685449 tx=23315249 date=2013-09-05 15:17:30 progress=0.164670 cache=63094 2015-03-26 01:12:54 UpdateTip: new best=0000000000000004106d02bd030be7b11b09dc29bd1b814d82230a3602d71cbf height=256262 log2_work=71.685591 tx=23315921 date=2013-09-05 15:39:25 progress=0.164675 cache=63618 2015-03-26 01:12:55 Pre-allocating up to position 0x900000 in rev00079.dat 2015-03-26 01:12:55 UpdateTip: new best=00000000000000152c20907e5fc32b0a5699cd6b3bdfdc54541068acc40c9001 height=256263 log2_work=71.685733 tx=23316369 date=2013-09-05 15:42:00 progress=0.164678 cache=63845 2015-03-26 01:12:55 UpdateTip: new best=0000000000000017393b8866299590a0cccb9fc3ec77d78f95ad1c8dad019ba5 height=256264 log2_work=71.685875 tx=23316635 date=2013-09-05 15:44:52 progress=0.164680 cache=64044 2015-03-26 01:12:55 UpdateTip: new best=0000000000000029669d094d8730098533dace24b5ebbf53b2a289feb034444e height=256265 log2_work=71.686016 tx=23316846 date=2013-09-05 15:48:59 progress=0.164682 cache=64209 2015-03-26 01:12:55 UpdateTip: new best=0000000000000024de7285b3c2414f0a16183de523ea34b0e761a4111f693051 height=256266 log2_work=71.686158 tx=23317071 date=2013-09-05 15:54:51 progress=0.164683 cache=64449 2015-03-26 01:12:55 UpdateTip: new best=00000000000000165eab046aa4a026bc181b82d951936924c5aeb71ca394161a height=256267 log2_work=71.6863 tx=23317372 date=2013-09-05 15:58:28 progress=0.164685 cache=64676 2015-03-26 01:12:55 UpdateTip: new best=0000000000000030064bb7a58f10d456eaa8ed4b1b5d302c0ef7beee89165195 height=256268 log2_work=71.686442 tx=23317436 date=2013-09-05 15:59:52 progress=0.164686 cache=64706 2015-03-26 01:12:55 UpdateTip: new best=0000000000000028115e14c9c3ff53915c178d7e00483ea1d49e89e3a2f8ea1a height=256269 log2_work=71.686584 tx=23317684 date=2013-09-05 16:05:53 progress=0.164688 cache=64910 2015-03-26 01:12:55 UpdateTip: new best=000000000000002d8e2f9179ed9f8cf3d9651d7ba23e1df5045fd53a7efb7e9f height=256270 log2_work=71.686725 tx=23317794 date=2013-09-05 16:08:09 progress=0.164688 cache=64989 2015-03-26 01:12:55 UpdateTip: new best=000000000000000455fe9a0f779024be6ffb8d66e3983fbb9daf563cc2720dc1 height=256271 log2_work=71.686867 tx=23318058 date=2013-09-05 16:11:30 progress=0.164690 cache=65240 2015-03-26 01:12:56 UpdateTip: new best=0000000000000008ba72a286f0c0d7cc9f76404d6d03b1ecbceb957a896169ef height=256272 log2_work=71.687009 tx=23319210 date=2013-09-05 16:33:00 progress=0.164698 cache=66056 2015-03-26 01:12:56 UpdateTip: new best=000000000000001e54d7eb160c15019da95f2bf0e4a55a75339c2be02953c314 height=256273 log2_work=71.68715 tx=23319463 date=2013-09-05 16:38:52 progress=0.164700 cache=66267 2015-03-26 01:12:56 UpdateTip: new best=000000000000002665aa9b70dc61c3e3a21b14254d025f247fcd0ee7988556dc height=256274 log2_work=71.687292 tx=23319761 date=2013-09-05 16:45:01 progress=0.164702 cache=66495 2015-03-26 01:12:56 UpdateTip: new best=000000000000001452940962883c497d7bfe87508813529d924c3555ca524b6e height=256275 log2_work=71.687434 tx=23319801 date=2013-09-05 16:46:11 progress=0.164702 cache=66522 2015-03-26 01:12:56 UpdateTip: new best=000000000000002b0e29289255b11ea377d03f02d6e2013c9c4500879f17aa79 height=256276 log2_work=71.687575 tx=23320487 date=2013-09-05 17:02:48 progress=0.164707 cache=67014 2015-03-26 01:12:56 UpdateTip: new best=000000000000002d054be1e77c50aafcabf5ad9466560117bd8fd9706e08a472 height=256277 log2_work=71.687717 tx=23320591 date=2013-09-05 17:06:30 progress=0.164708 cache=67099 2015-03-26 01:12:57 UpdateTip: new best=000000000000002dc13bc14c9e999f56fa19ce4e0ae0c4f203197f1c6f269a26 height=256278 log2_work=71.687859 tx=23321470 date=2013-09-05 17:32:00 progress=0.164714 cache=67893 2015-03-26 01:12:57 UpdateTip: new best=000000000000000f7125b930e8fd8e239a4c63c0f2d55bb5e63ba9fc4e0109a8 height=256279 log2_work=71.688 tx=23322078 date=2013-09-05 17:35:07 progress=0.164719 cache=68269 2015-03-26 01:12:57 UpdateTip: new best=000000000000001a92af8fe69ff4aa1e1f02642f9a93587143e9d5d7f1ffba6c height=256280 log2_work=71.688142 tx=23322632 date=2013-09-05 17:40:49 progress=0.164722 cache=68537 2015-03-26 01:12:57 UpdateTip: new best=000000000000000159f4bd54cf3c54c2df34ddd6ff51c680e1b7d0622f5c8b43 height=256281 log2_work=71.688283 tx=23323215 date=2013-09-05 17:51:32 progress=0.164727 cache=68947 2015-03-26 01:12:58 UpdateTip: new best=00000000000000247fe2e1f11a489c118ffb6792d6ba11121279cf12a62453eb height=256282 log2_work=71.688425 tx=23323753 date=2013-09-05 18:02:21 progress=0.164730 cache=69359 2015-03-26 01:12:58 UpdateTip: new best=0000000000000014813cffe67140e7dbfb5a7773d274941c2edb1a11d0edd0b7 height=256283 log2_work=71.688567 tx=23324401 date=2013-09-05 18:17:30 progress=0.164735 cache=69837 2015-03-26 01:12:58 UpdateTip: new best=000000000000000a41919e5ba9bf94590307957438df8957b2d8e055d196b073 height=256284 log2_work=71.688708 tx=23324549 date=2013-09-05 18:17:40 progress=0.164736 cache=69925 2015-03-26 01:12:58 UpdateTip: new best=000000000000000da78b890167754320fcd7844a8333cf2e7eaa27e6eb66beef height=256285 log2_work=71.68885 tx=23324674 date=2013-09-05 18:19:50 progress=0.164737 cache=70080 2015-03-26 01:12:58 UpdateTip: new best=000000000000000a11b83ec67046bd1c3742d37c1fd19eb60993dd4142832587 height=256286 log2_work=71.688991 tx=23325155 date=2013-09-05 18:29:23 progress=0.164740 cache=70487 2015-03-26 01:12:58 UpdateTip: new best=0000000000000030b9133b269aa99ef3ff0720207add7d6cda4ee4b3682293c5 height=256287 log2_work=71.689133 tx=23325253 date=2013-09-05 18:30:04 progress=0.164741 cache=70561 2015-03-26 01:12:59 UpdateTip: new best=000000000000001ad1c72f89e3e477dad1a4f31fa259dcc36347e95df771beb3 height=256288 log2_work=71.689274 tx=23325512 date=2013-09-05 18:35:01 progress=0.164743 cache=70724 2015-03-26 01:12:59 UpdateTip: new best=000000000000001eb25e185d9b67d1395f90134039a94141aec1d1405ae6ed3e height=256289 log2_work=71.689416 tx=23325535 date=2013-09-05 18:35:15 progress=0.164743 cache=70777 2015-03-26 01:12:59 UpdateTip: new best=00000000000000021f594b3f66f4caa4251d538e4450bd3f03106d0008845d00 height=256290 log2_work=71.689557 tx=23325632 date=2013-09-05 18:36:45 progress=0.164744 cache=70928 2015-03-26 01:12:59 UpdateTip: new best=000000000000000eff0b9ad6c63cae18b2c3ca434f62083a77e09a5c254b9240 height=256291 log2_work=71.689699 tx=23326314 date=2013-09-05 18:58:29 progress=0.164748 cache=71546 2015-03-26 01:13:00 UpdateTip: new best=000000000000001857b4bcda0878dd5a25ffb28add7b9ce33ccaf2f6024e42f8 height=256292 log2_work=71.68984 tx=23326874 date=2013-09-05 19:00:16 progress=0.164752 cache=72269 2015-03-26 01:13:00 UpdateTip: new best=00000000000000003141cfb167866059105db3bb1cf035f6bc85b53ef85b92ae height=256293 log2_work=71.689981 tx=23326941 date=2013-09-05 19:00:35 progress=0.164753 cache=72342 2015-03-26 01:13:00 UpdateTip: new best=0000000000000020bb674a462e0c4a656dce0cd89a96d32beba275afc66512c6 height=256294 log2_work=71.690123 tx=23327139 date=2013-09-05 19:04:22 progress=0.164754 cache=72474 2015-03-26 01:13:00 UpdateTip: new best=000000000000000f1fd8011fb66ce8df84fb0f2f1b963e0e3cdbb3617f59b7c7 height=256295 log2_work=71.690264 tx=23327734 date=2013-09-05 19:23:20 progress=0.164759 cache=72917 2015-03-26 01:13:00 UpdateTip: new best=000000000000002a6947553bbcfb982ca718cf2a4cac7dd1b08b035be2964f7e height=256296 log2_work=71.690406 tx=23327990 date=2013-09-05 19:28:00 progress=0.164760 cache=73191 2015-03-26 01:13:01 UpdateTip: new best=000000000000000a5ad1f21d83c1432c8562d8dae8ba6b225a3b1ba85acce7f6 height=256297 log2_work=71.690547 tx=23328170 date=2013-09-05 19:28:25 progress=0.164762 cache=73281 2015-03-26 01:13:01 UpdateTip: new best=00000000000000105bd14a20434bdcd0ee740134893cf84a88421fd3e33ab983 height=256298 log2_work=71.690688 tx=23328497 date=2013-09-05 19:33:39 progress=0.164764 cache=73674 2015-03-26 01:13:01 UpdateTip: new best=000000000000000e31ee80d1bfb86f6afda5f01cc7fbde2fe4ad6b9ea5c64ce0 height=256299 log2_work=71.69083 tx=23328847 date=2013-09-05 19:41:38 progress=0.164766 cache=73966 2015-03-26 01:13:01 UpdateTip: new best=000000000000001b0326c319e92c6b9da767ef4afd124363307a6da3d902fa0a height=256300 log2_work=71.690971 tx=23329181 date=2013-09-05 19:47:54 progress=0.164769 cache=74273 2015-03-26 01:13:01 UpdateTip: new best=00000000000000119a3ce9b6ba7951f3d377b3218bb1be68e48434b5f8a5a9d5 height=256301 log2_work=71.691112 tx=23329436 date=2013-09-05 19:53:33 progress=0.164771 cache=74449 2015-03-26 01:13:02 UpdateTip: new best=000000000000003083e3e983f998ad82a3dee8678d718c50947dcb1ba95f492b height=256302 log2_work=71.691254 tx=23329988 date=2013-09-05 20:07:37 progress=0.164774 cache=74884 2015-03-26 01:13:02 UpdateTip: new best=00000000000000232c0aa351c33716d7763d6ed2fd31cac929d03711dea15557 height=256303 log2_work=71.691395 tx=23330089 date=2013-09-05 20:09:47 progress=0.164775 cache=74968 2015-03-26 01:13:02 UpdateTip: new best=00000000000000312aac75a02b0a1a704c80d00943284d98b7b290a150936718 height=256304 log2_work=71.691536 tx=23330274 date=2013-09-05 20:12:43 progress=0.164776 cache=75085 2015-03-26 01:13:02 UpdateTip: new best=000000000000001a1be9fab4bc79a801932b364716ced96ef324de80b158a67c height=256305 log2_work=71.691677 tx=23330498 date=2013-09-05 20:17:57 progress=0.164778 cache=75258 2015-03-26 01:13:02 UpdateTip: new best=000000000000000d884a8219f18d692d9a289bed1ade63ea2fe458681de87d93 height=256306 log2_work=71.691819 tx=23330904 date=2013-09-05 20:23:36 progress=0.164781 cache=75535 2015-03-26 01:13:02 UpdateTip: new best=0000000000000017771fa7ee6475fb0214c27f4bf9d05add8f0ac7d61d03b469 height=256307 log2_work=71.69196 tx=23330920 date=2013-09-05 20:24:55 progress=0.164781 cache=75547 2015-03-26 01:13:02 UpdateTip: new best=000000000000000696591811eb1df654a2ee33056bb8bfaea7024a6e1ff46ae3 height=256308 log2_work=71.692101 tx=23331408 date=2013-09-05 20:34:22 progress=0.164784 cache=75854 2015-03-26 01:13:02 UpdateTip: new best=000000000000000a00fd2b77b9808adce5a65a7ef665f9a1e537453548dabcf1 height=256309 log2_work=71.692242 tx=23332064 date=2013-09-05 20:46:32 progress=0.164789 cache=76332 2015-03-26 01:13:02 UpdateTip: new best=00000000000000019d219483d1b58abc6e6e4d2a147eaa9dd872f17be08b20ea height=256310 log2_work=71.692383 tx=23332098 date=2013-09-05 20:45:30 progress=0.164789 cache=76359 2015-03-26 01:13:03 UpdateTip: new best=000000000000000c10150feb7fca04dac4ffe51fd1b65cb786a28394e4f15a9a height=256311 log2_work=71.692525 tx=23332413 date=2013-09-05 20:52:20 progress=0.164792 cache=76578 2015-03-26 01:13:03 UpdateTip: new best=000000000000002132822bd27a89b73a722db1882a93ee3fb955fc90e185bc5e height=256312 log2_work=71.692666 tx=23332670 date=2013-09-05 20:57:32 progress=0.164793 cache=76730 2015-03-26 01:13:03 UpdateTip: new best=00000000000000049b4273b34759a18d1790a898f51946aa9479d2c6a4cccfa9 height=256313 log2_work=71.692807 tx=23332803 date=2013-09-05 20:59:25 progress=0.164794 cache=76717 2015-03-26 01:13:03 UpdateTip: new best=0000000000000013325dd0dea18664e71740f935c7d7330368c9fd79ce44220a height=256314 log2_work=71.692948 tx=23333358 date=2013-09-05 21:10:26 progress=0.164798 cache=77114 2015-03-26 01:13:03 UpdateTip: new best=000000000000002270d84d64b2d9738a39566a9614d037bda5df147ebaa8f7ee height=256315 log2_work=71.693089 tx=23333392 date=2013-09-05 21:10:35 progress=0.164798 cache=77139 2015-03-26 01:13:03 UpdateTip: new best=000000000000001a5005494e32ee1d0cef03424b64a51c26f0763c2cd4ed280b height=256316 log2_work=71.69323 tx=23334155 date=2013-09-05 21:26:59 progress=0.164804 cache=77683 2015-03-26 01:13:04 UpdateTip: new best=0000000000000021092a76cf2a89cdf3d936524f7d9e421e851bdc1cc2ed892e height=256317 log2_work=71.693371 tx=23334457 date=2013-09-05 21:37:35 progress=0.164806 cache=77961 2015-03-26 01:13:04 UpdateTip: new best=000000000000001e7e4c0d7928ba3ca327d3dcb2b22ab1120646d426f1e2db34 height=256318 log2_work=71.693512 tx=23334921 date=2013-09-05 21:46:23 progress=0.164809 cache=78139 2015-03-26 01:13:11 Autoprune: PruneOneBlockFile deleted blk/rev (00073) 2015-03-26 01:13:11 Pre-allocating up to position 0xa00000 in rev00079.dat

  19. ajweiss commented at 2:06 am on March 26, 2015: contributor

    Do you have the head of this log where it prints the version string? core file/backtrace? On Mar 25, 2015 9:45 PM, “Rusty Russell” notifications@github.com wrote:

    Neither. git describe uses the previous tag it knows about. For some reason it doesn’t know about more recent tags. But I’m on commit 40ba177 https://github.com/bitcoin/bitcoin/commit/40ba177537a6cb032a03648208add12695c635e8 .

    The good news: it happened again! bitcoind: coins.cpp:150: virtual bool CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion `it->second.flags & CCoinsCacheEntry::FRESH’ failed.

    Here’s the last 100 lines of debug.log (can’t figure out how to attach the whole thing):

    2015-03-26 01:12:46 UpdateTip: new best=000000000000002a45bf369333c2daa0555e8e6f064cbd6bd1ff1a5d06980d82 height=256222 log2_work=71.679906 tx=23298335 date=2013-09-05 08:23:11 progress=0.164551 cache=48753 2015-03-26 01:12:46 UpdateTip: new best=000000000000000753309260f94ad504e02cfc39bbd27864572d935b1aea715d height=256223 log2_work=71.680048 tx=23298379 date=2013-09-05 08:24:21 progress=0.164551 cache=48814 2015-03-26 01:12:46 UpdateTip: new best=0000000000000022474ef8062a2b3ffac71dba34f4713e4320cb03ab2a8b4f27 height=256224 log2_work=71.680191 tx=23298647 date=2013-09-05 08:31:51 progress=0.164553 cache=49002 2015-03-26 01:12:46 UpdateTip: new best=000000000000000d93e092f11fbffe4cf51b3230b85429126fd59fdc4a658711 height=256225 log2_work=71.680333 tx=23298903 date=2013-09-05 09:02:55 progress=0.164555 cache=49232 2015-03-26 01:12:46 UpdateTip: new best=000000000000000b82f040c3342eb73532a6124efc40b024fdad513e05fd0bd5 height=256226 log2_work=71.680475 tx=23299531 date=2013-09-05 09:10:09 progress=0.164559 cache=49832 2015-03-26 01:12:46 UpdateTip: new best=000000000000002a6ecdbe7fbfa95c3506f1453577a683a79da81098e7905584 height=256227 log2_work=71.680618 tx=23300084 date=2013-09-05 09:16:24 progress=0.164563 cache=50243 2015-03-26 01:12:46 UpdateTip: new best=000000000000002c6fa89ede90bbc722936a218850ce5f6376edb2ea00a7fa05 height=256228 log2_work=71.68076 tx=23300099 date=2013-09-05 09:16:32 progress=0.164563 cache=50271 2015-03-26 01:12:47 UpdateTip: new best=00000000000000101ce20a35d1ddcae106b960d6e785104426f8d0bdd2017bf2 height=256229 log2_work=71.680902 tx=23300780 date=2013-09-05 09:35:11 progress=0.164568 cache=50989 2015-03-26 01:12:47 UpdateTip: new best=0000000000000020c9620a098f464ca259dfb49e0d58ac6e8072fb9ebf01aa22 height=256230 log2_work=71.681045 tx=23301155 date=2013-09-05 09:43:39 progress=0.164571 cache=51343 2015-03-26 01:12:47 UpdateTip: new best=000000000000002ff0c69115a9a7ec287f2eb1e7aaf5fcd8e570523c6d0e35da height=256231 log2_work=71.681187 tx=23301803 date=2013-09-05 10:08:04 progress=0.164575 cache=51839 2015-03-26 01:12:48 UpdateTip: new best=0000000000000012934a060e2f39186df3576919488f578142ac0b39f40eb016 height=256232 log2_work=71.681329 tx=23302097 date=2013-09-05 10:11:37 progress=0.164577 cache=52213 2015-03-26 01:12:48 UpdateTip: new best=0000000000000001fd0e62b6be598ed76515a2044941efdffaa6cffbaedf6be9 height=256233 log2_work=71.681472 tx=23302512 date=2013-09-05 10:23:50 progress=0.164580 cache=52519 2015-03-26 01:12:48 UpdateTip: new best=000000000000003040c350eb9968ddd8d465c02d3b8c08a57092d648d84e81fb height=256234 log2_work=71.681614 tx=23303160 date=2013-09-05 10:56:06 progress=0.164585 cache=53021 2015-03-26 01:12:48 UpdateTip: new best=0000000000000004e00a510cb0eb701049eab4ffa7f5ae0cb35166012f206735 height=256235 log2_work=71.681756 tx=23303555 date=2013-09-05 10:58:04 progress=0.164588 cache=53195 2015-03-26 01:12:48 UpdateTip: new best=0000000000000001d5cb5a162b017593ea700796346fc4ad2878317f88639558 height=256236 log2_work=71.681898 tx=23303687 date=2013-09-05 10:59:25 progress=0.164589 cache=53329 2015-03-26 01:12:49 UpdateTip: new best=00000000000000132059570a30473e9a66082f15a3587f46674e2868e42c1717 height=256237 log2_work=71.68204 tx=23304007 date=2013-09-05 11:07:52 progress=0.164591 cache=53593 2015-03-26 01:12:49 UpdateTip: new best=0000000000000022e8d500382e2890c4188afbac95bd96b28badeb40535a2d62 height=256238 log2_work=71.682183 tx=23304182 date=2013-09-05 11:13:55 progress=0.164592 cache=53742 2015-03-26 01:12:49 UpdateTip: new best=00000000000000153e89df838e32e1d69f44352582b7e916779a4c81f5c87fc8 height=256239 log2_work=71.682325 tx=23304295 date=2013-09-05 11:16:07 progress=0.164593 cache=53864 2015-03-26 01:12:49 UpdateTip: new best=000000000000001c4c2ae705ca273cabbb7881587eee17d65e97872f6d32e3dd height=256240 log2_work=71.682467 tx=23304658 date=2013-09-05 11:30:15 progress=0.164596 cache=54138 2015-03-26 01:12:49 UpdateTip: new best=00000000000000094943a4f8db9e6e3c7693fda19a87e0c6311cbff6af5e30ed height=256241 log2_work=71.682609 tx=23304712 date=2013-09-05 11:31:46 progress=0.164596 cache=54188 2015-03-26 01:12:49 UpdateTip: new best=00000000000000240151486223bec38ac2efd88b06358ed808b7650ca2d4e7b9 height=256242 log2_work=71.682751 tx=23305195 date=2013-09-05 11:53:06 progress=0.164599 cache=54500 2015-03-26 01:12:49 UpdateTip: new best=000000000000000b204f319b88cb7ada312006cff24259767ce543590376916b height=256243 log2_work=71.682893 tx=23305205 date=2013-09-05 11:53:17 progress=0.164599 cache=54510 2015-03-26 01:12:49 UpdateTip: new best=000000000000002fe406df0a623d0552973f7455aff2866b400492e7b964905d height=256244 log2_work=71.683035 tx=23305255 date=2013-09-05 11:54:08 progress=0.164600 cache=54530 2015-03-26 01:12:49 UpdateTip: new best=0000000000000004760b054428b39113e0a27e08cce9a98cd27c4dbee3ea3f05 height=256245 log2_work=71.683178 tx=23305450 date=2013-09-05 12:00:16 progress=0.164601 cache=54716 2015-03-26 01:12:50 UpdateTip: new best=000000000000000c5a4a7971338e3b2226b4697035455b1f10c8db8806241ecd height=256246 log2_work=71.68332 tx=23306018 date=2013-09-05 12:08:59 progress=0.164605 cache=55351 2015-03-26 01:12:50 UpdateTip: new best=000000000000001bb68eb99892b94fa8b33da6be1e52afe17920e05bea0528b0 height=256247 log2_work=71.683462 tx=23307265 date=2013-09-05 12:33:09 progress=0.164614 cache=56346 2015-03-26 01:12:51 UpdateTip: new best=00000000000000178f4cf7cef8941844bd72d1435f4cf5e61cfe066311f7807a height=256248 log2_work=71.683604 tx=23307913 date=2013-09-05 12:45:14 progress=0.164619 cache=56992 2015-03-26 01:12:51 UpdateTip: new best=00000000000000176e15e4fb8f59e2b65407afa87af9af2f2a3ad31a215b5049 height=256249 log2_work=71.683746 tx=23308112 date=2013-09-05 12:48:01 progress=0.164620 cache=57097 2015-03-26 01:12:51 UpdateTip: new best=000000000000001f1d84edf1d8901ed8a3b4415c0ae71faea14902a0cb12eb2c height=256250 log2_work=71.683888 tx=23308762 date=2013-09-05 13:07:00 progress=0.164625 cache=57724 2015-03-26 01:12:51 UpdateTip: new best=0000000000000021843eb11fc9e41c9f6b8403166d485259acd04f6349a15368 height=256251 log2_work=71.68403 tx=23309579 date=2013-09-05 13:35:58 progress=0.164630 cache=58350 2015-03-26 01:12:52 UpdateTip: new best=000000000000001be38f4d3d802a0c4f53aa250ade35ef562858df8f4459143a height=256252 log2_work=71.684172 tx=23310617 date=2013-09-05 13:44:30 progress=0.164638 cache=59410 2015-03-26 01:12:52 UpdateTip: new best=0000000000000016f9e206d675a4806a56889b4dad5bc8101458a67caae8fec5 height=256253 log2_work=71.684314 tx=23310937 date=2013-09-05 13:53:32 progress=0.164640 cache=59760 2015-03-26 01:12:53 UpdateTip: new best=00000000000000167d0798f1c90a8b032608b2bfec24e9338046f0458f889050 height=256254 log2_work=71.684456 tx=23311912 date=2013-09-05 14:11:04 progress=0.164647 cache=60417 2015-03-26 01:12:53 UpdateTip: new best=000000000000002c615c4e75ed0e3cd5fdf8c784ed70f994f6b8dd170491052b height=256255 log2_work=71.684598 tx=23312598 date=2013-09-05 14:25:07 progress=0.164652 cache=61044 2015-03-26 01:12:53 UpdateTip: new best=00000000000000294c1570b253f58ae84bb3436f27dc341e01ec98b12ffb4457 height=256256 log2_work=71.68474 tx=23312983 date=2013-09-05 14:38:18 progress=0.164654 cache=61382 2015-03-26 01:12:53 UpdateTip: new best=0000000000000013ef06f2beede29fc3544553f88da16e56be374b98bf8378cc height=256257 log2_work=71.684882 tx=23313815 date=2013-09-05 14:51:12 progress=0.164660 cache=61964 2015-03-26 01:12:54 UpdateTip: new best=000000000000000120c0962bfabb16f454d619b081dabd5f593bdec041fdb04c height=256258 log2_work=71.685023 tx=23314011 date=2013-09-05 14:53:04 progress=0.164662 cache=62117 2015-03-26 01:12:54 UpdateTip: new best=0000000000000030465e2521d48854fd32e22fb56a4d23383215eeef5cec71ad height=256259 log2_work=71.685165 tx=23314390 date=2013-09-05 14:59:37 progress=0.164664 cache=62420 2015-03-26 01:12:54 UpdateTip: new best=0000000000000015f00b818ec4d3cd84c7efe492c19042e8d41aa1d88220fcca height=256260 log2_work=71.685307 tx=23314668 date=2013-09-05 15:03:44 progress=0.164666 cache=62627 2015-03-26 01:12:54 UpdateTip: new best=0000000000000021f9c19ee0a908e5e8467a3135ca017778fa0b6fe205858e86 height=256261 log2_work=71.685449 tx=23315249 date=2013-09-05 15:17:30 progress=0.164670 cache=63094 2015-03-26 01:12:54 UpdateTip: new best=0000000000000004106d02bd030be7b11b09dc29bd1b814d82230a3602d71cbf height=256262 log2_work=71.685591 tx=23315921 date=2013-09-05 15:39:25 progress=0.164675 cache=63618 2015-03-26 01:12:55 Pre-allocating up to position 0x900000 in rev00079.dat 2015-03-26 01:12:55 UpdateTip: new best=00000000000000152c20907e5fc32b0a5699cd6b3bdfdc54541068acc40c9001 height=256263 log2_work=71.685733 tx=23316369 date=2013-09-05 15:42:00 progress=0.164678 cache=63845 2015-03-26 01:12:55 UpdateTip: new best=0000000000000017393b8866299590a0cccb9fc3ec77d78f95ad1c8dad019ba5 height=256264 log2_work=71.685875 tx=23316635 date=2013-09-05 15:44:52 progress=0.164680 cache=64044 2015-03-26 01:12:55 UpdateTip: new best=0000000000000029669d094d8730098533dace24b5ebbf53b2a289feb034444e height=256265 log2_work=71.686016 tx=23316846 date=2013-09-05 15:48:59 progress=0.164682 cache=64209 2015-03-26 01:12:55 UpdateTip: new best=0000000000000024de7285b3c2414f0a16183de523ea34b0e761a4111f693051 height=256266 log2_work=71.686158 tx=23317071 date=2013-09-05 15:54:51 progress=0.164683 cache=64449 2015-03-26 01:12:55 UpdateTip: new best=00000000000000165eab046aa4a026bc181b82d951936924c5aeb71ca394161a height=256267 log2_work=71.6863 tx=23317372 date=2013-09-05 15:58:28 progress=0.164685 cache=64676 2015-03-26 01:12:55 UpdateTip: new best=0000000000000030064bb7a58f10d456eaa8ed4b1b5d302c0ef7beee89165195 height=256268 log2_work=71.686442 tx=23317436 date=2013-09-05 15:59:52 progress=0.164686 cache=64706 2015-03-26 01:12:55 UpdateTip: new best=0000000000000028115e14c9c3ff53915c178d7e00483ea1d49e89e3a2f8ea1a height=256269 log2_work=71.686584 tx=23317684 date=2013-09-05 16:05:53 progress=0.164688 cache=64910 2015-03-26 01:12:55 UpdateTip: new best=000000000000002d8e2f9179ed9f8cf3d9651d7ba23e1df5045fd53a7efb7e9f height=256270 log2_work=71.686725 tx=23317794 date=2013-09-05 16:08:09 progress=0.164688 cache=64989 2015-03-26 01:12:55 UpdateTip: new best=000000000000000455fe9a0f779024be6ffb8d66e3983fbb9daf563cc2720dc1 height=256271 log2_work=71.686867 tx=23318058 date=2013-09-05 16:11:30 progress=0.164690 cache=65240 2015-03-26 01:12:56 UpdateTip: new best=0000000000000008ba72a286f0c0d7cc9f76404d6d03b1ecbceb957a896169ef height=256272 log2_work=71.687009 tx=23319210 date=2013-09-05 16:33:00 progress=0.164698 cache=66056 2015-03-26 01:12:56 UpdateTip: new best=000000000000001e54d7eb160c15019da95f2bf0e4a55a75339c2be02953c314 height=256273 log2_work=71.68715 tx=23319463 date=2013-09-05 16:38:52 progress=0.164700 cache=66267 2015-03-26 01:12:56 UpdateTip: new best=000000000000002665aa9b70dc61c3e3a21b14254d025f247fcd0ee7988556dc height=256274 log2_work=71.687292 tx=23319761 date=2013-09-05 16:45:01 progress=0.164702 cache=66495 2015-03-26 01:12:56 UpdateTip: new best=000000000000001452940962883c497d7bfe87508813529d924c3555ca524b6e height=256275 log2_work=71.687434 tx=23319801 date=2013-09-05 16:46:11 progress=0.164702 cache=66522 2015-03-26 01:12:56 UpdateTip: new best=000000000000002b0e29289255b11ea377d03f02d6e2013c9c4500879f17aa79 height=256276 log2_work=71.687575 tx=23320487 date=2013-09-05 17:02:48 progress=0.164707 cache=67014 2015-03-26 01:12:56 UpdateTip: new best=000000000000002d054be1e77c50aafcabf5ad9466560117bd8fd9706e08a472 height=256277 log2_work=71.687717 tx=23320591 date=2013-09-05 17:06:30 progress=0.164708 cache=67099 2015-03-26 01:12:57 UpdateTip: new best=000000000000002dc13bc14c9e999f56fa19ce4e0ae0c4f203197f1c6f269a26 height=256278 log2_work=71.687859 tx=23321470 date=2013-09-05 17:32:00 progress=0.164714 cache=67893 2015-03-26 01:12:57 UpdateTip: new best=000000000000000f7125b930e8fd8e239a4c63c0f2d55bb5e63ba9fc4e0109a8 height=256279 log2_work=71.688 tx=23322078 date=2013-09-05 17:35:07 progress=0.164719 cache=68269 2015-03-26 01:12:57 UpdateTip: new best=000000000000001a92af8fe69ff4aa1e1f02642f9a93587143e9d5d7f1ffba6c height=256280 log2_work=71.688142 tx=23322632 date=2013-09-05 17:40:49 progress=0.164722 cache=68537 2015-03-26 01:12:57 UpdateTip: new best=000000000000000159f4bd54cf3c54c2df34ddd6ff51c680e1b7d0622f5c8b43 height=256281 log2_work=71.688283 tx=23323215 date=2013-09-05 17:51:32 progress=0.164727 cache=68947 2015-03-26 01:12:58 UpdateTip: new best=00000000000000247fe2e1f11a489c118ffb6792d6ba11121279cf12a62453eb height=256282 log2_work=71.688425 tx=23323753 date=2013-09-05 18:02:21 progress=0.164730 cache=69359 2015-03-26 01:12:58 UpdateTip: new best=0000000000000014813cffe67140e7dbfb5a7773d274941c2edb1a11d0edd0b7 height=256283 log2_work=71.688567 tx=23324401 date=2013-09-05 18:17:30 progress=0.164735 cache=69837 2015-03-26 01:12:58 UpdateTip: new best=000000000000000a41919e5ba9bf94590307957438df8957b2d8e055d196b073 height=256284 log2_work=71.688708 tx=23324549 date=2013-09-05 18:17:40 progress=0.164736 cache=69925 2015-03-26 01:12:58 UpdateTip: new best=000000000000000da78b890167754320fcd7844a8333cf2e7eaa27e6eb66beef height=256285 log2_work=71.68885 tx=23324674 date=2013-09-05 18:19:50 progress=0.164737 cache=70080 2015-03-26 01:12:58 UpdateTip: new best=000000000000000a11b83ec67046bd1c3742d37c1fd19eb60993dd4142832587 height=256286 log2_work=71.688991 tx=23325155 date=2013-09-05 18:29:23 progress=0.164740 cache=70487 2015-03-26 01:12:58 UpdateTip: new best=0000000000000030b9133b269aa99ef3ff0720207add7d6cda4ee4b3682293c5 height=256287 log2_work=71.689133 tx=23325253 date=2013-09-05 18:30:04 progress=0.164741 cache=70561 2015-03-26 01:12:59 UpdateTip: new best=000000000000001ad1c72f89e3e477dad1a4f31fa259dcc36347e95df771beb3 height=256288 log2_work=71.689274 tx=23325512 date=2013-09-05 18:35:01 progress=0.164743 cache=70724 2015-03-26 01:12:59 UpdateTip: new best=000000000000001eb25e185d9b67d1395f90134039a94141aec1d1405ae6ed3e height=256289 log2_work=71.689416 tx=23325535 date=2013-09-05 18:35:15 progress=0.164743 cache=70777 2015-03-26 01:12:59 UpdateTip: new best=00000000000000021f594b3f66f4caa4251d538e4450bd3f03106d0008845d00 height=256290 log2_work=71.689557 tx=23325632 date=2013-09-05 18:36:45 progress=0.164744 cache=70928 2015-03-26 01:12:59 UpdateTip: new best=000000000000000eff0b9ad6c63cae18b2c3ca434f62083a77e09a5c254b9240 height=256291 log2_work=71.689699 tx=23326314 date=2013-09-05 18:58:29 progress=0.164748 cache=71546 2015-03-26 01:13:00 UpdateTip: new best=000000000000001857b4bcda0878dd5a25ffb28add7b9ce33ccaf2f6024e42f8 height=256292 log2_work=71.68984 tx=23326874 date=2013-09-05 19:00:16 progress=0.164752 cache=72269 2015-03-26 01:13:00 UpdateTip: new best=00000000000000003141cfb167866059105db3bb1cf035f6bc85b53ef85b92ae height=256293 log2_work=71.689981 tx=23326941 date=2013-09-05 19:00:35 progress=0.164753 cache=72342 2015-03-26 01:13:00 UpdateTip: new best=0000000000000020bb674a462e0c4a656dce0cd89a96d32beba275afc66512c6 height=256294 log2_work=71.690123 tx=23327139 date=2013-09-05 19:04:22 progress=0.164754 cache=72474 2015-03-26 01:13:00 UpdateTip: new best=000000000000000f1fd8011fb66ce8df84fb0f2f1b963e0e3cdbb3617f59b7c7 height=256295 log2_work=71.690264 tx=23327734 date=2013-09-05 19:23:20 progress=0.164759 cache=72917 2015-03-26 01:13:00 UpdateTip: new best=000000000000002a6947553bbcfb982ca718cf2a4cac7dd1b08b035be2964f7e height=256296 log2_work=71.690406 tx=23327990 date=2013-09-05 19:28:00 progress=0.164760 cache=73191 2015-03-26 01:13:01 UpdateTip: new best=000000000000000a5ad1f21d83c1432c8562d8dae8ba6b225a3b1ba85acce7f6 height=256297 log2_work=71.690547 tx=23328170 date=2013-09-05 19:28:25 progress=0.164762 cache=73281 2015-03-26 01:13:01 UpdateTip: new best=00000000000000105bd14a20434bdcd0ee740134893cf84a88421fd3e33ab983 height=256298 log2_work=71.690688 tx=23328497 date=2013-09-05 19:33:39 progress=0.164764 cache=73674 2015-03-26 01:13:01 UpdateTip: new best=000000000000000e31ee80d1bfb86f6afda5f01cc7fbde2fe4ad6b9ea5c64ce0 height=256299 log2_work=71.69083 tx=23328847 date=2013-09-05 19:41:38 progress=0.164766 cache=73966 2015-03-26 01:13:01 UpdateTip: new best=000000000000001b0326c319e92c6b9da767ef4afd124363307a6da3d902fa0a height=256300 log2_work=71.690971 tx=23329181 date=2013-09-05 19:47:54 progress=0.164769 cache=74273 2015-03-26 01:13:01 UpdateTip: new best=00000000000000119a3ce9b6ba7951f3d377b3218bb1be68e48434b5f8a5a9d5 height=256301 log2_work=71.691112 tx=23329436 date=2013-09-05 19:53:33 progress=0.164771 cache=74449 2015-03-26 01:13:02 UpdateTip: new best=000000000000003083e3e983f998ad82a3dee8678d718c50947dcb1ba95f492b height=256302 log2_work=71.691254 tx=23329988 date=2013-09-05 20:07:37 progress=0.164774 cache=74884 2015-03-26 01:13:02 UpdateTip: new best=00000000000000232c0aa351c33716d7763d6ed2fd31cac929d03711dea15557 height=256303 log2_work=71.691395 tx=23330089 date=2013-09-05 20:09:47 progress=0.164775 cache=74968 2015-03-26 01:13:02 UpdateTip: new best=00000000000000312aac75a02b0a1a704c80d00943284d98b7b290a150936718 height=256304 log2_work=71.691536 tx=23330274 date=2013-09-05 20:12:43 progress=0.164776 cache=75085 2015-03-26 01:13:02 UpdateTip: new best=000000000000001a1be9fab4bc79a801932b364716ced96ef324de80b158a67c height=256305 log2_work=71.691677 tx=23330498 date=2013-09-05 20:17:57 progress=0.164778 cache=75258 2015-03-26 01:13:02 UpdateTip: new best=000000000000000d884a8219f18d692d9a289bed1ade63ea2fe458681de87d93 height=256306 log2_work=71.691819 tx=23330904 date=2013-09-05 20:23:36 progress=0.164781 cache=75535 2015-03-26 01:13:02 UpdateTip: new best=0000000000000017771fa7ee6475fb0214c27f4bf9d05add8f0ac7d61d03b469 height=256307 log2_work=71.69196 tx=23330920 date=2013-09-05 20:24:55 progress=0.164781 cache=75547 2015-03-26 01:13:02 UpdateTip: new best=000000000000000696591811eb1df654a2ee33056bb8bfaea7024a6e1ff46ae3 height=256308 log2_work=71.692101 tx=23331408 date=2013-09-05 20:34:22 progress=0.164784 cache=75854 2015-03-26 01:13:02 UpdateTip: new best=000000000000000a00fd2b77b9808adce5a65a7ef665f9a1e537453548dabcf1 height=256309 log2_work=71.692242 tx=23332064 date=2013-09-05 20:46:32 progress=0.164789 cache=76332 2015-03-26 01:13:02 UpdateTip: new best=00000000000000019d219483d1b58abc6e6e4d2a147eaa9dd872f17be08b20ea height=256310 log2_work=71.692383 tx=23332098 date=2013-09-05 20:45:30 progress=0.164789 cache=76359 2015-03-26 01:13:03 UpdateTip: new best=000000000000000c10150feb7fca04dac4ffe51fd1b65cb786a28394e4f15a9a height=256311 log2_work=71.692525 tx=23332413 date=2013-09-05 20:52:20 progress=0.164792 cache=76578 2015-03-26 01:13:03 UpdateTip: new best=000000000000002132822bd27a89b73a722db1882a93ee3fb955fc90e185bc5e height=256312 log2_work=71.692666 tx=23332670 date=2013-09-05 20:57:32 progress=0.164793 cache=76730 2015-03-26 01:13:03 UpdateTip: new best=00000000000000049b4273b34759a18d1790a898f51946aa9479d2c6a4cccfa9 height=256313 log2_work=71.692807 tx=23332803 date=2013-09-05 20:59:25 progress=0.164794 cache=76717 2015-03-26 01:13:03 UpdateTip: new best=0000000000000013325dd0dea18664e71740f935c7d7330368c9fd79ce44220a height=256314 log2_work=71.692948 tx=23333358 date=2013-09-05 21:10:26 progress=0.164798 cache=77114 2015-03-26 01:13:03 UpdateTip: new best=000000000000002270d84d64b2d9738a39566a9614d037bda5df147ebaa8f7ee height=256315 log2_work=71.693089 tx=23333392 date=2013-09-05 21:10:35 progress=0.164798 cache=77139 2015-03-26 01:13:03 UpdateTip: new best=000000000000001a5005494e32ee1d0cef03424b64a51c26f0763c2cd4ed280b height=256316 log2_work=71.69323 tx=23334155 date=2013-09-05 21:26:59 progress=0.164804 cache=77683 2015-03-26 01:13:04 UpdateTip: new best=0000000000000021092a76cf2a89cdf3d936524f7d9e421e851bdc1cc2ed892e height=256317 log2_work=71.693371 tx=23334457 date=2013-09-05 21:37:35 progress=0.164806 cache=77961 2015-03-26 01:13:04 UpdateTip: new best=000000000000001e7e4c0d7928ba3ca327d3dcb2b22ab1120646d426f1e2db34 height=256318 log2_work=71.693512 tx=23334921 date=2013-09-05 21:46:23 progress=0.164809 cache=78139 2015-03-26 01:13:11 Autoprune: PruneOneBlockFile deleted blk/rev (00073) 2015-03-26 01:13:11 Pre-allocating up to position 0xa00000 in rev00079.dat

    — Reply to this email directly or view it on GitHub #5863 (comment).

  20. ajweiss commented at 2:48 am on March 26, 2015: contributor

    Also, my idea of a “canonical environment” is a commodity x86_64 based PC made in the last few years with 4-8gb of ram running a recent version of Debian or Ubuntu with bitcoind being run in the bare environment with no containers or VMs. Can you please describe in detail how your environment differs? (ie; if it’s cloud, who and what region. if it’s aws; magnetic or ssd, enhanced ebs or no…). When you’ve listed sufficient detail such that you think it’s getting absurd, that’s just right.

    Also, as mentioned before, core files, backtraces and full debug logs are most welcome.

    Thanks! On Mar 25, 2015 10:06 PM, “Adam Weiss” adam@signal11.com wrote:

    Do you have the head of this log where it prints the version string? core file/backtrace? On Mar 25, 2015 9:45 PM, “Rusty Russell” notifications@github.com wrote:

    Neither. git describe uses the previous tag it knows about. For some reason it doesn’t know about more recent tags. But I’m on commit 40ba177 https://github.com/bitcoin/bitcoin/commit/40ba177537a6cb032a03648208add12695c635e8 .

    The good news: it happened again! bitcoind: coins.cpp:150: virtual bool CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion `it->second.flags & CCoinsCacheEntry::FRESH’ failed.

    Here’s the last 100 lines of debug.log (can’t figure out how to attach the whole thing):

    2015-03-26 01:12:46 UpdateTip: new best=000000000000002a45bf369333c2daa0555e8e6f064cbd6bd1ff1a5d06980d82 height=256222 log2_work=71.679906 tx=23298335 date=2013-09-05 08:23:11 progress=0.164551 cache=48753 2015-03-26 01:12:46 UpdateTip: new best=000000000000000753309260f94ad504e02cfc39bbd27864572d935b1aea715d height=256223 log2_work=71.680048 tx=23298379 date=2013-09-05 08:24:21 progress=0.164551 cache=48814 2015-03-26 01:12:46 UpdateTip: new best=0000000000000022474ef8062a2b3ffac71dba34f4713e4320cb03ab2a8b4f27 height=256224 log2_work=71.680191 tx=23298647 date=2013-09-05 08:31:51 progress=0.164553 cache=49002 2015-03-26 01:12:46 UpdateTip: new best=000000000000000d93e092f11fbffe4cf51b3230b85429126fd59fdc4a658711 height=256225 log2_work=71.680333 tx=23298903 date=2013-09-05 09:02:55 progress=0.164555 cache=49232 2015-03-26 01:12:46 UpdateTip: new best=000000000000000b82f040c3342eb73532a6124efc40b024fdad513e05fd0bd5 height=256226 log2_work=71.680475 tx=23299531 date=2013-09-05 09:10:09 progress=0.164559 cache=49832 2015-03-26 01:12:46 UpdateTip: new best=000000000000002a6ecdbe7fbfa95c3506f1453577a683a79da81098e7905584 height=256227 log2_work=71.680618 tx=23300084 date=2013-09-05 09:16:24 progress=0.164563 cache=50243 2015-03-26 01:12:46 UpdateTip: new best=000000000000002c6fa89ede90bbc722936a218850ce5f6376edb2ea00a7fa05 height=256228 log2_work=71.68076 tx=23300099 date=2013-09-05 09:16:32 progress=0.164563 cache=50271 2015-03-26 01:12:47 UpdateTip: new best=00000000000000101ce20a35d1ddcae106b960d6e785104426f8d0bdd2017bf2 height=256229 log2_work=71.680902 tx=23300780 date=2013-09-05 09:35:11 progress=0.164568 cache=50989 2015-03-26 01:12:47 UpdateTip: new best=0000000000000020c9620a098f464ca259dfb49e0d58ac6e8072fb9ebf01aa22 height=256230 log2_work=71.681045 tx=23301155 date=2013-09-05 09:43:39 progress=0.164571 cache=51343 2015-03-26 01:12:47 UpdateTip: new best=000000000000002ff0c69115a9a7ec287f2eb1e7aaf5fcd8e570523c6d0e35da height=256231 log2_work=71.681187 tx=23301803 date=2013-09-05 10:08:04 progress=0.164575 cache=51839 2015-03-26 01:12:48 UpdateTip: new best=0000000000000012934a060e2f39186df3576919488f578142ac0b39f40eb016 height=256232 log2_work=71.681329 tx=23302097 date=2013-09-05 10:11:37 progress=0.164577 cache=52213 2015-03-26 01:12:48 UpdateTip: new best=0000000000000001fd0e62b6be598ed76515a2044941efdffaa6cffbaedf6be9 height=256233 log2_work=71.681472 tx=23302512 date=2013-09-05 10:23:50 progress=0.164580 cache=52519 2015-03-26 01:12:48 UpdateTip: new best=000000000000003040c350eb9968ddd8d465c02d3b8c08a57092d648d84e81fb height=256234 log2_work=71.681614 tx=23303160 date=2013-09-05 10:56:06 progress=0.164585 cache=53021 2015-03-26 01:12:48 UpdateTip: new best=0000000000000004e00a510cb0eb701049eab4ffa7f5ae0cb35166012f206735 height=256235 log2_work=71.681756 tx=23303555 date=2013-09-05 10:58:04 progress=0.164588 cache=53195 2015-03-26 01:12:48 UpdateTip: new best=0000000000000001d5cb5a162b017593ea700796346fc4ad2878317f88639558 height=256236 log2_work=71.681898 tx=23303687 date=2013-09-05 10:59:25 progress=0.164589 cache=53329 2015-03-26 01:12:49 UpdateTip: new best=00000000000000132059570a30473e9a66082f15a3587f46674e2868e42c1717 height=256237 log2_work=71.68204 tx=23304007 date=2013-09-05 11:07:52 progress=0.164591 cache=53593 2015-03-26 01:12:49 UpdateTip: new best=0000000000000022e8d500382e2890c4188afbac95bd96b28badeb40535a2d62 height=256238 log2_work=71.682183 tx=23304182 date=2013-09-05 11:13:55 progress=0.164592 cache=53742 2015-03-26 01:12:49 UpdateTip: new best=00000000000000153e89df838e32e1d69f44352582b7e916779a4c81f5c87fc8 height=256239 log2_work=71.682325 tx=23304295 date=2013-09-05 11:16:07 progress=0.164593 cache=53864 2015-03-26 01:12:49 UpdateTip: new best=000000000000001c4c2ae705ca273cabbb7881587eee17d65e97872f6d32e3dd height=256240 log2_work=71.682467 tx=23304658 date=2013-09-05 11:30:15 progress=0.164596 cache=54138 2015-03-26 01:12:49 UpdateTip: new best=00000000000000094943a4f8db9e6e3c7693fda19a87e0c6311cbff6af5e30ed height=256241 log2_work=71.682609 tx=23304712 date=2013-09-05 11:31:46 progress=0.164596 cache=54188 2015-03-26 01:12:49 UpdateTip: new best=00000000000000240151486223bec38ac2efd88b06358ed808b7650ca2d4e7b9 height=256242 log2_work=71.682751 tx=23305195 date=2013-09-05 11:53:06 progress=0.164599 cache=54500 2015-03-26 01:12:49 UpdateTip: new best=000000000000000b204f319b88cb7ada312006cff24259767ce543590376916b height=256243 log2_work=71.682893 tx=23305205 date=2013-09-05 11:53:17 progress=0.164599 cache=54510 2015-03-26 01:12:49 UpdateTip: new best=000000000000002fe406df0a623d0552973f7455aff2866b400492e7b964905d height=256244 log2_work=71.683035 tx=23305255 date=2013-09-05 11:54:08 progress=0.164600 cache=54530 2015-03-26 01:12:49 UpdateTip: new best=0000000000000004760b054428b39113e0a27e08cce9a98cd27c4dbee3ea3f05 height=256245 log2_work=71.683178 tx=23305450 date=2013-09-05 12:00:16 progress=0.164601 cache=54716 2015-03-26 01:12:50 UpdateTip: new best=000000000000000c5a4a7971338e3b2226b4697035455b1f10c8db8806241ecd height=256246 log2_work=71.68332 tx=23306018 date=2013-09-05 12:08:59 progress=0.164605 cache=55351 2015-03-26 01:12:50 UpdateTip: new best=000000000000001bb68eb99892b94fa8b33da6be1e52afe17920e05bea0528b0 height=256247 log2_work=71.683462 tx=23307265 date=2013-09-05 12:33:09 progress=0.164614 cache=56346 2015-03-26 01:12:51 UpdateTip: new best=00000000000000178f4cf7cef8941844bd72d1435f4cf5e61cfe066311f7807a height=256248 log2_work=71.683604 tx=23307913 date=2013-09-05 12:45:14 progress=0.164619 cache=56992 2015-03-26 01:12:51 UpdateTip: new best=00000000000000176e15e4fb8f59e2b65407afa87af9af2f2a3ad31a215b5049 height=256249 log2_work=71.683746 tx=23308112 date=2013-09-05 12:48:01 progress=0.164620 cache=57097 2015-03-26 01:12:51 UpdateTip: new best=000000000000001f1d84edf1d8901ed8a3b4415c0ae71faea14902a0cb12eb2c height=256250 log2_work=71.683888 tx=23308762 date=2013-09-05 13:07:00 progress=0.164625 cache=57724 2015-03-26 01:12:51 UpdateTip: new best=0000000000000021843eb11fc9e41c9f6b8403166d485259acd04f6349a15368 height=256251 log2_work=71.68403 tx=23309579 date=2013-09-05 13:35:58 progress=0.164630 cache=58350 2015-03-26 01:12:52 UpdateTip: new best=000000000000001be38f4d3d802a0c4f53aa250ade35ef562858df8f4459143a height=256252 log2_work=71.684172 tx=23310617 date=2013-09-05 13:44:30 progress=0.164638 cache=59410 2015-03-26 01:12:52 UpdateTip: new best=0000000000000016f9e206d675a4806a56889b4dad5bc8101458a67caae8fec5 height=256253 log2_work=71.684314 tx=23310937 date=2013-09-05 13:53:32 progress=0.164640 cache=59760 2015-03-26 01:12:53 UpdateTip: new best=00000000000000167d0798f1c90a8b032608b2bfec24e9338046f0458f889050 height=256254 log2_work=71.684456 tx=23311912 date=2013-09-05 14:11:04 progress=0.164647 cache=60417 2015-03-26 01:12:53 UpdateTip: new best=000000000000002c615c4e75ed0e3cd5fdf8c784ed70f994f6b8dd170491052b height=256255 log2_work=71.684598 tx=23312598 date=2013-09-05 14:25:07 progress=0.164652 cache=61044 2015-03-26 01:12:53 UpdateTip: new best=00000000000000294c1570b253f58ae84bb3436f27dc341e01ec98b12ffb4457 height=256256 log2_work=71.68474 tx=23312983 date=2013-09-05 14:38:18 progress=0.164654 cache=61382 2015-03-26 01:12:53 UpdateTip: new best=0000000000000013ef06f2beede29fc3544553f88da16e56be374b98bf8378cc height=256257 log2_work=71.684882 tx=23313815 date=2013-09-05 14:51:12 progress=0.164660 cache=61964 2015-03-26 01:12:54 UpdateTip: new best=000000000000000120c0962bfabb16f454d619b081dabd5f593bdec041fdb04c height=256258 log2_work=71.685023 tx=23314011 date=2013-09-05 14:53:04 progress=0.164662 cache=62117 2015-03-26 01:12:54 UpdateTip: new best=0000000000000030465e2521d48854fd32e22fb56a4d23383215eeef5cec71ad height=256259 log2_work=71.685165 tx=23314390 date=2013-09-05 14:59:37 progress=0.164664 cache=62420 2015-03-26 01:12:54 UpdateTip: new best=0000000000000015f00b818ec4d3cd84c7efe492c19042e8d41aa1d88220fcca height=256260 log2_work=71.685307 tx=23314668 date=2013-09-05 15:03:44 progress=0.164666 cache=62627 2015-03-26 01:12:54 UpdateTip: new best=0000000000000021f9c19ee0a908e5e8467a3135ca017778fa0b6fe205858e86 height=256261 log2_work=71.685449 tx=23315249 date=2013-09-05 15:17:30 progress=0.164670 cache=63094 2015-03-26 01:12:54 UpdateTip: new best=0000000000000004106d02bd030be7b11b09dc29bd1b814d82230a3602d71cbf height=256262 log2_work=71.685591 tx=23315921 date=2013-09-05 15:39:25 progress=0.164675 cache=63618 2015-03-26 01:12:55 Pre-allocating up to position 0x900000 in rev00079.dat 2015-03-26 01:12:55 UpdateTip: new best=00000000000000152c20907e5fc32b0a5699cd6b3bdfdc54541068acc40c9001 height=256263 log2_work=71.685733 tx=23316369 date=2013-09-05 15:42:00 progress=0.164678 cache=63845 2015-03-26 01:12:55 UpdateTip: new best=0000000000000017393b8866299590a0cccb9fc3ec77d78f95ad1c8dad019ba5 height=256264 log2_work=71.685875 tx=23316635 date=2013-09-05 15:44:52 progress=0.164680 cache=64044 2015-03-26 01:12:55 UpdateTip: new best=0000000000000029669d094d8730098533dace24b5ebbf53b2a289feb034444e height=256265 log2_work=71.686016 tx=23316846 date=2013-09-05 15:48:59 progress=0.164682 cache=64209 2015-03-26 01:12:55 UpdateTip: new best=0000000000000024de7285b3c2414f0a16183de523ea34b0e761a4111f693051 height=256266 log2_work=71.686158 tx=23317071 date=2013-09-05 15:54:51 progress=0.164683 cache=64449 2015-03-26 01:12:55 UpdateTip: new best=00000000000000165eab046aa4a026bc181b82d951936924c5aeb71ca394161a height=256267 log2_work=71.6863 tx=23317372 date=2013-09-05 15:58:28 progress=0.164685 cache=64676 2015-03-26 01:12:55 UpdateTip: new best=0000000000000030064bb7a58f10d456eaa8ed4b1b5d302c0ef7beee89165195 height=256268 log2_work=71.686442 tx=23317436 date=2013-09-05 15:59:52 progress=0.164686 cache=64706 2015-03-26 01:12:55 UpdateTip: new best=0000000000000028115e14c9c3ff53915c178d7e00483ea1d49e89e3a2f8ea1a height=256269 log2_work=71.686584 tx=23317684 date=2013-09-05 16:05:53 progress=0.164688 cache=64910 2015-03-26 01:12:55 UpdateTip: new best=000000000000002d8e2f9179ed9f8cf3d9651d7ba23e1df5045fd53a7efb7e9f height=256270 log2_work=71.686725 tx=23317794 date=2013-09-05 16:08:09 progress=0.164688 cache=64989 2015-03-26 01:12:55 UpdateTip: new best=000000000000000455fe9a0f779024be6ffb8d66e3983fbb9daf563cc2720dc1 height=256271 log2_work=71.686867 tx=23318058 date=2013-09-05 16:11:30 progress=0.164690 cache=65240 2015-03-26 01:12:56 UpdateTip: new best=0000000000000008ba72a286f0c0d7cc9f76404d6d03b1ecbceb957a896169ef height=256272 log2_work=71.687009 tx=23319210 date=2013-09-05 16:33:00 progress=0.164698 cache=66056 2015-03-26 01:12:56 UpdateTip: new best=000000000000001e54d7eb160c15019da95f2bf0e4a55a75339c2be02953c314 height=256273 log2_work=71.68715 tx=23319463 date=2013-09-05 16:38:52 progress=0.164700 cache=66267 2015-03-26 01:12:56 UpdateTip: new best=000000000000002665aa9b70dc61c3e3a21b14254d025f247fcd0ee7988556dc height=256274 log2_work=71.687292 tx=23319761 date=2013-09-05 16:45:01 progress=0.164702 cache=66495 2015-03-26 01:12:56 UpdateTip: new best=000000000000001452940962883c497d7bfe87508813529d924c3555ca524b6e height=256275 log2_work=71.687434 tx=23319801 date=2013-09-05 16:46:11 progress=0.164702 cache=66522 2015-03-26 01:12:56 UpdateTip: new best=000000000000002b0e29289255b11ea377d03f02d6e2013c9c4500879f17aa79 height=256276 log2_work=71.687575 tx=23320487 date=2013-09-05 17:02:48 progress=0.164707 cache=67014 2015-03-26 01:12:56 UpdateTip: new best=000000000000002d054be1e77c50aafcabf5ad9466560117bd8fd9706e08a472 height=256277 log2_work=71.687717 tx=23320591 date=2013-09-05 17:06:30 progress=0.164708 cache=67099 2015-03-26 01:12:57 UpdateTip: new best=000000000000002dc13bc14c9e999f56fa19ce4e0ae0c4f203197f1c6f269a26 height=256278 log2_work=71.687859 tx=23321470 date=2013-09-05 17:32:00 progress=0.164714 cache=67893 2015-03-26 01:12:57 UpdateTip: new best=000000000000000f7125b930e8fd8e239a4c63c0f2d55bb5e63ba9fc4e0109a8 height=256279 log2_work=71.688 tx=23322078 date=2013-09-05 17:35:07 progress=0.164719 cache=68269 2015-03-26 01:12:57 UpdateTip: new best=000000000000001a92af8fe69ff4aa1e1f02642f9a93587143e9d5d7f1ffba6c height=256280 log2_work=71.688142 tx=23322632 date=2013-09-05 17:40:49 progress=0.164722 cache=68537 2015-03-26 01:12:57 UpdateTip: new best=000000000000000159f4bd54cf3c54c2df34ddd6ff51c680e1b7d0622f5c8b43 height=256281 log2_work=71.688283 tx=23323215 date=2013-09-05 17:51:32 progress=0.164727 cache=68947 2015-03-26 01:12:58 UpdateTip: new best=00000000000000247fe2e1f11a489c118ffb6792d6ba11121279cf12a62453eb height=256282 log2_work=71.688425 tx=23323753 date=2013-09-05 18:02:21 progress=0.164730 cache=69359 2015-03-26 01:12:58 UpdateTip: new best=0000000000000014813cffe67140e7dbfb5a7773d274941c2edb1a11d0edd0b7 height=256283 log2_work=71.688567 tx=23324401 date=2013-09-05 18:17:30 progress=0.164735 cache=69837 2015-03-26 01:12:58 UpdateTip: new best=000000000000000a41919e5ba9bf94590307957438df8957b2d8e055d196b073 height=256284 log2_work=71.688708 tx=23324549 date=2013-09-05 18:17:40 progress=0.164736 cache=69925 2015-03-26 01:12:58 UpdateTip: new best=000000000000000da78b890167754320fcd7844a8333cf2e7eaa27e6eb66beef height=256285 log2_work=71.68885 tx=23324674 date=2013-09-05 18:19:50 progress=0.164737 cache=70080 2015-03-26 01:12:58 UpdateTip: new best=000000000000000a11b83ec67046bd1c3742d37c1fd19eb60993dd4142832587 height=256286 log2_work=71.688991 tx=23325155 date=2013-09-05 18:29:23 progress=0.164740 cache=70487 2015-03-26 01:12:58 UpdateTip: new best=0000000000000030b9133b269aa99ef3ff0720207add7d6cda4ee4b3682293c5 height=256287 log2_work=71.689133 tx=23325253 date=2013-09-05 18:30:04 progress=0.164741 cache=70561 2015-03-26 01:12:59 UpdateTip: new best=000000000000001ad1c72f89e3e477dad1a4f31fa259dcc36347e95df771beb3 height=256288 log2_work=71.689274 tx=23325512 date=2013-09-05 18:35:01 progress=0.164743 cache=70724 2015-03-26 01:12:59 UpdateTip: new best=000000000000001eb25e185d9b67d1395f90134039a94141aec1d1405ae6ed3e height=256289 log2_work=71.689416 tx=23325535 date=2013-09-05 18:35:15 progress=0.164743 cache=70777 2015-03-26 01:12:59 UpdateTip: new best=00000000000000021f594b3f66f4caa4251d538e4450bd3f03106d0008845d00 height=256290 log2_work=71.689557 tx=23325632 date=2013-09-05 18:36:45 progress=0.164744 cache=70928 2015-03-26 01:12:59 UpdateTip: new best=000000000000000eff0b9ad6c63cae18b2c3ca434f62083a77e09a5c254b9240 height=256291 log2_work=71.689699 tx=23326314 date=2013-09-05 18:58:29 progress=0.164748 cache=71546 2015-03-26 01:13:00 UpdateTip: new best=000000000000001857b4bcda0878dd5a25ffb28add7b9ce33ccaf2f6024e42f8 height=256292 log2_work=71.68984 tx=23326874 date=2013-09-05 19:00:16 progress=0.164752 cache=72269 2015-03-26 01:13:00 UpdateTip: new best=00000000000000003141cfb167866059105db3bb1cf035f6bc85b53ef85b92ae height=256293 log2_work=71.689981 tx=23326941 date=2013-09-05 19:00:35 progress=0.164753 cache=72342 2015-03-26 01:13:00 UpdateTip: new best=0000000000000020bb674a462e0c4a656dce0cd89a96d32beba275afc66512c6 height=256294 log2_work=71.690123 tx=23327139 date=2013-09-05 19:04:22 progress=0.164754 cache=72474 2015-03-26 01:13:00 UpdateTip: new best=000000000000000f1fd8011fb66ce8df84fb0f2f1b963e0e3cdbb3617f59b7c7 height=256295 log2_work=71.690264 tx=23327734 date=2013-09-05 19:23:20 progress=0.164759 cache=72917 2015-03-26 01:13:00 UpdateTip: new best=000000000000002a6947553bbcfb982ca718cf2a4cac7dd1b08b035be2964f7e height=256296 log2_work=71.690406 tx=23327990 date=2013-09-05 19:28:00 progress=0.164760 cache=73191 2015-03-26 01:13:01 UpdateTip: new best=000000000000000a5ad1f21d83c1432c8562d8dae8ba6b225a3b1ba85acce7f6 height=256297 log2_work=71.690547 tx=23328170 date=2013-09-05 19:28:25 progress=0.164762 cache=73281 2015-03-26 01:13:01 UpdateTip: new best=00000000000000105bd14a20434bdcd0ee740134893cf84a88421fd3e33ab983 height=256298 log2_work=71.690688 tx=23328497 date=2013-09-05 19:33:39 progress=0.164764 cache=73674 2015-03-26 01:13:01 UpdateTip: new best=000000000000000e31ee80d1bfb86f6afda5f01cc7fbde2fe4ad6b9ea5c64ce0 height=256299 log2_work=71.69083 tx=23328847 date=2013-09-05 19:41:38 progress=0.164766 cache=73966 2015-03-26 01:13:01 UpdateTip: new best=000000000000001b0326c319e92c6b9da767ef4afd124363307a6da3d902fa0a height=256300 log2_work=71.690971 tx=23329181 date=2013-09-05 19:47:54 progress=0.164769 cache=74273 2015-03-26 01:13:01 UpdateTip: new best=00000000000000119a3ce9b6ba7951f3d377b3218bb1be68e48434b5f8a5a9d5 height=256301 log2_work=71.691112 tx=23329436 date=2013-09-05 19:53:33 progress=0.164771 cache=74449 2015-03-26 01:13:02 UpdateTip: new best=000000000000003083e3e983f998ad82a3dee8678d718c50947dcb1ba95f492b height=256302 log2_work=71.691254 tx=23329988 date=2013-09-05 20:07:37 progress=0.164774 cache=74884 2015-03-26 01:13:02 UpdateTip: new best=00000000000000232c0aa351c33716d7763d6ed2fd31cac929d03711dea15557 height=256303 log2_work=71.691395 tx=23330089 date=2013-09-05 20:09:47 progress=0.164775 cache=74968 2015-03-26 01:13:02 UpdateTip: new best=00000000000000312aac75a02b0a1a704c80d00943284d98b7b290a150936718 height=256304 log2_work=71.691536 tx=23330274 date=2013-09-05 20:12:43 progress=0.164776 cache=75085 2015-03-26 01:13:02 UpdateTip: new best=000000000000001a1be9fab4bc79a801932b364716ced96ef324de80b158a67c height=256305 log2_work=71.691677 tx=23330498 date=2013-09-05 20:17:57 progress=0.164778 cache=75258 2015-03-26 01:13:02 UpdateTip: new best=000000000000000d884a8219f18d692d9a289bed1ade63ea2fe458681de87d93 height=256306 log2_work=71.691819 tx=23330904 date=2013-09-05 20:23:36 progress=0.164781 cache=75535 2015-03-26 01:13:02 UpdateTip: new best=0000000000000017771fa7ee6475fb0214c27f4bf9d05add8f0ac7d61d03b469 height=256307 log2_work=71.69196 tx=23330920 date=2013-09-05 20:24:55 progress=0.164781 cache=75547 2015-03-26 01:13:02 UpdateTip: new best=000000000000000696591811eb1df654a2ee33056bb8bfaea7024a6e1ff46ae3 height=256308 log2_work=71.692101 tx=23331408 date=2013-09-05 20:34:22 progress=0.164784 cache=75854 2015-03-26 01:13:02 UpdateTip: new best=000000000000000a00fd2b77b9808adce5a65a7ef665f9a1e537453548dabcf1 height=256309 log2_work=71.692242 tx=23332064 date=2013-09-05 20:46:32 progress=0.164789 cache=76332 2015-03-26 01:13:02 UpdateTip: new best=00000000000000019d219483d1b58abc6e6e4d2a147eaa9dd872f17be08b20ea height=256310 log2_work=71.692383 tx=23332098 date=2013-09-05 20:45:30 progress=0.164789 cache=76359 2015-03-26 01:13:03 UpdateTip: new best=000000000000000c10150feb7fca04dac4ffe51fd1b65cb786a28394e4f15a9a height=256311 log2_work=71.692525 tx=23332413 date=2013-09-05 20:52:20 progress=0.164792 cache=76578 2015-03-26 01:13:03 UpdateTip: new best=000000000000002132822bd27a89b73a722db1882a93ee3fb955fc90e185bc5e height=256312 log2_work=71.692666 tx=23332670 date=2013-09-05 20:57:32 progress=0.164793 cache=76730 2015-03-26 01:13:03 UpdateTip: new best=00000000000000049b4273b34759a18d1790a898f51946aa9479d2c6a4cccfa9 height=256313 log2_work=71.692807 tx=23332803 date=2013-09-05 20:59:25 progress=0.164794 cache=76717 2015-03-26 01:13:03 UpdateTip: new best=0000000000000013325dd0dea18664e71740f935c7d7330368c9fd79ce44220a height=256314 log2_work=71.692948 tx=23333358 date=2013-09-05 21:10:26 progress=0.164798 cache=77114 2015-03-26 01:13:03 UpdateTip: new best=000000000000002270d84d64b2d9738a39566a9614d037bda5df147ebaa8f7ee height=256315 log2_work=71.693089 tx=23333392 date=2013-09-05 21:10:35 progress=0.164798 cache=77139 2015-03-26 01:13:03 UpdateTip: new best=000000000000001a5005494e32ee1d0cef03424b64a51c26f0763c2cd4ed280b height=256316 log2_work=71.69323 tx=23334155 date=2013-09-05 21:26:59 progress=0.164804 cache=77683 2015-03-26 01:13:04 UpdateTip: new best=0000000000000021092a76cf2a89cdf3d936524f7d9e421e851bdc1cc2ed892e height=256317 log2_work=71.693371 tx=23334457 date=2013-09-05 21:37:35 progress=0.164806 cache=77961 2015-03-26 01:13:04 UpdateTip: new best=000000000000001e7e4c0d7928ba3ca327d3dcb2b22ab1120646d426f1e2db34 height=256318 log2_work=71.693512 tx=23334921 date=2013-09-05 21:46:23 progress=0.164809 cache=78139 2015-03-26 01:13:11 Autoprune: PruneOneBlockFile deleted blk/rev (00073) 2015-03-26 01:13:11 Pre-allocating up to position 0xa00000 in rev00079.dat

    — Reply to this email directly or view it on GitHub #5863 (comment).

  21. rustyrussell commented at 3:00 am on March 26, 2015: contributor

    Got a core file, but backtrace was useless without debugging info :( So I’ve reconfigured with –enable-debug (and –disable-wallet). Seems repeatable, so I’ll expect something soon. If not, I’ll erase the blockchain and try again.

    Hardware: I’m running this on a minimal digital ocean droplet, so 512M ram, 1.5G swap, 20GB total hdd. Hence the desire to test pruning.

    Setup: $ cat .bitcoin/bitcoin.conf server=1 gen=0 prune=1000 rpcuser=bitcoinrpc rpcpassword=….. $ bitcoind > bitcoind-out-4 2>&1 $ watch bitcoin-cli getinfo

    The following diff was applied, but I’ve now unapplied it to make doubly-sure:

     0diff --git a/src/txmempool.cpp b/src/txmempool.cpp
     1index 6e0f7e9..2645baf 100644
     2--- a/src/txmempool.cpp
     3+++ b/src/txmempool.cpp
     4@@ -523,14 +523,29 @@ void CTxMemPool::removeForBlock(const std::vector<CTransaction>& vtx, unsigned i
     5     BOOST_FOREACH(const CTransaction& tx, vtx)
     6     {
     7         uint256 hash = tx.GetHash();
     8-        if (mapTx.count(hash))
     9+        if (mapTx.count(hash)) {
    10+           // Record a TX we already knew.
    11+           std::cerr << nBlockHeight << ":mutual:" << tx.GetHash().ToString() << endl;
    12             entries.push_back(mapTx[hash]);
    13+       } else {
    14+           std::cerr << nBlockHeight << ":new:" << tx.GetHash().ToString() << endl;
    15+       }
    16     }
    17     minerPolicyEstimator->seenBlock(entries, nBlockHeight, minRelayFee);
    18     BOOST_FOREACH(const CTransaction& tx, vtx)
    19     {
    20         std::list<CTransaction> dummy;
    21         remove(tx, dummy, false);
    22+    }
    23+
    24+   typedef std::map<uint256, CTxMemPoolEntry> maptx_type;
    25+   BOOST_FOREACH(const maptx_type::value_type& txpair, mapTx)
    26+   {
    27+       std::cerr << nBlockHeight << ":mempool-only:" << txpair.first.ToString() << endl;
    28+   }
    29+
    30+    BOOST_FOREACH(const CTransaction& tx, vtx)
    31+    {
    32         removeConflicts(tx, conflicts);
    33         ClearPrioritisation(tx.GetHash());
    34     }
    
  22. rustyrussell commented at 3:11 am on March 26, 2015: contributor
     0$ lsb_release -a
     1No LSB modules are available.
     2Distributor ID: Debian
     3Description:    Debian GNU/Linux 7.7 (wheezy)
     4Release:    7.7
     5Codename:   wheezy
     6$ uname -a
     7Linux Petty1 3.2.0-4-686-pae [#1](/bitcoin-bitcoin/1/) SMP Debian 3.2.54-2 i686 GNU/Linux
     8$ bitcoind --version
     9Bitcoin Core Daemon version v0.10.99.0-40ba177
    10Copyright (C) 2009-2015 The Bitcoin Core Developers
    11
    12This is experimental software.
    13
    14Distributed under the MIT software license, see the accompanying file COPYING
    15or <http://www.opensource.org/licenses/mit-license.php>.
    16
    17This product includes software developed by the OpenSSL Project for use in the
    18OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
    19by Eric Young and UPnP software written by Thomas Bernard.
    
  23. ajweiss commented at 3:11 am on March 26, 2015: contributor

    I don’t see any immediate problems with the diff, but I agree, better safe than sorry. Hopefully you’ll get a backtrace, and if it’s not obvious, don’t forget to mind the threads.

    Thanks a lot! On Mar 25, 2015 11:00 PM, “Rusty Russell” notifications@github.com wrote:

    Reconfigured with –enable-debug (and –disable-wallet) as before. Got a core file, but backtrace was useless without debugging info :( Seems repeatable, so I’ll expect something soon. If not, I’ll erase the blockchain and try again.

    Hardware: I’m running this on a minimal digital ocean droplet, so 512M ram, 1.5G swap, 20GB total hdd. Hence the desire to test pruning.

    Setup: $ cat .bitcoin/bitcoin.conf server=1 gen=0 prune=1000 rpcuser=bitcoinrpc rpcpassword=….. $ bitcoind > bitcoind-out-4 2>&1 $ watch bitcoin-cli getinfo

    The following diff was applied, but I’ve now unapplied it to make doubly-sure:

    diff –git a/src/txmempool.cpp b/src/txmempool.cpp index 6e0f7e9..2645baf 100644— a/src/txmempool.cpp+++ b/src/txmempool.cpp@@ -523,14 +523,29 @@ void CTxMemPool::removeForBlock(const std::vector& vtx, unsigned i BOOST_FOREACH(const CTransaction& tx, vtx) { uint256 hash = tx.GetHash();- if (mapTx.count(hash))+ if (mapTx.count(hash)) {+ // Record a TX we already knew.+ std::cerr « nBlockHeight « “:mutual:” « tx.GetHash().ToString() « endl; entries.push_back(mapTx[hash]);+ } else {+ std::cerr « nBlockHeight « “:new:” « tx.GetHash().ToString() « endl;+ } } minerPolicyEstimator->seenBlock(entries, nBlockHeight, minRelayFee); BOOST_FOREACH(const CTransaction& tx, vtx) { std::list dummy; remove(tx, dummy, false);+ }++ typedef std::map<uint256, CTxMemPoolEntry> maptx_type;+ BOOST_FOREACH(const maptx_type::value_type& txpair, mapTx)+ {+ std::cerr « nBlockHeight « “:mempool-only:” « txpair.first.ToString() « endl;+ }++ BOOST_FOREACH(const CTransaction& tx, vtx)+ { removeConflicts(tx, conflicts); ClearPrioritisation(tx.GetHash()); }

    — Reply to this email directly or view it on GitHub #5863 (comment).

  24. fanquake commented at 6:22 am on March 26, 2015: member
    Can this be rebased?
  25. rustyrussell commented at 10:04 am on March 26, 2015: contributor

    $ tail bitcoind-out-4 bitcoind: coins.cpp:150: virtual bool CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&): Assertion `it->second.flags & CCoinsCacheEntry::FRESH’ failed. $ gdb bitcoin/src/bitcoind core (gdb) thread apply all bt

    Thread 11 (Thread 0xaef05b70 (LWP 31697)): #0 0xb702a424 in __kernel_vsyscall () #1 0xb6c2423a in __pthread_cond_wait (cond=0xbfb8f740, mutex=0xbfb8f728) at pthread_cond_wait.c:153 #2 0xb7083f4d in boost::condition_variable::wait (this=0xbfb8f728, m=…) at /usr/include/boost/thread/pthread/condition_variable.hpp:56 #3 0xb722317d in CSemaphore::wait (this=0xbfb8f728) at sync.h:200 #4 0xb7223321 in CSemaphoreGrant::Acquire (this=0xaef0515c) at sync.h:236 #5 0xb7223522 in CSemaphoreGrant::CSemaphoreGrant (this=0xaef0515c, sema=…, fTry=false) at sync.h:271 #6 0xb7218d06 in ThreadOpenConnections () at net.cpp:1181 #7 0xb722ae48 in TraceThread<void ()()> (name=0xb74ef9c2 “opencon”, func=0xb72187d2 <ThreadOpenConnections()>) at util.h:214 #8 0xb7265027 in boost::_bi::list2<boost::_bi::value<char const>, boost::bi::value<void ()()> >::operator()<void ()(char const*, void ()()), boost::_bi::list0> (this=0xb211cc80, f=@0xb211cc7c: 0xb722adca <TraceThread<void ()()>(char const, void (_)())>, a=…) at /usr/include/boost/bind/bind.hpp:313 #9 0xb7264b23 in boost::bi::bind_t<void, void ()(char const, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::bi::value<void ()()> > >::operator() (this=0xb211cc7c) at /usr/include/boost/bind/bind_template.hpp:20 #10 0xb72644b1 in boost::detail::thread_data<boost::_bi::bind_t<void, void ()(c—Type to continue, or q to quit— har const, void ()()), boost::_bi::list2<boost::_bi::value<char const*>, boost::_bi::value<void (*)()> > > >::run (this=0xb211cb78) at /usr/include/boost/thread/detail/thread.hpp:62 #11 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0 #12 0xb6c1fc39 in start_thread (arg=0xaef05b70) at pthread_create.c:304 #13 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

    Thread 10 (Thread 0xb611bb70 (LWP 31657)): #0 0xb702a424 in __kernel_vsyscall () #1 0xb6c2423a in __pthread_cond_wait (cond=0xb611b1a8, mutex=0xb83d5900) at pthread_cond_wait.c:153 #2 0xb7281848 in boost::asio::detail::posix_event::waitboost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex > (this=0xb611b1a8, lock=…) at /usr/include/boost/asio/detail/posix_event.hpp:80 #3 0xb7277e33 in boost::asio::detail::task_io_service::do_run_one ( this=0xb83d58e8, lock=…, this_thread=…, private_op_queue=…, ec=…) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:380 #4 0xb727784b in boost::asio::detail::task_io_service::run (this=0xb83d58e8, ec=…) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:146 #5 0xb72782c1 in boost::asio::io_service::run (this=0xb83d5340) at /usr/include/boost/asio/impl/io_service.ipp:59 #6 0xb72e9911 in boost::_mfi::mf0<unsigned int, boost::asio::io_service>::operator() (this=0xb842634c, p=0xb83d5340) —Type to continue, or q to quit— at /usr/include/boost/bind/mem_fn_template.hpp:49 #7 0xb72e7f0a in boost::_bi::list1boost::_bi::value<boost::asio::io_service* >::operator()<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list0> (this=0xb8426354, f=…, a=…) at /usr/include/boost/bind/bind.hpp:243 #8 0xb72e679d in boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > >::operator() (this=0xb842634c) at /usr/include/boost/bind/bind_template.hpp:20 #9 0xb72e4b31 in boost::detail::thread_data<boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > > >::run (this=0xb8426248) at /usr/include/boost/thread/detail/thread.hpp:62 #10 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0 #11 0xb6c1fc39 in start_thread (arg=0xb611bb70) at pthread_create.c:304 #12 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

    Thread 9 (Thread 0xb466ab70 (LWP 31663)): #0 0xb702a424 in __kernel_vsyscall () #1 0xb6c27e7b in do_pread64 (offset=, count=, buf=, fd=) at ../sysdeps/unix/sysv/linux/pread64.c:54 #2 __libc_pread64 (fd=109, buf=0xb15d3d58, count=31295, offset=4234304) —Type to continue, or q to quit— at ../sysdeps/unix/sysv/linux/pread64.c:77 #3 0xb74810d1 in leveldb::(anonymous namespace)::PosixRandomAccessFile::Read ( this=0xb893bee0, offset=4217300, n=31295, result=0xb4669cf4, scratch=0xb15d3d58 “”) at util/env_posix.cc:83 #4 0xb748dc60 in leveldb::ReadBlock (file=0xb893bee0, options=…, handle=…, result=0xb4669da0) at table/format.cc:79 #5 0xb747a1da in leveldb::Table::BlockReader (arg=0xb87c23e8, options=…, index_value=…) at table/table.cc:189 #6 0xb747b742 in leveldb::(anonymous namespace)::TwoLevelIterator::InitDataBlock (this=0xb1e55eb0) at table/two_level_iterator.cc:165 #7 0xb747b448 in leveldb::(anonymous namespace)::TwoLevelIterator::SkipEmptyDataBlocksForward (this=0xb1e55eb0) at table/two_level_iterator.cc:133 #8 0xb747b334 in leveldb::(anonymous namespace)::TwoLevelIterator::Next ( this=0xb1e55eb0) at table/two_level_iterator.cc:115 #9 0xb747769a in leveldb::IteratorWrapper::Next (this=0xb227b6f8) at ./table/iterator_wrapper.h:42 #10 0xb747b329 in leveldb::(anonymous namespace)::TwoLevelIterator::Next ( this=0xb227b6c0) at table/two_level_iterator.cc:114 #11 0xb747769a in leveldb::IteratorWrapper::Next (this=0xb1b16384) at ./table/iterator_wrapper.h:42 #12 0xb7476c82 in leveldb::(anonymous namespace)::MergingIterator::Next ( this=0xbdc6c858) at table/merger.cc:81 #13 0xb744cf6e in leveldb::DBImpl::DoCompactionWork (this=0xb8433448, —Type to continue, or q to quit— compact=0xbfd4fff0) at db/db_impl.cc:975 #14 0xb744ba72 in leveldb::DBImpl::BackgroundCompaction (this=0xb8433448) at db/db_impl.cc:706 #15 0xb744b3c0 in leveldb::DBImpl::BackgroundCall (this=0xb8433448) at db/db_impl.cc:644 #16 0xb744b302 in leveldb::DBImpl::BGWork (db=0xb8433448) at db/db_impl.cc:633 #17 0xb7483a86 in leveldb::(anonymous namespace)::PosixEnv::BGThread ( this=0xb8426db8) at util/env_posix.cc:569 #18 0xb748365f in leveldb::(anonymous namespace)::PosixEnv::BGThreadWrapper ( arg=0xb8426db8) at util/env_posix.cc:508 #19 0xb6c1fc39 in start_thread (arg=0xb466ab70) at pthread_create.c:304 #20 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

    Thread 8 (Thread 0xadf03b70 (LWP 31699)): #0 0xb702a424 in __kernel_vsyscall ()

    #1 0xb6c24733 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236 #2 0xb7372570 in boost::condition_variable::timed_wait (this=0xbcc8c6b0, m=…, wait_until=…) at /usr/include/boost/thread/pthread/condition_variable.hpp:74 #3 0xb6f95a58 in boost::this_thread::sleep(boost::posix_time::ptime const&) () from /usr/lib/libboost_thread.so.1.49.0 —Type to continue, or q to quit— #4 0xb742f85e in boost::this_thread::sleep<boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000ll> > (rel_time=…) at /usr/include/boost/thread/pthread/thread_data.hpp:149 #5 0xb742db6e in MilliSleep (n=900000) at utiltime.cpp:54 #6 0xb722b1c3 in LoopForever<void ()()> (name=0xb74ef9d2 “dumpaddr”, func=0xb7218522 <DumpAddresses()>, msecs=900000) at util.h:185 #7 0xb7264f87 in boost::_bi::list3<boost::_bi::value<char const>, boost::bi::value<void ()()>, boost::_bi::value >::operator()<void ()(char const*, void ()(), long long), boost::_bi::list0> (this=0xbcc8c728, f=@0xbcc8c724: 0xb722b12c <LoopForever<void ()()>(char const, void (_)(), long long)>, a=…) at /usr/include/boost/bind/bind.hpp:392 #8 0xb7264aa7 in boost::_bi::bind_t<void, void ()(char const, void ()(), long long), boost::_bi::list3<boost::_bi::value<char const>, boost::_bi::value<void ()()>, boost::_bi::value > >::operator() (this=0xbcc8c724) at /usr/include/boost/bind/bind_template.hpp:20 #9 0xb7264467 in boost::detail::thread_data<boost::_bi::bind_t<void, void ()(char const*, void ()(), long long), boost::_bi::list3<boost::_bi::value<char const>, boost::_bi::value<void (*)()>, boost::_bi::value > > >::run ( this=0xbcc8c620) at /usr/include/boost/thread/detail/thread.hpp:62 #10 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0 #11 0xb6c1fc39 in start_thread (arg=0xadf03b70) at pthread_create.c:304 #12 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

    —Type to continue, or q to quit— Thread 7 (Thread 0xb5119b70 (LWP 31659)): #0 0xb702a424 in __kernel_vsyscall () #1 0xb6c2423a in __pthread_cond_wait (cond=0xb51191a8, mutex=0xb83d5900) at pthread_cond_wait.c:153 #2 0xb7281848 in boost::asio::detail::posix_event::waitboost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex > (this=0xb51191a8, lock=…) at /usr/include/boost/asio/detail/posix_event.hpp:80 #3 0xb7277e33 in boost::asio::detail::task_io_service::do_run_one ( this=0xb83d58e8, lock=…, this_thread=…, private_op_queue=…, ec=…) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:380 #4 0xb727784b in boost::asio::detail::task_io_service::run (this=0xb83d58e8, ec=…) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:146 #5 0xb72782c1 in boost::asio::io_service::run (this=0xb83d5340) at /usr/include/boost/asio/impl/io_service.ipp:59 #6 0xb72e9911 in boost::_mfi::mf0<unsigned int, boost::asio::io_service>::operator() (this=0xb842657c, p=0xb83d5340) at /usr/include/boost/bind/mem_fn_template.hpp:49 #7 0xb72e7f0a in boost::_bi::list1boost::_bi::value<boost::asio::io_service* >::operator()<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list0> (this=0xb8426584, f=…, a=…) at /usr/include/boost/bind/bind.hpp:243 #8 0xb72e679d in boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::bi::list1<boost::bi::value<boost::asio::io—Type to continue, or q to quit— service> > >::operator() (this=0xb842657c) at /usr/include/boost/bind/bind_template.hpp:20 #9 0xb72e4b31 in boost::detail::thread_data<boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1<boost::_bi::valueboost::asio::io_service_ > > >::run (this=0xb8426478) at /usr/include/boost/thread/detail/thread.hpp:62 #10 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0 #11 0xb6c1fc39 in start_thread (arg=0xb5119b70) at pthread_create.c:304 #12 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

    Thread 6 (Thread 0xaf706b70 (LWP 31696)): #0 0xb702a424 in __kernel_vsyscall () #1 0xb6c24733 in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:236 #2 0xb7372570 in boost::condition_variable::timed_wait (this=0xbf8cadf8, m=…, wait_until=…) at /usr/include/boost/thread/pthread/condition_variable.hpp:74 #3 0xb6f95a58 in boost::this_thread::sleep(boost::posix_time::ptime const&) () from /usr/lib/libboost_thread.so.1.49.0 #4 0xb742f85e in boost::this_thread::sleep<boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000ll> > (rel_time=…) at /usr/include/boost/thread/pthread/thread_data.hpp:149 —Type to continue, or q to quit— #5 0xb742db6e in MilliSleep (n=120000) at utiltime.cpp:54 #6 0xb721abaf in ThreadOpenAddedConnections () at net.cpp:1320 #7 0xb722ae48 in TraceThread<void ()()> (name=0xb74ef9bb “addcon”, func=0xb7219453 <ThreadOpenAddedConnections()>) at util.h:214 #8 0xb7265027 in boost::_bi::list2<boost::_bi::value<char const>, boost::bi::value<void ()()> >::operator()<void ()(char const*, void ()()), boost::_bi::list0> (this=0xbf8cae70, f=@0xbf8cae6c: 0xb722adca <TraceThread<void ()()>(char const, void (_)())>, a=…) at /usr/include/boost/bind/bind.hpp:313 #9 0xb7264b23 in boost::_bi::bind_t<void, void ()(char const, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void ()()> > >::operator() (this=0xbf8cae6c) at /usr/include/boost/bind/bind_template.hpp:20 #10 0xb72644b1 in boost::detail::thread_data<boost::_bi::bind_t<void, void ()(char const*, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void (*)()> > > >::run (this=0xbf8cad68) at /usr/include/boost/thread/detail/thread.hpp:62 #11 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0 #12 0xb6c1fc39 in start_thread (arg=0xaf706b70) at pthread_create.c:304 #13 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

    Thread 5 (Thread 0xaff07b70 (LWP 31695)): #0 0xb702a424 in __kernel_vsyscall () #1 0xb6b84d01 in select () at ../sysdeps/unix/syscall-template.S:82 —Type to continue, or q to quit— #2 0xb7216197 in ThreadSocketHandler () at net.cpp:770 #3 0xb722ae48 in TraceThread<void ()()> (name=0xb74ef34f “net”, func=0xb7215069 <ThreadSocketHandler()>) at util.h:214 #4 0xb7265027 in boost::_bi::list2<boost::_bi::value<char const>, boost::bi::value<void ()()> >::operator()<void ()(char const*, void ()()), boost::_bi::list0> (this=0xbdd72f60, f=@0xbdd72f5c: 0xb722adca <TraceThread<void ()()>(char const, void (_)())>, a=…) at /usr/include/boost/bind/bind.hpp:313 #5 0xb7264b23 in boost::_bi::bind_t<void, void ()(char const, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void ()()> > >::operator() (this=0xbdd72f5c) at /usr/include/boost/bind/bind_template.hpp:20 #6 0xb72644b1 in boost::detail::thread_data<boost::_bi::bind_t<void, void ()(char const*, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void (*)()> > > >::run (this=0xbdd72e58) at /usr/include/boost/thread/detail/thread.hpp:62 #7 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0 #8 0xb6c1fc39 in start_thread (arg=0xaff07b70) at pthread_create.c:304 #9 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

    Thread 4 (Thread 0xb591ab70 (LWP 31658)): #0 0xb702a424 in __kernel_vsyscall () #1 0xb6b8c466 in epoll_wait () at ../sysdeps/unix/syscall-template.S:82 #2 0xb7276709 in boost::asio::detail::epoll_reactor::run (this=0xb83bda80, —Type to continue, or q to quit— block=true, ops=…) at /usr/include/boost/asio/detail/impl/epoll_reactor.ipp:366 #3 0xb7277d5b in boost::asio::detail::task_io_service::do_run_one ( this=0xb83d58e8, lock=…, this_thread=…, private_op_queue=…, ec=…) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:353 #4 0xb727784b in boost::asio::detail::task_io_service::run (this=0xb83d58e8, ec=…) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:146 #5 0xb72782c1 in boost::asio::io_service::run (this=0xb83d5340) at /usr/include/boost/asio/impl/io_service.ipp:59 #6 0xb72e9911 in boost::_mfi::mf0<unsigned int, boost::asio::io_service>::operator() (this=0xb8426464, p=0xb83d5340) at /usr/include/boost/bind/mem_fn_template.hpp:49 #7 0xb72e7f0a in boost::_bi::list1boost::_bi::value<boost::asio::io_service* >::operator()<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list0> (this=0xb842646c, f=…, a=…) at /usr/include/boost/bind/bind.hpp:243 #8 0xb72e679d in boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > >::operator() (this=0xb8426464) at /usr/include/boost/bind/bind_template.hpp:20 #9 0xb72e4b31 in boost::detail::thread_data<boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > > >::run (this=0xb8426360) —Type to continue, or q to quit— at /usr/include/boost/thread/detail/thread.hpp:62 #10 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0 #11 0xb6c1fc39 in start_thread (arg=0xb591ab70) at pthread_create.c:304 #12 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

    Thread 3 (Thread 0xb691cb70 (LWP 31656)): #0 0xb702a424 in __kernel_vsyscall () #1 0xb6c2423a in __pthread_cond_wait (cond=0xb691c1a8, mutex=0xb83d5900) at pthread_cond_wait.c:153 #2 0xb7281848 in boost::asio::detail::posix_event::waitboost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex > (this=0xb691c1a8, lock=…) at /usr/include/boost/asio/detail/posix_event.hpp:80 #3 0xb7277e33 in boost::asio::detail::task_io_service::do_run_one ( this=0xb83d58e8, lock=…, this_thread=…, private_op_queue=…, ec=…) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:380 #4 0xb727784b in boost::asio::detail::task_io_service::run (this=0xb83d58e8, ec=…) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:146 #5 0xb72782c1 in boost::asio::io_service::run (this=0xb83d5340) at /usr/include/boost/asio/impl/io_service.ipp:59 #6 0xb72e9911 in boost::_mfi::mf0<unsigned int, boost::asio::io_service>::operator() (this=0xb83c73f4, p=0xb83d5340) at /usr/include/boost/bind/mem_fn_template.hpp:49 #7 0xb72e7f0a in boost::_bi::list1boost::_bi::value<boost::asio::io_service* —Type to continue, or q to quit—

    ::operator()<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list0> (this=0xb83c73fc, f=…, a=…) at /usr/include/boost/bind/bind.hpp:243 #8 0xb72e679d in boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > >::operator() (this=0xb83c73f4) at /usr/include/boost/bind/bind_template.hpp:20 #9 0xb72e4b31 in boost::detail::thread_data<boost::_bi::bind_t<unsigned int, boost::_mfi::mf0<unsigned int, boost::asio::io_service>, boost::_bi::list1boost::_bi::value<boost::asio::io_service* > > >::run (this=0xb83c72f0) at /usr/include/boost/thread/detail/thread.hpp:62 #10 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0 #11 0xb6c1fc39 in start_thread (arg=0xb691cb70) at pthread_create.c:304 #12 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

    Thread 2 (Thread 0xb6a956d0 (LWP 31655)): #0 0xb702a424 in __kernel_vsyscall () #1 0xb6c27b46 in nanosleep () at ../sysdeps/unix/syscall-template.S:82 #2 0xb6f95b6c in boost::this_thread::sleep(boost::posix_time::ptime const&) () from /usr/lib/libboost_thread.so.1.49.0 #3 0xb742f85e in boost::this_thread::sleep<boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000ll> > (rel_time=…) at /usr/include/boost/thread/pthread/thread_data.hpp:149 —Type to continue, or q to quit— #4 0xb742db6e in MilliSleep (n=200) at utiltime.cpp:54 #5 0xb707e461 in WaitForShutdown (threadGroup=0xbff7b9fc) at bitcoind.cpp:42 #6 0xb707ef0d in AppInit (argc=1, argv=0xbff7bc04) at bitcoind.cpp:161 #7 0xb707f3da in main (argc=1, argv=0xbff7bc04) at bitcoind.cpp:175

    Thread 1 (Thread 0xae704b70 (LWP 31698)): #0 0xb702a424 in __kernel_vsyscall () #1 0xb6ade661 in GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #2 0xb6ae1a92 in *__GI_abort () at abort.c:92 #3 0xb6ad7878 in *__GI___assert_fail ( assertion=0xb758a6d8 “it->second.flags & CCoinsCacheEntry::FRESH”, file=0xb758a6c0 “coins.cpp”, line=150, function=0xb758ada0 “virtual bool CCoinsViewCache::BatchWrite(CCoinsMap&, const uint256&)”) at assert.c:81 #4 0xb73d4c8a in CCoinsViewCache::BatchWrite (this=0xb84ec518, mapCoins=…, hashBlockIn=…) at coins.cpp:150 #5 0xb73d4eb4 in CCoinsViewCache::Flush (this=0xae703438) at coins.cpp:176 #6 0xb710f86e in ConnectTip (state=…, pindexNew=0xb9de2490, pblock=0xae7033d0) at main.cpp:2088 #7 0xb71109d6 in ActivateBestChainStep (state=…, pindexMostWork=0xb8f40680, pblock=0x0) at main.cpp:2223 #8 0xb7110d0f in ActivateBestChain (state=…, pblock=0xae703b48) —Type to continue, or q to quit— at main.cpp:2276 #9 0xb71149c7 in ProcessNewBlock (state=…, pfrom=0xb1eaff30, pblock=0xae703b48, dbp=0x0) at main.cpp:2823 #10 0xb711e6e8 in ProcessMessage (pfrom=0xb1eaff30, strCommand=…, vRecv=…, nTimeReceived=1427349299020461) at main.cpp:4175 #11 0xb7120ae1 in ProcessMessages (pfrom=0xb1eaff30) at main.cpp:4499 #12 0xb71da520 in boost::detail::function::function_invoker1<bool ()(CNode), bool, CNode>::invoke (function_ptr=…, a0=0xb1eaff30) at /usr/include/boost/function/function_template.hpp:95 #13 0xb7262937 in boost::function1<bool, CNode*>::operator() (this=0xb8426644, a0=0xb1eaff30) at /usr/include/boost/function/function_template.hpp:760 #14 0xb7261c4b in boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker::m_invoke(boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > const&, …) const (this=0xae704100, connectionBody=…) at /usr/include/boost/signals2/detail/signal_template.hpp:368 #15 0xb7260437 in boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost—Type to continue, or q to quit— ::signals2::mutex>::slot_invoker::operator()(boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > const&) const (this=0xae704100, connectionBody=…) at /usr/include/boost/signals2/detail/signal_template.hpp:345 #16 0xb725d69d in boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> >::dereference() const (this=0xae703f28) at /usr/include/boost/signals2/detail/slot_call_iterator.hpp:82 #17 0xb7258d9b in boost::iterator_core_access::dereference<boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<b—Type to continue, or q to quit— oost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >(boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > const&) (f=…) at /usr/include/boost/iterator/iterator_facade.hpp:517 #18 0xb72534dc in boost::iterator_facade<boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNo—Type to continue, or q to quit— de)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode, boost::function<bool (CNode*)> >, boost::signals2::mutex> >, bool, boost::single_pass_traversal_tag, bool const&, int>::operator() const (this=0xae703f28) at /usr/include/boost/iterator/iterator_facade.hpp:643 #19 0xb724b840 in boost::signals2::optional_last_value::operator()<boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >(boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool—Type to continue, or q to quit— (CNode)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode, boost::function<bool (CNode*)> >, boost::signals2::mutex> >, boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> >) const ( this=0xb83bb0c8, first=…, last=…) at /usr/include/boost/signals2/optional_last_value.hpp:34 #20 0xb72413d3 in boost::signals2::detail::combiner_invokerboost::optional::operator()boost::signals2::optional_last_value<bool, boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost:—Type to continue, or q to quit— :function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >(boost::signals2::optional_last_value&, boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> >, boost::signals2::detail::slot_call_iterator_t<boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::slot_invoker, std::List_iterator<boost::shared_ptr<boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost::signals2::mutex> > >, boost::signals2::detail::connection_body<std::pair<boost::signals2::detail::slot_meta_group, boost::optional >, boost::signals2::slot1<bool, CNode*, boost::function<bool (CNode*)> >, boost—Type to continue, or q to quit— ::signals2::mutex> >) const (this=0xae70402b, combiner=…, first=…, last=…) at /usr/include/boost/signals2/detail/result_type_wrapper.hpp:53 #21 0xb7235f23 in boost::signals2::detail::signal1_impl<bool, CNode*, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::operator()(CNode) (this=0xb83bb048, arg1=0xb1eaff30) at /usr/include/boost/signals2/detail/signal_template.hpp:246 #22 0xb722abdd in boost::signals2::signal1<bool, CNode, boost::signals2::optional_last_value, int, std::less, boost::function<bool (CNode*)>, boost::function<bool (boost::signals2::connection const&, CNode*)>, boost::signals2::mutex>::operator()(CNode) (this=0xb774230c, arg1=0xb1eaff30) at /usr/include/boost/signals2/detail/signal_template.hpp:695 #23 0xb721b505 in ThreadMessageHandler () at net.cpp:1385 #24 0xb722ae48 in TraceThread<void ()()> (name=0xb74ef9ca “msghand”, func=0xb721b025 <ThreadMessageHandler()>) at util.h:214 #25 0xb7265027 in boost::_bi::list2<boost::bi::value<char const*>, boost::bi::value<void ()()> >::operator()<void ()(char const*, void ()()), boost::_bi::list0> (this=0xb211ce30, f=@0xb211ce2c: 0xb722adca <TraceThread<void ()()>(char const, void ()())>, a=…) at /usr/include/boost/bind/bind.hpp:313 #26 0xb7264b23 in boost::_bi::bind_t<void, void ()(char const, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void ()()> > >::operator() (this=0xb211ce2c) at /usr/include/boost/bind/bind_template.hpp:20 —Type to continue, or q to quit— #27 0xb72644b1 in boost::detail::thread_data<boost::_bi::bind_t<void, void ()(char const*, void ()()), boost::_bi::list2<boost::_bi::value<char const>, boost::_bi::value<void (*)()> > > >::run (this=0xb211cd28) at /usr/include/boost/thread/detail/thread.hpp:62 #28 0xb6f9342c in ?? () from /usr/lib/libboost_thread.so.1.49.0 #29 0xb6c1fc39 in start_thread (arg=0xae704b70) at pthread_create.c:304 #30 0xb6b8b9fe in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

  26. morcos commented at 3:26 pm on March 26, 2015: member
    Thanks a lot for your debugging help. I think we found the problem. If we prune inside ConnectBlock (as undo files allocate more space) then we flush pcoinsTip, which breaks the assumptions made inside flushing the child cache after ConnectBlock is finished. Will work on a solution.
  27. in src/main.cpp: in 40ba177537 outdated
    2524@@ -2493,6 +2525,12 @@ bool FindUndoPos(CValidationState &state, int nFile, CDiskBlockPos &pos, unsigne
    2525     unsigned int nOldChunks = (pos.nPos + UNDOFILE_CHUNK_SIZE - 1) / UNDOFILE_CHUNK_SIZE;
    2526     unsigned int nNewChunks = (nNewSize + UNDOFILE_CHUNK_SIZE - 1) / UNDOFILE_CHUNK_SIZE;
    2527     if (nNewChunks > nOldChunks) {
    2528+        if (fPruneMode) {
    2529+            // nUndoSize has already been incremented, so passing in pos.nPos
    2530+            // would cause Autoprune to overstate disk usage (see related
    2531+            // comment in FindBlockPos).
    2532+            Autoprune(nNewChunks * UNDOFILE_CHUNK_SIZE - vinfoBlockFile[nFile].nUndoSize);
    2533+        }
    


    morcos commented at 3:30 pm on March 26, 2015:
    In the meantime, you could try commenting out this call to Autoprune. It should still keep you very close to the target and ought to fix the problem.
  28. rustyrussell commented at 3:24 am on March 27, 2015: contributor
    Thanks, have commented that out and re-running now.
  29. rustyrussell commented at 3:02 am on March 30, 2015: contributor

    Sorry for delayed update. It’s still running fine, commenting out that line seems to have fixed it. Thanks!

    It’s within 15% of the target, too (1000M):

    du -sk .bitcoin/blocks 1137288 .bitcoin/blocks

  30. sdaftuar force-pushed on Apr 3, 2015
  31. sdaftuar commented at 9:10 pm on April 3, 2015: member

    We’ve updated this pull:

    • rebased off of #5959
    • squashed all the commits that have been previously pushed
    • adds a commit that changes the tests in CheckBlockIndex (and adds a couple) to be consistent with how the data structures are used when pruning. This also fixes a bug we introduced in LoadBlockIndexDB. Ultimately we’d squash this, but we’ve left this as a separate commit to try to make it easier to see the assumptions that are changing.

    We’ve got a fix in progress for the bug @rustyrussell found, which refactors the code to avoid calling FlushStateToDisk when we shouldn’t. (Separately, #5967 should also fix that bug.)

  32. morcos commented at 11:22 pm on April 3, 2015: member

    OK here are 3 more commits:

    • tiny optimization to be squashed
    • A change to where pruning occurs so we’re no longer flushing pcoinsTip from underneath child caches
    • A renaming of functions

    Sorry for the annoying 3rd commit, but it seemed like the Autoprune function call was no longer the right name. The functionality has now changed a bit with the 2nd commit. We only check for pruning inside of FlushStateToDisk. We’ve added an extra call to FlushStateToDisk inside of AcceptBlock so that we’re covered after we might have allocated space for block files. However now pruning doesn’t happen until after allocation so its possible to exceed the target for that reason. We build in a small buffer to help prevent that. @rustyrussell if you wouldn’t mind testing again, that would be great.

  33. morcos commented at 0:07 am on April 4, 2015: member
    and a bug fix…
  34. laanwj commented at 1:35 pm on April 13, 2015: member
    How close is this to being mergeable? Any known issues or regressions left?
  35. ondra-novak commented at 2:00 pm on April 13, 2015: none

    I downloaded master, merged this pull, compiled, started.

    Seems, it works. But works differently than I expected. I expected, that it will actually “prune” blocks, not simply erase them. So i expected, that genesis block remains untouched, because its coinbase transaction was never spent.

    https://blockchain.info/block/00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048

    Apparently, bitcoind keeps UTXO-DB elsewhere, .. it should be kept for validation of new blocks (sorry, I don’t have details about how bitcoin-core exactly works). Main benefit from pruning is that UTXO is still available and valid. Is there any way, how to access these transactions?

  36. sdaftuar commented at 2:53 pm on April 13, 2015: member

    There is one minor bug that came up recently which we’ll be fixing today (an edge case when a block is re-processed). A few things that I think should happen before merging:

    1. I don’t think anyone has re-ACK’ed after we rebased and pushed up more commits a couple weeks ago. In particular, it would be nice if someone could review the changes to CheckBlockIndex and maybe also the refactoring of the calls to pruning (which now happen inside FlushStateToDisk, to avoid the inconsistency we ran into by flushing pcoinsTip while a child cache was still outstanding).

    2. I think we’d need to squash commits before merging (will do after people are done reviewing).

    3. There’s an open pull somewhat related to autoprune (#5875) that would be nice to consider; if we don’t accept #5875 or something like it, then we may need a different solution so that autoprune nodes deal better with duplicate blocks. (Looks like that pull needs to be rebased, so I will do that today as well.)

    4. This code needs more testing by users, but that would probably be helped by merging. @ondra-novak Please note that all nodes already prune the UTXO set. However, nodes currently also keep all historical blocks, even though once a block is processed, it is no longer needed to validate new transactions (it’s only needed to process a reorg). Pruning nodes will delete old block files to save disk space, but this pull request has no effect on the way the UTXO set is stored on disk, which is separate from the block files.

  37. laanwj commented at 3:19 pm on April 13, 2015: member

    @sdaftuar OK, thanks for the information. The reason I’m asking is that I’d like to avoid this slipping to the last minute of the merge window, as it did for 0.10. Having the code simmer in master for a while before the release ensures more testing. So let’s try to get this merged by the end of April. @ondra-novak Pruning of the UTXO set (“ultraprune”) was implemented by @sipa a long time ago. The storage format is very efficient, and does not retain the full transactions just the necessary information: their unspent outputs.

    This pull is unrelated to that. It affects the archived block chain, which is completely unnecessary for validation. I do agree ‘pruning’ may be a bit confusing name, but I wouldn’t know any better one.

  38. rustyrussell commented at 2:19 am on April 14, 2015: contributor
    FWIW, I’ve been running 386039510b56ba7a224d009e5deb53f0f5b12274 with no problems on multiple nodes for a while.
  39. ondra-novak commented at 8:09 am on April 14, 2015: none

    @laanwj Thank you for clarification. Now I understand why there are some limitations in this solution. I mean for example why the wallet is disabled while prune is active (the wallet need to access to those files to reconstruct the transaction history, but theoretically the wallet still should be able to run above the valid UTXO-DB).

    Unfortunately it seems, that this solution solves one problem (disk space) but creates another problem (no longer access to unspent transactions through the API and apparently not just API only ). I will try to describe this problem in a new issue.

  40. sipa commented at 8:18 am on April 14, 2015: member

    @ondra-novak In theory, the Bitcoin Core wallet can function perfectly on top of a pruned block chain. It just can’t rescan missing transactions from pruned history. That means being unable to import a new key or wallet into the software, unless one knows it has no incoming payments. But working as a normal wallet, with locally-generated keys should be possible. A pruned Bitcoin Core instance still downloads and verifies and processes all blocks - we just don’t keep them around forever in full anymore.

    I said in theory, but in practice, that functionality is just not implemented, and the Bitcoin Core wallet does not get much development attention (though it seems to be increasing, recently!), so we’re conservative and try to get the most important functionality in - other parts can go later.

    Note that it’s perfectly possible to run a more lightweight wallet solution (Bitcoin Wallet for Android, Electrum, Multibit, …), and even connect it directly to a trusted Bitcoin Core implementation, to get the best of both worlds.

  41. ondra-novak commented at 8:38 am on April 14, 2015: none
    @sipa “That means being unable to import a new key or wallet into the software, unless one knows it has no incoming payment” Are you sure about this? If you have database of ALL unspent outputs, you can simply search it for outputs owned by the imported address and find balance and all incoming payments (not outgoing of course)
  42. sipa commented at 8:45 am on April 14, 2015: member

    With the UTXO set you can indeed find the currently spendable coins. That is not how the Bitcoin Core wallet works, however. It uses a ledger-based approach that lists all historical transactions.

    You’re better off using a different wallet which supports that model if you want it. As I said, that is perfectly possible, and remains possible after pruning.

  43. sdaftuar force-pushed on Apr 16, 2015
  44. sdaftuar commented at 8:06 pm on April 16, 2015: member

    To follow up on my earlier comment, after further review we decided that no additional bug fix was needed to handle re-processing blocks. Also, #5875 would be nice, but isn’t a blocker, as only pruning nodes are affected; this pull shouldn’t introduce any issues for non-pruning nodes’ ability to deal with duplicate blocks.

    We added comments to the rpc test, squashed all our commits down, and rebased off master, so this should be mergeable. At this point I think we just need some review/ACKs.

  45. jonasschnelli commented at 8:26 pm on April 16, 2015: contributor

    Just started running a mainnet node (with this PR on top) with a fresh datadir. Will report.

    Some minor things:

    • would it make sense to add prune.py to qa/pull-tester/rpc-test.sh and disable it when running all tests (should only start with qa/pull-tester/rpc-tests.sh pruning)
    • /rest/tx and /rest/block should be disabled when pruning is on. /rest/chaininfos and upcoming mempool calls could make sense even in pruned mode.
    • IMO it would be nice if cmd arg -prune (without value) would enable pruning and use a preferred (550MB?) limit.
  46. jonasschnelli commented at 11:47 am on April 17, 2015: contributor

    The prune.py test did fail: https://gist.github.com/jonasschnelli/13b077c7215f012fe44d (didn’t analyzed it).

    Yesterday i started a fresh node and it took around 6h to catch up. Everything worked as expected. I did some RPC and REST calls and found out, that it might be enough to just inform the users when tx or block hash was not found that autoprune is enabled. On the other hand this reveals the nodes behavior and could therefore harm privacy or security (again possible over browsers/webpages accessing 127.0.0.1 on the same machine).

    0~/.bitcoin$ du -sh ~/.bitcoin
    11.3G    ~/.bitcoin
    

    What about adding a state information (“autoprune”:true) in the RPC getinfo call? Currently it looks like:

     0{
     1    "version" : 109900,
     2    "protocolversion" : 70002,
     3    "blocks" : 352482,
     4    "timeoffset" : 0,
     5    "connections" : 13,
     6    "proxy" : "",
     7    "difficulty" : 49446390688.24143982,
     8    "testnet" : false,
     9    "paytxfee" : 0.00000000,
    10    "relayfee" : 0.00001000,
    11    "errors" : "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications"
    12}
    
  47. in src/init.cpp: in 1790bcb401 outdated
    274@@ -275,7 +275,12 @@ std::string HelpMessage(HelpMessageMode mode)
    275 #ifndef WIN32
    276     strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), "bitcoind.pid"));
    277 #endif
    278-    strUsage += HelpMessageOpt("-reindex", _("Rebuild block chain index from current blk000??.dat files") + " " + _("on startup"));
    279+    strUsage += HelpMessageOpt("-prune=<n>", _("Reduce storage requirements by pruning (deleting) old blocks. This mode disables wallet support and is incompatible with -txindex.") + " " +
    280+            _("Warning: Reverting this setting requires re-downloading the entire blockchain.") + " " +
    281+            _("(default: 0 = disable pruning blocks,") + " " +
    282+            strprintf(_(">%u = target size in MiB to use for block files)"), MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024));
    283+strUsage += HelpMessageOpt("-reindex", _("Rebuild block chain index from current blk000??.dat files") + " " + _("on startup"));
    


    jonasschnelli commented at 11:55 am on April 17, 2015:
    little nit: missing indent.
  48. sipa commented at 11:55 am on April 17, 2015: member
    @jonasschnelli I don’t think we should be adding stuff to getinfo - the call is already very overloaded, and needs access to pretty every piece of data (mempool, blockchain, database, wallet, network). If you want to add something, add it to getblockchaininfo or something.
  49. in src/chainparams.cpp: in 1790bcb401 outdated
    198@@ -198,6 +199,7 @@ class CTestNetParams : public CMainParams {
    199         vAlertPubKey = ParseHex("04302390343f91cc401d56d68b123028bf52e5fca1939df127f63c6467cdf9c8e2c14b61104cf817d0b780da337893ecc4aaff1309e536162dabbdb45200ca2b0a");
    200         nDefaultPort = 18333;
    201         nMinerThreads = 0;
    202+        nPruneAfterHeight = 1000; //! low since testnet can be reset in future
    


    sipa commented at 11:57 am on April 17, 2015:
    If testnet is reset, it will just be a separate network (testnet4?), so that shouldn’t be a concern.
  50. in src/init.cpp: in 1790bcb401 outdated
    1078@@ -1029,8 +1079,12 @@ bool AppInit2(boost::thread_group& threadGroup)
    1079                 pcoinscatcher = new CCoinsViewErrorCatcher(pcoinsdbview);
    1080                 pcoinsTip = new CCoinsViewCache(pcoinscatcher);
    1081 
    1082-                if (fReindex)
    1083+                if (fReindex) {
    1084                     pblocktree->WriteReindexing(true);
    1085+                    //If we're reindexing in prune mode, wipe away all our block and undo data files
    


    sipa commented at 12:00 pm on April 17, 2015:
    This doesn’t seem to be what “reindexing” means, so I think this may be against user expectations. Perhaps introduce a new option ("-reset" ?), which wipes everything. Then you can just say that reindexing is not compatible with pruned mode.

    jonasschnelli commented at 12:02 pm on April 17, 2015:
    Agreed. I just wiped my 6h sync by trying to see what -reindex does in pruned mode. :)

    morcos commented at 12:14 pm on April 17, 2015:
    We can do that, but we didn’t really change the behavior of reindex. All we did was delete the old data files which wouldn’t have been found or used anyway and would just have gotten in the way of the new files being written.

    sipa commented at 11:03 am on April 22, 2015:
    I agree it doesn’t effectively change any behaviour of -reindex, but I’d argue that -reindex itself has unexpected behaviour already in case of pruning. Anyway, not a big concern - maybe we can improve this after merge but before release.
  51. in src/main.cpp: in 1790bcb401 outdated
    2864+}
    2865+
    2866+/* Prune a block file (modify associated database entries)*/
    2867+void PruneOneBlockFile(const int fileNumber)
    2868+{
    2869+    for (BlockMap::iterator it = mapBlockIndex.begin(); it != mapBlockIndex.end(); ++it) {
    


    sipa commented at 12:13 pm on April 17, 2015:
    This is painful to see, but I see no better way for now.

    morcos commented at 12:21 pm on April 17, 2015:
    I wrote an in-memory reverse lookup, which gets populated on startup. On my computer the brute force way takes about 20ms, whereas the reverse lookup takes 200us. The problem is the size of the in-memory structure, it will only get populated if you’re in prune mode, but if you’re keeping the whole current blockchain for instance, I think its about 10MB. I decided to punt on the problem for now.

    sipa commented at 12:27 pm on April 17, 2015:
    Would it be possible to just check whether a block entry’s file is pruned or not, whenever the block or undo data is requested, and do the updating to mapBlocksUnlinked lazily in that case?
  52. morcos commented at 12:38 pm on April 17, 2015: member
    @sipa, hmm, i do think that until prune mode allows you to have a more regular node such as supporting NODE_NETWORK and a wallet, it might make sense to report that state in the most general place possible, such as getinfo. we could move it when it becomes a less defining characteristic of your node.
  53. jonasschnelli commented at 12:45 pm on April 17, 2015: contributor
    20mins leaks detecting during fresh datadir catchup showed no issues. Memory behavior as expected. bildschirmfoto 2015-04-17 um 14 43 11
  54. morcos commented at 12:47 pm on April 17, 2015: member

    @jonasschnelli , re: pruning.py failing. Were you running it on a decently equipped machine? What happens is the reorg’s are so large that they take a long time, and then the rpc calls (such as to getblocks() in this case) time out. I increased the timeout from 30s to 5min, which gave some buffer on my machine, but perhaps that wasn’t enough for general usage. If you wouldn’t mind trying increasing that timewait variable a little bigger and seeing if it completes, it might take a very long time though. I would say the test is so cumbersome its of questionable value, except we’ve found it quite useful in recent weeks to test unrelated behavior because it stresses the nodes so much.

    The test will have to be modified anyway if #5943 gets merged, which could make at least the reorgs faster.

  55. jonasschnelli commented at 12:53 pm on April 17, 2015: contributor
    @morcos The machine should be sufficient: Intel Xeon E31245 3.30GHz, 16GB RAM. I now increased timewait from 300 to 1000 and started again. Will report.
  56. jonasschnelli commented at 6:34 pm on April 17, 2015: contributor
  57. jonasschnelli commented at 6:15 pm on April 19, 2015: contributor

    @morcos: after changing timewaitto 3000 the prune.py test ran successfully (https://gist.github.com/jonasschnelli/90ac6516780607011b26). Took ~1h36'.

    My fullnode with autoprune mode is running smooth sind 2.5days. Nice work. Hopefully this gets merged soon! Tested ACK.

  58. sipa commented at 6:18 pm on April 19, 2015: member
    Concept ACK. Code review ACK. Only lightly tested, sorry.
  59. sdaftuar force-pushed on Apr 22, 2015
  60. sdaftuar commented at 2:57 pm on April 22, 2015: member
    This needed to be rebased, so I did so and updated the pull. I also added a commit to try to reduce surprise in the event that someone uses -reindex and -prune at the same time: now, we only will delete all the block files if block file 0 is missing: in that case, we know that reindex will not find the files anyway, so there is no harm in deleting them (and this way a pruning node isn’t tying up space used by old, inaccessible files).
  61. sipa commented at 4:45 pm on April 22, 2015: member
    Ok, I’ve run out of nits (see above). I think this is safe to merge - especially in case pruning itself is not enabled.
  62. sdaftuar force-pushed on Apr 22, 2015
  63. sdaftuar commented at 7:49 pm on April 22, 2015: member
    @sipa Thanks for all the review, I’ve gone ahead and fixed those nits and squashed everything back down to one commit.
  64. Add block pruning functionality
    This adds a -prune=N option to bitcoind, which if set to N>0 will enable block
    file pruning. When pruning is enabled, block and undo files will be deleted to
    try to keep total space used by those files to below the prune target (N, in
    MB) specified by the user, subject to some constraints:
    
    - The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP),
    - N must be at least 550MB (chosen as a value for the target that could
      reasonably be met, with some assumptions about block sizes, orphan rates,
      etc; see comment in main.h),
    - No blocks are pruned until chainActive is at least 100,000 blocks long (on
      mainnet; defined separately for mainnet, testnet, and regtest in chainparams
      as nPruneAfterHeight).
    
    This unsets NODE_NETWORK if pruning is enabled.
    
    Also included is an RPC test for pruning (pruning.py).
    
    Thanks to @rdponticelli for earlier work on this feature; this is based in
    part off that work.
    f9ec3f0fad
  65. sdaftuar force-pushed on Apr 22, 2015
  66. in src/main.cpp: in f9ec3f0fad
    2917+    }
    2918+    if (chainActive.Tip()->nHeight <= Params().PruneAfterHeight()) {
    2919+        return;
    2920+    }
    2921+
    2922+    unsigned int nLastBlockWeMustKeep = chainActive.Tip()->nHeight - MIN_BLOCKS_TO_KEEP;
    


    sipa commented at 10:18 pm on April 22, 2015:
    This variable name is slightly confusing. It’s the last height that’s allowed to be pruned (the test below using it is correct).
  67. sipa commented at 10:20 pm on April 22, 2015: member
    ACK
  68. laanwj commented at 8:29 am on April 24, 2015: member

    Works for me - did full testnet and mainnet sync, which succeeded, and disk usage remained within the configured bound. Also tried various RPCs on a pruned node and was unable to crash it.

    Tested ACK.

  69. laanwj merged this on Apr 24, 2015
  70. laanwj closed this on Apr 24, 2015

  71. laanwj referenced this in commit c2713042a3 on Apr 24, 2015
  72. gavinandresen commented at 2:25 pm on April 24, 2015: contributor
    Post-pull ACK; copied my -txindex=1 main net datadir, ran pruned (it told me I had to -reindex, as expected), running pruned nicely on my Mac.
  73. cozz commented at 4:14 pm on April 24, 2015: contributor
    I have a question: Not relaying blocks sounds really bad, couldnt we still announce it, if you know that the other guy has at least all blocks until our prune-threshold?
  74. sipa commented at 4:21 pm on April 24, 2015: member
    We should work on that, yes.
  75. dacox commented at 1:56 am on May 12, 2015: none

    I have a question also:

    Does the -prune=N option work from a cold start, or does it require a full sync first?

    I recently installed bitcoind on a 40GB droplet with -prune=30000 and it keeps running out of disk space.

    I have tried with the prune option as a cli argument to bitcoind, and also as an option in the config file.

    Cheers

  76. laanwj commented at 12:35 pm on May 12, 2015: member
    @dacox That should work. -prune=N means it will only retain the last N MB of blocks during a full sync. This size does not include the UTXO database, block index, wallet and miscellaneous files so keep some margin. But 30000 MB on a 40000 MB medium should work. What version of bitcoin core are you using? Is -prune shown in the -help output?
  77. dacox commented at 4:38 pm on May 12, 2015: none

    According to bitcoind -help it’s Bitcoin Core Daemon version v0.10.1.0-gd8ac901

    I grabbed it from the PPA, and I saw that this PR was merged in before the release was tagged.

    However, I do not see a reference to -prune in the help output

    Edit: I see the problem, the 0.10 branch was branched off of master quite some time before this PR. For some reason I thought it was in 0.10

  78. wtogami commented at 7:58 am on May 14, 2015: contributor

    RPC/REST interfaces currently do not distinguish between unknown blocks/tx and pruned blocks/tx. It’s unclear if a specific error should be returned, or perhaps the block/tx query interfaces be disabled for pruned nodes.

    Could this be improved by keeping the headers of pruned blocks and somehow marking those blocks as pruned? That would allow distinguishing the difference between pruned and unknown blocks.

  79. jonasschnelli commented at 8:40 am on May 14, 2015: contributor
    @wtogami: I think this is okay now. Check #6058
  80. 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: 2024-07-05 19:13 UTC

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