Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Substrate EVM #3927
This implements an EVM execution module in SRML, to allow unmodified EVM code to be executed in a Substrate-based blockchains.
Accounts that the EVM can touch are stored in
Once balance is in, users can then use
The module should be able to produce nearly identical result as running on Ethereum mainnet, including gas cost and balance changes. Observable behaviors by the contract that might be different include:
I think we currently don't aim to make unobservable behaviors, such as state root, to be the same. We also don't aim to follow the exact same transaction / receipt format. However, given one Ethereum transaction and one Substrate balances user private key, one should be able to convert any Ethereum transaction into a transaction compatible to use in this module.
The gas configurations are currently hard-coded to Istanbul hard fork. It can later be expanded to support earlier hard fork configurations.
The current underlying EVM engine is SputnikVM. The engine is overhauled so that it's modular. One of the important reasons for this is that in the future we'll want to allow users to swap out components like gasometer, and inject their own customized ones.
TODOs before this PR can be merged:
Improvements that can be done, but maybe better in a future PR: