dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

getblocktemplate not available for up to 20 minutes after starting #1738

Closed flound1129 closed 6 years ago

flound1129 commented 6 years ago

GBT should be fully functional once the blockchain is synced. But for up to 20 minutes after a node starts, GBT fails with

error code: -10
error message:
Dash Core is syncing with network...
schinzelh commented 6 years ago

Hi,

the message is not only referring to blockchain data sync, but also to governance object sync, which may take up to 60 mins after restart depending on your connection and CPU load. You can check the full sync status of your wallet with

mnsync status

As soon as the status is „complete/999“ GBT will be available.

flound1129 commented 6 years ago

Why does the governance object need to be synced in order to return a block template?

Just return an empty template or exclude transactions related to governance until the sync is complete.

flound1129 commented 6 years ago

IIRC masternodes also can't have more than an hour of downtime before losing their spot in the payment queue, so this is also an important issue for masternode operators.

UdjinM6 commented 6 years ago

GBT should be fully functional once the blockchain is synced.

Unlike in Bitcoin, in Dash you can't construct correct block having only blockchain data, you need at least masternode payee and some times all governance info. But yes, current situation is a bit suboptimal and can be improved, please see #1739

flound1129 commented 6 years ago

This looks to be exactly what I need, thanks.

UdjinM6 commented 6 years ago

Should be fixed by #1739.