Skip to main content

AdmissionChecksTheValidityProof

Trait AdmissionChecksTheValidityProof 

Source
pub trait AdmissionChecksTheValidityProof: BlobValidityRestsOnCertificates + BlockOutputsArePersisted { }
Expand description

Lemma (Nothing enters shared storage without its validity proof having been checked). A certificate, a blob or an event in a correct validator’s shared storage was verified against the committee for its epoch before it was written.

Code correspondence.

transitionChainWorkerState::process_confirmed_block
readscommittee_for_epoch(block.header.epoch)
writeswrite_blobs_and_certificate, then write_events
preconditioncertificate.check returned Ok, before either write

Proof. process_confirmed_block resolves the committee for the block’s declared epoch and calls certificate.check against it. Only afterwards does it write: the certificate and the block’s required blobs through write_blobs_and_certificate, then the block’s events through write_events. Both writes are inside the branch guarded by that check, and the ordering is BlockOutputsArePersisted’s. A blob admitted ahead of certification takes the other route, handle_pending_blob, which admits only blobs a pending proposal or validated block expects and fails with WorkerError::UnexpectedBlob otherwise. ∎

The proof is checked once, not on every read. Nothing re-verifies a certificate’s signatures when it is read back, so a reader inside the validator relies on the admission check having happened rather than on the certificate in hand. The proof remains attached — a certificate read from storage can be re-verified, and is, when it crosses to another node — so this is a choice about where to spend verification, not a loss of evidence. It is the same shape as ContentAddressingProvesIntegrity’s asymmetry, for a different kind of proof.

Events inherit their proof rather than carrying one. An event has no signature of its own: it is valid because the block that emitted it is certified, and it is written in the same guarded branch. A reader that has the event but not that block is trusting the writer — which is what linera_chain::proof::checkpoints::EventFloorTracksCheckpoints means when it says a cross-chain read resolves only at or above a stream’s floor.

Implementors§