Skip to content

CivicNet Core v3.0.6 - Stake-Target Chainwork Sync Fix

Choose a tag to compare

@CivicLight CivicLight released this 25 Aug 23:15

This release fixes a divergence introduced by the v3.0.5 stake-target retarget redesign: the block header's nBits field (which feeds directly into chain-work accounting) and the internal nStakeTarget value the network actually validates stakes against had drifted apart, since only the latter was updated by v3.0.5's periodic/tiered/emergency-reset logic. This release unifies both around a single shared prediction function.

If you run a full node with an unlocked wallet doing PoS staking, please update to this release before the activation time below to stay in sync with the network.

What's fixed in this release

  • Fixed ComputeExpectedStakeTarget() (which sets the PoS block header's nBits) still using the old flat ±8% event-driven logic from before v3.0.5, while nStakeTarget itself had already moved to the new periodic/tiered/emergency-reset mechanism -- the two values could diverge significantly, especially right after a periodic retarget checkpoint
  • Fixed a related staleness issue in the staking wallet: it captured the current nStakeTarget once per search tick, so a kernel found valid just before a retarget checkpoint could be rejected by validation using the newly-retargeted value at submission -- the wallet now predicts the correct target for the candidate block height before searching
  • Both the wallet's kernel search and the network's nBits/chain-work accounting now share one prediction function (PredictNextStakeTarget()), eliminating the divergence at its source instead of patching each symptom separately
  • Added a dedicated activation gate (POS_NBITS_UNIFY_ACTIVATION_TIME) so this doesn't apply retroactively to already-settled chain history

Activation

2026-08-26 14:00:00 UTC

Upgrading

Stop your node, back up your wallet and datadir, replace the binary with this release, and restart. Your existing blockchain data and wallet remain fully compatible -- no resync required.

Included binaries

  • civicnet-node, civicnet-cli (Linux x86_64)
  • Windows binaries to follow in a follow-up upload to this same release