Skip to content

Conversation

@aarlt
Copy link
Contributor

@aarlt aarlt commented May 28, 2020

  • work in progress
  • still incomplete, hacky & unoptimized, but probably the basic idea is already visible
  • introduction of EVMHosts, that inherits from EVMHost.. EVMHosts is now used within ExecutionFramework, the different evm vms will be initialized via the command line option--evmc
  • current idea is basically to distinguish between creation & normal calls to the evmc vms
  • based on the capability of the evm, "evm" or "ewasm" bytecode is deployed to the evmc vm
  • normal calls e.g. sendMessage(..) will basically iterate through the defined evms and call "sendMessage" per instance.. results will be collected and compared if they are the same
  • if they are the same some members of EVMHosts will be set, so that e.g. SolidityEndToEndTests.cpp can still operate on the defined member variables, if they where not the same, an assertion will fail
  • created a fake-ewasm branch of evmone here https://github.com/aarlt/evmone/tree/fake-ewasm, this special evmone will basically just set the ewasm capability flag
  • right now no contract is compiled to ewasm, instead the bytecode for ewasm is just evm bytecode, appended with some additional bytes fake-ewasm.. I did this to be able to test the "deployment-behaviour" before hera supports evmc v7

#ifdef _WIN32
static constexpr auto evmoneFilename = "evmone.dll";
static constexpr auto evmoneDownloadLink = "https://github.com/ethereum/evmone/releases/download/v0.4.1/evmone-0.4.1-windows-amd64.zip";
static constexpr auto heraFilename = "hera.dll";
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest this refactoring PR only makes support for multiple EVMC VMs, but only keeps evmone. Then separately we can introduce hera and running ewasm tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also hera 0.2.5 is not evmc7 compatible, 0.2.6 will be :)

Copy link
Contributor Author

@aarlt aarlt Jun 1, 2020

Choose a reason for hiding this comment

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

ah yes, I know.. I just wanted to have the hera things similar to the evmone things.. but I where also thinking to not introduce any hera specific code.. right now additional evmc vms can be defined by setting --evmc <path-to-a-evmc-library>, potentially multiple times

@chriseth
Copy link
Contributor

chriseth commented Jun 2, 2020

I don't think we should implement this kind of "Y"-connector. We should handle wasm in a similar way as we handle compileViaYul. The host just receives a VM and does its thing - it should not care about what that VM really is.

@aarlt aarlt force-pushed the multiple-evmc-vms branch from a15bce9 to b170221 Compare June 3, 2020 00:46
@aarlt aarlt force-pushed the multiple-evmc-vms branch from b170221 to 5c33565 Compare June 3, 2020 00:46
@aarlt aarlt mentioned this pull request Jun 5, 2020
3 tasks
@aarlt
Copy link
Contributor Author

aarlt commented Jun 5, 2020

Replaced by #9143.

@aarlt aarlt closed this Jun 5, 2020
@axic axic deleted the multiple-evmc-vms branch November 10, 2020 10:41
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