Post
Topic
Board Development & Technical Discussion
Re: Some odd blockchain questions
by
CIYAM
on 22/04/2014, 14:17:10 UTC
Also, although people say the "longest" chain, its really (AFAIK) the "most difficult" that is chosen.  For all normal cases these two concepts are the same but this is why an attacker can't hack the code to artificially reduce the difficulty to 1, create a chain longer than the rest of the network and have everyone switch over.

Correct - it should be perhaps termed the "best chain" at a particular height. This is generally termed as the chain "weight" which (in PoW in particular) is how you decide out of two "forks" which chain you are going to build upon (each node will build upon the one with the "greatest weight").

So if you are on chain A100 B110 C110 you would report to your peers that your blockchain is at height C with weight 320.

If a peer reports to you they are on a chain of height C with a weight > 320 then you would check that this new chain checks out and if it does you would now build upon that rather than the one you were going to previously.