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

instructions: Set gas cost for undefined instructions to 0 #425

Merged
merged 2 commits into from
Sep 19, 2019

Conversation

chfast
Copy link
Member

@chfast chfast commented Sep 19, 2019

Closes #356.

@chfast chfast force-pushed the instruction_metrics branch from b78eb52 to e87b24d Compare September 19, 2019 14:07
@@ -277,7 +277,7 @@ static struct evmc_instruction_metrics istanbul_metrics[256] = {
/* = 0xfc */ {UNDEFINED, 0, 0},
/* REVERT = 0xfd */ {ZERO, 2, 0},
/* INVALID = 0xfe */ {ZERO, 0, 0},
/* SUICIDE = 0xff */ {5000, 1, 0},
/* SELFDESTRUCT = 0xff */ {5000, 1, 0},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow this wasn't done yet? :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only in comments. This was created by transforming Aleth's table / enum.

@chfast chfast merged commit b831a16 into master Sep 19, 2019
@chfast chfast deleted the instruction_metrics branch September 19, 2019 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instructions: consider definding undefined instruction's cost as 0 instead of -1
2 participants