Conversation
1e9a68a to
17dd8f8
Compare
e5b5a78 to
8b25057
Compare
lib/evmone/instructions_traits.hpp
Outdated
| table[EVMC_CANCUN][OP_DUPN] = 3; | ||
| table[EVMC_CANCUN][OP_SWAPN] = 3; | ||
| table[EVMC_CANCUN][OP_CREATE3] = 32000; | ||
| table[EVMC_CANCUN][OP_RETURNCONTRACT] = 0; |
There was a problem hiding this comment.
To think about this: probably neither of these prices are good?
82013aa to
f8f095b
Compare
219821b to
3987c3d
Compare
860b84f to
b4b4aa0
Compare
Codecov ReportAttention: Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more.
|
91b770f to
ef94b4e
Compare
lib/evmone/instructions.hpp
Outdated
| const auto& offset = stack[0]; | ||
| const auto& size = stack[1]; | ||
|
|
||
| if (state.msg->kind != EVMC_CREATE3) |
There was a problem hiding this comment.
In case we end up allowing EOF creation transactions with empty to (as opposed to relying only on transaction to Creator Contract), this will have to be adjusted to allow RETURNCONTRACT in the context of creation transaction.
They have been fixed and uncommented in |
|
Rebased. |
|
Rebased and reworked subcontainers and truncated data support in |
|
Rebased and squashed. |
There was a problem hiding this comment.
Moved to eof_create4 branch
pdobacz
left a comment
There was a problem hiding this comment.
Very nice, I appreciate the very thorough testing. Just a few nitpicks left, but pls someone else review and give a stamp too.
Late thought: do we have a test that a CREATE3-RETURNCONTRACT-ed contract can be successfully called, for example DATALOAD ing from the dynamic aux data part. To ensure that the deployment process doesn't garble the EOF container in any way.
lib/evmone/eof.hpp
Outdated
|
|
||
| /// Size of the data section. | ||
| /// In case of deploy container it is the minimal data size of the container that will be | ||
| /// deployed, taking into account part of data appended at deploy-time (aux_data). In this case |
There was a problem hiding this comment.
| /// deployed, taking into account part of data appended at deploy-time (aux_data). In this case | |
| /// deployed, taking into account part of data appended at deploy-time (static_aux_data). In this case |
test/unittests/evm_eof_test.cpp
Outdated
| EXPECT_STATUS(EVMC_UNDEFINED_INSTRUCTION); | ||
| } | ||
|
|
||
| TEST_P(evm, returncontract_not_int_initcode) |
There was a problem hiding this comment.
| TEST_P(evm, returncontract_not_int_initcode) | |
| TEST_P(evm, returncontract_not_in_initcode) |
test/unittests/state_tx_test.cpp
Outdated
| EXPECT_EQ(std::get<std::error_code>(validate_transaction(acc, bi, tx, EVMC_PRAGUE, 60000, | ||
| BlockInfo::MAX_BLOB_GAS_PER_BLOCK)) | ||
| .message(), | ||
| "EOF in creation transaction"); |
There was a problem hiding this comment.
| "EOF in creation transaction"); | |
| "EOF initcode in creation transaction"); |
to be more specific? Can also be "in creation transaction data"
Added such test. |
|
Renamed CREATE3 to EOFCREATE. |
|
Not sure yet what happened to the coverage now, it was almost everything covered some time ago 😞 |
Seems to be beacause |
|
Rebased. |
Co-authored-by: pdobacz <5735525+pdobacz@users.noreply.github.com>
Also support EOFCREATE and EOF with containers in bytecode helper. Co-authored-by: pdobacz <5735525+pdobacz@users.noreply.github.com>
TODO:
[ ] Optimization to replace validation recursion with iterationcreated separate issue EOF: Nested container validation without recursion #794