Skip to content

Commit

Permalink
Fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fmkra committed Aug 15, 2024
1 parent e7319b9 commit 644f5d3
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 19 deletions.
5 changes: 4 additions & 1 deletion src/air/layouts/recursive.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ use cairo_verifier::{
},
common::{math::{Felt252Div, Felt252PartialOrd, pow}, asserts::assert_range_u128}
};
use starknet::ContractAddress;

impl RecursiveAIRCompositionImpl of AIRComposition<InteractionElements, PublicInput> {
fn eval_composition_polynomial(
Expand All @@ -31,7 +32,8 @@ impl RecursiveAIRCompositionImpl of AIRComposition<InteractionElements, PublicIn
constraint_coefficients: Span<felt252>,
point: felt252,
trace_domain_size: felt252,
trace_generator: felt252
trace_generator: felt252,
contract_address_1: ContractAddress,
) -> felt252 {
let memory_z = interaction_elements.memory_multi_column_perm_perm_interaction_elm;
let memory_alpha = interaction_elements.memory_multi_column_perm_hash_interaction_elm0;
Expand Down Expand Up @@ -104,6 +106,7 @@ impl RecursiveAIROodsImpl of AIROods {
point: felt252,
oods_point: felt252,
trace_generator: felt252,
contract_address_2: ContractAddress,
) -> felt252 {
eval_oods_polynomial_inner(
column_values, oods_values, constraint_coefficients, point, oods_point, trace_generator,
Expand Down
7 changes: 4 additions & 3 deletions src/benches/fri/verify.cairo
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use cairo_verifier::{fri::fri::fri_verify, tests::stone_proof_fibonacci_keccak};
use cairo_verifier::{fri::fri::fri_verify_initial, tests::stone_proof_fibonacci_keccak};

fn bench_fri_verify() {
let queries = stone_proof_fibonacci_keccak::queries::get().span();
let commitment = stone_proof_fibonacci_keccak::fri::commitment::get();
let decommitment = stone_proof_fibonacci_keccak::fri::decommitment::get();
let witness = stone_proof_fibonacci_keccak::fri::witness::get();
let _witness = stone_proof_fibonacci_keccak::fri::witness::get();

fri_verify(queries, commitment, decommitment, witness)
fri_verify_initial(queries, commitment, decommitment);
// TODO: add next steps
}

2 changes: 1 addition & 1 deletion src/benches/stark/commit.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ fn bench_stark_commit() {
let config = stone_proof_fibonacci_keccak::stark::config::get();
let stark_domains = stone_proof_fibonacci_keccak::stark::domains::get();

stark_commit(ref channel, @public_input, @unsent_commitment, @config, @stark_domains);
stark_commit(ref channel, @public_input, @unsent_commitment, @config, @stark_domains, 0.try_into().unwrap());
}
2 changes: 1 addition & 1 deletion src/benches/stark/stark_proof_verify.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ fn bench_stark_proof_verify() {
witness: stone_proof_fibonacci_keccak::stark::witness::get(),
};

stark_proof.verify(security_bits);
stark_proof.verify_initial(security_bits, 0.try_into().unwrap(), 0.try_into().unwrap());
}
4 changes: 2 additions & 2 deletions src/benches/stark/verify.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ fn bench_stark_verify() {
let stark_domains = stone_proof_fibonacci_keccak::stark::domains::get();

stark_verify(
NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND, queries, commitment, witness, stark_domains,
)
NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND, queries, commitment, witness, stark_domains, 0.try_into().unwrap()
);
}
11 changes: 6 additions & 5 deletions src/fri/tests/test_fri_verify.cairo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cairo_verifier::{
fri::fri::fri_verify, tests::{stone_proof_fibonacci, stone_proof_fibonacci_keccak}
fri::fri::fri_verify_initial, tests::{stone_proof_fibonacci, stone_proof_fibonacci_keccak}
};

// === BLAKE2S BEGIN ===
Expand All @@ -9,9 +9,9 @@ use cairo_verifier::{
// let queries = stone_proof_fibonacci::queries::get().span();
// let commitment = stone_proof_fibonacci::fri::commitment::get();
// let decommitment = stone_proof_fibonacci::fri::decommitment::get();
// let witness = stone_proof_fibonacci::fri::witness::get();
// let _witness = stone_proof_fibonacci::fri::witness::get();

// fri_verify(queries, commitment, decommitment, witness)
// fri_verify_initial(queries, commitment, decommitment)
// }
// === BLAKE2S END ===

Expand All @@ -22,9 +22,10 @@ fn test_fri_verify() {
let queries = stone_proof_fibonacci_keccak::queries::get().span();
let commitment = stone_proof_fibonacci_keccak::fri::commitment::get();
let decommitment = stone_proof_fibonacci_keccak::fri::decommitment::get();
let witness = stone_proof_fibonacci_keccak::fri::witness::get();
let _witness = stone_proof_fibonacci_keccak::fri::witness::get();

fri_verify(queries, commitment, decommitment, witness)
fri_verify_initial(queries, commitment, decommitment);
// TODO: next steps
}
// === KECCAK END ===

Expand Down
3 changes: 2 additions & 1 deletion src/oods.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ mod tests {
constraint_coefficients.span(),
0x47148421d376a8ca07af1e4c89890bf29c90272f63b16103646397d907281a8,
0x40000,
0x4768803ef85256034f67453635f87997ff61841e411ee63ce7b0a8b9745a046
0x4768803ef85256034f67453635f87997ff61841e411ee63ce7b0a8b9745a046,
0.try_into().unwrap()
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/stark/tests/test_stark_commit.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fn test_stark_commit() {

assert(
stark_commit(
ref channel, @public_input, @unsent_commitment, @config, @stark_domains
ref channel, @public_input, @unsent_commitment, @config, @stark_domains, 0.try_into().unwrap()
) == stone_proof_fibonacci_keccak::stark::commitment::get(),
'Invalid value'
);
Expand Down
5 changes: 3 additions & 2 deletions src/stark/tests/test_stark_proof_verify.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use cairo_verifier::{
// witness: stone_proof_fibonacci::stark::witness::get(),
// };
//
// stark_proof.verify(security_bits);
// stark_proof.verify_initial(security_bits);
// }
// === BLAKE2S END ===

Expand All @@ -33,7 +33,8 @@ fn test_stark_proof_fibonacci_verify() {
witness: stone_proof_fibonacci_keccak::stark::witness::get(),
};

stark_proof.verify(security_bits);
stark_proof.verify_initial(security_bits, 0.try_into().unwrap(), 0.try_into().unwrap());
// TODO: next steps
}
// === KECCAK END ===

Expand Down
5 changes: 3 additions & 2 deletions src/stark/tests/test_stark_verify.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ fn test_stark_verify() {
let stark_domains = stone_proof_fibonacci_keccak::stark::domains::get();

stark_verify(
NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND, queries, commitment, witness, stark_domains,
)
NUM_COLUMNS_FIRST, NUM_COLUMNS_SECOND, queries, commitment, witness, stark_domains, 0.try_into().unwrap()
);
// TODO: next steps
}
// === KECCAK END ===

Expand Down

0 comments on commit 644f5d3

Please sign in to comment.