You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Proof or provers work contains generating commitments and decommiting them, to convence the verifier over the integrity of the computation.
538
+
// i) Commitment ✅
539
+
// ii) Decommitment -> query phase
540
+
// Decommitment involves verifier sending random elements from evaluation domain to prover. and prover responding with decommitments to the evaluations, which involve sending merkle paths along with evaluations.
541
+
542
+
// with each successful query and valid decommitment, verifiers confidence in the proof increases.
543
+
487
544
let no_of_queries = num_queries;
488
545
decommit_fri(
489
546
no_of_queries,
@@ -524,22 +581,17 @@ pub fn prove(
524
581
)
525
582
}
526
583
527
-
// verifier knows -
528
-
// constraints (therefore AIR)
529
-
// combination polynomial equation
530
-
// challenges of extension columns
531
-
// challenges of combination polynomial
532
-
533
584
// prover sends to verifier -
534
-
// height (whose correctness is indirectly verified through fri and degree bound)
535
-
// base codewords merkle root, extension codewords merkle root
536
-
// for each query (index) of verifier, prover sends respective evaluation and merkle authentication path of evaluation
537
-
// written in fri decommit_on_query
585
+
//-> height (whose correctness is indirectly verified through fri and degree bound)
586
+
//-> base codewords merkle root, extension codewords merkle root
587
+
// ->for each query (index) of verifier, prover sends respective evaluation and merkle authentication path of evaluation
588
+
589
+
//panic for invalid proof
538
590
539
591
pubfnverify_proof(
540
592
num_of_queries:usize,
541
593
maximum_random_int:u64,
542
-
blow_up_factor:usize,//expansion_factor
594
+
blow_up_factor:usize,
543
595
field:Field,
544
596
fri_domains:&[Vec<FieldElement>],
545
597
compressed_proof:&[Vec<u8>],
@@ -553,7 +605,7 @@ pub fn verify_proof(
553
605
log::info!("verifying proof");
554
606
let start = Local::now();
555
607
letmut channel = Channel::new();
556
-
//merkle root of the zipped base codewords
608
+
//merkle root of the zipped base codewords
557
609
let base_merkle_root = compressed_proof[0].clone();
let exten_merkle_root = compressed_proof[1].clone();
571
623
572
624
channel.send(exten_merkle_root.clone());
573
625
626
+
// get challenges for the combination polynomial
574
627
letmut challenges_combination = vec![];
575
628
let x = channel.receive_random_field_element(field);
576
629
challenges_combination.push(x);
@@ -582,9 +635,6 @@ pub fn verify_proof(
582
635
channel.send(combination_merkle_root);
583
636
584
637
//commit to fri
585
-
586
-
// height should be power of 2
587
-
// for fri_layer degree of the combination polynomial should be less then the height and the domain size will be the height*expansion_fact
588
638
// fri.layer.len = 1+ log(height)/log2
589
639
590
640
let number = degree_bound + 1_usize;
@@ -604,7 +654,7 @@ pub fn verify_proof(
604
654
// last term of the constant polynomial
605
655
606
656
channel.send(last_layer_free_term.clone());
607
-
// base_idx will be the point where the end of the compressed_proof indices for thr fri-layer_root commitment after this we have added the element and there authentication path
657
+
// base_idx will be the point where the end of the compressed_proof indices for thr fri-layer_root commitment after this we have added the element and there authentication path
608
658
letmut base_idx = 3_usize + fri_layer_length;
609
659
for i in0..num_of_queries {
610
660
let idx = channel.receive_random_int(0, maximum_random_int,true)asusize;
0 commit comments