Bitcoin Forum
September 28, 2022, 10:44:58 PM *
News: Latest Bitcoin Core release: 23.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: fork detection behavior  (Read 814 times)
jonald_fyookball (OP)
Legendary
*
Offline Offline

Activity: 1302
Merit: 1004


Core dev leaves me neg feedback #abuse #political


View Profile
January 01, 2015, 06:50:37 AM
 #1

regarding this:

Quote
Bitcoin Core includes code that detects a hard fork by looking at block chain proof of work. If a node receives block chain headers demonstrating six blocks more proof of work than the best chain this node considers valid, the node reports an error in the getinfo RPC results and runs the -alertnotify command if set.

even though the node reports an error, will it still accept the longer chain as the new best chain?

1664405098
Hero Member
*
Offline Offline

Posts: 1664405098

View Profile Personal Message (Offline)

Ignore
1664405098
Reply with quote  #2

1664405098
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1664405098
Hero Member
*
Offline Offline

Posts: 1664405098

View Profile Personal Message (Offline)

Ignore
1664405098
Reply with quote  #2

1664405098
Report to moderator
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 3752
Merit: 6852



View Profile
January 01, 2015, 06:55:50 AM
 #2

Of course, otherwise it would risk triggerable (or even spontaneous) convergence failures which could be exploited to cause loss of funds.
harding
Jr. Member
*
Offline Offline

Activity: 50
Merit: 46


View Profile WWW
January 03, 2015, 02:26:47 PM
 #3

The quote is out of context, so it isn't clear that we're talking about a non-upgraded node after a hard fork.  In that case, the non-upgraded node does not think the stronger chain is valid (because it breaks some consensus rule), so it will not accept it as the local best block chain.  The error/alertnotify is to tell you something is wrong.  For reference, that section of the docs was written based on the code is this function.

I'll push a minor revision to the quoted sentence so it's more clear and harder to take out of context.  Thanks!
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!