Devnet4 Phase 3: dual-key verification and remove proposer attestation from store#232
Devnet4 Phase 3: dual-key verification and remove proposer attestation from store#232pablodeymo wants to merge 3 commits intodevnet4from
Conversation
Introduce the devnet4 type-level changes:
- Validator: single pubkey → attestation_pubkey + proposal_pubkey with
get_attestation_pubkey() and get_proposal_pubkey() methods
- SignedBlockWithAttestation → SignedBlock (message is Block directly)
- Delete BlockWithAttestation and BlockSignaturesWithAttestation wrappers
- Genesis config: GENESIS_VALIDATORS changes from list of hex strings to
list of {attestation_pubkey, proposal_pubkey} objects
- Test fixtures: Validator deserialization updated for dual pubkeys
NOTE: This is SSZ-breaking. Downstream crates will not compile until
subsequent phases update all call sites.
- KeyManager: introduce ValidatorKeyPair with attestation_key + proposal_key - sign_attestation() routes to attestation key, new sign_block_root() uses proposal key - propose_block(): sign block root with proposal key, remove proposer attestation from block (proposer now attests at interval 1 via gossip) - produce_attestations(): remove proposer skip, all validators attest - main.rs: read dual key files per validator (attestation_privkey_file + proposal_privkey_file) - checkpoint_sync: validate both attestation_pubkey and proposal_pubkey - Type cascade: SignedBlockWithAttestation → SignedBlock, fix field access NOTE: store.rs and network layer still reference old types — fixed in subsequent phases.
…r attestation - verify_signatures(): attestation proofs use get_attestation_pubkey(), proposer signature verified with get_proposal_pubkey() over block root - on_block_core(): remove proposer attestation processing (~40 lines) — no more gossip signature insert or dummy proof for proposer - Gossip attestation/aggregation verification: get_attestation_pubkey() - Remove StoreError::ProposerAttestationMismatch variant - Storage: write/read BlockSignatures directly (no wrapper), fix field access .message.block → .message - Table docs: BlockSignatures stores BlockSignatures (not WithAttestation)
🤖 Kimi Code ReviewReview SummaryThis PR introduces dual XMSS key pairs for validators (attestation + proposal keys) and removes the proposer attestation from blocks. The changes are well-structured and maintain security properties while improving performance by eliminating redundant signatures. Issues Found
Security Considerations
Performance Impact
Code Quality
Recommendations
Automated review by Kimi (Moonshot AI) · custom prompt |
🤖 Claude Code ReviewNow I have a full picture of the diff. Let me write the review. Code Review — PR #232: Dual-key verification, remove proposer attestationOverall this is a clean, well-scoped refactor. The architecture simplification (removing Correctness1. Dead parameter
2. Weakened state root pin test ( The 3. Storage format break — no migration
Metrics4. Proposal signing reuses attestation metric labels
let _timing = metrics::time_pq_sig_attestation_signing();
// ...
metrics::inc_pq_sig_attestation_signatures();Both calls use attestation metrics. Proposal signing is now a distinct operation on a different key — mixing them obscures observability (e.g., if proposal signing is slow or fails, the attestation metric is inflated). Either add Error messages5.
Test coverage6.
Minor7.
What's good
Automated review by Claude (Anthropic) · custom prompt |
🤖 Codex Code Review
Briefly: the dual-key split (attestation vs proposal) and signature verification direction look structurally sound; main concern is storage compatibility/panic behavior plus restoring stronger consensus-root test coverage. I did not run tests locally in this review pass. Automated review by OpenAI Codex · custom prompt |
Motivation
Third of 4 PRs implementing devnet4. Updates signature verification to use dual keys and removes all proposer attestation handling from block processing.
Depends on: #230 (Phase 1), #231 (Phase 2)
Description
Signature verification: dual keys
on_block_core: remove proposer attestation processing
Removed ~40 lines of proposer attestation handling:
Storage layer
Files changed
PR chain
How to Test
Requires Phase 1+2 merged. Network layer still references old types — fixed in Phase 4.