Discusses the rules by which one chain-tip gets chosen over another, including questions about heaviest/longest chains. Closely related to [chainwork], [chain-reorganization] and [blockchain-fork].
Questions tagged [best-chain]
64 questions
50
votes
2 answers
What happens if two miners mine the next block at the same time?
The process of mining as described in the answer to this question is simultaneously repeated by multiple miners.
Is it possible for two miners to find the next block at the same instant? If it is, what happens if they do?
Emre Kenci
- 3,158
- 2
- 19
- 45
28
votes
2 answers
What does the term "Longest chain" mean?
What does the term "Longest chain" mean, as there is only one 'right' blockchain exists? How another longer chain would make the 'right' chain invalid?
vi.su.
- 1,842
- 5
- 23
- 41
23
votes
2 answers
How does a client decide which is the longest block chain if there is a fork?
Is it only the block height or is it the effort that went into the forks? In other words: does this decision account for different difficulties?
kermit
- 2,009
- 1
- 17
- 26
20
votes
3 answers
Countrywide Internet isolation, inevitable fork
Many countries around the world have provisions for shutting off the Internet as well as isolating itself from the Internet (where networking within borders still flourishes), any transaction processing (mining) going on within that country will…
CQM
- 1,590
- 15
- 29
12
votes
2 answers
What is chainwork?
If I run the RPC call getBlock on the bitcoin-qt client it gives me field called chainwork containing a hash. I can't find any information what this value is about.
Request:
getblock…
Dennis Kriechel
- 1,763
- 4
- 16
- 34
11
votes
1 answer
Strongest vs Longest chain and orphaned blocks
Satoshi writes at the bottom of page 3 of his white paper that "If two nodes broadcast different versions of the next block simultaneously, some nodes may receive one or the other first. In that case, they work on the first one they received, but…
morsecoder
- 14,008
- 2
- 42
- 92
9
votes
2 answers
Can the blockchain be outpaced by a chain of low-difficulty blocks?
Let's say someone creates a blockchain fork starting from the genesis block, when the difficulty was absurdly low compared to today; then he starts mining new blocks from there up to the current block index.
Normally, this would require such an…
Massimo
- 1,048
- 6
- 20
7
votes
2 answers
What does "Activating Best Chain" mean?
What does "Activating Best Chain" mean? My Bitcoin Core doesn't freeze, it just takes a while. I'm curious as to what it's doing.
DoaJC_Blogger
- 125
- 2
- 10
7
votes
2 answers
How does the BTC protocol guarantee that a "main" blockchain emerges?
I'm reading up on the bitcoin/blockchain technology.
Usually, the part about proof of work and how to create a block is well explained.
However, what is never explained is how/why the communication of blocks over the network allows for a…
lezebulon
- 173
- 3
6
votes
1 answer
How does Bitcoin Core know it's on the longest chain?
In trying to implement a client, I am wondering what is the most efficient approach to figure out if you are on a fork.
Let's say you pick a peer at random and go through IBD using the headers-first approach. After reaching the tip of the chain,…
cloudhead
- 189
- 5
6
votes
2 answers
Why aren't block hashes used directly as scores for difficulty purposes?
Why does Bitcoin apply a difficulty function to block hashes and then use the output of this function to add up and determine the "longest" chain?
Why not just e.g. add together all block hashes (as bigints) and consider the longest chain to be the…
Adam Ierymenko
- 163
- 3
6
votes
2 answers
How is a blockchain split resolved?
Let's say two miners created 2 different blocks and broadcast them into the network. Now some clients see blockchain 1 and other blockchain 2 which are different from each other.
I would like to understand technically as possible how in the end the…
Haddar Macdasi
- 978
- 1
- 14
- 22
6
votes
2 answers
What happens to extinct blockchains, and transactions inside of them?
While understanding the concept of block chain and proof of work, few things are confusing me. Miners always consider the longest chain(by difficulty) and work on expanding it. Now, lets say two miners (Miner A and Miner B) come up with the solution…
Avikarsha Mandal
- 61
- 3
4
votes
1 answer
How often does temporary fork occur and how long does it last?
I was wondering, how often does temporary forks occur? They appear when there are two different blocks mined based on the same previous block (parent block), but what are chances for that? And if fork occurs, how long does it last (on average)? What…
ddavi031
- 459
- 2
- 9
4
votes
1 answer
Why isn't the block hash used to calculate accumulated work?
Why is this idea flawed? It doesn't seem to be a bad idea at first, because the miners should be incentivized to extend existing chain, instead of to "remine existing blocks", since such "remining" apparently requires more work to be done.
What's…
Chris Chen
- 922
- 4
- 13