Skip to content

Tighten up our gas analysis tests #30

Open
@nagisa

Description

@nagisa

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-gas-analysisArea: the gas analysis implemented in this crate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Tighten up our gas analysis tests · Issue #30 · near/finite-wasm