Often seeing Rewinding blocks... and Loading block index

Often seeing Rewinding blocks... and Loading block index

Manage alerts

Loading saved threads...

Eddie0110 · External communityPost link
External question — Bitcoin Stack Exchange Author: Eddie0110 Original post: https://bitcoin.stackexchange.com/questions/116477 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Every so often I see these error messages in Rewinding blocks... and Loading block. What is the cause of those error messages? I am using the core wallet.
Quote
Report
RedGrittyBrick · External communityPost link
External answer — Bitcoin Stack Exchange Author: RedGrittyBrick Original post: https://bitcoin.stackexchange.com/a/116480 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. I am using the core wallet. There are several different wallet applications with "core" in their name. This answer applies to Bitcoin Core but not to Bitcore or other wallets whose name includes the word "core". Often seeing Rewinding blocks ... I could not find the word "Rewinding" in the source of Bitcoin core v23. Occurrences of the word "rewind" seem to me to be associated with blockchain reorganisations. Murch commented that a one-block chain-tip change might occur once every two weeks. This is routine and not a cause of any concern, The only similar message I can find mentioning "rewind" is these: index\base.cpp: FatalError("%s: Failed to rewind index %s to a previous chain tip", index\base.cpp: FatalError("%s: Failed to rewind index %s to a previous chain tip", I don't work on this code, so have no real insight, but examining the source code may help clarify what this means. For example // Ensure block connects to an ancestor of the current best block. This should be the case // most of the time, but may not be immediately after the sync thread catches up and sets // m_synced. Consider the case where there is a reorg and the blocks on the stale branch are // in the ValidationInterface queue backlog even after the sync thread has caught up to the // new chain tip. In this unlikely event, log a warning and let the queue clear. if (best_block_index->GetAncestor(pindex->nHeight - 1) != pindex->pprev) { LogPrintf("%s: WARNING: Block %s does not connect to an ancestor of " /* Continued */ "known best chain (tip=%s); not updating index\n", __func__, pindex->GetBlockHash().ToString(), best_block_index->GetBlockHash().ToString()); return; } if (best_block_index != pindex->pprev && !Rewind(best_block_index, pindex->pprev)) { FatalError("%s: Failed to rewind index %s to a previous chain tip", __func__, GetName()); return; } Since failing to rewind the index is a fatal error, I would expect Bitcoin Core to exit. Perhaps it indicates data corruption? ... and Loading block index Every time you start Bitcoin Core, it has to first load some parts of its database and check their integrity. It does this in stages and the informational messages let you know how far it has progressed through that process. Loading the block index is a part of that: On my PC "Loading block index..." is quickly replaced by "Verifying blocks..." The message "Loading block index" occurs in init.cpp and in qt/bitcoinstrings.cpp in Bitcoin Core's source code.
Quote
Report

Post Reply

Checking account access…