Bitcoin Forum
May 26, 2024, 12:21:01 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: fork detection behavior  (Read 831 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?

gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4186
Merit: 8426



View Profile WWW
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!