bluealloy / revm

Rust implementation of the Ethereum Virtual Machine.
https://bluealloy.github.io/revm/
MIT License
1.61k stars 540 forks source link

chore(revm): defer bytecode load #1588

Closed lightsing closed 2 months ago

lightsing commented 3 months ago

Current revm try to load bytecode just after depth check, but there are some conditions the code is not needed:

As long as the code is not needed, the database provider may not have corresponding code, like in our implementation scroll-tech/stateless-block-verifier#15 use this as an optimization.

rakita commented 3 months ago

Looks reasonable, will check it again to be sure