pub fn prove_execution_on_trie_backend<S, H, Exec>(
	trie_backend: &TrieBackend<S, H>,
	overlay: &mut OverlayedChanges,
	exec: &Exec,
	method: &str,
	call_data: &[u8],
) -> Result<(Vec<u8>, Vec<Vec<u8>>), Box<Error>>
where
	S: trie_backend_essence::TrieBackendStorage<H>,
	H: Hasher,
	Exec: CodeExecutor<H>,
	H::Out: Ord + HeapSizeOf,
{
	let proving_backend = proving_backend::ProvingBackend::new(trie_backend);
	let mut sm = StateMachine {
		backend: &proving_backend,
		changes_trie_storage: None as Option<&changes_trie::InMemoryStorage<H>>,
		offchain_ext: NeverOffchainExt::new(),
		overlay,
		exec,
		method,
		call_data,
		_hasher: PhantomData,
	};
	let (result, _, _) = sm.execute_using_consensus_failure_handler::<_, NeverNativeValue, fn() -> _>(
		native_else_wasm(),
		false,
		None,
	)?;
	let proof = proving_backend.extract_proof();
	Ok((result.into_encoded(), proof))
}
/// Prove execution using the given trie backend, overlayed changes, and call executor.
/// Produces a state-backend-specific "transaction" which can be used to apply the changes
/// to the backing store, such as the disk.
/// Execution proof is the set of all 'touched' storage DBValues from the backend.
///
/// On an error, no prospective changes are written to the overlay.
///
/// Note: changes to code will be in place if this call is made again. For running partial
/// blocks (e.g. a transaction at a time), ensure a different method is used.
Prove execution using the given trie backend, overlayed changes, and call executor.
Produces a state-backend-specific "transaction" which can be used to apply the changes
to the backing store, such as the disk.
Execution proof is the set of all 'touched' storage DBValues from the backend.

On an error, no prospective changes are written to the overlay.

changes to code will be in place if this call is made again. For running partial
blocks , ensure a different method is used.
Prove execution using the given trie backend overlayed changes and call executor . Produces a state - backend - specific " transaction " which can be used to apply the changes to the backing store such as the disk . Execution proof is the set of all ' touched ' storage DBValues from the backend . On an error no prospective changes are written to the overlay . changes to code will be in place if this call is made again . For running partial blocks ensure a different method is used .
pub fn prove_execution_on_trie_backend<S, H, Exec>(
	trie_backend: &TrieBackend<S, H>,
	overlay: &mut OverlayedChanges,
	exec: &Exec,
	method: &str,
	call_data: &[u8],
) -> Result<(Vec<u8>, Vec<Vec<u8>>), Box<Error>>
where
	S: trie_backend_essence::TrieBackendStorage<H>,
	H: Hasher,
	Exec: CodeExecutor<H>,
	H::Out: Ord + HeapSizeOf,
{
	let proving_backend = proving_backend::ProvingBackend::new(trie_backend);
	let mut sm = StateMachine {
		backend: &proving_backend,
		changes_trie_storage: None as Option<&changes_trie::InMemoryStorage<H>>,
		offchain_ext: NeverOffchainExt::new(),
		overlay,
		exec,
		method,
		call_data,
		_hasher: PhantomData,
	};
	let (result, _, _) = sm.execute_using_consensus_failure_handler::<_, NeverNativeValue, fn() -> _>(
		native_else_wasm(),
		false,
		None,
	)?;
	let proof = proving_backend.extract_proof();
	Ok((result.into_encoded(), proof))
}
pub fn prove_execution_on_trie_backend < S , H , Exec > ( trie_backend : & TrieBackend < S , H > , overlay : & mut OverlayedChanges , exec : & Exec , method : & str , call_data : & [ u8 ] , ) -> Result < ( Vec < u8 > , Vec < Vec < u8 > > ) , Box < Error > > where S : trie_backend_essence :: TrieBackendStorage < H > , H : Hasher , Exec : CodeExecutor < H > , H :: Out : Ord + HeapSizeOf , { let proving_backend = proving_backend :: ProvingBackend :: new ( trie_backend ) ; let mut sm = StateMachine { backend : & proving_backend , changes_trie_storage : None as Option < & changes_trie :: InMemoryStorage < H > > , offchain_ext : NeverOffchainExt :: new ( ) , overlay , exec , method , call_data , _hasher : PhantomData , } ; let ( result , _ , _ ) = sm . execute_using_consensus_failure_handler :: < _ , NeverNativeValue , fn ( ) -> _ > ( native_else_wasm ( ) , false , None , ) ? ; let proof = proving_backend . extract_proof ( ) ; Ok ( ( result . into_encoded ( ) , proof ) ) }
Prove execution using the given trie backend, overlayed changes, and call executor.
Prove execution using the given trie backend overlayed changes and call executor .
trie_backend
&TrieBackend<S, H>
overlay
&mut OverlayedChanges
exec
&Exec
method
&str
call_data
&[u8]
trie_backend
&TrieBackend<S, H>
overlay
&mut OverlayedChanges
exec
&Exec
method
&str
call_data
&[u8]