Skip to content

MCP-13: Add ConsensusBlock v1 wire codec#30

Open
aeyakovenko wants to merge 306 commits intoanza-xyz:masterfrom
aeyakovenko:issue-15-mcp-consensus-block
Open

MCP-13: Add ConsensusBlock v1 wire codec#30
aeyakovenko wants to merge 306 commits intoanza-xyz:masterfrom
aeyakovenko:issue-15-mcp-consensus-block

Conversation

@aeyakovenko
Copy link
Copy Markdown

Summary

  • add ledger/src/mcp_consensus_block.rs implementing ConsensusBlock v1 wire encode/decode
  • enforce exact parser invariants:
    • version must be 1
    • aggregate/meta lengths are explicit u32
    • truncated and trailing-byte payloads are rejected
  • add canonical signing preimage (signing_bytes) and leader sign/verify helpers
  • preserve protocol policy that consensus_meta is opaque and authoritative for consensus-defined block_id
  • add unit tests for roundtrip, signature verification, tamper detection, and parse rejection paths

Why this shape

  • isolates consensus payload wire correctness in a small module
  • minimizes diff by avoiding gossip/TPU/TVU pipeline changes in this issue

Tests

  • cargo test -p solana-ledger --lib mcp_consensus_block::tests -- --nocapture

Fixes #15

@aeyakovenko aeyakovenko force-pushed the issue-15-mcp-consensus-block branch from e5d91b4 to 342ceaa Compare February 8, 2026 15:24
# Conflicts:
#	ledger/src/shred/mcp_shred.rs
#	plan.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MCP-13 Consensus Leader: broadcast block via turbine

1 participant