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
}

@gumb0 gumb0 force-pushed the eip-3670 branch 3 times, most recently from 813795e to d74609d Compare December 13, 2021 10:23
@gumb0 gumb0 force-pushed the eip-3670 branch 4 times, most recently from e632518 to 58401a8 Compare February 8, 2022 15:58
@gumb0 gumb0 force-pushed the eip-3670 branch 2 times, most recently from f0330f1 to b8549e9 Compare February 11, 2022 18:30
@gumb0 gumb0 force-pushed the eip-3670 branch 3 times, most recently from 2eae00d to 39418ee Compare May 12, 2022 10:29
@gumb0 gumb0 force-pushed the eip-3670 branch 2 times, most recently from 229d9cd to cb1d9b7 Compare May 17, 2022 14:30
@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