Bitcoin Forum
June 25, 2024, 01:02:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need help understanding what happens in a natural Bitcoin fork  (Read 418 times)
element72 (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile
June 04, 2017, 05:51:50 AM
 #1

Hi Bitcointalk community!

I am trying very hard to understand the technical details of how the blockchain is created.

Lets imagine 2 nodes solve the current block puzzle at nearly the same time. I guess now we have 2 chains. How do the nodes determine which chain is the longest? If I understood correctly, the longest chain is used when the next block is added.

How do the nodes determine which of the 2 chains is the longest chain == 'has the most effort put into it'?

P.S. I did learn some of the very deep technical parts, such as the prefix of 0's required in proof-of-work, and that more required 0's basically implies more work needed.
Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
June 04, 2017, 09:06:17 AM
 #2

Lets imagine 2 nodes solve the current block puzzle at nearly the same time. I guess now we have 2 chains. How do the nodes determine which chain is the longest? If I understood correctly, the longest chain is used when the next block is added.
If you have 2 nodes, of which both create 1 new block at the same time, then neither chain is the longest one. In this case, they are both likely to be of the same length and amount of work. Now, consider this as a block building race. Eventually one becomes longer/has more proof of work and the other one reorganizes (thus becoming an orphaned chain). Read these two links:
1) What's the longest chain of orphan blocks? (How many confirmations have been necessary?)
2) What are orphaned and stale blocks?

Bitcoin is very large, with several competing miners and thousands of non-mining nodes. Because of this, it is extremely unlikely that half the network is on block A and the other half of the network is on block B (same block number). "My own understanding is that orphaned blocks are initially accepted by the majority of the network, but are later rejected when proof of a longer blockchain is received that doesn't include that particular block."

How do the nodes determine which of the 2 chains is the longest chain == 'has the most effort put into it'?
It's usually referred to as "most proof of work" or the "longest valid chain with the most amount of work" and not "most effort" as that is too vague.

P.S. I did learn some of the very deep technical parts, such as the prefix of 0's required in proof-of-work, and that more required 0's basically implies more work needed.
That is not knowledge about "very deep technical parts". Those are just some details of the underlying technology.

"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
fhireman
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
June 05, 2017, 02:52:22 PM
 #3

Thanks for the awesome explanation Lauda, cleared some things up for me Smiley
Do you have some more resources to learn about blockchain technology?
Lauda
Legendary
*
Offline Offline

Activity: 2674
Merit: 2965


Terminated.


View Profile WWW
June 05, 2017, 04:46:39 PM
 #4

Thanks for the awesome explanation Lauda, cleared some things up for me Smiley
Do you have some more resources to learn about blockchain technology?
These are all you need:
1) Bitcoin Wiki: https://en.bitcoin.it/wiki/Main_Page.
2) Bitcoin Stack Exchange: https://bitcoin.stackexchange.com/.
3) Mastering Bitcoin book: https://www.bitcoinbook.info/

"The Times 03/Jan/2009 Chancellor on brink of second bailout for banks"
😼 Bitcoin Core (onion)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!