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

EOFCREATE and RETURNCONTRACT implementation #553

Merged
merged 11 commits into from
Apr 16, 2024
Merged

EOFCREATE and RETURNCONTRACT implementation #553

merged 11 commits into from
Apr 16, 2024

Conversation

gumb0
Copy link
Member

@gumb0 gumb0 commented Feb 6, 2023

TODO:

  • Validate CREATE3 to not allow it with truncated containers (currently implemented as run-time check, but should be done at validation, but requires parsing subcontainers before CREATE3 validation)
  • Fix some commented out tests
  • [ ] Optimization to replace validation recursion with iteration created separate issue EOF: Nested container validation without recursion #794
  • More transition tests and unit tests
  • Merge EVMC changes
  • Update state tests

@gumb0 gumb0 force-pushed the eof-create3 branch 2 times, most recently from 1e9a68a to 17dd8f8 Compare February 6, 2023 14:52
@gumb0 gumb0 changed the base branch from master to eof February 6, 2023 14:52
@gumb0 gumb0 force-pushed the eof-create3 branch 6 times, most recently from e5b5a78 to 8b25057 Compare February 6, 2023 15:41
lib/evmone/instructions.hpp Outdated Show resolved Hide resolved
lib/evmone/instructions.hpp Outdated Show resolved Hide resolved
@@ -171,6 +171,8 @@ constexpr inline GasCostTable gas_costs = []() noexcept {
table[EVMC_CANCUN] = table[EVMC_SHANGHAI];
table[EVMC_CANCUN][OP_DUPN] = 3;
table[EVMC_CANCUN][OP_SWAPN] = 3;
table[EVMC_CANCUN][OP_CREATE3] = 32000;
table[EVMC_CANCUN][OP_RETURNCONTRACT] = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To think about this: probably neither of these prices are good?

@gumb0 gumb0 force-pushed the eof-create3 branch 4 times, most recently from 82013aa to f8f095b Compare February 8, 2023 11:13
@gumb0 gumb0 force-pushed the eof-create3 branch 8 times, most recently from 860b84f to b4b4aa0 Compare February 15, 2023 18:31
@codecov
Copy link

codecov bot commented Feb 16, 2023

Codecov Report

Attention: Patch coverage is 98.82729% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 98.25%. Comparing base (24a3214) to head (6e697e7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #553      +/-   ##
==========================================
+ Coverage   98.17%   98.25%   +0.08%     
==========================================
  Files         129      129              
  Lines       13767    14644     +877     
==========================================
+ Hits        13516    14389     +873     
- Misses        251      255       +4     
Flag Coverage Δ
statetests 29.35% <7.70%> (-1.70%) ⬇️
statetests-silkpre 19.86% <3.61%> (-1.22%) ⬇️
unittests 93.79% <98.82%> (+0.36%) ⬆️

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

Files Coverage Δ
lib/evmone/advanced_instructions.cpp 100.00% <ø> (ø)
lib/evmone/baseline.cpp 100.00% <100.00%> (ø)
lib/evmone/baseline_instruction_table.cpp 100.00% <ø> (ø)
lib/evmone/eof.hpp 100.00% <100.00%> (ø)
lib/evmone/execution_state.hpp 96.22% <ø> (ø)
lib/evmone/instructions.hpp 100.00% <100.00%> (ø)
test/state/host.cpp 98.14% <100.00%> (+1.36%) ⬆️
test/state/host.hpp 100.00% <ø> (ø)
test/state/state.cpp 100.00% <100.00%> (ø)
test/unittests/eof_validation.cpp 94.28% <100.00%> (+0.34%) ⬆️
... and 8 more

@gumb0
Copy link
Member Author

gumb0 commented Mar 27, 2024

Not sure yet what happened to the coverage now, it was almost everything covered some time ago 😞

@gumb0
Copy link
Member Author

gumb0 commented Mar 27, 2024

Not sure yet what happened to the coverage now, it was almost everything covered some time ago 😞

Seems to be beacause blockchain-tests job is segfaulting.

@gumb0 gumb0 force-pushed the eof-create3 branch 4 times, most recently from 4a02f97 to 3599674 Compare April 3, 2024 10:03
@gumb0 gumb0 force-pushed the eof-create3 branch 2 times, most recently from 67cbffe to f395362 Compare April 12, 2024 13:37
@gumb0
Copy link
Member Author

gumb0 commented Apr 12, 2024

Rebased.

@gumb0 gumb0 merged commit d53b9e2 into master Apr 16, 2024
24 checks passed
@gumb0 gumb0 deleted the eof-create3 branch April 16, 2024 09:03
gumb0 added a commit that referenced this pull request Apr 18, 2024
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.

5 participants