Skip to content

feat(anvil): add Tempo consensus core - #17729

Draft
0xKarl98 wants to merge 4 commits into
masterfrom
feat/anvil-tempo-consensus-core
Draft

0xKarl98 wants to merge 4 commits into
masterfrom
feat/anvil-tempo-consensus-core

Conversation

@0xKarl98

Copy link
Copy Markdown
Contributor

Adds the local signing core for Tempo block certificates in Anvil.

  • Derive a reproducible ed25519 proposer and 1-of-1 BLS committee from the development seed.
  • Prepare native Tempo header context and DKG outcomes before hashing. Reject stale or inconsistent consensus metadata before signing the complete header hash.
  • Encode the vote and seed signatures using the pinned Commonware finalization format, with a small adapter around the existing crypto and codec crates.
  • Announce replacement keys in the epoch boundary block before activating them. Restore the key schedule, derivation counter, and certificates together when rewinding a checkpoint.
  • Keep the core independent of mining and RPCs. The added direct dependencies are already in Cargo.lock; this does not pull in the Commonware consensus runtime.

This draft covers the core portion of OSS-1188. Mining, RPC/CLI wiring, and end-to-end verification are still to follow.

Add a deterministic one-member development signer with native Tempo headers, DKG outcomes, and Commonware finalization framing. Keep epoch rotation and checkpoint restoration in the pure core, without mining, RPC, or CLI integration.
Document that preparing genesis only clears its consensus context. Cover nonempty extra data, removal of an existing context, and repeated preparation across supported hardforks.
Share header metadata preparation and validation without cloning the full
header. Replace the single-format dispatcher with a fail-closed hardfork
allowlist and reserve certificate capacity using codec and type sizes.

Preserve genesis handling, validation order, certificate framing, and
checkpoint behavior. Keep module visibility until production integration.
Use NonZeroU64 directly for epoch division and remainder operations.
The current CI nightly flags the redundant get calls with
clippy::needless_nonzero_get under warnings-as-errors.

Keep the get calls needed for identity metadata and subtraction.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant