pub trait DaVerifier {
    type Spec: DaSpec;
    type Error: Debug;

    // Required methods
    fn new(params: <Self::Spec as DaSpec>::ChainParams) -> Self;
    fn verify_relevant_tx_list(
        &self,
        block_header: &<Self::Spec as DaSpec>::BlockHeader,
        txs: &[<Self::Spec as DaSpec>::BlobTransaction],
        inclusion_proof: <Self::Spec as DaSpec>::InclusionMultiProof,
        completeness_proof: <Self::Spec as DaSpec>::CompletenessProof
    ) -> Result<<Self::Spec as DaSpec>::ValidityCondition, Self::Error>;
}
Expand description

A DaVerifier implements the logic required to create a zk proof that some data has been processed.

This trait implements the required functionality to verify claims of the form “If X is the most recent block in the DA layer, then Y is the ordered set of transactions that must be processed by the rollup.”

Required Associated Types§

source

type Spec: DaSpec

The set of types required by the DA layer.

source

type Error: Debug

The error type returned by the DA layer’s verification function TODO: Should we add std::Error bound so it can be ()? ?

Required Methods§

source

fn new(params: <Self::Spec as DaSpec>::ChainParams) -> Self

Create a new da verifier with the given chain parameters

source

fn verify_relevant_tx_list( &self, block_header: &<Self::Spec as DaSpec>::BlockHeader, txs: &[<Self::Spec as DaSpec>::BlobTransaction], inclusion_proof: <Self::Spec as DaSpec>::InclusionMultiProof, completeness_proof: <Self::Spec as DaSpec>::CompletenessProof ) -> Result<<Self::Spec as DaSpec>::ValidityCondition, Self::Error>

Verify a claimed set of transactions against a block header.

Implementors§