Skip to content

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

Merged
matkt merged 5 commits intoConsensys:mainfrom
garyschulte:fix/shomei-use-block-tracer-on-eth-simulate
Apr 23, 2026
Merged

Fix: shomei use block tracer on eth simulate to support trielog filtering#165
matkt merged 5 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 the commits from #164 (and supersedes it) , 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
Touches RPC request schema and the trielog decoding path used for rollup_getVirtualZkEVMStateMerkleProofV1, so mismatched params or incorrect state storage selection could break virtual trace/proof generation.

Overview
Updates eth_simulateV1 requests to include a new traceBlockImport flag, enabling Besu to run block-import tracing during forced transaction simulation while still returning a trielog.

Fixes virtual proof generation to decode the returned trielog against the parent block’s cached WorldStateStorage rather than the head state by threading the storage through TrieLogLayerConverter.decodeTrieLog(...) (and updating the associated unit test/mocking).

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

Signed-off-by: garyschulte <garyschulte@gmail.com>
…ed overload

Signed-off-by: garyschulte <garyschulte@gmail.com>
@garyschulte garyschulte marked this pull request as draft April 10, 2026 01:45
Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: garyschulte <garyschulte@gmail.com>
@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.

@garyschulte garyschulte marked this pull request as ready for review April 22, 2026 16:01
@garyschulte
Copy link
Copy Markdown
Contributor Author

This PR is reviewable/mergeable now that besu 10211 and besu-shomei-plugin 82 have merged

@matkt matkt merged commit 436e9c5 into Consensys:main Apr 23, 2026
19 checks passed
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