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 EVMC_LONDON revision #595

Merged
merged 1 commit into from
May 6, 2021
Merged

Add EVMC_LONDON revision #595

merged 1 commit into from
May 6, 2021

Conversation

yperbasis
Copy link
Member

@yperbasis yperbasis commented May 2, 2021

Add evmc_revision value for the upcoming London fork.

@yperbasis yperbasis requested review from axic and chfast May 2, 2021 12:53
@codecov
Copy link

codecov bot commented May 2, 2021

Codecov Report

Merging #595 (d8270c9) into master (6741315) will decrease coverage by 0.13%.
The diff coverage is 84.21%.

❗ Current head d8270c9 differs from pull request most recent head c3656dd. Consider uploading reports for the commit c3656dd to get more accurate results

@@            Coverage Diff             @@
##           master     #595      +/-   ##
==========================================
- Coverage   93.78%   93.64%   -0.14%     
==========================================
  Files          25       25              
  Lines        3747     3763      +16     
==========================================
+ Hits         3514     3524      +10     
- Misses        233      239       +6     

@yperbasis yperbasis changed the title Add EVMC_LONDON Add EVMC_LONDON revision May 3, 2021
@@ -48,7 +48,7 @@ int main(int argc, const char** argv)
std::string vm_config;
std::string code_arg;
int64_t gas = 1000000;
auto rev = EVMC_ISTANBUL;
auto rev = EVMC_MAX_REVISION;
Copy link
Member

Choose a reason for hiding this comment

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

Here we rather want to go with stable Berlin for now. If we want to minimize number of changes here, we may want to introduce EVMC_LATEST_STABLE_REVISON (something we considered before). Comments @axic ?

Copy link
Member

Choose a reason for hiding this comment

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

Took a bit of digging, but this was the issue: #175. And this was discussion sparking it: #174 (comment)

I think what we discussed there still stands.

*/
EVMC_ISTANBUL = 7,

/**
* The Berlin revision.
*
* The spec draft: https://eips.ethereum.org/EIPS/eip-2070.
* https://github.com/ethereum/eth1.0-specs/blob/master/network-upgrades/mainnet-upgrades/berlin.md
Copy link
Member

Choose a reason for hiding this comment

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

Still don't get why the EIPs are deprecated and now there's a volatile place for the spec, i.e. this link has changed twice already since it has been added to the EIP 😬

Copy link
Member

Choose a reason for hiding this comment

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

This looks bad to me too. I think we should ask for shorter permanent links.

const auto ln = evmc_get_instruction_names_table(EVMC_LONDON);
const auto bn = evmc_get_instruction_names_table(EVMC_BERLIN);

for (int op{OP_STOP}; op <= OP_SELFDESTRUCT; ++op)
Copy link
Member

Choose a reason for hiding this comment

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

I know this isn't introduced by this PR as a new thing, but why is this going from STOP->SELFDESTRUCT and not 0 to 255 or some min/max based on the enum type? I know it is identical but still feels weird basing it on the instruction name.

Copy link
Member

Choose a reason for hiding this comment

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

Make sense, I will change that later.

@@ -147,6 +147,8 @@ const (
Constantinople Revision = C.EVMC_CONSTANTINOPLE
Petersburg Revision = C.EVMC_PETERSBURG
Istanbul Revision = C.EVMC_ISTANBUL
Berlin Revision = C.EVMC_BERLIN
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, isn't this a bugfix which should be released as 8.0.1?

Copy link
Member

Choose a reason for hiding this comment

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

It is, but we don't need to fix it proactively.

@chfast chfast merged commit 2c6a0f8 into ethereum:master May 6, 2021
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.

4 participants