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§
Required Methods§
Sourcefn new(params: <Self::Spec as DaSpec>::ChainParams) -> Self
fn new(params: <Self::Spec as DaSpec>::ChainParams) -> Self
Create a new da verifier with the given chain parameters
Sourcefn 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>
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.
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.