github iotexproject/iotex-core v2.4.1

3 hours ago

Summary

v2.4.1 is a mandatory follow-up patch to v2.4.0 fixing bugs in the candidate exit queue introduced by the Yap hardfork. All changes are scoped to the staking package; no genesis or config schema changes.

The headline fix prevents archive nodes from panicking the first time ScheduleCandidateDeactivation runs after Yap activation. The remaining fixes restore Web3 access to the exit queue and correct dropped event data.

Changes

  • Fix: archive nodes panic on the Schedule block (#4827) — *lastExitEpoch now implements kvListContainer so it can be stored under the CandsMap namespace via erigon's kvListStorage. Without this, archive-enabled nodes panicked with object of type *staking.lastExitEpoch does not supported and entered a restart loop.
  • Fix: Confirm op callable via Web3 (#4828) — registers the missing confirmCandidateDeactivation ABI method and loosens the zero-arg length guard (len(data) <= 4< 4). Native gRPC was unaffected, which masked the bug during local testing.
  • Feat: candidateDeactivation view method (#4829) — candidateDeactivation(address) → (bool requested, uint64 scheduledAtBlock). Exposes exit-queue state to dApps and unpacks the internal MaxUint64 sentinel for "requested-but-not-scheduled".
  • Fix: clear DeactivatedAt after Confirm — prevents frontends like iotex-hub from showing "Confirm Exit" prematurely on a re-staked candidate.
  • Fix: emit non-indexed event args on candidate deactivationCandidateDeactivationScheduled.blockNumber was being dropped because the handlers used the legacy receipt-log path. Both deactivation handlers now route through AddEvent.
  • Refactor: split newReceiptLog into legacy + events constructors — no behavior change; prevents the event-args bug above from recurring.

Upgrade Priority

v2.4.1 is a mandatory release for all node types.

Node type Action
Archive node Mandatory
Delegate Mandatory
Fullnode Mandatory
API node Mandatory

Commits

v2.4.0...v2.4.1

Don't miss a new iotex-core release

NewReleases is sending notifications on new releases.