+1 vote
We know that a part of blockverification is checking that it contains valid previous block hash. But let's imagine, that for some reason (network glitch etc.) previous block never arrived. Wouldn't node discard all the following blocks?

I wonder how this problem is solved? Does node periodically checks whole chain, by requesting peers? How exactly is this implemented?
Mar 26, 2018 1,451 views

## 1 answer to this question.

+1 vote

A node will ask for block number N before asking for block N+1. Yes, mostly block N+1 will be discarded if block number N doesn't exist, but that's irrelevant. Because it's not that a node gets blocks only by being the receiving end. It can contact all the other nodes around it, and ask for block number N. If all these nodes don't have block number N, well, then it doesn't exist!

Notice that on a broader scale every node asks its peers for node number N, and verifies that this block follows the rules of the protocol. That's part of the consensus.

If we're talking about mining, the situation is different. You can imagine two competing miners creating blocks. If a miner doesn't have block N, he'll keep trying to mine that block. If he receives block number N after having mined it, the miner just ignores it, and we have a temporary fork in the blockchain with two branches, and block N+1 will have two different versions. Now what determines which branch survives is basically the branch that is mined faster. An arbitrary consensus rule is that the longer chain is always the correct chain. When a longer chain exists, all miners agree that this chain is the correct one.

The reason why this works, is because the probability of mining a block is wide enough over 10 minutes in Bitcoin (or block time in general).

This is why it's wrong to create blockchains with very short time. Because if the time is very short (like 10 seconds), there will be tons of forks before the blockchain stabilizes.

This is why it's wrong to create blockchains with very short time. Because if the time is very short (like 10 seconds), there will be tons of forks before the blockchain stabilizes.

answered Mar 26, 2018 by
• 17,100 points

selected Aug 6, 2018 by Omkar

## How do transactions create a new block in Blockchain?

Bitcoin puts a cap of 2,400 transactions ...READ MORE

## How to create a new wallet on a blockchain?

Firstly, you need to have a clear ...READ MORE

## How do I add a new node on a Hyperledger network?

You can do this by generating the crypto ...READ MORE

## Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

## Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

+1 vote

## How to perform a simple 1-to-1 Bitcoin Transaction with Bitcore?

What is the argument utxos int the ...READ MORE