Skip to content

Conversation

@onbjerg
Copy link
Member

@onbjerg onbjerg commented Jul 31, 2022

image

This is a pretty naive port, I think there are some places we can improve it a bit. For example, we can probably reuse the analysis from REVM now instead of building our own IC maps.

The speedup is also only really for fuzz tests that deploy their contracts in setUp or the constructor - we can potentially improve here as well

Depends on bluealloy/revm#156

@onbjerg onbjerg added L-ignore Log: ignore PR in changelog T-perf Type: performance labels Jul 31, 2022
onbjerg added 5 commits August 1, 2022 17:58
Whenever we output the bytecode of an account, whether to
a file or in a response, we need to return the *original*
bytecode using `Bytecode::len`, otherwise the bytecode
will differ depending on whether the bytecode has been
checked, analyzed or not.
@onbjerg onbjerg marked this pull request as ready for review August 1, 2022 18:36
Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

pretty insane - i also got a large perf boost

@gakonst gakonst merged commit 4cfe78c into master Aug 1, 2022
@gakonst gakonst deleted the onbjerg/revm-analysis-cache branch August 1, 2022 20:05
iFrostizz pushed a commit to iFrostizz/foundry that referenced this pull request Nov 9, 2022
* build: use new revm with analysis cache

* refactor: use checked bytecode

See bluealloy/revm#121 (comment)

* build: use git revm

* build: use revm 1.8

* test: fix test

* fix: correct bytecode getters/setters

Whenever we output the bytecode of an account, whether to
a file or in a response, we need to return the *original*
bytecode using `Bytecode::len`, otherwise the bytecode
will differ depending on whether the bytecode has been
checked, analyzed or not.

* refactor: use `Bytecode::hash`

* fix: get original account code for traces

* refactor: remove unsafe code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L-ignore Log: ignore PR in changelog T-perf Type: performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants