Skip to content

Commit

Permalink
Rename cairo_verifier -> integrity
Browse files Browse the repository at this point in the history
  • Loading branch information
fmkra committed Nov 5, 2024
1 parent 2d54ef5 commit f065075
Show file tree
Hide file tree
Showing 148 changed files with 256 additions and 256 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/proof_verification_tests.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
name: Continuous Integration - proof verification tests

on:
push:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
pull_request:
branches:
- main

jobs:
verify-example-proofs:
runs-on: ubuntu-latest
strategy:
matrix:
cairo_version: ["cairo0", "cairo1"]
layout: ["recursive", "recursive_with_poseidon", "small", "dex", "starknet", "starknet_with_keccak"]
hash_function: ["keccak"]
hasher_bit_length: ["160_lsb"]
stone_version: ["stone5"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: true
- name: Setup Scarb
uses: software-mansion/setup-scarb@v1
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Build project
run: scarb build --no-default-features --features monolith,${{ matrix.layout }},${{ matrix.hash_function }}
- name: Run verification
run: cargo run --release --bin runner -- --program target/dev/cairo_verifier.sierra.json --cairo-version ${{ matrix.cairo_version }} --stone-version ${{ matrix.stone_version }} --hasher-bit-length ${{ matrix.hasher_bit_length }} < examples/proofs/${{ matrix.layout }}/${{ matrix.cairo_version }}_${{ matrix.stone_version }}_${{ matrix.hash_function }}_${{ matrix.hasher_bit_length }}_example_proof.json
verify-example-proofs:
runs-on: ubuntu-latest
strategy:
matrix:
cairo_version: ['cairo0', 'cairo1']
layout: ['recursive', 'recursive_with_poseidon', 'small', 'dex', 'starknet', 'starknet_with_keccak']
hash_function: ['keccak']
hasher_bit_length: ['160_lsb']
stone_version: ['stone5']
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: true

- name: Setup Scarb
uses: software-mansion/setup-scarb@v1

- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Build project
run: scarb build --no-default-features --features monolith,${{ matrix.layout }},${{ matrix.hash_function }}

- name: Run verification
run: cargo run --release --bin runner -- --program target/dev/integrity.sierra.json --cairo-version ${{ matrix.cairo_version }} --stone-version ${{ matrix.stone_version }} --hasher-bit-length ${{ matrix.hasher_bit_length }} < examples/proofs/${{ matrix.layout }}/${{ matrix.cairo_version }}_${{ matrix.stone_version }}_${{ matrix.hash_function }}_${{ matrix.hasher_bit_length }}_example_proof.json
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ You can use cairo runner to run the verifier on example proof:

```bash
cargo run --release --bin runner -- \
--program target/dev/cairo_verifier.sierra.json \
--program target/dev/integrity.sierra.json \
--cairo-version cairo0 \
--stone-version stone5 \
--hasher-bit-length 160_lsb \
Expand Down Expand Up @@ -113,7 +113,7 @@ scarb test
In order to launch benchmarking, just run this (it requires recursive layout configuration):

```bash
cargo run --release --bin benches -- target/dev/cairo_verifier.sierra.json
cargo run --release --bin benches -- target/dev/integrity.sierra.json
```

## Creating a Proof
Expand Down
2 changes: 1 addition & 1 deletion Scarb.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "cairo_verifier"
name = "integrity"
version = "0.1.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/air/diluted.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::common::math::pow;
use integrity::common::math::pow;

// The cumulative value is defined using the next recursive formula:
// r_1 = 1, r_{j+1} = r_j * (1 + z * u_j) + alpha * u_j^2
Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/_generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def pair_with_next(iterable, fill=None):
}

imports = lambda layout: f"""\
use cairo_verifier::{{
use integrity::{{
air::layouts::{layout}::{{
global_values::GlobalValues,
constants::{{CONSTRAINT_DEGREE, NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND, MASK_SIZE}},
Expand Down
6 changes: 3 additions & 3 deletions src/air/layouts/dex.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod traces;
#[cfg(feature: 'split')]
mod contract;

use cairo_verifier::{
use integrity::{
air::{
constants::{SHIFT_POINT_X, SHIFT_POINT_Y, StarkCurve},
layouts::dex::{
Expand All @@ -27,7 +27,7 @@ use cairo_verifier::{
use starknet::ContractAddress;

#[cfg(feature: 'monolith')]
use cairo_verifier::air::layouts::dex::autogenerated::{
use integrity::air::layouts::dex::autogenerated::{
eval_oods_polynomial_inner as eval_oods_polynomial_inner_,
};

Expand All @@ -47,7 +47,7 @@ fn eval_oods_polynomial_inner(
}

#[cfg(feature: 'split')]
use cairo_verifier::air::layouts::dex::contract::{
use integrity::air::layouts::dex::contract::{
ILayoutOodsContractDispatcher, ILayoutOodsContractDispatcherTrait,
};

Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/dex/autogenerated.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
air::layouts::dex::{
global_values::GlobalValues,
constants::{CONSTRAINT_DEGREE, NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND, MASK_SIZE},
Expand Down
4 changes: 2 additions & 2 deletions src/air/layouts/dex/contract.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::air::layouts::dex::global_values::GlobalValues;
use integrity::air::layouts::dex::global_values::GlobalValues;

#[starknet::interface]
trait ILayoutOodsContract<ContractState> {
Expand All @@ -16,7 +16,7 @@ trait ILayoutOodsContract<ContractState> {
#[starknet::contract]
mod LayoutOodsContract {
use super::ILayoutOodsContract;
use cairo_verifier::air::layouts::dex::{
use integrity::air::layouts::dex::{
global_values::GlobalValues, autogenerated::eval_oods_polynomial_inner,
};

Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/dex/public_input.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
common::{
math::{pow, Felt252PartialOrd, Felt252Div},
asserts::{assert_range_u128_le, assert_range_u128},
Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/dex/traces.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
air::layouts::dex::{
constants::{NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND}, global_values::InteractionElements,
},
Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/recursive.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod global_values;
mod public_input;
mod traces;

use cairo_verifier::{
use integrity::{
air::{
constants::{SHIFT_POINT_X, SHIFT_POINT_Y},
layouts::recursive::{
Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/recursive/autogenerated.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
air::layouts::recursive::{
global_values::GlobalValues,
constants::{CONSTRAINT_DEGREE, NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND, MASK_SIZE},
Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/recursive/public_input.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
common::{
math::{pow, Felt252PartialOrd, Felt252Div},
asserts::{assert_range_u128_le, assert_range_u128},
Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/recursive/traces.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
air::layouts::recursive::{
constants::{NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND}, global_values::InteractionElements,
},
Expand Down
6 changes: 3 additions & 3 deletions src/air/layouts/recursive_with_poseidon.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod traces;
#[cfg(feature: 'split')]
mod contract;

use cairo_verifier::{
use integrity::{
air::{
constants::{SHIFT_POINT_X, SHIFT_POINT_Y},
layouts::recursive_with_poseidon::{
Expand All @@ -31,7 +31,7 @@ use cairo_verifier::{
use starknet::ContractAddress;

#[cfg(feature: 'monolith')]
use cairo_verifier::air::layouts::recursive_with_poseidon::autogenerated::{
use integrity::air::layouts::recursive_with_poseidon::autogenerated::{
eval_oods_polynomial_inner as eval_oods_polynomial_inner_,
};

Expand All @@ -51,7 +51,7 @@ fn eval_oods_polynomial_inner(
}

#[cfg(feature: 'split')]
use cairo_verifier::air::layouts::recursive_with_poseidon::contract::{
use integrity::air::layouts::recursive_with_poseidon::contract::{
ILayoutOodsContractDispatcher, ILayoutOodsContractDispatcherTrait,
};

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
air::layouts::recursive_with_poseidon::{
global_values::GlobalValues,
constants::{CONSTRAINT_DEGREE, NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND, MASK_SIZE},
Expand Down
4 changes: 2 additions & 2 deletions src/air/layouts/recursive_with_poseidon/contract.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::air::layouts::recursive_with_poseidon::global_values::GlobalValues;
use integrity::air::layouts::recursive_with_poseidon::global_values::GlobalValues;

#[starknet::interface]
trait ILayoutOodsContract<ContractState> {
Expand All @@ -16,7 +16,7 @@ trait ILayoutOodsContract<ContractState> {
#[starknet::contract]
mod LayoutOodsContract {
use super::ILayoutOodsContract;
use cairo_verifier::air::layouts::recursive_with_poseidon::{
use integrity::air::layouts::recursive_with_poseidon::{
global_values::GlobalValues, autogenerated::eval_oods_polynomial_inner,
};

Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/recursive_with_poseidon/public_input.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
common::{
math::{pow, Felt252PartialOrd, Felt252Div},
asserts::{assert_range_u128_le, assert_range_u128},
Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/recursive_with_poseidon/traces.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
air::layouts::recursive_with_poseidon::{
constants::{NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND}, global_values::InteractionElements,
},
Expand Down
6 changes: 3 additions & 3 deletions src/air/layouts/small.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod traces;
#[cfg(feature: 'split')]
mod contract;

use cairo_verifier::{
use integrity::{
air::{
constants::{SHIFT_POINT_X, SHIFT_POINT_Y, StarkCurve},
layouts::small::{
Expand All @@ -27,7 +27,7 @@ use cairo_verifier::{
use starknet::ContractAddress;

#[cfg(feature: 'monolith')]
use cairo_verifier::air::layouts::small::autogenerated::{
use integrity::air::layouts::small::autogenerated::{
eval_oods_polynomial_inner as eval_oods_polynomial_inner_,
};

Expand All @@ -47,7 +47,7 @@ fn eval_oods_polynomial_inner(
}

#[cfg(feature: 'split')]
use cairo_verifier::air::layouts::small::contract::{
use integrity::air::layouts::small::contract::{
ILayoutOodsContractDispatcher, ILayoutOodsContractDispatcherTrait,
};

Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/small/autogenerated.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
air::layouts::small::{
global_values::GlobalValues,
constants::{CONSTRAINT_DEGREE, NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND, MASK_SIZE},
Expand Down
4 changes: 2 additions & 2 deletions src/air/layouts/small/contract.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::air::layouts::small::global_values::GlobalValues;
use integrity::air::layouts::small::global_values::GlobalValues;

#[starknet::interface]
trait ILayoutOodsContract<ContractState> {
Expand All @@ -16,7 +16,7 @@ trait ILayoutOodsContract<ContractState> {
#[starknet::contract]
mod LayoutOodsContract {
use super::ILayoutOodsContract;
use cairo_verifier::air::layouts::small::{
use integrity::air::layouts::small::{
global_values::GlobalValues, autogenerated::eval_oods_polynomial_inner,
};

Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/small/public_input.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
common::{
math::{pow, Felt252PartialOrd, Felt252Div},
asserts::{assert_range_u128_le, assert_range_u128},
Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/small/traces.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
air::layouts::small::{
constants::{NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND}, global_values::InteractionElements,
},
Expand Down
6 changes: 3 additions & 3 deletions src/air/layouts/starknet.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mod traces;
#[cfg(feature: 'split')]
mod contract;

use cairo_verifier::{
use integrity::{
air::{
constants::{SHIFT_POINT_X, SHIFT_POINT_Y, StarkCurve},
layouts::starknet::{
Expand Down Expand Up @@ -35,7 +35,7 @@ use cairo_verifier::{
use starknet::ContractAddress;

#[cfg(feature: 'monolith')]
use cairo_verifier::air::layouts::starknet::autogenerated::{
use integrity::air::layouts::starknet::autogenerated::{
eval_composition_polynomial_inner as eval_composition_polynomial_inner_,
};

Expand All @@ -54,7 +54,7 @@ fn eval_composition_polynomial_inner(
}

#[cfg(feature: 'split')]
use cairo_verifier::air::layouts::starknet::contract::{
use integrity::air::layouts::starknet::contract::{
ILayoutCompositionContractDispatcher, ILayoutCompositionContractDispatcherTrait,
};

Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/starknet/autogenerated.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
air::layouts::starknet::{
global_values::GlobalValues,
constants::{CONSTRAINT_DEGREE, NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND, MASK_SIZE},
Expand Down
4 changes: 2 additions & 2 deletions src/air/layouts/starknet/contract.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::air::layouts::starknet::global_values::GlobalValues;
use integrity::air::layouts::starknet::global_values::GlobalValues;

#[starknet::interface]
trait ILayoutCompositionContract<ContractState> {
Expand All @@ -15,7 +15,7 @@ trait ILayoutCompositionContract<ContractState> {
#[starknet::contract]
mod LayoutCompositionContract {
use super::ILayoutCompositionContract;
use cairo_verifier::air::layouts::starknet::{
use integrity::air::layouts::starknet::{
global_values::GlobalValues, autogenerated::eval_composition_polynomial_inner,
};

Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/starknet/public_input.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
common::{
math::{pow, Felt252PartialOrd, Felt252Div},
asserts::{assert_range_u128_le, assert_range_u128},
Expand Down
2 changes: 1 addition & 1 deletion src/air/layouts/starknet/traces.cairo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cairo_verifier::{
use integrity::{
air::layouts::starknet::{
constants::{NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND}, global_values::InteractionElements,
},
Expand Down
Loading

0 comments on commit f065075

Please sign in to comment.