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

Use evmone APIv2 on the side #2561

Merged
merged 7 commits into from
Dec 6, 2024
Merged

Use evmone APIv2 on the side #2561

merged 7 commits into from
Dec 6, 2024

Conversation

chfast
Copy link
Member

@chfast chfast commented Dec 5, 2024

This is the part of the full replacement of the evmone API proposed in #2480.

Here we translate structures representing blocks/transactions and implement required interfaces (StateView and BlockHashes). Transactions are also executed in evmone APIv2 but effects of the execution (StateDiff) are not applied to the state. The state transitions are still handled by Silkworm in the old way (IntraBlockState + evmone/EVMC).
The results of both executions are compared against each other to verify the evmone APIv2 works correctly.

In summary, we execute every transaction twice, but this allows us to verify the correctness of the new API and its integration. Moreover, the unit tests and RPC are unaffected by the change. We plan to incrementally move the EVM execution to the new API.

@chfast chfast force-pushed the ci/evmone/apiv2-sidecar branch from d1422ec to cb2f0e5 Compare December 5, 2024 20:45
Use evmone APIv2 to execute transactions in the Processor exec
as the dry-run on-the-side execution (without modifying the state).
Then compare the results of the execution with the execution done
by Silkworm.
Disable tests related to create address collision.
Silkworm and evmone implement this scenario differently.
For details, see the in code comment.
@chfast chfast force-pushed the ci/evmone/apiv2-sidecar branch from cb2f0e5 to ba26055 Compare December 6, 2024 08:07
@canepat canepat added the evmone apiv2 Migration to evmone state::transition API label Dec 6, 2024
@canepat canepat merged commit 8bd1bfc into master Dec 6, 2024
13 of 14 checks passed
@canepat canepat deleted the ci/evmone/apiv2-sidecar branch December 6, 2024 09:31
@canepat canepat mentioned this pull request Dec 12, 2024
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
evmone apiv2 Migration to evmone state::transition API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants