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

core/vm: implement EIP-3670: EOF - Code Validation #24090

Closed
wants to merge 15 commits into from

Conversation

gumb0
Copy link
Member

@gumb0 gumb0 commented Dec 9, 2021

@@ -40,6 +40,8 @@ type operation struct {

// memorySize returns the memory size required for the operation
memorySize memorySizeFunc

undefined bool
Copy link
Member Author

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)

Copy link
Member Author

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
}

@axic
Copy link
Member

axic commented Sep 24, 2022

Rebased over #22958.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants