Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
fmkra committed Feb 20, 2024
1 parent bd9b253 commit 8db7584
Showing 1 changed file with 20 additions and 11 deletions.
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
```

0 comments on commit 8db7584

Please sign in to comment.