<blockquote>
  <p>How does a new user realizes which is the correct copy of the ledger to be used when initially updating(downloading) the ledger</p>
</blockquote>

<p>They find the highest-work valid blockchain. This is not the same thing as the most popular blockchain - if 999 nodes tell your node they're on a chain, but one node tells you about a longer chain, you will prefer the longer chain.</p>

<p>If you do not see the longer chain at least once, you will not switch to it. However, even if you start mining on the shorter chain, you will switch to a longer chain after it appears.</p>

<blockquote>
  <p>How does one understand if the two ledgers are the same?</p>
</blockquote>

<p>You compare the block hash of the chain tip. If they are equal, both nodes have identical blockchains. If they are not equal, the nodes have different blockchains.</p>

CC BY-SA 3.0
2016-11-12T03:22:18.810Z
2016-11-21T05:39:38.560Z
2016-11-21T05:39:38.560Z
Nick ODell
<p>I have two specific questions:</p>

<p>How does a new user realizes which is the correct copy of the ledger to be used when initially updating(downloading) the ledger, and why is it that a user cannot deceive it by broadcasting its ledgers manytimes. (there by giving the system a pseudo idea that that is indeed the majority ledger)</p>

<p>How does one understand if the two ledgers are the same? Does the hash function change with the last transaction? My specific doubt would be that considering that the hash will change with the guesses too even if the last block info is the same then how does the system realize that these are from the same block even if their final values are diff.</p>

<bitcoin-core><blockchain><synchronization><block-validity>
How does the node system understand which ledger is the latest before updating their own ledger?
Utsav Mitrakaushi Basak
# How does the node system understand which ledger is the latest before updating their own ledger?

(Asked by: username_0 on 2016-11-11)

I have two specific questions:

How does a new user realizes which is the correct copy of the ledger to be used when initially updating(downloading) the ledger, and why is it that a user cannot deceive it by broadcasting its ledgers manytimes. (there by giving the system a pseudo idea that that is indeed the majority ledger)

How does one understand if the two ledgers are the same? Does the hash function change with the last transaction? My specific doubt would be that considering that the hash will change with the guesses too even if the last block info is the same then how does the system realize that these are from the same block even if their final values are diff.

**Tags:** bitcoin-core, blockchain, synchronization, block-validity


---

## 1 answers

### Answer by username_1 on 2016-11-12. Score: 5

> How does a new user realizes which is the correct copy of the ledger to be used when initially updating(downloading) the ledger

They find the highest-work valid blockchain. This is not the same thing as the most popular blockchain - if 999 nodes tell your node they're on a chain, but one node tells you about a longer chain, you will prefer the longer chain.

If you do not see the longer chain at least once, you will not switch to it. However, even if you start mining on the shorter chain, you will switch to a longer chain after it appears.

> How does one understand if the two ledgers are the same?

You compare the block hash of the chain tip. If they are equal, both nodes have identical blockchains. If they are not equal, the nodes have different blockchains.


---

