Skip to content

Validator Key Rotation Ceremony With On-Chain Consensus Commitment #52

Description

@JamesEjembi

Problem Statement / Feature Objective
Validators periodically rotate signing keys to limit cryptographic exposure. The codebase lacks a formalized key rotation ceremony that coordinates new key registration, old key deactivation, and on-chain consensus commitment. Without atomic rotation, a window exists where double-signing penalties can be triggered during the transition.

Technical Invariants & Bounds

  • Rotation grace period: 256 epochs (~27 hours)
  • Minimum stake to initiate rotation: 10,000 VERI
  • Old key must remain inactive for 4,096 slots before final revocation
  • Duplicate key registration must raise ERR_DUPLICATE_KEY within 500ms
  • Signature threshold for rotation approval: 2/3 of active validator set

Codebase Navigation Guide

  • src/keys/rotation-ceremony.ts - Orchestrates the multi-phase rotation flow
  • src/consensus/commitment-broadcaster.ts - Gossips rotation commitments to peer validators
  • src/keys/key-registry.ts - On-chain registry of active and retired public keys
  • src/slashing/penalty-calculator.ts - Guards against double-signing during key overlap

Implementation Blueprint

  1. Implement RotationCeremony class with phases: INITIATE, APPROVE, ACTIVATE, RETIRE
  2. Add commitRotation() in commitment-broadcaster.ts that emits a ValidatorKeyRotation event and waits for 2/3 approval
  3. Modify key-registry.ts to support PENDING, ACTIVE, RETIRED key states with epoch timestamps
  4. Update penalty-calculator.ts to suppress slashing for signatures from newly registered keys within the grace period
  5. Add integration test validating that concurrent rotations from different validators do not deadlock the registry

Metadata

Metadata

Assignees

Labels

Complexity: HardcoreExtremely difficult, high-complexity engineering taskGrantFox OSSIssue tracked in GrantFox OSSLayer: Core-EngineCore engine layerMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial CampaignCampaign: Official CampaignType: Core-ArchitectureCore system architecture change required

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions