-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
In runevm there are two sources of truth for the remaining gas during a transaction. One stored by the host, and one by parity's interpreter.
This would be no problem if runevm were to meter everything and only do a consumeGas at the end to let the host know how much gas it has spent. But some hosts (e.g. hera) meter EEI methods themselves, which means the gas costs stored by the interpreter and the host diverges.
I was wondering what others think about these alternatives, and whether there are better approaches I'm not seeing:
- Disable interface metering in hosts (e.g. add a flag to hera for this), add the methods mentioned in evm2wasm specific EEI methods ewasm/design#138 to the EEI, and do complete metering in runevm.
- Keep interface metering in hosts and to keep the gas costs in sync (necessary for e.g. EIP150):
- do a
consumeGasafter instructions which don't call an EEI method - do a
getGasLeftafter instructions which do call an EEI method
- do a
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels