You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When comparing our vm with the vm1, there are several differences in the remaining gas, here are some of the places we are missing:
Heap growth: the heap starts with a free size of u32::MAX, so we should start charging gas if the bound to grow is higher than that number.
Stipend gas: when pushing a new far_call frame if the bytecode was for the evm interpreter, we add a stipend gas, but on ret, we should not be adding that gas back to the new frame.
Inexplicit panics: this functions behaves like a typical instruction and so we should be also spending the usual static gas, with the only exception we fell in there because we actually ran out of gas, in that case, the inexplicit panic is free of cost.
Invalid opcode: should burn all frame gas.
We should burn all gas in heap write last address check(see here).
To test the differences in gas, this pr might be useful.
Btw, some fixes have been addressed in this pr, but it might got old since the newer changes so it might be better to just re-implement them.
The text was updated successfully, but these errors were encountered:
When comparing our vm with the vm1, there are several differences in the remaining gas, here are some of the places we are missing:
u32::MAX
, so we should start charging gas if the bound to grow is higher than that number.far_call frame
if the bytecode was for the evm interpreter, we add a stipend gas, but onret
, we should not be adding that gas back to the new frame.To test the differences in gas, this pr might be useful.
Btw, some fixes have been addressed in this pr, but it might got old since the newer changes so it might be better to just re-implement them.
The text was updated successfully, but these errors were encountered: