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

fix: dont calculate initcode keccak on CREATE #969

Merged
merged 1 commit into from
Jan 11, 2024
Merged

fix: dont calculate initcode keccak on CREATE #969

merged 1 commit into from
Jan 11, 2024

Conversation

rakita
Copy link
Member

@rakita rakita commented Jan 10, 2024

Calculating keccak on CREATE opcode is unnecessary as it is only needed on CREATE2. init_code_hash is needed only for foundry so setting B256::ZERO can work.

Copy link
Contributor

Valgrind Results:

==3932== Cachegrind, a cache and branch-prediction profiler
==3932== Copyright (C) 2002-2017, and GNU GPL'd, by Nicholas Nethercote et al.
==3932== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==3932== Command: target/release/snailtracer
==3932== 
--3932-- warning: L3 cache found, using its data for the LL simulation.
==3932== 
==3932== I   refs:      456,276,177
==3932== I1  misses:          3,005
==3932== LLi misses:          2,636
==3932== I1  miss rate:        0.00%
==3932== LLi miss rate:        0.00%
==3932== 
==3932== D   refs:      229,453,815  (152,512,579 rd   + 76,941,236 wr)
==3932== D1  misses:        349,991  (    210,174 rd   +    139,817 wr)
==3932== LLd misses:        137,003  (      3,750 rd   +    133,253 wr)
==3932== D1  miss rate:         0.2% (        0.1%     +        0.2%  )
==3932== LLd miss rate:         0.1% (        0.0%     +        0.2%  )
==3932== 
==3932== LL refs:           352,996  (    213,179 rd   +    139,817 wr)
==3932== LL misses:         139,639  (      6,386 rd   +    133,253 wr)
==3932== LL miss rate:          0.0% (        0.0%     +        0.2%  )

Copy link
Collaborator

@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.

easy enough

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this looks reasonable

@rakita rakita merged commit b28c154 into main Jan 11, 2024
23 checks passed
@rakita rakita deleted the create_keccak branch January 11, 2024 16:09
@github-actions github-actions bot mentioned this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants