Skip to content

Commit

Permalink
Fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
fmkra committed Jul 17, 2024
1 parent 555dfc0 commit 93cd49b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 20 deletions.
3 changes: 1 addition & 2 deletions src/air/public_input.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ trait PublicInputTrait {
fn validate(self: @PublicInput, stark_domains: @StarkDomains);
}

// Computes the hash of the public input, which is used as the initial seed for the Fiat-Shamir
// heuristic.
// Computes the hash of the public input, which is used as the initial seed for the Fiat-Shamir heuristic.
fn get_public_input_hash(public_input: @PublicInput) -> felt252 {
// Main page hash.
let mut main_page_hash_state = PedersenTrait::new(0);
Expand Down
3 changes: 1 addition & 2 deletions src/fri/fri_formula.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ const OMEGA_8: felt252 = 0x446ed3ce295dda2b5ea677394813e6eab8bfbc55397aacac8e6df
const OMEGA_4: felt252 = 0x1dafdc6d65d66b5accedf99bcd607383ad971a9537cdf25d59e99d90becc81e;
const OMEGA_2: felt252 = 0x800000000000011000000000000000000000000000000000000000000000000;

// Function to fold 2 elements into one using one layer of FRI (Fast Reed-Solomon Interactive Oracle
// Proofs).
// Function to fold 2 elements into one using one layer of FRI (Fast Reed-Solomon Interactive Oracle Proofs).
fn fri_formula2(f_x: felt252, f_minus_x: felt252, eval_point: felt252, x_inv: felt252) -> felt252 {
f_x + f_minus_x + eval_point * x_inv * (f_x - f_minus_x)
}
Expand Down
6 changes: 2 additions & 4 deletions src/lib.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ use cairo_verifier::{
air::layouts::recursive::public_input::RecursivePublicInputImpl as PublicInputImpl,
// === RECURSIVE END ===
// === RECURSIVE_WITH_POSEIDON BEGIN ===
// air::layouts::recursive_with_poseidon::public_input::RecursiveWithPoseidonPublicInputImpl as
// PublicInputImpl,
// air::layouts::recursive_with_poseidon::public_input::RecursiveWithPoseidonPublicInputImpl as PublicInputImpl,
// === RECURSIVE_WITH_POSEIDON END ===
// === SMALL BEGIN ===
// air::layouts::small::public_input::SmallPublicInputImpl as PublicInputImpl,
Expand All @@ -38,8 +37,7 @@ use cairo_verifier::{
// air::layouts::starknet::public_input::StarknetPublicInputImpl as PublicInputImpl,
// === STARKNET END ===
// === STARKNET_WITH_KECCAK BEGIN ===
// air::layouts::starknet_with_keccak::public_input::StarknetWithKeccakPublicInputImpl as
// PublicInputImpl,
// air::layouts::starknet_with_keccak::public_input::StarknetWithKeccakPublicInputImpl as PublicInputImpl,
// === STARKNET_WITH_KECCAK END ===
};

Expand Down
15 changes: 5 additions & 10 deletions src/vector_commitment/tests/test_vector_commitment_decommit.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,22 @@ use cairo_verifier::vector_commitment::vector_commitment::{
// index: 0xf8, value: 0x5d49462d844a3f203c59d39fa005cbe153c78e6ac831987f19c0d6dfae38fad
// },
// VectorQuery {
// index: 0x115, value:
// 0x53d21587a9cb08d1b9402a4b8c2a9d37942b26963936200fea3122eaaf870b1
// index: 0x115, value: 0x53d21587a9cb08d1b9402a4b8c2a9d37942b26963936200fea3122eaaf870b1
// },
// VectorQuery {
// index: 0x11c, value:
// 0x7c3355a75f6b36a95068b68d48e7539cd97531b7478e2cf7d2dc85b32bafc66
// index: 0x11c, value: 0x7c3355a75f6b36a95068b68d48e7539cd97531b7478e2cf7d2dc85b32bafc66
// },
// VectorQuery {
// index: 0x12f, value: 0xb6f3a522577229ac26f12df90daaf376afbd960ee4b0ab07f270bf9c5da56a
// },
// VectorQuery {
// index: 0x13c, value:
// 0x174cfc44eb57da0eda6ae9407db71c5144940f05ef51f858bc8e229d15703e2
// index: 0x13c, value: 0x174cfc44eb57da0eda6ae9407db71c5144940f05ef51f858bc8e229d15703e2
// },
// VectorQuery {
// index: 0x153, value:
// 0x2220da78b33e155482bdf0534dc30fc17fe059a7b9e30f710ee2681a8151484
// index: 0x153, value: 0x2220da78b33e155482bdf0534dc30fc17fe059a7b9e30f710ee2681a8151484
// },
// VectorQuery {
// index: 0x1f4, value:
// 0x566b71a4f84556a3816d911c5dfb45f75cc962d9829acd0dd56e81517cc73b8
// index: 0x1f4, value: 0x566b71a4f84556a3816d911c5dfb45f75cc962d9829acd0dd56e81517cc73b8
// },
// ]
// .span();
Expand Down
4 changes: 2 additions & 2 deletions src/vector_commitment/vector_commitment.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ impl VectorCommitmentConfigImpl of VectorCommitmentConfigTrait {
n_verifier_friendly_commitment_layers: felt252,
) {
assert(*self.height == expected_height, 'height mismatch');
// Note that n_verifier_friendly_commitment_layers can be greater than height (in such a
// case, all Merkle layers use the verifier-friendly hash).
// Note that n_verifier_friendly_commitment_layers can be greater than height (in such a case,
// all Merkle layers use the verifier-friendly hash).
assert(
*self.n_verifier_friendly_commitment_layers == n_verifier_friendly_commitment_layers,
'n_verifier_friendly mismatch'
Expand Down

0 comments on commit 93cd49b

Please sign in to comment.