feat(witness): use block executor to execute block inside debug_execution_witness (#11149)

This commit is contained in:
Francis Li
2024-09-24 09:48:32 -07:00
committed by GitHub
parent 4da5f1f388
commit d3114b4eec
5 changed files with 245 additions and 166 deletions

View File

@ -33,8 +33,8 @@ use reth::rpc::builder::{
// Configuring the network parts, ideally also wouldn't need to think about this.
use myrpc_ext::{MyRpcExt, MyRpcExtApiServer};
use reth::{blockchain_tree::noop::NoopBlockchainTree, tasks::TokioTaskExecutor};
use reth_node_ethereum::{EthEvmConfig, EthereumNode};
use reth_provider::test_utils::TestCanonStateSubscriptions;
use reth_node_ethereum::{EthEvmConfig, EthExecutorProvider, EthereumNode};
use reth_provider::{test_utils::TestCanonStateSubscriptions, ChainSpecProvider};
// Custom rpc extension
pub mod myrpc_ext;
@ -67,7 +67,8 @@ async fn main() -> eyre::Result<()> {
.with_noop_network()
.with_executor(TokioTaskExecutor::default())
.with_evm_config(EthEvmConfig::new(spec))
.with_events(TestCanonStateSubscriptions::default());
.with_events(TestCanonStateSubscriptions::default())
.with_block_executor(EthExecutorProvider::ethereum(provider.chain_spec()));
// Pick which namespaces to expose.
let config = TransportRpcModuleConfig::default().with_http([RethRpcModule::Eth]);