I'm trying to understand how the mining process works. Specifically, my understanding is the local miner works on blocks and add them to their local blockchain if they succeed. It may turn out that this isn't the longest chain of blocks (because there are other miners working in parallel) and when that longest chain arrives at the miner, the miner will discard its local (shorter) subchain in favor of the new one.

My question is if the local node (who's also a miner) is asked for information from the block chain before that longest chain arrives, how would it know that these blocks may still change in the future and shouldn't necessarily be trusted?

I apologize if the whole question seems confused. It's only a reflection of my own confusion on the topic.

  • 1
    Note that the term "longest chain" is often used (even in the Satoshi whitepaper), but that method is actually flawed. "most-work chain" better describes what is in use these days. I don't think this alters your question though.
    – Jannes
    Aug 29, 2016 at 12:35

2 Answers 2


I think the answer is the same as when you're receiving a Bitcoin transaction and you want to be "certain" that the coins are now actually yours and can't be double spent anymore: you wait for multiple confirmations (the whitepaper says 6).

In situations where you can't afford to wait (like mining) you'll just have to make a gamble and be ready to change your mind if reality forces you to do a re-organization. Meaning: discarding the last 1 or more blocks and replacing them with the new most-work tail.

So anything inquiring information from a full node, should also always be ready for a change of that information.

  • What I get out of the answer is that there's only a statistical confirmation but no sure way. Thank you for clarifying.
    – mprivat
    Aug 29, 2016 at 14:05
  • @mprivat Correct. If I remember correctly the Bitcoin whitepaper describes it as such. Under normal circumstances "6 confirmations" is considered pretty secure.
    – Jannes
    Aug 29, 2016 at 17:19

Your node doesn't know for sure. Actually, nobody ever knows for sure that the current chain-tip will be in the chain with the most work, it just becomes increasingly likely as more time passes and additional blocks build on-top.

Once a sufficient number of blocks have been built on top of the observed block, it will be sufficiently unlikely that the observed block will end up in a stale chain-tip, and you can trust it.

Users make different judgment calls about the number of blocks they wait for: some don't wait for another block and accept at first confirmation, some wait three blocks, some require six. The extreme is likely to be the 100 block waiting period the network requires before mining rewards may be spent.

However, until proven wrong, the node will assume that he has the newest information: after all finding a block is an unlikely event, and thus will respond with information about his block when queried for the blockchain-tip.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.