Skip to content

Conversation

@pdobacz
Copy link
Member

@pdobacz pdobacz commented Jul 25, 2024

Depends on ipsilon/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 ipsilon/evmc#713

@codecov
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 force-pushed the fix-validate-eof-flag branch from 8af9515 to 840eb55 Compare July 25, 2024 10:31
@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 requested review from chfast, gumb0 and rodiazet July 25, 2024 11:57
@pdobacz pdobacz force-pushed the fix-validate-eof-flag branch from 840eb55 to 97e4c70 Compare July 27, 2024 19:18
@pdobacz pdobacz force-pushed the fix-validate-eof-flag branch from 97e4c70 to 02762fe Compare July 27, 2024 19:19
@pdobacz pdobacz merged commit 9696fcf into master Jul 29, 2024
@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.

3 participants