Skip to content

Commit

Permalink
dynamic layout sketch
Browse files Browse the repository at this point in the history
  • Loading branch information
Okm165 committed Aug 22, 2024
1 parent e5cb297 commit a002b5c
Show file tree
Hide file tree
Showing 7 changed files with 828 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/air/layouts.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ mod recursive;
// === STARKNET_WITH_KECCAK BEGIN ===
// mod starknet_with_keccak;
// === STARKNET_WITH_KECCAK END ===

// === DYNAMIC BEGIN ===
// mod dynamic;
// === DYNAMIC END ===

45 changes: 45 additions & 0 deletions src/air/layouts/dynamic.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
mod autogenerated;
mod constants;
mod global_values;
mod public_input;
mod traces;

use cairo_verifier::{
air::{
constants::{SHIFT_POINT_X, SHIFT_POINT_Y, StarkCurve}, air::{AIRComposition, AIROods},
diluted::get_diluted_product,
periodic_columns::{
eval_pedersen_x, eval_pedersen_y, eval_ecdsa_x, eval_ecdsa_y,
eval_poseidon_poseidon_full_round_key0, eval_poseidon_poseidon_full_round_key1,
eval_poseidon_poseidon_full_round_key2, eval_poseidon_poseidon_partial_round_key0,
eval_poseidon_poseidon_partial_round_key1
},
public_input::{PublicInput, get_public_memory_product_ratio}
},
common::{math::{Felt252Div, Felt252PartialOrd, pow}, asserts::assert_range_u128}
};

impl StarknetAIRCompositionImpl of AIRComposition<InteractionElements, PublicInput> {
fn eval_composition_polynomial(
interaction_elements: InteractionElements,
public_input: @PublicInput,
mask_values: Span<felt252>,
constraint_coefficients: Span<felt252>,
point: felt252,
trace_domain_size: felt252,
trace_generator: felt252
) -> felt252 {// TODO REWRITE
}
}

impl StarknetAIROodsImpl of AIROods {
fn eval_oods_polynomial(
column_values: Span<felt252>,
oods_values: Span<felt252>,
constraint_coefficients: Span<felt252>,
point: felt252,
oods_point: felt252,
trace_generator: felt252,
) -> felt252 {// TODO REWRITE
}
}
26 changes: 26 additions & 0 deletions src/air/layouts/dynamic/autogenerated.cairo
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
use cairo_verifier::{
air::layouts::dex::{
global_values::GlobalValues,
constants::{CONSTRAINT_DEGREE, NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND, MASK_SIZE}
},
common::math::{Felt252Div, pow},
};

fn eval_composition_polynomial_inner(
mut mask_values: Span<felt252>,
mut constraint_coefficients: Span<felt252>,
point: felt252,
trace_generator: felt252,
global_values: GlobalValues
) -> felt252 { // TODO REWRITE
}

fn eval_oods_polynomial_inner(
mut column_values: Span<felt252>,
mut oods_values: Span<felt252>,
mut constraint_coefficients: Span<felt252>,
point: felt252,
oods_point: felt252,
trace_generator: felt252,
) -> felt252 { // TODO REWRITE
}
Loading

0 comments on commit a002b5c

Please sign in to comment.