Skip to content

Update to EVMC7 and evmone 0.3.0#7655

Merged
chriseth merged 6 commits intodevelopfrom
evmc7
Nov 19, 2019
Merged

Update to EVMC7 and evmone 0.3.0#7655
chriseth merged 6 commits intodevelopfrom
evmc7

Conversation

@axic
Copy link
Copy Markdown
Contributor

@axic axic commented Nov 7, 2019

Should wait for evmc and evmone releases (potentially next week) before merging.

Part of #7310.
Closes #7544.

@axic axic mentioned this pull request Nov 7, 2019
6 tasks
Copy link
Copy Markdown
Contributor

@chfast chfast left a comment

Choose a reason for hiding this comment

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

Try to omit std::unique_ptr. If any issues with this, let me know — I probably should fix it in EVMC then.

evmc::VM* EVMHost::getVM(string const& _path)
{
static unique_ptr<evmc::vm> theVM;
static unique_ptr<evmc::VM> theVM;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The evmc::VM itself works as unique ptr, so it can be used directly here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can you push a commit simplifying the entire function?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can you create a PR changing this after this PR is merged?

{
evmc_loader_error_code errorCode = {};
evmc_instance* vm = evmc_load_and_configure(_path.c_str(), &errorCode);
evmc_vm* vm = evmc_load_and_configure(_path.c_str(), &errorCode);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
evmc_vm* vm = evmc_load_and_configure(_path.c_str(), &errorCode);
theVM = evmc::VM{evmc_load_and_configure(_path.c_str(), &errorCode)};

where theVM is of evmc::VM type.

Copy link
Copy Markdown
Collaborator

@ekpyron ekpyron left a comment

Choose a reason for hiding this comment

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

Didn't look at evmc and EVMHost (@chfast's comments are still outstanding there).
Apart from that and me wondering why there's no test expectation changes and some minor stuff, this looks good to me! Added links to the respective Istanbul EIPs (which are summarized in https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1679.md) for reference.
(and of course the fuzzing build needs fixing)

@chriseth chriseth mentioned this pull request Nov 11, 2019
@chriseth
Copy link
Copy Markdown
Contributor

Rebased to see if we can somehow run the optimizer tests.

@axic axic force-pushed the evmc7 branch 2 times, most recently from 536f705 to 39a0abd Compare November 19, 2019 11:10
@axic axic marked this pull request as ready for review November 19, 2019 11:21
@axic
Copy link
Copy Markdown
Contributor Author

axic commented Nov 19, 2019

Need to update test expectations for the new gas prices. Otherwise I think it should be ready.

@axic axic changed the title Update to EVMC7 and enable support for Istanbul Update to EVMC7 and evmone 0.3.0 Nov 19, 2019
@axic
Copy link
Copy Markdown
Contributor Author

axic commented Nov 19, 2019

Removed Istanbul changes from this PR. Let's merge this as is.

Copy link
Copy Markdown
Contributor

@bshastry bshastry left a comment

Choose a reason for hiding this comment

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

Could you please update the revision in the circleci README where it reads

The current revision is 1.

@axic
Copy link
Copy Markdown
Contributor Author

axic commented Nov 19, 2019

@bshastry done

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.

[BLOCKER] Upgrade EVMOne to support Istanbul

5 participants