mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 19:47:59 +00:00
State machine call proof backend (#3945)
* drafting a proof extraction at the hashdb level (to include everything for the 'call' proof case). * use full proof by default (replace previous proof recorder). * fix warnings. * Cache value not found in proof recorder. * Remove need or internal backend struct. * fix type. * doc
This commit is contained in:
@@ -59,16 +59,14 @@ use rstd::result;
|
||||
pub use codec::{Encode, Decode};
|
||||
use primitives::OpaqueMetadata;
|
||||
#[cfg(feature = "std")]
|
||||
use std::{panic::UnwindSafe, cell::RefCell, rc::Rc};
|
||||
#[cfg(feature = "std")]
|
||||
use primitives::Hasher as HasherT;
|
||||
use std::{panic::UnwindSafe, cell::RefCell};
|
||||
|
||||
pub use sr_api_proc_macro::{decl_runtime_apis, impl_runtime_apis};
|
||||
|
||||
#[cfg(feature = "std")]
|
||||
/// A type that records all accessed trie nodes and generates a proof out of it.
|
||||
pub type ProofRecorder<B> = state_machine::ProofRecorder<
|
||||
<<<<B as BlockT>::Header as HeaderT>::Hashing as HashT>::Hasher as HasherT>::Out
|
||||
<<<B as BlockT>::Header as HeaderT>::Hashing as HashT>::Hasher
|
||||
>;
|
||||
|
||||
/// Something that can be constructed to a runtime api.
|
||||
@@ -168,7 +166,7 @@ pub trait CallRuntimeAt<Block: BlockT> {
|
||||
initialize_block: InitializeBlock<'a, Block>,
|
||||
native_call: Option<NC>,
|
||||
context: ExecutionContext,
|
||||
recorder: &Option<Rc<RefCell<ProofRecorder<Block>>>>,
|
||||
recorder: &Option<ProofRecorder<Block>>,
|
||||
) -> Result<NativeOrEncoded<R>, Self::Error>;
|
||||
|
||||
/// Returns the runtime version at the given block.
|
||||
|
||||
Reference in New Issue
Block a user