Fix fresh sync failure at diff reset height 2838976
Fresh-syncing nodes rejected the on-chain min-diff block at the RANDOMX_VALIDATION activation height (2838976) because GetNextWorkRequired computed the expected nBits from the preceding normal-difficulty blocks, producing 469847994 instead of the on-chain 0x200f0f0f (HUSH_MINDIFF_NBITS). This caused all seed nodes to be banned with "Incorrect diffbits" and the node could never sync past that height. Two changes: 1. GetNextWorkRequired (pow.cpp): Return nProofOfWorkLimit at the exact RANDOMX_VALIDATION activation height, matching the on-chain diff reset. 2. ContextualCheckBlockHeader (main.cpp): Raise DragonX daaForkHeight to RANDOMX_VALIDATION + 62000, covering the window where nBits was never validated (diff reset at 2838976 through the attack at ~2879907). Tested by invalidating block 2838975 and reconsidering — node re-validated through the diff reset and attack window, syncing back to tip with zero bad-diffbits rejections. Bump version to 1.0.1.
This commit is contained in:
@@ -3,7 +3,7 @@ AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 1)
|
||||
dnl Must be kept in sync with src/clientversion.h , ugh!
|
||||
define(_CLIENT_VERSION_MINOR, 0)
|
||||
define(_CLIENT_VERSION_REVISION, 0)
|
||||
define(_CLIENT_VERSION_REVISION, 1)
|
||||
define(_CLIENT_VERSION_BUILD, 50)
|
||||
define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50)))
|
||||
define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1)))
|
||||
|
||||
Reference in New Issue
Block a user