Hacker News new | ask | show | jobs
by kpcyrd 230 days ago
The partial collision is easy to verify but hard to generate, consensus is defined as "longest chain is the source of truth". If some p2p node can present you a longer chain you switch your source of truth to that one.
1 comments

In terms of Bitcoin consensus, it is actually the chain with the most work, not the longest chain.
Isn't the longest chain assumed to be the chain with the most work? Not an expert.
Generally, yes. But remember that there are difficulty adjustments, and it's conceivable that there are two chains, one being a bit shorter but with higher difficulty, and that can have precedence over the longer but easier one. The point is that you want the chain embodying most work, no matter how long.

(And note that a) the difficulty is included in the header that gets hashed, and b) it is easy to check that the block conforms to the specified difficulty.)

That's why "heavier-chain-rule" would be a better name than "longest-chain-rule", strictly speaking.