Test pass

This commit is contained in:
wborgeaud 2022-02-01 10:48:53 +01:00
parent b0738c2094
commit f2369f4fae
6 changed files with 5 additions and 6 deletions

View File

@ -31,7 +31,6 @@ pub(crate) fn verify_merkle_proof<F: RichField, H: Hasher<F>>(
merkle_cap: &MerkleCap<F, H>,
proof: &MerkleProof<F, H>,
) -> Result<()> {
dbg!(leaf_index);
let mut index = leaf_index;
let mut current_digest = H::hash(&leaf_data, false);
for &sibling_digest in proof.siblings.iter() {

View File

@ -59,7 +59,7 @@ impl<F: RichField + Extendable<D>, const D: usize> Stark<F, D> for FibonacciStar
FE: FieldExtension<D2, BaseField = F>,
P: PackedField<Scalar = FE>,
{
// // Check public inputs.
// Check public inputs.
// yield_constr.one_first_row(vars.local_values[0] - vars.public_inputs[Self::PI_INDEX_X0]);
// yield_constr.one_first_row(vars.local_values[1] - vars.public_inputs[Self::PI_INDEX_X1]);
// yield_constr.one_last_row(vars.local_values[1] - vars.public_inputs[Self::PI_INDEX_RES]);

View File

@ -24,7 +24,6 @@ fn get_challenges<F: RichField + Extendable<D>, C: GenericConfig<D, F = F>, cons
let num_challenges = config.num_challenges;
let num_fri_queries = config.fri_config.num_query_rounds;
let lde_size = 1 << (degree_bits + config.fri_config.rate_bits);
dbg!(lde_size);
let mut challenger = Challenger::<F, C::Hasher>::new();

View File

@ -124,7 +124,7 @@ where
timing,
"compute openings proof",
PolynomialBatch::prove_openings(
&S::fri_instance(zeta, g, rate_bits),
&S::fri_instance(zeta, g, rate_bits, config.num_challenges),
initial_merkle_trees,
&mut challenger,
&fri_params,

View File

@ -67,10 +67,11 @@ pub trait Stark<F: RichField + Extendable<D>, const D: usize>: Sync {
zeta: F::Extension,
g: F::Extension,
rate_bits: usize,
num_challenges: usize,
) -> FriInstanceInfo<F, D> {
let no_blinding_oracle = FriOracleInfo { blinding: false };
let trace_info = FriPolynomialInfo::from_range(0, 0..Self::COLUMNS);
let quotient_info = FriPolynomialInfo::from_range(1, 0..1 << rate_bits);
let quotient_info = FriPolynomialInfo::from_range(1, 0..(1 << rate_bits) * num_challenges);
let zeta_batch = FriBatchInfo {
point: zeta,
polynomials: [trace_info.clone(), quotient_info].concat(),

View File

@ -31,7 +31,6 @@ where
[(); S::PUBLIC_INPUTS]:,
{
let challenges = proof_with_pis.get_challenges(config, degree_bits)?;
dbg!(&challenges.fri_challenges.fri_query_indices);
verify_with_challenges(stark, proof_with_pis, challenges, config)
}
@ -115,6 +114,7 @@ where
challenges.stark_zeta,
F::primitive_root_of_unity(degree_bits).into(),
config.fri_config.rate_bits,
config.num_challenges,
),
&proof.openings.to_fri_openings(),
&challenges.fri_challenges,