diff --git a/src/channel/channel.cairo b/src/channel/channel.cairo index b7542dbe0..120fbbeeb 100644 --- a/src/channel/channel.cairo +++ b/src/channel/channel.cairo @@ -53,7 +53,8 @@ impl ChannelImpl of ChannelTrait { let mut res = ArrayTrait::::new(); loop { if n != 0 { - res.append(self.random_felt_to_prover()) + res.append(self.random_felt_to_prover()); + n -= 1; } else { break; } diff --git a/src/common/tests/test_math.cairo b/src/common/tests/test_math.cairo index 61d0066ac..0ddceec9e 100644 --- a/src/common/tests/test_math.cairo +++ b/src/common/tests/test_math.cairo @@ -55,7 +55,10 @@ fn test_mul_inverse_3() { fn test_mul_inverse_4() { let x = 3; let inv_x = mul_inverse(x); - assert(inv_x == 1206167596222043737899107594365023368541035738443865566657697352045290673494, 'Invalid value'); + assert( + inv_x == 1206167596222043737899107594365023368541035738443865566657697352045290673494, + 'Invalid value' + ); assert(x * inv_x == 1, 'Invalid value'); } @@ -73,4 +76,4 @@ fn test_mul_inverse_6() { let x = 19345680409051406060084; let inv_inv_x = mul_inverse(mul_inverse(x)); assert(x == inv_inv_x, 'Invalid value'); -} \ No newline at end of file +} diff --git a/src/lib.cairo b/src/lib.cairo index 904271d9d..d6e811a6c 100644 --- a/src/lib.cairo +++ b/src/lib.cairo @@ -1,5 +1,6 @@ const FIELD_GENERATOR: felt252 = 3; -const FIELD_GENERATOR_INV: felt252 = 1206167596222043737899107594365023368541035738443865566657697352045290673494; +const FIELD_GENERATOR_INV: felt252 = + 1206167596222043737899107594365023368541035738443865566657697352045290673494; mod channel; mod common; diff --git a/src/table_commitment.cairo b/src/table_commitment.cairo index 0930add4b..38b38deda 100644 --- a/src/table_commitment.cairo +++ b/src/table_commitment.cairo @@ -2,22 +2,27 @@ // these values from the channel. #[derive(Drop, Copy)] struct TableUnsentCommitment { + a: felt252, // dummy // vector: VectorUnsentCommitment, } // Commitment for a table (n_rows x n_columns) of field elements in montgomery form. #[derive(Drop, Copy)] struct TableCommitment { + a: felt252, // dummy // config: TableCommitmentConfig*, // vector_commitment: VectorCommitment*, } #[derive(Drop, Copy)] struct TableCommitmentConfig { + a: felt252, // dummy // n_columns: felt, // vector: VectorCommitmentConfig*, } -fn table_commit(unsent_commitment: TableUnsentCommitment, config: TableCommitmentConfig) -> TableCommitment{ - TableCommitment{} -} \ No newline at end of file +fn table_commit( + unsent_commitment: TableUnsentCommitment, config: TableCommitmentConfig +) -> TableCommitment { + TableCommitment {a: 0} +} diff --git a/src/vector_commitment.cairo b/src/vector_commitment.cairo index 605431ed9..10ee68797 100644 --- a/src/vector_commitment.cairo +++ b/src/vector_commitment.cairo @@ -2,18 +2,21 @@ // values from the channel. #[derive(Drop)] struct VectorUnsentCommitment { + a: felt252, // dummy // commitment_hash: ChannelUnsentFelt, } // Commitment for a vector of field elements. #[derive(Drop)] struct VectorCommitment { + a: felt252, // dummy // config: VectorCommitmentConfig*, // commitment_hash: ChannelSentFelt, } #[derive(Drop)] struct VectorCommitmentConfig { + a: felt252, // dummy // height: felt, // n_verifier_friendly_commitment_layers: felt, }