-
Notifications
You must be signed in to change notification settings - Fork 294
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
EIP-4750: EOF - Functions #497
Conversation
section_count * section_header_size + sizeof(TERMINATOR); | ||
} | ||
|
||
std::pair<EOFSectionHeaders, EOFValidationError> validate_eof_headers(bytes_view container) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this not noexcept
anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Number of sections is arbitrary now and so function does dynamic allocation (to return all sections' sizes)
case DATA_SECTION: | ||
if (section_headers[CODE_SECTION] == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can't remove this from here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's replaced by another check in case CODE_SECTION:
if (!section_headers[DATA_SECTION].empty())
return {{}, EOFValidationError::data_section_before_code_section};
(because now invalid case can be like code-data-code)
plus the old check in case TERMINATOR
guarantees that at least one code section is present.
ef30ed0
to
41acfad
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## eof-static-jumps2 #497 +/- ##
=====================================================
- Coverage 98.03% 97.37% -0.66%
=====================================================
Files 59 64 +5
Lines 5687 6390 +703
=====================================================
+ Hits 5575 6222 +647
- Misses 112 168 +56
Flags with carried forward coverage won't be shown. Click here to find out more.
|
a2f706b
to
72c70b4
Compare
3da226a
to
ceb4032
Compare
4a7c4be
to
1bc4f69
Compare
3e89dde
to
1ab5b19
Compare
Rebased, updated opcodes and gas prices for CALLF/RETF and made it activated in Shanghai. |
9c49c47
to
875d04e
Compare
Implement EIP-663: Unlimited SWAP and DUP instructions
8310c73
to
f023c37
Compare
4faa8ce
to
bcc15ac
Compare
e844a66
to
f4ea517
Compare
20c499c
to
1c91f92
Compare
09c7e79
to
79baead
Compare
lib/evmone/instructions.hpp
Outdated
const auto rel_offset_hi = pc[1 + static_cast<uint16_t>(case_) * REL_OFFSET_SIZE]; | ||
const auto rel_offset_lo = pc[2 + static_cast<uint16_t>(case_) * REL_OFFSET_SIZE]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this off-by-one error?
const auto rel_offset_hi = pc[1 + static_cast<uint16_t>(case_) * REL_OFFSET_SIZE]; | |
const auto rel_offset_lo = pc[2 + static_cast<uint16_t>(case_) * REL_OFFSET_SIZE]; | |
const auto rel_offset_hi = pc[2 + static_cast<uint16_t>(case_) * REL_OFFSET_SIZE]; | |
const auto rel_offset_lo = pc[3 + static_cast<uint16_t>(case_) * REL_OFFSET_SIZE]; |
pc[1]
is count, for case == 0
, it should take pc[2]
and pc[3]
.
test/utils/bytecode.hpp
Outdated
return condition + OP_RJUMPI + bytecode{big_endian(offset)}; | ||
} | ||
|
||
inline bytecode rjumpv(const std::initializer_list<uint16_t> offsets, bytecode condition) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry this was wrong
inline bytecode rjumpv(const std::initializer_list<uint16_t> offsets, bytecode condition) | |
inline bytecode rjumpv(const std::initializer_list<int16_t> offsets, bytecode condition) |
|
||
for (const auto& t : types) | ||
{ | ||
if (t.max_stack_height > MAX_STACK_HEIGHT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to EIP-5450 max stack height doesn't exceed 1023
if (t.max_stack_height > MAX_STACK_HEIGHT) | |
if (t.max_stack_height >= MAX_STACK_HEIGHT) |
Is this deprecated by #563? |
No description provided.