Friday, November 15, 2024
HomeBitcoinbitcoin core - Typically seeing Rewinding blocks... and Loading block index

bitcoin core – Typically seeing Rewinding blocks… and Loading block index


I’m utilizing the core pockets.

There are a number of completely different pockets purposes with “core” of their title. This reply applies to Bitcoin Core however to not Bitcore or different wallets whose title consists of the phrase “core”.


Typically seeing Rewinding blocks …

I couldn’t discover the phrase “Rewinding” within the supply of Bitcoin core v23.

Occurrences of the phrase “rewind” appear to me to be related to blockchain reorganisations. Murch commented {that a} one-block chain-tip change would possibly happen as soon as each two weeks. That is routine and never a reason behind any concern,

The one related message I can discover mentioning “rewind” is these:

indexbase.cpp:                    FatalError("%s: Did not rewind index %s to a earlier chain tip",
indexbase.cpp:            FatalError("%s: Did not rewind index %s to a earlier chain tip",

I do not work on this code, so don’t have any actual perception, however inspecting the supply code might assist make clear what this implies. For instance

        // Guarantee block connects to an ancestor of the present greatest block. This must be the case
        // more often than not, however is probably not instantly after the sync thread catches up and units
        // m_synced. Think about the case the place there's a reorg and the blocks on the stale department are
        // within the ValidationInterface queue backlog even after the sync thread has caught as much as the
        // new chain tip. On this unlikely occasion, log a warning and let the queue clear.
        if (best_block_index->GetAncestor(pindex->nHeight - 1) != pindex->pprev) {
            LogPrintf("%s: WARNING: Block %s doesn't connect with an ancestor of " /* Continued */
                      "recognized greatest chain (tip=%s); not updating indexn",
                      __func__, pindex->GetBlockHash().ToString(),
                      best_block_index->GetBlockHash().ToString());
            return;
        }
        if (best_block_index != pindex->pprev && !Rewind(best_block_index, pindex->pprev)) {
            FatalError("%s: Did not rewind index %s to a earlier chain tip",
                       __func__, GetName());
            return;
        }

Since failing to rewind the index is a deadly error, I’d anticipate Bitcoin Core to exit. Maybe it signifies information corruption?


… and Loading block index

Each time you begin Bitcoin Core, it has to first load some elements of its database and test their integrity. It does this in phases and the informational messages let you understand how far it has progressed via that course of. Loading the block index is part of that:

Loading Blocks

On my PC “Loading block index…” is rapidly changed by “Verifying blocks…”

enter image description here

The message “Loading block index” happens in init.cpp and in qt/bitcoinstrings.cpp in Bitcoin Core’s supply code.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments