pub trait ProvingBlockChainClient: BlockChainClient {
fn prove_storage(
&self,
key1: H256,
key2: H256,
id: BlockId
) -> Option<(Vec<Bytes>, H256)>;
fn prove_account(
&self,
key1: H256,
id: BlockId
) -> Option<(Vec<Bytes>, BasicAccount)>;
fn prove_transaction(
&self,
transaction: SignedTransaction,
id: BlockId
) -> Option<(Bytes, Vec<DBValue>)>;
fn epoch_signal(&self, hash: H256) -> Option<Vec<u8>>;
}
Expand description
Extended client interface for providing proofs of the state.
Required methods
Prove account storage at a specific block id.
Both provided keys assume a secure trie. Returns a vector of raw trie nodes (in order from the root) proving the storage query.
fn prove_account(
&self,
key1: H256,
id: BlockId
) -> Option<(Vec<Bytes>, BasicAccount)>
fn prove_account(
&self,
key1: H256,
id: BlockId
) -> Option<(Vec<Bytes>, BasicAccount)>
Prove account existence at a specific block id. The key is the keccak hash of the account’s address. Returns a vector of raw trie nodes (in order from the root) proving the query.
fn prove_transaction(
&self,
transaction: SignedTransaction,
id: BlockId
) -> Option<(Bytes, Vec<DBValue>)>
fn prove_transaction(
&self,
transaction: SignedTransaction,
id: BlockId
) -> Option<(Bytes, Vec<DBValue>)>
Prove execution of a transaction at the given block. Returns the output of the call and a vector of database items necessary to reproduce it.