You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sporks are lost after an in-place upgrade from v23 to v24 and not requested again (non-mainnet networks) #7891
After an in-place upgrade from 23.1.8 to 24.0.0-rc.3, a node starts with no sporks and does not request them again. On a masternode that means no DKG participation, so it gets PoSe-banned, and it does not accept ChainLocks.
Mainnet is not affected, because its sporks are hardcoded. This affects test networks (devnets, regtest/local networks, possibly testnet).
What we saw
This was on a local regtest network: 7 evonodes plus a seed, created with dashmate, Core upgraded in place one node at a time.
On the first v24 start the log shows Reading info from sporks.dat..., Loaded info from sporks.dat, Sporks: 0. v24 changed SporkStore::SERIALIZATION_VERSION_STRING from CSporkManager-Version-2 to -Version-3 (src/spork.cpp), so v23's sporks.dat is discarded.
mnsync then completes MASTERNODE_SYNC_BLOCKCHAIN in 0 s and finishes in the same second.
No GETSPORKS was ever sent: the per-peer counters show getsporks sent 0 and spork received 0.
GETSPORKS only goes out from the sync tick (src/node/sync_manager.cpp), once per peer address via the netfulfilled spork-sync flag, and netfulfilled.dat survives the restart.
On an active masternode the tick also skips inbound peers. In a small network most of a masternode's connections are inbound or non-relay masternode connections.
As a result SPORK_2, SPORK_17 and SPORK_19 were off on each upgraded node. The node sent no qcontrib and was PoSe-banned within 2 DKGs. getbestchainlock returned "Unable to find any ChainLock".
Workaround
After peers reconnect, run dash-cli mnsync reset (sporks arrive within a second), then mnsync next until FINISHED. A reset run before any peer connects does nothing.
Not seen on testnet
Our testnet evonodes on 24.0.0 have all sporks active and are synced. They likely have outbound full-relay peers that answer GETSPORKS. We did not confirm whether those nodes were upgraded in place from v23.
Suggestion
When sporks.dat is discarded for a format mismatch, or simply on startup, request sporks from peers regardless of the persisted spork-sync fulfilled flag. Alternatively, keep loading the previous format.
Activity
fix(net): announce sporks to new peers instead of requesting them dur…
fix(net): announce sporks to new peers instead of requesting them dur…
Merge dashpay#7893: fix(net): announce sporks to new peers instead of…
Merge #7893: fix(net): announce sporks to new peers instead of reques…
fix(net): announce sporks to new peers instead of requesting them dur…