Trait sc_light::fetcher::FetchChecker[][src]

pub trait FetchChecker<Block>: Send + Sync where
    Block: Block
{ pub fn check_header_proof(
        &self,
        request: &RemoteHeaderRequest<<Block as Block>::Header>,
        header: Option<<Block as Block>::Header>,
        remote_proof: StorageProof
    ) -> Result<<Block as Block>::Header, Error>;
pub fn check_read_proof(
        &self,
        request: &RemoteReadRequest<<Block as Block>::Header>,
        remote_proof: StorageProof
    ) -> Result<HashMap<Vec<u8, Global>, Option<Vec<u8, Global>>, RandomState>, Error>;
pub fn check_read_child_proof(
        &self,
        request: &RemoteReadChildRequest<<Block as Block>::Header>,
        remote_proof: StorageProof
    ) -> Result<HashMap<Vec<u8, Global>, Option<Vec<u8, Global>>, RandomState>, Error>;
pub fn check_execution_proof(
        &self,
        request: &RemoteCallRequest<<Block as Block>::Header>,
        remote_proof: StorageProof
    ) -> Result<Vec<u8, Global>, Error>;
pub fn check_changes_proof(
        &self,
        request: &RemoteChangesRequest<<Block as Block>::Header>,
        proof: ChangesProof<<Block as Block>::Header>
    ) -> Result<Vec<(<<Block as Block>::Header as Header>::Number, u32), Global>, Error>;
pub fn check_body_proof(
        &self,
        request: &RemoteBodyRequest<<Block as Block>::Header>,
        body: Vec<<Block as Block>::Extrinsic, Global>
    ) -> Result<Vec<<Block as Block>::Extrinsic, Global>, Error>; }

Light client remote data checker.

Implementations of this trait should not use any prunable blockchain data except that is passed to its methods.

Required methods

pub fn check_header_proof(
    &self,
    request: &RemoteHeaderRequest<<Block as Block>::Header>,
    header: Option<<Block as Block>::Header>,
    remote_proof: StorageProof
) -> Result<<Block as Block>::Header, Error>
[src]

Check remote header proof.

pub fn check_read_proof(
    &self,
    request: &RemoteReadRequest<<Block as Block>::Header>,
    remote_proof: StorageProof
) -> Result<HashMap<Vec<u8, Global>, Option<Vec<u8, Global>>, RandomState>, Error>
[src]

Check remote storage read proof.

pub fn check_read_child_proof(
    &self,
    request: &RemoteReadChildRequest<<Block as Block>::Header>,
    remote_proof: StorageProof
) -> Result<HashMap<Vec<u8, Global>, Option<Vec<u8, Global>>, RandomState>, Error>
[src]

Check remote storage read proof.

pub fn check_execution_proof(
    &self,
    request: &RemoteCallRequest<<Block as Block>::Header>,
    remote_proof: StorageProof
) -> Result<Vec<u8, Global>, Error>
[src]

Check remote method execution proof.

pub fn check_changes_proof(
    &self,
    request: &RemoteChangesRequest<<Block as Block>::Header>,
    proof: ChangesProof<<Block as Block>::Header>
) -> Result<Vec<(<<Block as Block>::Header as Header>::Number, u32), Global>, Error>
[src]

Check remote changes query proof.

pub fn check_body_proof(
    &self,
    request: &RemoteBodyRequest<<Block as Block>::Header>,
    body: Vec<<Block as Block>::Extrinsic, Global>
) -> Result<Vec<<Block as Block>::Extrinsic, Global>, Error>
[src]

Check remote body proof.

Loading content...

Implementors

impl<E, Block, H, S> FetchChecker<Block> for LightDataChecker<E, H, Block, S> where
    Block: BlockT,
    E: CodeExecutor + Clone + 'static,
    H: Hasher,
    H::Out: Ord + Codec + 'static,
    S: BlockchainStorage<Block>, 
[src]

Loading content...