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

feat(EOF): disallow ExtDelegateCall to legacy bytecode #1572

Merged
merged 3 commits into from
Jun 27, 2024

Conversation

rakita
Copy link
Member

@rakita rakita commented Jun 27, 2024

From spec: https://github.com/ipsilon/eof/blob/main/spec/eof.md
EXTDELEGATECALL to a non-EOF contract (legacy contract, EOA, empty account) is disallowed, and it returns 1 (same as when the callee frame reverts) to signal failure. Only initial gas cost of EXTDELEGATECALL is consumed (similarly to the call depth check) and the target address still becomes warm. We allow legacy to EOF path for existing proxy contracts to be able to use EOF upgrades.

It acts like revert.

Copy link
Contributor

Valgrind Results:

==3903== Cachegrind, a cache and branch-prediction profiler
==3903== Copyright (C) 2002-2017, and GNU GPL'd, by Nicholas Nethercote et al.
==3903== Using Valgrind-3.18.1 and LibVEX; rerun with -h for copyright info
==3903== Command: target/release/snailtracer
==3903== 
--3903-- warning: L3 cache found, using its data for the LL simulation.
Running snailtracer example!
elapsed: 1.830873475s
==3903== 
==3903== I   refs:      427,038,325
==3903== I1  misses:          3,155
==3903== LLi misses:          2,797
==3903== I1  miss rate:        0.00%
==3903== LLi miss rate:        0.00%
==3903== 
==3903== D   refs:      204,076,894  (132,269,073 rd   + 71,807,821 wr)
==3903== D1  misses:        341,739  (    201,795 rd   +    139,944 wr)
==3903== LLd misses:        137,732  (      4,451 rd   +    133,281 wr)
==3903== D1  miss rate:         0.2% (        0.2%     +        0.2%  )
==3903== LLd miss rate:         0.1% (        0.0%     +        0.2%  )
==3903== 
==3903== LL refs:           344,894  (    204,950 rd   +    139,944 wr)
==3903== LL misses:         140,529  (      7,248 rd   +    133,281 wr)
==3903== LL miss rate:          0.0% (        0.0%     +        0.2%  )

@rakita rakita merged commit d3ff9cf into main Jun 27, 2024
26 checks passed
This was referenced Jun 27, 2024
@rakita rakita deleted the rakita/disable_delcall_legacy branch June 30, 2024 20:17
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.

1 participant