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

Cairo 0 Hints Support Issue #9

Open
neotheprogramist opened this issue Feb 23, 2024 · 1 comment
Open

Cairo 0 Hints Support Issue #9

neotheprogramist opened this issue Feb 23, 2024 · 1 comment

Comments

@neotheprogramist
Copy link

Description

While attempting to use stone-prover-cli with a simple Fibonacci program and input, it seems that the prover does not support Cairo 0 hints. Running the ./run.sh script in this repository results in an error.

Steps to Reproduce

  1. Clone the repository: git clone https://github.com/neotheprogramist/stone-prover-playground.git
  2. Navigate to the repository: cd stone-prover-playground
  3. Run the script: ./run.sh

Expected Behavior

The prover should support Cairo 0 hints and successfully run the Fibonacci program with input.

Actual Behavior

An error occurs with the following message:

error failed to run Cairo program: main.cairo:24:5: Error at pc=0:8:
Got an exception while executing a hint: Unknown Hint: ids.fibonacci_claim_index = program_input['fibonacci_claim_index']
    %{ ids.fibonacci_claim_index = program_input['fibonacci_claim_index'] %}
    ^**********************************************************************^
Cairo traceback (most recent call last):
<start>:3:1: (pc=0:2)
@odesenfans
Copy link
Contributor

Hello, and thanks for giving the CLI a try!

We use the Rust VM under the hood, and there is no way to convert Python hints to the equivalent Rust code besides implementing the hints manually in Rust and forking the CLI to pass them to cairo-vm on initialization. This essentially means that program-specific hints are not supported.

From our discussion on TG, we could do the following things:

  1. Document this limitation
  2. Improve the error message
  3. Add a command to just prove a program without executing it
  4. Add support for the Python VM if it is found on the system.

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

2 participants