feat(rpc): implement debug_executionWitnessByHash (#14022)

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
This commit is contained in:
Dan Cline
2025-01-27 17:08:31 -05:00
committed by GitHub
parent 2b44d17d5f
commit b9e361cbea
2 changed files with 50 additions and 4 deletions

View File

@ -136,11 +136,23 @@ pub trait DebugApi {
/// to their preimages that were required during the execution of the block, including during
/// state root recomputation.
///
/// The first argument is the block number or block hash.
/// The first argument is the block number or tag.
#[method(name = "executionWitness")]
async fn debug_execution_witness(&self, block: BlockNumberOrTag)
-> RpcResult<ExecutionWitness>;
/// The `debug_executionWitnessByBlockHash` method allows for re-execution of a block with the
/// purpose of generating an execution witness. The witness comprises of a map of all hashed
/// trie nodes to their preimages that were required during the execution of the block,
/// including during state root recomputation.
///
/// The first argument is the block hash.
#[method(name = "executionWitnessByBlockHash")]
async fn debug_execution_witness_by_block_hash(
&self,
hash: B256,
) -> RpcResult<ExecutionWitness>;
/// Sets the logging backtrace location. When a backtrace location is set and a log message is
/// emitted at that location, the stack of the goroutine executing the log statement will
/// be printed to stderr.