[runtime, tesseract]: Tempo consensus client - #1090
Draft
seunlanlege wants to merge 2 commits into
Draft
Conversation
Adds a light client for Tempo (tempoxyz/tempo), a Reth-based EVM chain finalized by commonware's simplex consensus with BLS12-381 threshold certificates. Every finalized Tempo block carries a ~134-byte certificate: a threshold signature pair over the finalize vote and the per-view VRF seed, verifiable against a single static group public key (the "network identity") with two pairings. The certificate's payload digest is the block hash, so one verification finalizes an Ethereum-style header carrying a standard MPT state root — state proofs reuse EvmStateMachine unchanged. The network identity is the constant term of the DKG public polynomial. Reshares provably preserve it, so validator churn does not rotate the key; only a governance-scheduled full DKG does, and that is committed on-chain in the epoch-boundary block's extra_data and finalized under the outgoing key. The client follows that handoff, subject to two rules that keep it unbreakable: an update may never cross a boundary the client has not verified, and a boundary may only change the key when the previous boundary announced a full DKG. - modules/consensus/tempo/verifier: no_std verifier. Decoders for the commonware wire formats (certificate, on-chain DKG outcome) written against the rev Tempo pins, MinSig BLS verification over arkworks (hash-to-G1, subgroup and infinity checks), Tempo header RLP, epoch and rotation rules, fraud proofs. - modules/ismp/clients/tempo: ConsensusClient (TMPO) for Evm(4217) mainnet and Evm(42431) testnet. - tesseract/consensus/tempo: relayer host over the node's consensus RPC namespace, walking boundary blocks so rotations are never skipped. Fraud proofs carry headers and accept same-round-different-digest or same-height-different-digest: a simplex safety violation is not always a same-round double vote, since a Byzantine quorum can nullify its way to a second notarization at the same height. Tested against captured mainnet certificates and headers, including an epoch-boundary block and its DKG outcome. Rotation and equivocation paths — which mainnet has never exercised — are covered with synthetic certificates, exploiting that a recovered threshold signature is indistinguishable from a plain BLS signature under the group key. A live end-to-end test against mainnet RPC runs with `cargo test -p tesseract-tempo -- --ignored`.
seunlanlege
marked this pull request as draft
August 1, 2026 13:36
seunlanlege
force-pushed
the
seun/tempo-consensus-client
branch
from
August 1, 2026 13:38
136de72 to
ca9e746
Compare
Follows repo conventions:
- Derive the verifier's Error with thiserror instead of a hand-written
Display impl, and convert into ismp::error::Error through the AnyHow
variant rather than Custom(String). The unsupported-state-machine case
becomes an error variant so every ismp error goes through that one path.
- Split the JSON-RPC prover out of the relayer into tempo-prover, a std-only
sibling of tempo-verifier, matching modules/consensus/<chain>/{verifier,
prover}. The live mainnet test moves with it, so it now runs as
`cargo test -p tempo-prover -- --ignored`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a light client for Tempo, the Reth-based EVM chain finalized by commonware's simplex consensus with BLS12-381 threshold certificates.
Why it fits
Tempo turns out to be one of the cleanest integrations available to us:
EvmStateMachineunchanged;eth_getProofworks as-is.extra_dataand finalized under the outgoing key.consensusRPC namespace (consensus_getFinalization,consensus_subscribe) backed by a permanent archive, so no beacon-API-style proof assembly is needed.What's here
modules/consensus/tempo/verifierno_stdverifier: commonware wire-format decoders, MinSig BLS verification, header RLP, epoch/rotation rules, fraud proofsmodules/consensus/tempo/proverconsensusandethnamespacesmodules/ismp/clients/tempoConsensusClient(TMPO) forEvm(4217)mainnet andEvm(42431)testnettesseract/consensus/tempoRegistered in both gargantua and nexus.
Note the BLS orientation: commonware uses MinSig (48-byte G1 signatures, 96-byte G2 public keys), the mirror image of Ethereum's MinPk. We reuse
bls_on_arkworks' IETF point serialization but hash to G1 and pair accordingly. The wire-format decoders are hand-rolled rather than imported, becausecommonware-cryptographyis built on blst and its consensus types are unconditionallystd— neither survives the runtime'sno_stdwasm target.Security properties
Two rules keep the identity handoff unbreakable, both mirroring what Tempo's own nodes enforce before following a new epoch:
is_next_full_dkg, tracked asConsensusState::full_dkg_pending). Every rotation therefore gets an epoch of on-chain advance warning, and an unannounced one is rejected. This matters because a bad rotation is uniquely unrecoverable: it overwrites the identity, after which no honest certificate verifies and no fraud proof can be satisfied.Fraud proofs carry headers and accept same-round-different-digest or same-height-different-digest. The second form is necessary because a simplex safety violation is not always a same-round double vote — a Byzantine quorum can nullify its way to a second notarization of a conflicting block at the same height.
One deliberate leniency:
decode_dkg_outcometolerates trailing bytes. Tempo's nodes decodeextra_dataprefix-only and compare the decoded struct, so a boundary block with trailing garbage is a valid finalized chain state; rejecting it would let a single Byzantine proposer freeze identity rotation forever. The bytes are committed under a certificate-verified header hash either way.Trust assumptions are documented in the crate docs. The load-bearing one: because reshares preserve the constant term, a quorum of any past epoch's shares reconstructs the same group secret — security rests on no such quorum ever colluding, not on the current validator set alone.
Testing
38 tests in the verifier, run against captured mainnet certificates and headers, including an epoch-boundary block and its DKG outcome (which decodes to exactly the identity pinned in Tempo's chainspec).
Rotation and equivocation paths — which mainnet has never exercised, since it has never done a full DKG — are covered with synthetic certificates. A recovered threshold signature is indistinguishable from a plain BLS signature under the group key, so tests forge certificates with a 1-of-1 group key. That covers the full rotation lifecycle (rotate → retired key now rejected → new key accepted), unannounced-rotation rejection, and both fraud-proof forms.
A live end-to-end test against mainnet RPC runs with:
Follow-ups (not in this PR)
EvmHostshost-executive entry forEvm(4217)once contracts are deployed on Tempo.EvmHostdeployment. Worth knowing: Tempo has no native gas token — fees are paid in USD-pegged TIP-20 stablecoins, defaulting to pathUSD at0x20C0…0000. That suits our existing stablecoinfeeTokenmodel, but deployment/fee config there needs its own look.test-data/are what will fail loudly if either side drifts; worth rechecking on Tempo node upgrades.