Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Booster Tests #94

Open
bbyalcinkaya opened this issue Mar 27, 2024 · 0 comments
Open

Booster Tests #94

bbyalcinkaya opened this issue Mar 27, 2024 · 0 comments

Comments

@bbyalcinkaya
Copy link
Member

Introduction

The booster tests serve the purpose of testing the performance of the prover by running various claims where the booster might abort or get stuck.

Each booster test consists of two main components:

  • A WebAssembly (.wat) file that mimics the structure of a Kasmer test contract.
  • A JSON file specifying the types of symbolic variables in the test and the expected number of aborts and stucks.

Example test configuration:

{
    "inputs": ["BigUint", "BigUint"],
    "aborted": 2,
    "stuck": 0
}

In this example, the test has two BigUint parameters and is expected to encounter 2 aborts and 0 stucks during execution.

Running the tests

Follow these instructions from inside the kmxwasm directory.

Install the dependencies

poetry install

Running all booster tests

make test-booster

Alternatively, you can execute them directly using Poetry:

poetry run pytest src/tests/booster

Running a specific test:

To run a specific test, you can use the -k flag along with the test name:

make test-booster TEST_ARGS='-k bigIntAdd'
#or
poetry run pytest src/tests/booster -k bigIntAdd

Creating Bug Reports

You can create bug reports by running the tests with the --bug-report flag.

poetry run pytest src/tests/booster --bug-report --bug-report-dir <output-directory>
poetry run pytest src/tests/booster -k bigIntAdd --bug-report --bug-report-dir <output-directory>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant