Skip to content

Commit

Permalink
verifier_corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
m-pandey5 committed Dec 16, 2024
1 parent a14495b commit bdbb3ee
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/stark/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ pub fn verify_proof(
terminal_memory:Vec<FieldElement>,
terminal_input:Vec<FieldElement>,
terminal_output:Vec<FieldElement>,
height:FieldElement){
degree_bound:usize){
let mut channel=Channel::new();
// merkle root of the zipped base codewords
let base_merkle_root =compressed_proof[0].clone();
Expand Down Expand Up @@ -516,7 +516,7 @@ height:FieldElement){
// height should be power of 2
// for fri_layer degree of the combination polynomial should be less then the height and the domain size will be the height*expansion_fact
// fri.layer.len = 1+ log(height)/log2
let number = height.0;
let number = degree_bound+1 as usize;
let base = 2.0;
let log_base_2 = (number as f64).log2();
let fri_layer_length:usize=(log_base_2+1 as f64) as usize;
Expand Down Expand Up @@ -551,7 +551,7 @@ height:FieldElement){
terminal_memory.clone(),
terminal_input.clone(),
terminal_output.clone(),
height,
degree_bound,
fri_layer_length
);
// why 46 ??// here 46 is consistence acc to stark101 6 commitment of the f(x), f(gx), f(g^2x) for it's elem and the authentication path and other 41 for the fri layer 4 for all 10 layers and 1 for the last layer the constant term
Expand All @@ -574,11 +574,11 @@ pub fn verify_queries( base_idx: usize,
terminal_memory:Vec<FieldElement>,
terminal_input:Vec<FieldElement>,
terminal_output:Vec<FieldElement>,
height:FieldElement,
degree_bound:usize,
fri_layer_length:usize
){
// length of the eval_domain
let len =height.0 as usize *blow_up_factor ;
let len = (degree_bound+1 as usize)*blow_up_factor ;
let base_merkle_root = compressed_proof[0].clone();
// doubt here how this compressed proof is storing the leaf and the proof_bytes // leaf of the zipped base codewords
// doubt solved
Expand Down Expand Up @@ -636,7 +636,7 @@ fri_layer_length:usize
assert_eq!(terminal_processor[3], terminal_output[0]); //Tipa = Tea output
//@todo
//let this be for now:- assert_eq!(Terminal_instruction[1], Tpea); //Tpea = program evaluation
let intial_length=blow_up_factor*height.0 as usize;


verify_fri_layers(
base_idx + 8,
Expand Down Expand Up @@ -756,6 +756,7 @@ mod stark_test {


}

#[test]
fn helper_tests() {
let x = FieldElement::new(318, Field::new(421));
Expand Down

0 comments on commit bdbb3ee

Please sign in to comment.