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 commandline option to load bytecode for system contracts #288

Closed
axic opened this issue Aug 2, 2018 · 3 comments
Closed

Add commandline option to load bytecode for system contracts #288

axic opened this issue Aug 2, 2018 · 3 comments
Assignees

Comments

@axic
Copy link
Member

axic commented Aug 2, 2018

Proposed syntax:

  • sys:<address>=<path>
  • sys:sentinel=<path> (alias to 0x00...00e?)
  • sys:evm2wasm=<path> (likewise)

For example, one would run testeth -t GeneralStateTests/stExample -- --testpath ~/tests --singlenet "Byzantium" --singletest "add11" --vm ~/libhera.so --evmc sys:evm2wasm=my_cool_version_of_evm2wasm.wasm

sys stands for system contract, while the address can be any ethereum address (hex encoded, all nibbles set, with the 0x prefix) and path is a relative filesystem path to load the binary from.

Additionally sentinel and evm2wasm are an aliases for their respective addresses.

The main benefit here is that we can load system contracts without adjusting the genesis and as a result makes testing way easier.

In the future we could think about migrating all these settings over to a configuration file.

@axic
Copy link
Member Author

axic commented Aug 9, 2018

This feature should only change the code Hera will be executing when a call comes in to those addresses, but it cannot influence the client to create a new account and deploy code.

This second feature should be enabled by: ethereum/evmc#53

@jakelang
Copy link
Member

jakelang commented Aug 9, 2018

@axic Figured as much. Should this be considered blocked on the evmc issue or should it be implemented the dirty way?

@axic
Copy link
Member Author

axic commented Aug 9, 2018

It should only do case 1: replace the code hera has for the given account, but it is up to the client to actually route the call to hera.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants