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