0

Say a node was offline for a week. After one week, when this node becomes online again, this node has a blockchain which is shorter than the current blockchain.

If a miner sends block to this node, this node will start to compare this block to his blockchain. However, because this node was offline for a week, this node will determine that the newly created block does not match with his blockchain and conclude that this block is false. So I think this node must be updated to the current version of blockchain and then participate.

Am I understanding correctly?

Thank you in advance.

2

Yes your understanding is correct, the node must update itself with the blocks generated and accepted after it went offline(in your case about a week ago).

Whenever a node receives a new block, it first looks at its header called blockheader which contains the following:

1.Version (32-bit version the node that mined the block was running). 2.Hash of the previous blockheader 3.Merkle root of transaction 4.Timestamp (approximate time of generation of block) 5.Target for block mining puzzle 6.nonce (solution of the puzzle)

To verify a new block each node computes the hash of the previous blockheader and checks for proof of work. In your case the hash of the previous block-header will not match, so the received block will be considered invalid. Also, the timestamp included in the newly received block will be far ahead in future form the last known block of the validating node which will indicate(not explicitly) that the node was out of date for some time.

To come back in the mining game, the recovered node has to query few up-to-date nodes for all blocks generated after the failure time, apply these new set of transactions to the obsolete blockchain, update the UTXO as per required.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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