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

minor refactor #9

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ members = [
"crates/fri",
"crates/pow",
"crates/stark",
"crates/common",
]
exclude = []

Expand Down Expand Up @@ -38,4 +37,3 @@ cairovm_verifier_commitment = { path = "crates/commitment" }
cairovm_verifier_fri = { path = "crates/fri" }
cairovm_verifier_pow = { path = "crates/pow" }
cairovm_verifier_stark = { path = "crates/stark" }
cairovm_verifier_common = { path = "crates/common" }
4 changes: 2 additions & 2 deletions crates/air/src/layout/recursive/autogenerated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1496,12 +1496,12 @@ pub fn eval_oods_polynomial_inner(
let oods_point_to_deg = oods_point.pow(CONSTRAINT_DEGREE);

value = (column_values[(NUM_COLUMNS_FIRST + NUM_COLUMNS_SECOND) as usize] - oods_values[133])
.floor_div(&NonZeroFelt::from_felt_unchecked(point - oods_point_to_deg));
.field_div(&NonZeroFelt::from_felt_unchecked(point - oods_point_to_deg));
total_sum += constraint_coefficients[133] * value;

value = (column_values[(NUM_COLUMNS_FIRST + NUM_COLUMNS_SECOND + 1) as usize]
- oods_values[134])
.floor_div(&NonZeroFelt::from_felt_unchecked(point - oods_point_to_deg));
.field_div(&NonZeroFelt::from_felt_unchecked(point - oods_point_to_deg));
total_sum += constraint_coefficients[134] * value;

total_sum
Expand Down
2 changes: 2 additions & 0 deletions crates/air/src/layout/recursive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ use crate::{
public_memory::PublicInput,
};

pub mod tests;

// Recursive layout
pub const BITWISE_RATIO: u32 = 8;
pub const BITWISE_ROW_RATIO: u32 = 128;
Expand Down
26 changes: 26 additions & 0 deletions crates/air/src/layout/recursive/tests/interaction_elements.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
use starknet_crypto::Felt;

use crate::layout::recursive::global_values::InteractionElements;

pub fn get() -> InteractionElements {
InteractionElements {
memory_multi_column_perm_perm_interaction_elm: Felt::from_hex_unchecked(
"0x33dd9c083eee682a168398d8189bf14bc503febe8d298c7b254ff5d74868c39",
),
memory_multi_column_perm_hash_interaction_elm0: Felt::from_hex_unchecked(
"0x6a7aed3206de9c6a434484cc1f499801fc2df433783aef27b67ee8010b9a6c5",
),
range_check16_perm_interaction_elm: Felt::from_hex_unchecked(
"0x645541a20083f184215fcb20d8014bed0546f6ae292f9eb7ee3de254117c597",
),
diluted_check_permutation_interaction_elm: Felt::from_hex_unchecked(
"0x11d978931f41d88e9e8930b42c84b6471782ca8c565464dd6f468c2b4804a22",
),
diluted_check_interaction_z: Felt::from_hex_unchecked(
"0x1e22e58ff299d68ff2d5823796c232bd70a8e700d70379417849503417a478a",
),
diluted_check_interaction_alpha: Felt::from_hex_unchecked(
"0x3b74ba4892c5814cd3d16f5f28df48e8a6dc70a3d67f18b1b4921510fe88278",
),
}
}
6 changes: 6 additions & 0 deletions crates/air/src/layout/recursive/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pub mod interaction_elements;
pub mod trace_commitment;
pub mod trace_config;
pub mod trace_decommitment;
pub mod trace_unsent_commitment;
pub mod trace_witness;
35 changes: 35 additions & 0 deletions crates/air/src/layout/recursive/tests/trace_commitment.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
use cairovm_verifier_commitment::{table, vector};
use starknet_crypto::Felt;

use crate::trace::Commitment;

use super::{interaction_elements, trace_config, trace_unsent_commitment};

pub fn get() -> Commitment {
let unsent_commitment = trace_unsent_commitment::get();
let config = trace_config::get();

return Commitment {
original: table::types::Commitment {
config: config.original,
vector_commitment: vector::types::Commitment {
config: vector::config::Config {
height: Felt::from_hex_unchecked("0x14"),
n_verifier_friendly_commitment_layers: Felt::from_hex_unchecked("0x64"),
},
commitment_hash: unsent_commitment.original,
},
},
interaction_elements: interaction_elements::get(),
interaction: table::types::Commitment {
config: config.interaction,
vector_commitment: vector::types::Commitment {
config: vector::config::Config {
height: Felt::from_hex_unchecked("0x14"),
n_verifier_friendly_commitment_layers: Felt::from_hex_unchecked("0x64"),
},
commitment_hash: unsent_commitment.interaction,
},
},
};
}
23 changes: 23 additions & 0 deletions crates/air/src/layout/recursive/tests/trace_config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use cairovm_verifier_commitment::{table, vector};
use starknet_crypto::Felt;

use crate::trace::config::Config;

pub fn get() -> Config {
return Config {
original: table::config::Config {
n_columns: Felt::from_hex_unchecked("0x7"),
vector: vector::config::Config {
height: Felt::from_hex_unchecked("0x14"),
n_verifier_friendly_commitment_layers: Felt::from_hex_unchecked("0x64"),
},
},
interaction: table::config::Config {
n_columns: Felt::from_hex_unchecked("0x3"),
vector: vector::config::Config {
height: Felt::from_hex_unchecked("0x14"),
n_verifier_friendly_commitment_layers: Felt::from_hex_unchecked("0x64"),
},
},
};
}
Loading
Loading