pub trait TracingExecuteBlock<Block: BlockT>: Send + Sync {
// Required method
fn execute_block(&self, orig_hash: Block::Hash, block: Block) -> Result<()>;
// Provided method
fn call_recorded(
&self,
_block: Block::Hash,
_method: &str,
_call_data: &[u8],
) -> Result<Vec<u8>> { ... }
}Expand description
Something that can execute a block in a tracing context.
Required Methods§
Sourcefn execute_block(&self, orig_hash: Block::Hash, block: Block) -> Result<()>
fn execute_block(&self, orig_hash: Block::Hash, block: Block) -> Result<()>
Execute the given block.
The block is prepared to be executed right away, this means that any Seal was already
removed from the header. As this changes the hash of the block, orig_hash is passed
alongside to the callee.
The execution should be done sync on the same thread, because the caller will register special tracing collectors.
Provided Methods§
Sourcefn call_recorded(
&self,
_block: Block::Hash,
_method: &str,
_call_data: &[u8],
) -> Result<Vec<u8>>
fn call_recorded( &self, _block: Block::Hash, _method: &str, _call_data: &[u8], ) -> Result<Vec<u8>>
Run method re-enacting block at its parent state, with a proof-size recorder registered
and block’s stored recording replayed when available; returns the SCALE-encoded result.
call_data is the complete SCALE-encoded argument list, passed through verbatim.
The default implementation errors: nodes that do not record proof size do not need it.