Skip to content

Conversation

@rakita
Copy link
Member

@rakita rakita commented Jul 12, 2024

Bytecode::new_raw now support EOF bytecode and will panic on invalid EOF code. In most cases, the validity of EOF is not questioned as validity is checked inside EVM.

An alternative safe function new_raw_checked was added that returns EofDecodeError if an invalid EOF bytecode can happen.

Bytecode::new_legacy to force legacy bytecode.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 12, 2024

Valgrind Results:

==3962== Cachegrind, a cache and branch-prediction profiler
==3962== Copyright (C) 2002-2017, and GNU GPL'd, by Nicholas Nethercote et al.
==3962== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==3962== Command: target/release/snailtracer
==3962== 
--3962-- warning: L3 cache found, using its data for the LL simulation.
Running snailtracer example!
elapsed: 1.857832964s
==3962== 
==3962== I   refs:      427,041,912
==3962== I1  misses:          3,402
==3962== LLi misses:          2,835
==3962== I1  miss rate:        0.00%
==3962== LLi miss rate:        0.00%
==3962== 
==3962== D   refs:      204,077,616  (132,269,149 rd   + 71,808,467 wr)
==3962== D1  misses:        340,092  (    200,092 rd   +    140,000 wr)
==3962== LLd misses:        137,814  (      4,493 rd   +    133,321 wr)
==3962== D1  miss rate:         0.2% (        0.2%     +        0.2%  )
==3962== LLd miss rate:         0.1% (        0.0%     +        0.2%  )
==3962== 
==3962== LL refs:           343,494  (    203,494 rd   +    140,000 wr)
==3962== LL misses:         140,649  (      7,328 rd   +    133,321 wr)
==3962== LL miss rate:          0.0% (        0.0%     +        0.2%  )

@rakita rakita merged commit 81acfe3 into main Jul 12, 2024
@github-actions github-actions bot mentioned this pull request Jul 12, 2024
@DaniPopes DaniPopes deleted the rakita/eof_new_raw branch July 12, 2024 19:04
This was referenced Jul 15, 2024
@github-actions github-actions bot mentioned this pull request Jul 16, 2024
j75689 pushed a commit to j75689/revm that referenced this pull request Aug 1, 2024
…ealloy#1607)

* feat(EOF): Bytecode::new_raw supports EOF, new_raw_checked added

* Use from abbreviation
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.

3 participants