-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Hello, I’d like to simulate some contract code using exex. What’s the recommended way to use the block executor with the current state? I need to run a stateless transition based on the current EVM database
fn main() -> eyre::Result<()> {
reth::cli::Cli::parse_args().run(|builder, _| async move {
let handle = builder
.node(EthereumNode::default())
.install_exex("...", move |ctx| async {
let mut block_executor = ctx.block_executor().clone();
// block_executor. ??
})
.launch().await?;
handle.wait_for_node_exit().await
})
}Also, when my node is still syncing, reth-exex might end up simulating against an outdated state from a peer. I’d like to run simulations only against the latest block state (not the committed block, which I understand is already exposed via ExEx notifications).
Is there a way to access the most recent block from a connected peer during sync, so that I can simulate using that up-to-date state instead of an older one to avoid a unnecessary simulation?
Metadata
Metadata
Assignees
Labels
No labels