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

Implement a fine-tuned EVM instead of relying on an external one #382

Open
hai-rise opened this issue Oct 15, 2024 · 4 comments
Open

Implement a fine-tuned EVM instead of relying on an external one #382

hai-rise opened this issue Oct 15, 2024 · 4 comments
Assignees

Comments

@hai-rise
Copy link
Contributor

hai-rise commented Oct 15, 2024

Context: #316 (comment), #319, #373.

TL;DR, we want an implementation specifically designed for parallel execution with thread-safe types, states, more native caches and instrumentation, no overheads for lazy, etc. Using an external sequential-first implementation like revm adds too much overhead and unwanted type conversions.

EVM isn't that complicated anyway: https://github.com/lambdaclass/lambda_ethereum_rust/tree/main/crates/vm/levm.

@byhashdong
Copy link
Contributor

@hai-rise I'm also very interested in this topic.
Do you have any plan and task splits or architecture design now, or just fork from levm?

@hai-rise
Copy link
Contributor Author

hai-rise commented Oct 17, 2024

@byhashdong This is an ambitious project!

A fork is likely a bad choice as we want low-level control over EVM execution right within pevm::Vm, for instance, to use the multi-version memory directly instead of going through another (frictional) layer of JournaledState's EvmState in revm. We may want to reuse/reference utility functions (like era-based gas calculation) but our parallel-first VM must be very different architecturally.

The current plan is to take baby steps like in #383. We will need many iterations before we can completely remove revm usage. I'll create smaller tasks along the way that you can pick if you are interested 🙏.

@byhashdong
Copy link
Contributor

I'm thrilled to hear this ambitious project, so eager to see your task list.
And if any design doc could be provided, that will be more helpful for code implementation.

@hai-rise
Copy link
Contributor Author

@byhashdong We'll get there, sir 🫡.

@hai-rise hai-rise self-assigned this Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants