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
{{ message }}
This repository was archived by the owner on Jan 17, 2022. It is now read-only.
The gas metering code currently inserts metering instructions at the beginning of block, if, loop statements but does not correctly handle code that uses br_* to jump to a label. For example, in the following program, gas is charged for instructions after the br_if that are skipped.
There may also be imported functions that affect control flow or have more strict requirements on the state of the gas meter. In the Substrate srml-contracts module for example, the imported functions such ext_return and ext_gas_left need more delicate handling. ext_return affects control flow and currently gas is over-deducted if there are any unreachable instructions after the call. In the case of ext_gas_left the caller may see a lower result than expected (though this arguably is not a bug).