mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-25 03:28:57 +00:00
10807bce39
This provides the functions a loadable VM must provide for a host to use it. The main access to a loaded EVM is `evmc_create_nimbus_evm`, and this meant to be the only exported function the caller starts with. That provides access to other functions, also defined in this patch, to configure the EVM and then the key interesting function is `execute`. `execute` runs a full computation, here using Nimbus EVM `Computation`. (Note, even though everything is EVMC binary-compatible, there is a small dependency on `TransactionHost` in `execute` here, which prevents this being used by a host that is not Nimbus at the moment. It is necessary for some tests, and will eventually go away.) Although this provides the VM-side functionality needed by the host, it does not contain the glue functions for `Computation` to call the host, which are already part of the Nimbus EVM in `nimbus/vm/evmc_api.nim`. Signed-off-by: Jamie Lokier <jamie@shareable.org>