Skip to content

Commit

Permalink
Preprocessed Columns for Poseidon Round Keys
Browse files Browse the repository at this point in the history
  • Loading branch information
Gali-StarkWare committed Feb 13, 2025
1 parent a23eedf commit fb5efb7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions stwo_cairo_prover/crates/prover/src/cairo_air/preprocessed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,39 @@ impl<const N: usize> PreProcessedColumn for RangeCheck<N> {
}
}
}
#[derive(Debug)]
pub struct PoseidonRoundKeys {
log_size: u32,
col_index: usize,
}
impl PoseidonRoundKeys {
pub const fn new(log_size: u32, col_index: usize) -> Self {
assert!(col_index < 30, "col_index must be in range 0..=29");
Self {
log_size,
col_index,
}
}

pub fn packed_at(&self, _vec_row: usize) -> PackedM31 {
todo!()
}
}
impl PreProcessedColumn for PoseidonRoundKeys {
fn log_size(&self) -> u32 {
self.log_size
}

fn gen_column_simd(&self) -> CircleEvaluation<SimdBackend, BaseField, BitReversedOrder> {
todo!()
}

fn id(&self) -> PreProcessedColumnId {
PreProcessedColumnId {
id: format!("poseidon_round_keys_{}_{}", self.log_size, self.col_index),
}
}
}

/// Generates the root of the preprocessed trace commitment tree for a given `log_blowup_factor`.
pub fn generate_preprocessed_commitment_root<MC: MerkleChannel>(
Expand Down

0 comments on commit fb5efb7

Please sign in to comment.