finite-wasm icon indicating copy to clipboard operation
finite-wasm copied to clipboard

Tighten up our gas analysis tests

Open nagisa opened this issue 1 year ago • 0 comments

Today the gas analysis tests executes an instrumented wast test and compares that an overall gas cost to execute the test was the same.

This isn’t particularly great, it does not actually verify that the gas counters are precise at all points where a side effect does in fact occur, for example. We could have the interpreter output markers where it thinks side effects are occurring and have it validate the traces more tightly/rigorously.

Conceptually I expected that it would be possible to make each gas instrumentation point such a segmentation point, but this has not really panned out due to tests not always charging fees before the execution of a given instruction – loop is an example of that, function prologue is another.

nagisa avatar Jan 11 '23 13:01 nagisa