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

Add Istanbul to evmc_revision #174

Merged
merged 2 commits into from Jan 14, 2019
Merged

Add Istanbul to evmc_revision #174

merged 2 commits into from Jan 14, 2019

Conversation

axic
Copy link
Member

@axic axic commented Jan 4, 2019

Closes #134. Ref ethereum/EIPs#1679.

@axic axic requested a review from chfast January 4, 2019 14:45
@@ -706,6 +706,7 @@ enum evmc_revision
EVMC_SPURIOUS_DRAGON = 3,
EVMC_BYZANTIUM = 4,
EVMC_CONSTANTINOPLE = 5,
EVMC_ISTANBUL = 6,

EVMC_LATEST_REVISION = EVMC_CONSTANTINOPLE
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm still not sold that should point to the unstable version.

Copy link
Member Author

Choose a reason for hiding this comment

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

@chfast can you explain the reasoning behind?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can iterate over all revisions or make a table for all of them.

for (auto rev = EVMC_FRONTIER; rev <= EVMC_LATEST_REVISION;

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay that is reasonable. Actually what convinced me is that it would be hard to keep evmc version in line with hardforks and ensure that clients are also always up to date, would we want to set latest_version always to the latest active version.

However, I think we should add a comment to it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, what other enums usually do is use MAX_<name>. Perhaps the best naming would be EVMC_MAX_REVISION to fulfill this role. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, this is mostly this case, just "latest" sounds better than "max". But it might be ok to change it to MAX for people that already know this idiom. Or just add proper documentation.

I agree that having something like "latest stable" is bad idea. EVM implementation should be responsible for bumping the default revision on their own if they have any.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this is mostly this case, just "latest" sounds better than "max".

I think latest very much suggests it points to the latest stable. Hence my confusion all along.

@axic axic added this to In progress in v6.1 via automation Jan 14, 2019
@axic
Copy link
Member Author

axic commented Jan 14, 2019

@chfast ok to merge this?

v6.1 automation moved this from In progress to Reviewer approved Jan 14, 2019
@axic axic merged commit 46a2ef0 into master Jan 14, 2019
v6.1 automation moved this from Reviewer approved to Done Jan 14, 2019
@axic axic deleted the istanbul branch January 14, 2019 15:21
@axic axic mentioned this pull request May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v6.1
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants