Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(simulated): Add Simulation Client for EVM State Transitions (4/n) #2554

Open
wants to merge 70 commits into
base: add-more-simulation-tests
Choose a base branch
from

Conversation

rezbera
Copy link
Contributor

@rezbera rezbera commented Mar 1, 2025

The primary unlock from this PR is the ability to do tests like TestFullLifecycle_ValidBlockWithInjectedTransaction_IsSuccessful, in which we can inject custom transactions and create valid blocks that pass processing which was previously not possibly.

To do this, we must introduce the simulation client, which utilises eth_simulateV1 to calculate the EVM state and receipts roots for a given block. These fields are necessary to correctly pass NewPayload validation.

The eth_simulateV1 API is currently missing features we require which I hope to have merged in upstream geth ethereum/go-ethereum#31304

Till then, we have to use a custom image which I've built based on the linked PR. Once upstream is merged and released, we can go back to the original image.

--authrpc.addr 0.0.0.0 \
--authrpc.jwtsecret /testing/files/jwt.hex \
--authrpc.vhosts '*' \
--datadir /tmp/gethdata \
--ipcpath /tmp/gethdata/geth.ipc \
--syncmode full \
--verbosity 4
--verbosity 4 \
--nodiscover
Copy link
Contributor Author

Choose a reason for hiding this comment

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

nodiscover as peer discovery is not required

@rezbera rezbera marked this pull request as ready for review March 4, 2025 03:15
@rezbera rezbera requested a review from a team as a code owner March 4, 2025 03:15
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: rename to simulation_client.go? or sim_client.go?

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

Successfully merging this pull request may close these issues.

2 participants