Consensus issue, sync. stuck at "Synchronizing sporks - 25%" - PIVX fork
I've been working on a PIVX fork for some time, to better understand blockchain infrastructure and coding in general. I have been able to modify all parameters, remove checkpoints, set up a new genesis block for blockchain and both enable PoW & disable PoW/switch to PoS and masternode succesfully.
I am somewhat stuck however, on this last piece of the puzzle - spork synchronization. After setting up a seed node, I can continue synchronization from 12% to 25%, yet it will never go past that instance.
The feeling I have is that it has to do with spork activation times (in spork.h), yet changing these values around have not worked in getting the synchronization to complete. I am aware that I may not understand how those sporks are supposed to synchronize well enough, so I hope someone can point me in the right direction.
Any help is much appreciated.
I've been working on a PIVX fork for some time, to better understand blockchain infrastructure and coding in general. I have been able to modify all parameters, remove checkpoints, set up a new genesis block for blockchain and both enable PoW & disable PoW/switch to PoS and masternode succesfully.
I am somewhat stuck however, on this last piece of the puzzle - spork synchronization. After setting up a seed node, I can continue synchronization from 12% to 25%, yet it will never go past that instance.
The feeling I have is that it has to do with spork activation times (in spork.h), yet changing these values around have not worked in getting the synchronization to complete. I am aware that I may not understand how those sporks are supposed to synchronize well enough, so I hope someone can point me in the right direction.
Any help is much appreciated.
Looking through masternode-sync.cpp, I find these instances:
case (MASTERNODE_SYNC_SPORKS):
RequestedMasternodeAssets = MASTERNODE_SYNC_LIST;
break;
[....]
BOOST_FOREACH (CNode* pnode, vNodes) {
pnode->ClearFulfilledRequest("getspork");
[....]
if (mnodeman.CountEnabled() == 0 ) {
if(syncCount < 2){
Reset();
syncCount++;
}
} else
return;
[....]
if (RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS) {
if (pnode->HasFulfilledRequest("getspork")) continue;
pnode->FulfilledRequest("getspork");
pnode->PushMessage("getsporks"); //get current network sporks
if (RequestedMasternodeAttempt >= 2) GetNextAsset();
RequestedMasternodeAttempt++;
return;
[....]
//set to synced
if (RequestedMasternodeAssets == MASTERNODE_SYNC_SPORKS) {
if (pnode->HasFulfilledRequest("getspork")) continue;
pnode->FulfilledRequest("getspork");
pnode->PushMessage("getsporks"); //get current network sporks
if (RequestedMasternodeAttempt >= 2) GetNextAsset();
RequestedMasternodeAttempt++;
return;
}
They seem to corrobarate that is indeed a lack of nodes; it seems at least 2 nodes needed in order to complete syncing the sporks?
https://ift.tt/2r5HMAZ
Did you solve this issue?
ReplyDelete