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

Test case: initcode-mode not being EOF-validated #855

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

pdobacz
Copy link
Contributor

@pdobacz pdobacz commented Apr 3, 2024

Recently on the EOF impl call we discussed a potential rule to validate and prohibit "weird" mixing of initcode-mode being on or off - during EOF validation.

We concluded we do not find such validation rule useful enough. In case this rule withstands the test of time, we should have a test case for this.

I think this is a test case where we acertain, that none of the following conditions are validated:

  • Each EOF subcontainer must either be referenced by an EOFCREATE or a RETURNCONTRACT instruction, but never both
  • Each EOF subcontainer may either contain RETURNCONTRACT or RETURN / STOP instructions, but never a mix of these two kinds
  • A subcontainer referenced by an EOFCREATE must never contain a RETURN / STOP instruction, whereas a subcontainer referenced by a RETURNCONTRACT must never contain a RETURNCONTRACT

This quote is taken from the potential addition to the rationale section of EIP-7620, as PRed here: https://github.com/ethereum/EIPs/blob/d8149857a036b69f24c9f8d56fa87dbd0bbf2d0c/EIPS/eip-7620.md#eof-validation-checking-initcode-mode

@pdobacz pdobacz requested a review from gumb0 April 3, 2024 12:58
@pdobacz pdobacz self-assigned this Apr 3, 2024
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.32%. Comparing base (44a029d) to head (94cf08e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #855   +/-   ##
=======================================
  Coverage   98.32%   98.32%           
=======================================
  Files         129      129           
  Lines       15515    15525   +10     
=======================================
+ Hits        15255    15265   +10     
  Misses        260      260           
Flag Coverage Δ
statetests 27.78% <0.00%> (-0.03%) ⬇️
statetests-silkpre 18.81% <0.00%> (-0.02%) ⬇️
unittests 94.12% <100.00%> (+<0.01%) ⬆️

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

Files Coverage Δ
test/unittests/eof_validation_test.cpp 100.00% <100.00%> (ø)

@pdobacz pdobacz force-pushed the initcode-mode-mixing-fine-by-eof branch from 821a69f to be93f04 Compare April 3, 2024 13:01
@pdobacz pdobacz force-pushed the initcode-mode-mixing-fine-by-eof branch from be93f04 to 73c2d33 Compare April 8, 2024 07:32
@gumb0 gumb0 force-pushed the eof-create3 branch 2 times, most recently from f395362 to 6e697e7 Compare April 16, 2024 08:45
Base automatically changed from eof-create3 to master April 16, 2024 09:03
@gumb0
Copy link
Member

gumb0 commented Apr 16, 2024

Please rebase.

@pdobacz pdobacz force-pushed the initcode-mode-mixing-fine-by-eof branch from 73c2d33 to caae78f Compare April 16, 2024 13:52
@chfast chfast added EOF tests Testing infrastructure and removed tests Testing infrastructure labels Apr 17, 2024
@pdobacz pdobacz force-pushed the initcode-mode-mixing-fine-by-eof branch from caae78f to 12319da Compare April 18, 2024 10:03
@pdobacz pdobacz force-pushed the initcode-mode-mixing-fine-by-eof branch from 12319da to 94cf08e Compare April 18, 2024 14:06
@pdobacz pdobacz merged commit ad99657 into master Apr 19, 2024
24 checks passed
@pdobacz pdobacz deleted the initcode-mode-mixing-fine-by-eof branch April 19, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants