feat: backbone of l1sload_inspector created#39
feat: backbone of l1sload_inspector created#39Gohnnyman wants to merge 2 commits intofeature/l1sload-prover-changesfrom
Conversation
| /// | ||
| /// Returning `CallOutcome` will override the result of the call. | ||
| #[inline] | ||
| fn call(&mut self, context: &mut CTX, inputs: &mut CallInputs) -> Option<CallOutcome> { |
There was a problem hiding this comment.
I suppose we only need the call function for detecting all the calls to L1SLOAD precompile? The rest of the functions can be left as default?
| use alloy_primitives::{Address, U256}; | ||
| use reth_primitives::Log; | ||
| use revm::{ | ||
| interpreter::{CallInputs, CallOutcome, CreateInputs, CreateOutcome, Interpreter}, |
There was a problem hiding this comment.
You might have already seen, but I stumbled across the repo containing some common inspectors for REVM https://github.com/paradigmxyz/revm-inspectors/tree/main , might be useful to refer this.
| info!("execute_txs: execute_transactions start"); | ||
| builder | ||
| .execute_transactions(pool_txs.clone(), num_iterations + 1 < max_iterations) | ||
| .execute_transactions(pool_txs.clone(), num_iterations + 1 < max_iterations, true) |
There was a problem hiding this comment.
If I understand correctly: the precompile calls can be detected only during preflight, so during actual execution, we should populate the data fetched during preflight? Might have to ensure the l1sload data is populated and cleared after each batch is processed (prefight -> execution).
|
Closing this PR as these changes have been incorporated in the new PR #50 |
What's new
L1SloadInspectoradded. It works like a tracer and it is called at each step in eth interpreterTaikoWithOptimisticBlockExecutorraiko creates block executor with this inspector.inspectarg added for disabling inspector for zk executionWe could add l1sload logic into this
L1SloadInspector, in functioncallthat executes before the actual call. This inspector in this PR only works in preflight. So we could add logic in this inspector for storing l1sload values and then load them