Hera is an eWASM virtual machine implemented in C++ conforming to the Ethereum VM API.
It can be used with cpp-ethereum and perhaps in the future with other implementations through appropriate bindings.
Currently it uses Binaryen's interpreter for running WebAssembly bytecode and it should be improved to support the WAVM as a backend.
-DHERA_DEBUGGING=ON
will turn on debugging features and messages-DHERA_METERING_CONTRACT=ON
will pass contract creation data through the metering contract residing at 0x00..0a
Hera implements two interfaces: EEI and a debugging module.
debug::print32(value: i32)
- print valuedebug::print64(value: i64)
- print valuedebug::printMem(offset: i32, len: i32)
- print memory segment as printable charactersdebug::printMemHex(offset: i32, len: i32)
- print memory segment as hexdebug::printStorage(pathOffset: i32)
- print storage value as printable charactersdebug::printStorageHex(pathOffset: i32)
- print storage value as hex
These are only enabled if Hera is compiled with debugging on.
Although Hera enables the execution of eWASM bytecode, there are more elements to eWASM an Ethereum node must be aware of:
- backwards compatibility provisions
- injecting metering code to eWASM contracts
- transcompiling EVM1 contracts to eWASM if desired
All of the above must be implemented outside of Hera.
Alex Beregszaszi
MIT