Skip to main content

StateCommitment

Trait StateCommitment 

Source
pub trait StateCommitment: NamespaceStore {
    // Required methods
    fn root(
        &self,
        p: &Partition,
    ) -> impl Future<Output = Result<Option<(String, Hash)>, StoreError>> + MaybeSend;
    fn prove(
        &self,
        p: &Partition,
        key: &Key,
    ) -> impl Future<Output = Result<Option<Bytes>, StoreError>> + MaybeSend;
}
Expand description

A future verifiable state root over a partition (R-21). Optional and unimplemented in the epic; the pipeline never requires it.

Required Methods§

Source

fn root( &self, p: &Partition, ) -> impl Future<Output = Result<Option<(String, Hash)>, StoreError>> + MaybeSend

The partition’s current root, with the name of its commitment scheme; None if the backend keeps no root for it.

Source

fn prove( &self, p: &Partition, key: &Key, ) -> impl Future<Output = Result<Option<Bytes>, StoreError>> + MaybeSend

A proof of key’s value (or absence) against Self::root, in the scheme’s encoding; None if the backend cannot prove it.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§