-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1fe1caf
commit 435dea5
Showing
2 changed files
with
57 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,35 @@ | ||
# Cairo1 Verifier | ||
# Cairo Verifier | ||
|
||
## Overview | ||
This document provides steps to build and run the Cairo Verifier. | ||
|
||
The Cairo1 Verifier is a tool designed for parsing and utilizing proofs in the Cairo language. This document provides instructions on how to get and use the parsed proof. | ||
## Building the Verifier | ||
|
||
## Getting the Parsed Proof | ||
To build the latest version of the verifier and create a Sierra file, follow these steps: | ||
|
||
To obtain the parsed proof, follow these steps: | ||
1. Navigate to the project root directory: | ||
|
||
### 1. Download Source Code | ||
```bash | ||
cd . | ||
``` | ||
|
||
- Access the source code at [Cairo1 Parser Repository](https://github.com/neotheprogramist/cairo-lang/tree/parser). | ||
2. Build the project: | ||
|
||
### 2. Install Dependencies | ||
```bash | ||
scarb build | ||
``` | ||
|
||
- Execute the command: `pipenv install`. | ||
## Running the Verifier | ||
|
||
### 3. Activate Virtual Environment | ||
After building the verifier, you can run it with the following steps: | ||
|
||
- Activate the virtual environment with: `pipenv shell`. | ||
1. Navigate to the runner directory: | ||
|
||
### 4. Run the Parser | ||
```bash | ||
cd runner | ||
``` | ||
|
||
- Use the parser by running: | ||
``` | ||
python src/main.py -l starknet_with_keccak < src/starkware/cairo/stark_verifier/air/example_proof.json > parseout.txt | ||
``` | ||
2. Run the verifier: | ||
|
||
### 5. Access Output File | ||
|
||
- The output will be available in the `parseout.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 `parseout.txt` to `runner/resources/parsein.txt`. | ||
|
||
### 2. Adjust Input Structures | ||
|
||
- Modify the structures in `src/input_structs` to match the copied content. | ||
|
||
### 3. Execute the Runner Script | ||
|
||
- Run the script using: `./run.sh`. | ||
```bash | ||
cargo run --release -- ../target/dev/cairo_verifier.sierra < resources/parserin.txt | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,48 @@ | ||
# Cairo Verifier | ||
# Cairo1 Verifier | ||
|
||
This document provides steps to build and run the Cairo Verifier. | ||
## Overview | ||
|
||
## Building the Verifier | ||
The Cairo1 Verifier is a tool designed for parsing and utilizing proofs in the Cairo language. This document provides instructions on how to get and use the parsed proof. | ||
|
||
To build the latest version of the verifier and create a Sierra file, follow these steps: | ||
## Getting the Parsed Proof | ||
|
||
1. Navigate to the project root directory: | ||
To obtain the parsed proof, follow these steps: | ||
|
||
```bash | ||
cd . | ||
``` | ||
### 1. Download Source Code | ||
|
||
2. Build the project: | ||
- Access the source code at [Cairo1 Parser Repository](https://github.com/neotheprogramist/cairo-lang/tree/parser). | ||
|
||
```bash | ||
scarb build | ||
``` | ||
### 2. Install Dependencies | ||
|
||
## Running the Verifier | ||
- Execute the command: `pipenv install`. | ||
|
||
After building the verifier, you can run it with the following steps: | ||
### 3. Activate Virtual Environment | ||
|
||
1. Navigate to the runner directory: | ||
- Activate the virtual environment with: `pipenv shell`. | ||
|
||
```bash | ||
cd runner | ||
``` | ||
### 4. Run the Parser | ||
|
||
2. Run the verifier: | ||
- Use the parser by running: | ||
``` | ||
python src/main.py -l starknet_with_keccak < src/starkware/cairo/stark_verifier/air/example_proof.json > parseout.txt | ||
``` | ||
|
||
```bash | ||
cargo run --release -- ../target/dev/cairo_verifier.sierra < resources/parserin.txt | ||
``` | ||
### 5. Access Output File | ||
|
||
- The output will be available in the `parseout.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 `parseout.txt` to `runner/resources/parsein.txt`. | ||
|
||
### 2. Adjust Input Structures | ||
|
||
- Modify the structures in `src/input_structs` to match the copied content. | ||
|
||
### 3. Execute the Runner Script | ||
|
||
- Run the script using: `./run.sh`. |