pub struct Verifier {
pub verifier_key: Option<VerifierKey>,
pub preprocessed_transcript: Transcript,
/* private fields */
}Expand description
Abstraction structure designed verify Proofs.
Fields§
§verifier_key: Option<VerifierKey>VerificationKey which is used to verify a specific PLONK circuit
preprocessed_transcript: TranscriptStore the messages exchanged during the preprocessing stage This is copied each time, we make a proof, so that we can use the same verifier to Verify multiple proofs from the same circuit. If this is not copied, then the verification procedure will modify the transcript, making it unusable for future proofs.
Implementations§
Source§impl Verifier
impl Verifier
Sourcepub fn with_size(label: &'static [u8], size: usize) -> Verifier
pub fn with_size(label: &'static [u8], size: usize) -> Verifier
Creates a new Verifier instance with some expected size.
Sourcepub fn composer_mut(&mut self) -> &mut TurboComposer
pub fn composer_mut(&mut self) -> &mut TurboComposer
Mutable borrow of the TurboComposer.
Sourcepub fn preprocess(&mut self, commit_key: &CommitKey) -> Result<(), Error>
pub fn preprocess(&mut self, commit_key: &CommitKey) -> Result<(), Error>
Preprocess a circuit to obtain a VerifierKey and a circuit
descriptor so that the Verifier instance can verify Proofs
for this circuit descriptor instance.
Sourcepub fn key_transcript(&mut self, label: &'static [u8], message: &[u8])
pub fn key_transcript(&mut self, label: &'static [u8], message: &[u8])
Keys the Transcript with additional seed information
Wrapper around Transcript::append_message.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Verifier
impl RefUnwindSafe for Verifier
impl Send for Verifier
impl Sync for Verifier
impl Unpin for Verifier
impl UnwindSafe for Verifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more