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 validate_eof flag for EOF creation txs #960

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Conversation

pdobacz
Copy link
Collaborator

@pdobacz pdobacz commented Jul 25, 2024

Depends on ethereum/evmc#713, needs to set the submodule to a master revision of evmc before merging

Before, running evmc run with validate_eof would not recognize creation txs (which have to be validated as initcode) and regular calls to a deployed contract (which have to be validated as runtime) correctly. This fixes that.

Validation is only done on the top-level frame (msg->depth == 0), to avoid re-doing it on every deeper frame (all subcontainers are validated recursively anyway, so all code supplied will be validated).

Initcode/runtime code kind is decided by the msg->kind, which handling is in turn fixed in the evmc run in ethereum/evmc#713

Copy link

codecov bot commented Jul 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.29%. Comparing base (4542e8c) to head (02762fe).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #960   +/-   ##
=======================================
  Coverage   94.29%   94.29%           
=======================================
  Files         143      143           
  Lines       16129    16129           
=======================================
  Hits        15209    15209           
  Misses        920      920           
Flag Coverage Δ
eof_execution_spec_tests 16.86% <50.00%> (ø)
ethereum_tests 26.92% <50.00%> (ø)
ethereum_tests_silkpre 18.69% <50.00%> (ø)
execution_spec_tests 17.95% <50.00%> (ø)
unittests 89.72% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
lib/evmone/baseline_execution.cpp 100.00% <100.00%> (ø)

@pdobacz pdobacz self-assigned this Jul 25, 2024
@pdobacz pdobacz marked this pull request as ready for review July 25, 2024 11:57
@pdobacz pdobacz merged commit 9696fcf into master Jul 29, 2024
26 checks passed
@pdobacz pdobacz deleted the fix-validate-eof-flag branch July 29, 2024 06:25
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