evmc icon indicating copy to clipboard operation
evmc copied to clipboard

Add feature so that VM can request inserting code into the state

Open axic opened this issue 7 years ago • 3 comments

For example Hera could request to insert precompiles at certain addresses.

I would imagine this could work as adding a function create_account(address, code, balance) which can be called within execute. We trust the VM to do anything already, so this shouldn't raise any permission questions.

axic avatar Aug 09 '18 10:08 axic

I don't mind to have it in EVMC, but there might not be so easy to implement it on Client side because they usually does not expose API for it directly.

chfast avatar Aug 09 '18 13:08 chfast

I was thinking about this and of course it has to be optional, but instead of in execute, I think it should be in some kind of initialisation stage. Actually that makes sense with #44. I am not fully sure about it, probably better to skip this for ABIv5.

axic avatar Aug 09 '18 14:08 axic

I will definitely include this in the design of 2-phase initialization.

I'd like to put this in a "experimental" namespace to indicate this is not a stable API and implementation is not mandatory. Then we could include this as it is.

chfast avatar Aug 09 '18 16:08 chfast