pub trait CertifiableAutomaton: Automaton {
// Provided method
fn certify(
&mut self,
_payload: Self::Digest,
) -> impl Future<Output = Receiver<bool>> + Send { ... }
}Expand description
CertifiableAutomaton extends Automaton with the ability to certify payloads before finalization.
This trait is required by consensus implementations (like Simplex) that support a certification phase between notarization and finalization. Applications that do not need custom certification logic can use the default implementation which always certifies.
Provided Methods§
Sourcefn certify(
&mut self,
_payload: Self::Digest,
) -> impl Future<Output = Receiver<bool>> + Send
fn certify( &mut self, _payload: Self::Digest, ) -> impl Future<Output = Receiver<bool>> + Send
Determine whether a verified payload is safe to commit.
If context is required during certify, it must be included in the data associated with the payload.
Applications that employ erasure coding can override this method to delay or prevent finalization until they have reconstructed and validated the full block (e.g. after receiving enough shards).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.