Expand description
Tempo consensus owned by the canonical in-memory chain.
Mining checks consensus metadata before committing execution and signs the final header in the same storage write guard that publishes its block. Cache commits and state-root computation do not hold the storage lock, so readers can still access the published chain.
Imports that change canonical history start an unsigned signing segment. Database snapshots remain usable, but reverting across that import boundary starts a new segment at the restored height. Snapshots within the current segment restore consensus exactly.
All live consensus mutations, including rotation RPCs, must acquire the database write lock before the storage lock. Mining retains that database guard from preparation through publication, preventing snapshots, rewinds, resets, imports, or rotations from changing the prepared height or key schedule. Only initialization before the backend is shared and private staged copies are exempt; publishing a staged copy still requires the database write lock. Consensus readers acquire the database read lock before storage.
Historical queries can use the trusted fork provider at or below its pinned height. They snapshot the provider, root, and known canonical hash together with local history, then release all guards before network I/O. Upstream blocks must match that canonical hash when known. An overlapping reset can complete while the request returns the old snapshot; upstream responses are never cached into the replacement chain. Upstream committees remain independent of the local development identity. Height-bounded forwarding does not establish an authenticated committee or ancestry chain from upstream history to locally signed blocks.
Locally mined fork headers seal the same partial account and storage trie used by proofs. Its snapshots live in a separate bounded history cache, sharing the execution historyβs cache settings but preserving local trie membership through disk round trips. Only a canonical local certificate can select a snapshot. Rewinds remove orphaned proof states. Resets clear proof history before a replacement signing history starts.
Re-exportsΒ§
use super::Backend;πuse super::state::StateRootCache;πuse super::storage::BlockchainStorage;πuse super::storage::InMemoryBlockStates;πuse crate::eth::backend::db::MaybeFullDatabase;πuse crate::eth::backend::tempo_consensus::TempoConsensus;πuse crate::eth::backend::tempo_consensus::TempoConsensusIdentity;πuse crate::eth::backend::tempo_consensus::TempoFinalization;πuse crate::eth::error::BlockchainError;πuse crate::eth::tempo_consensus::TempoCertifiedBlock;πuse alloy_consensus::BlockHeader;πuse alloy_consensus::Sealable;πuse alloy_consensus::proofs::calculate_transaction_root;πuse alloy_network::Network;πuse alloy_primitives::Address;πuse alloy_primitives::B256;πuse alloy_primitives::U256;πuse alloy_primitives::map::AddressMap;πuse alloy_primitives::map::HashMap;πuse alloy_provider::Provider;πuse alloy_rpc_types::EIP1186AccountProofResponse as AccountProof;πuse anvil_core::eth::block::Block;πuse anvil_core::eth::block::canonical_block;πuse anvil_rpc::error::ErrorCode;πuse anvil_rpc::error::RpcError;πuse parking_lot::Mutex;πuse parking_lot::RwLock;πuse parking_lot::RwLockUpgradableReadGuard;πuse revm::database::DbAccount;πuse std::fmt;πuse std::num::NonZeroU64;πuse std::sync::Arc;πuse tempo_hardfork::TempoHardfork;πuse tempo_primitives::TempoHeader;π
StructsΒ§
- Tempo
Chain π - Local certificates, key schedule, and consensus snapshots for the current signing history.
- Tempo
Snapshot π - Consensus and the sealed head trie retained by an explicit EVM snapshot.
FunctionsΒ§
- certified_
block π - consensus_
unavailable π - latest_
finalization π - tempo_
chain π - tempo_
unavailable π