-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
100 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
use ff_ext::ExtensionField; | ||
use gkr::structs::PointAndEval; | ||
|
||
pub mod prover; | ||
pub mod verifier; | ||
|
||
pub struct ZKVMProof {} | ||
#[derive(Clone)] | ||
pub struct ZKVMProof<E: ExtensionField> { | ||
pub input_point_and_evals: Vec<PointAndEval<E>>, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
use ff_ext::ExtensionField; | ||
use gkr::structs::PointAndEval; | ||
use singer_utils::structs_v2::Circuit; | ||
use transcript::Transcript; | ||
|
||
use crate::error::ZKVMError; | ||
|
||
use super::ZKVMProof; | ||
|
||
pub struct ZKVMVerifier<E: ExtensionField> { | ||
circuit: Circuit<E>, | ||
} | ||
|
||
impl<E: ExtensionField> ZKVMVerifier<E> { | ||
pub fn new(circuit: Circuit<E>) -> Self { | ||
ZKVMVerifier { circuit } | ||
} | ||
pub fn verify( | ||
&self, | ||
proof: &ZKVMProof<E>, | ||
_transcript: &mut Transcript<E>, | ||
out_evals: &PointAndEval<E>, | ||
challenges: &[E], // derive challenge from PCS | ||
) -> Result<(), ZKVMError> { | ||
// verify and reduce product tower sumcheck | ||
|
||
// verify main + sel sumcheck | ||
|
||
// verify record (degree = 1) statement, thus no sumcheck | ||
|
||
// verify zero expression (degree = 1) statement, thus no sumcheck | ||
Ok(()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters