Skip to content

Sporks are lost after an in-place upgrade from v23 to v24 and not requested again (non-mainnet networks) #7891

Closed

Description

@shumkov

Summary

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.


🤖 Filed with Claude Code on behalf of @shumkov

Activity

  1. added 2 commits that reference this issue on Oct 15, 2026
    ce24c40
    45acdf3
  2. added 3 commits that reference this issue on Oct 15, 2026
    f99212b
    72a5997
    a56ed47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions