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

[EVM-Equivalence-YUL] Simplify EXTCODESIZE #752

Merged
merged 2 commits into from
Aug 29, 2024

Conversation

0xVolosnikov
Copy link

@0xVolosnikov 0xVolosnikov commented Aug 28, 2024

Instead of calling an oracle and decommiting the code, the length can be obtained from the hash. Using the same logic as in CodeOracle.yul. In addition, we can use this logic for both types of contracts, which allows us to remove the extra call to check the contract type.

Result observed:

╠═╡ Ergs/gas (-%) ╞═╡ EVMInterpreter M3B3 ╞═╣
║ EXTCODESIZE                        46.828 ║
║ CALL                                0.085 ║
║ STATICCALL                          0.086 ║
║ DELEGATECALL                        0.086 ║
║ CREATE                              0.042 ║
║ CREATE2                             0.044 ║
╚═══════════════════════════════════════════╝

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

@0xVolosnikov 0xVolosnikov changed the title [EVM-Equivalence-YUL] Simplify _fetchDeployedCodeLen [EVM-Equivalence-YUL] Simplify EXTCODESIZE Aug 28, 2024
@jrchatruc jrchatruc merged commit 2fe0652 into evm-equivalence-yul Aug 29, 2024
16 of 17 checks passed
@jrchatruc jrchatruc deleted the vv-evm-simplify-fetchDeployedCodeLen branch August 29, 2024 15:15
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.

2 participants