-
Notifications
You must be signed in to change notification settings - Fork 20.4k
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
core/vm: implement EIP-3670: EOF - Code Validation #24090
Conversation
@@ -40,6 +40,8 @@ type operation struct { | |||
|
|||
// memorySize returns the memory size required for the operation | |||
memorySize memorySizeFunc | |||
|
|||
undefined bool |
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.
This is undefined
rather than defined
because this way it can be initialized only in one place (bottom of this file) only for undefined instructions (i.e. defined is default)
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.
Another idea to achieve this is to have a separate bitmap for defined opcodes and return it together with jump table, i.e.
type JumpTable struct {
operations [256]*operation
defined [32]byte
}
813795e
to
d74609d
Compare
e632518
to
58401a8
Compare
f0330f1
to
b8549e9
Compare
2eae00d
to
39418ee
Compare
229d9cd
to
cb1d9b7
Compare
Rebased over #22958. |
04fd468
to
acd5ca1
Compare
It is required to distinguish INVALID in the jump table from undefined opcodes.
https://eips.ethereum.org/EIPS/eip-3670
Requires #22958