diff --git a/README.md b/README.md index c252ad041..4afe4a962 100644 --- a/README.md +++ b/README.md @@ -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. @@ -27,26 +28,26 @@ 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 @@ -54,10 +55,18 @@ 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 +```