diff --git a/src/air/traces.cairo b/src/air/traces.cairo index fcdd5542c..b2f0659a4 100644 --- a/src/air/traces.cairo +++ b/src/air/traces.cairo @@ -1,7 +1,6 @@ use cairo_verifier::channel::channel::ChannelTrait; use cairo_verifier::table_commitment::table_commitment::{ - TableUnsentCommitment, TableCommitment, TableDecommitment, TableCommitmentWitness, table_commit, - table_decommit, + TableCommitment, TableDecommitment, TableCommitmentWitness, table_commit, table_decommit, }; use cairo_verifier::air::{public_input::PublicInput, traces_config::TracesConfig}; use cairo_verifier::channel::channel::Channel; @@ -18,8 +17,8 @@ use cairo_verifier::channel::channel::Channel; // values from the channel. #[derive(Drop, Copy)] struct TracesUnsentCommitment { - original: TableUnsentCommitment, - interaction: TableUnsentCommitment, + original: felt252, + interaction: felt252, } // Commitment for the Traces component. @@ -62,11 +61,15 @@ fn traces_commit( config: TracesConfig ) -> TracesCommitment { // Read original commitment. - let original_commitment = table_commit(unsent_commitment.original, config.original); + let original_commitment = table_commit( + ref channel, unsent_commitment.original, config.original + ); // Generate interaction elements for the first interaction. let interaction_elements = channel.random_felts_to_prover(n_interaction_elements); // Read interaction commitment. - let interaction_commitment = table_commit(unsent_commitment.interaction, config.interaction); + let interaction_commitment = table_commit( + ref channel, unsent_commitment.interaction, config.interaction + ); TracesCommitment { public_input: public_input, diff --git a/src/deserialization/fri.cairo b/src/deserialization/fri.cairo index c725ed692..825d1bfeb 100644 --- a/src/deserialization/fri.cairo +++ b/src/deserialization/fri.cairo @@ -1,8 +1,6 @@ use cairo_verifier::{ fri::{fri_config::FriConfig, fri::{FriUnsentCommitment, FriWitness, FriLayerWitness}}, - table_commitment::table_commitment::{ - TableCommitmentConfig, TableCommitmentWitness, TableUnsentCommitment - }, + table_commitment::table_commitment::{TableCommitmentConfig, TableCommitmentWitness}, vector_commitment::vector_commitment::{VectorCommitmentConfig, VectorCommitmentWitness}, }; @@ -58,13 +56,13 @@ struct FriUnsentCommitmentWithSerde { } impl IntoFriUnsentCommitment of Into { fn into(self: FriUnsentCommitmentWithSerde) -> FriUnsentCommitment { - let mut inner_layers = ArrayTrait::::new(); + let mut inner_layers = ArrayTrait::::new(); let mut i = 0; loop { if i == self.inner_layers.len() { break; } - inner_layers.append(TableUnsentCommitment { vector: *self.inner_layers[i] }); + inner_layers.append(*self.inner_layers[i]); i += 1; }; FriUnsentCommitment { diff --git a/src/deserialization/traces.cairo b/src/deserialization/traces.cairo index a31aff6c7..d3bd2a5df 100644 --- a/src/deserialization/traces.cairo +++ b/src/deserialization/traces.cairo @@ -10,7 +10,7 @@ use cairo_verifier::{ } }, table_commitment::table_commitment::{ - TableCommitmentConfig, TableCommitmentWitness, TableDecommitment, TableUnsentCommitment + TableCommitmentConfig, TableCommitmentWitness, TableDecommitment }, }; @@ -54,10 +54,7 @@ struct TracesUnsentCommitmentWithSerde { } impl IntoTracesUnsentCommitment of Into { fn into(self: TracesUnsentCommitmentWithSerde) -> TracesUnsentCommitment { - TracesUnsentCommitment { - original: TableUnsentCommitment { vector: self.original }, - interaction: TableUnsentCommitment { vector: self.original }, - } + TracesUnsentCommitment { original: self.original, interaction: self.original, } } } diff --git a/src/fri/fri.cairo b/src/fri/fri.cairo index bb0696978..1350fb581 100644 --- a/src/fri/fri.cairo +++ b/src/fri/fri.cairo @@ -8,7 +8,7 @@ use cairo_verifier::{ }, table_commitment::table_commitment::{ TableCommitmentWitness, TableDecommitment, TableCommitment, TableCommitmentConfig, - TableUnsentCommitment, table_commit, table_decommit + table_commit, table_decommit } }; @@ -17,7 +17,7 @@ use cairo_verifier::{ #[derive(Drop, Copy)] struct FriUnsentCommitment { // Array of size n_layers - 1 containing unsent table commitments for each inner layer. - inner_layers: Span, + inner_layers: Span, // Array of size 2**log_last_layer_degree_bound containing coefficients for the last layer // polynomial. last_layer_coefficients: Span, @@ -86,7 +86,7 @@ fn fri_commit_rounds( ref channel: Channel, n_layers: felt252, configs: Span, - unsent_commitments: Span, + unsent_commitments: Span, step_sizes: Span, ) -> (Array, Array) { let mut commitments = ArrayTrait::::new(); @@ -99,7 +99,7 @@ fn fri_commit_rounds( break; } // Read commitments. - commitments.append(table_commit(*unsent_commitments.at(i), *configs.at(i))); + commitments.append(table_commit(ref channel, *unsent_commitments.at(i), *configs.at(i))); // Send the next eval_points. eval_points.append(channel.random_felt_to_prover());