Thursday, November 21, 2024

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

I’m utilizing the core pockets.

There are a number of totally different pockets purposes with “core” of their identify. This reply applies to Bitcoin Core however to not Bitcore or different wallets whose identify contains 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 may happen as soon as each two weeks. That is routine and never a reason for any concern,

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

indexbase.cpp:                    FatalError("%s: Didn't rewind index %s to a earlier chain tip",
indexbase.cpp:            FatalError("%s: Didn't rewind index %s to a earlier chain tip",

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

        // Guarantee block connects to an ancestor of the present finest block. This must be the case
        // more often than not, however might not be instantly after the sync thread catches up and units
        // m_synced. Take into account 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 finest 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: Didn't 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 knowledge corruption?


… and Loading block index

Each time you begin Bitcoin Core, it has to first load some elements of its database and verify their integrity. It does this in phases and the informational messages let you understand how far it has progressed by way of 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

Latest Articles