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

Update README #106

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Cairo Verifier

![Cairo Verifier](https://github.com/HerodotusDev/cairo-verifier/assets/46165861/8692dfc1-f267-4c7e-9af0-4ceaeec84207)

This document provides steps to build and run the Cairo Verifier.
Expand Down Expand Up @@ -27,37 +28,45 @@ To obtain the parsed proof, follow these steps:

### 1. Download Source Code

- Access the source code at [Cairo1 Parser Repository](https://github.com/neotheprogramist/cairo-lang/tree/parser).
- Access the source code at [Cairo1 Parser Repository](https://github.com/neotheprogramist/cairo-lang/tree/parser).

### 2. Install Dependencies

- Execute the command: `pipenv install`.
- Execute the command: `pipenv install`.

### 3. Activate Virtual Environment

- Activate the virtual environment with: `pipenv shell`.
- Activate the virtual environment with: `pipenv shell`.

### 4. Run the Parser

- Use the parser by running:
```
python src/main.py -l starknet_with_keccak < src/starkware/cairo/stark_verifier/air/example_proof.json > out.txt
```
- Use the parser by running:
```
python src/main.py -l starknet_with_keccak < src/starkware/cairo/stark_verifier/air/example_proof.json > out.txt
```

### 5. Access Output File

- The output will be available in the `out.txt` file.
- The output will be available in the `out.txt` file.

## Using the Parsed Proof

Once you have the parsed proof, you can use it as follows:

### 1. Copy Proof to Input File

- Copy the entire content or a consistent section of `out.txt` to `./resources/in.txt`.
- Copy the entire content or a consistent section of `out.txt` to `./resources/in.txt`.

### 3. Execute the Runner Script

- Run: `cargo run --release -- ./target/dev/cairo_verifier.sierra.json < ./resources/in.txt`
- Run: `cargo run --release -- ./target/dev/cairo_verifier.sierra.json < ./resources/in.txt`

- Or run the script using: `./run.sh`.

## Changing hasher

- Or run the script using: `./run.sh`.
By default, verifier uses pedersen for verifier friendly layers and keccak for unfriendly layers. Hasher for unfriendly layers can be changed to blake2s by running the python script with

```
python3 change_hasher.py -t blake
```
Loading