sp_domains_fraud_proof::storage_proof

Trait BasicStorageProof

Source
pub trait BasicStorageProof<Block: BlockT>:
    Into<StorageProof>
    + From<StorageProof>
    + Clone {
    type StorageValue: Decode;
    type Key = ();

    // Required method
    fn storage_key_request(
        key: Self::Key,
    ) -> FraudProofStorageKeyRequest<NumberFor<Block>>;

    // Provided methods
    fn generate<PP: ProofProvider<Block>, SKPI: FraudProofStorageKeyProviderInstance<NumberFor<Block>>>(
        proof_provider: &PP,
        block_hash: Block::Hash,
        key: Self::Key,
        storage_key_provider: &SKPI,
    ) -> Result<Self, GenerationError> { ... }
    fn verify<SKP: FraudProofStorageKeyProvider<NumberFor<Block>>>(
        self,
        key: Self::Key,
        state_root: &Block::Hash,
    ) -> Result<Self::StorageValue, VerificationError> { ... }
}

Required Associated Types§

Source

type StorageValue: Decode

Provided Associated Types§

Source

type Key = ()

Required Methods§

Source

fn storage_key_request( key: Self::Key, ) -> FraudProofStorageKeyRequest<NumberFor<Block>>

Provided Methods§

Source

fn generate<PP: ProofProvider<Block>, SKPI: FraudProofStorageKeyProviderInstance<NumberFor<Block>>>( proof_provider: &PP, block_hash: Block::Hash, key: Self::Key, storage_key_provider: &SKPI, ) -> Result<Self, GenerationError>

Source

fn verify<SKP: FraudProofStorageKeyProvider<NumberFor<Block>>>( self, key: Self::Key, state_root: &Block::Hash, ) -> Result<Self::StorageValue, VerificationError>

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.

Implementors§

Source§

impl<Block: BlockT> BasicStorageProof<Block> for DomainChainsAllowlistUpdateStorageProof

Source§

type StorageValue = DomainAllowlistUpdates

Source§

type Key = DomainId

Source§

impl<Block: BlockT> BasicStorageProof<Block> for DomainRuntimeCodeProof

Source§

type StorageValue = RuntimeObject<<<Block as Block>::Header as Header>::Number, <Block as Block>::Hash>

Source§

type Key = u32

Source§

impl<Block: BlockT> BasicStorageProof<Block> for DomainRuntimeUpgradesProof

Source§

impl<Block: BlockT> BasicStorageProof<Block> for DomainSudoCallStorageProof

Source§

type StorageValue = DomainSudoCall

Source§

type Key = DomainId

Source§

impl<Block: BlockT> BasicStorageProof<Block> for InvalidInherentExtrinsicDataProof

Source§

impl<Block: BlockT> BasicStorageProof<Block> for SuccessfulBundlesProof

Source§

type StorageValue = Vec<H256>

Source§

type Key = DomainId

Source§

impl<Block: BlockT, MmrHash: Decode + Clone> BasicStorageProof<Block> for MmrRootStorageProof<MmrHash>

Source§

type StorageValue = MmrHash

Source§

type Key = <<Block as Block>::Header as Header>::Number