[][src]Trait sc_client_api::proof_provider::ProofProvider

pub trait ProofProvider<Block: BlockT> {
    pub fn read_proof(
        &self,
        id: &BlockId<Block>,
        keys: &mut dyn Iterator<Item = &[u8]>
    ) -> Result<StorageProof>;
pub fn read_child_proof(
        &self,
        id: &BlockId<Block>,
        child_info: &ChildInfo,
        keys: &mut dyn Iterator<Item = &[u8]>
    ) -> Result<StorageProof>;
pub fn execution_proof(
        &self,
        id: &BlockId<Block>,
        method: &str,
        call_data: &[u8]
    ) -> Result<(Vec<u8>, StorageProof)>;
pub fn header_proof(
        &self,
        id: &BlockId<Block>
    ) -> Result<(Block::Header, StorageProof)>;
pub fn key_changes_proof(
        &self,
        first: Block::Hash,
        last: Block::Hash,
        min: Block::Hash,
        max: Block::Hash,
        storage_key: Option<&PrefixedStorageKey>,
        key: &StorageKey
    ) -> Result<ChangesProof<Block::Header>>; }

Interface for providing block proving utilities.

Required methods

pub fn read_proof(
    &self,
    id: &BlockId<Block>,
    keys: &mut dyn Iterator<Item = &[u8]>
) -> Result<StorageProof>
[src]

Reads storage value at a given block + key, returning read proof.

pub fn read_child_proof(
    &self,
    id: &BlockId<Block>,
    child_info: &ChildInfo,
    keys: &mut dyn Iterator<Item = &[u8]>
) -> Result<StorageProof>
[src]

Reads child storage value at a given block + storage_key + key, returning read proof.

pub fn execution_proof(
    &self,
    id: &BlockId<Block>,
    method: &str,
    call_data: &[u8]
) -> Result<(Vec<u8>, StorageProof)>
[src]

Execute a call to a contract on top of state in a block of given hash AND returning execution proof.

No changes are made.

pub fn header_proof(
    &self,
    id: &BlockId<Block>
) -> Result<(Block::Header, StorageProof)>
[src]

Reads given header and generates CHT-based header proof.

pub fn key_changes_proof(
    &self,
    first: Block::Hash,
    last: Block::Hash,
    min: Block::Hash,
    max: Block::Hash,
    storage_key: Option<&PrefixedStorageKey>,
    key: &StorageKey
) -> Result<ChangesProof<Block::Header>>
[src]

Get proof for computation of (block, extrinsic) pairs where key has been changed at given blocks range. min is the hash of the first block, which changes trie root is known to the requester - when we're using changes tries from ascendants of this block, we should provide proofs for changes tries roots max is the hash of the last block known to the requester - we can't use changes tries from descendants of this block. Works only for runtimes that are supporting changes tries.

Loading content...

Implementors

Loading content...