Skip to content

Fix: shomei use block tracer on eth simulate to support trielog filtering#165

Draft
garyschulte wants to merge 4 commits intoConsensys:mainfrom
garyschulte:fix/shomei-use-block-tracer-on-eth-simulate
Draft

Fix: shomei use block tracer on eth simulate to support trielog filtering#165
garyschulte wants to merge 4 commits intoConsensys:mainfrom
garyschulte:fix/shomei-use-block-tracer-on-eth-simulate

Conversation

@garyschulte
Copy link
Copy Markdown
Contributor

@garyschulte garyschulte commented Apr 10, 2026

PR Description

This PR builds on #164 , besu #10211 and besu-shomei-plugin #82

This should merge last in that chain, and will need to be rebased once #164 merges.

This PR adds a traceBlockImport parameter to the eth_simulateV1 call, which will cause besu to use (if configured) the zkTracer during forced transaction simulation rollup_getVirtualZkEVMStateMerkleProofV1

Fixed Issue(s)

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Note

Medium Risk
Changes the eth_simulateV1 request shape and the trielog decoding path used to build virtual proofs, which can affect correctness of generated traces/proofs if mismatched with Besu/plugin behavior.

Overview
Updates the Besu eth_simulateV1 client request to include a new traceBlockImport flag, enabling block-import tracing during forced transaction simulation.

Adjusts virtual proof generation (rollup_getVirtualZkEVMStateMerkleProofV1) to decode the returned trielog against the cached parent block WorldStateStorage, and refactors TrieLogLayerConverter to accept an explicit storage instance (instead of always using head state) when resolving prior account/storage values.

Reviewed by Cursor Bugbot for commit 634dc83. Bugbot is set up for automated code reviews on this repo. Configure here.

@garyschulte garyschulte marked this pull request as draft April 10, 2026 01:45
@garyschulte garyschulte force-pushed the fix/shomei-use-block-tracer-on-eth-simulate branch from 634dc83 to d9976fe Compare April 10, 2026 02:37
@garyschulte garyschulte mentioned this pull request Apr 11, 2026
2 tasks
final TrieLogLayer trieLogLayer =
worldStateArchive.getTrieLogLayerConverter().decodeTrieLog(RLP.input(trieLogBytes));
worldStateArchive.getTrieLogLayerConverter().decodeTrieLog(
RLP.input(trieLogBytes), optWorldState.get().getZkEvmWorldStateStorage());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we need to pass the worldstatestorage and not use the one we are passing in the constructor here https://github.com/Consensys/shomei/pull/165/changes#diff-4f07a7333cca9e86a5e0c552d5e21a36b4af014b7eec54b7071a127d70b79375R51

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because the trielog being generated needs to be against its parent, not necessarily the head worldstate. Like if we are trying to generate a trielog for a forced transaction that is n blocks back, we cannot use the head worldstate to validate prior values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants