pub struct IronSpartanBuilderChannel<F: Field> { /* private fields */ }Expand description
A channel that symbolically executes a verifier, building up an IronSpartan constraint system.
Instead of performing actual verification, this channel records all operations as constraints
in a ConstraintBuilder. The typical usage pattern is:
- Construct a fresh
IronSpartanBuilderChannelviaSelf::new - Run the verifier on the channel (e.g.,
verify_iop) - The channel’s
finish()method returns theConstraintBuilderwith all recorded constraints
Implementations§
Source§impl<F: Field> IronSpartanBuilderChannel<F>
impl<F: Field> IronSpartanBuilderChannel<F>
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new builder channel backed by a fresh ConstraintBuilder.
Sourcepub fn finish(self) -> ConstraintBuilder<F>
pub fn finish(self) -> ConstraintBuilder<F>
Consumes the channel and returns the underlying ConstraintBuilder.
This must be called after all CircuitElem values derived from this channel have been
dropped, as it requires sole ownership of the builder via Rc::try_unwrap.
Trait Implementations§
Source§impl<F: Field> Default for IronSpartanBuilderChannel<F>
impl<F: Field> Default for IronSpartanBuilderChannel<F>
Source§impl<F: Field> IOPVerifierChannel<F> for IronSpartanBuilderChannel<F>
impl<F: Field> IOPVerifierChannel<F> for IronSpartanBuilderChannel<F>
type Oracle = ()
Source§fn remaining_oracle_specs(&self) -> &[OracleSpec]
fn remaining_oracle_specs(&self) -> &[OracleSpec]
Returns the specifications for the remaining oracles to be received. Read more
Source§impl<F: Field> IPVerifierChannel<F> for IronSpartanBuilderChannel<F>
impl<F: Field> IPVerifierChannel<F> for IronSpartanBuilderChannel<F>
Source§type Elem = CircuitElem<F, ConstraintBuilder<F>>
type Elem = CircuitElem<F, ConstraintBuilder<F>>
The element type returned by receive and sample methods.
Source§fn recv_one(&mut self) -> Result<Self::Elem, Error>
fn recv_one(&mut self) -> Result<Self::Elem, Error>
Receives a single field element from the prover.
Source§fn recv_public_claim(&mut self) -> Result<Self::Elem, Error>
fn recv_public_claim(&mut self) -> Result<Self::Elem, Error>
Receives a value the verifier could compute for itself, taken as advice. Read more
Source§fn observe_one(&mut self, _val: F) -> Self::Elem
fn observe_one(&mut self, _val: F) -> Self::Elem
Observes a single field element, feeding it into the Fiat-Shamir state. Read more
Source§fn assert_zero(&mut self, val: Self::Elem) -> Result<(), Error>
fn assert_zero(&mut self, val: Self::Elem) -> Result<(), Error>
Asserts that a value is zero. Read more
Source§fn recv_many(&mut self, n: usize) -> Result<Vec<Self::Elem>, Error>
fn recv_many(&mut self, n: usize) -> Result<Vec<Self::Elem>, Error>
Receives
n field elements from the prover.Source§fn recv_array<const N: usize>(&mut self) -> Result<[Self::Elem; N], Error>
fn recv_array<const N: usize>(&mut self) -> Result<[Self::Elem; N], Error>
Receives a fixed-size array of field elements from the prover.
Source§impl<F: BinaryField> WordIPVerifierChannel<F> for IronSpartanBuilderChannel<F>
impl<F: BinaryField> WordIPVerifierChannel<F> for IronSpartanBuilderChannel<F>
Source§fn observe_words(&mut self, words: &[Word]) -> Vec<Word>
fn observe_words(&mut self, words: &[Word]) -> Vec<Word>
Feeds words into the Fiat-Shamir state, each as eight little-endian bytes, and returns them
as this channel’s word type. Read more
Auto Trait Implementations§
impl<F> !RefUnwindSafe for IronSpartanBuilderChannel<F>
impl<F> !Send for IronSpartanBuilderChannel<F>
impl<F> !Sync for IronSpartanBuilderChannel<F>
impl<F> !UnwindSafe for IronSpartanBuilderChannel<F>
impl<F> Freeze for IronSpartanBuilderChannel<F>
impl<F> Unpin for IronSpartanBuilderChannel<F>
impl<F> UnsafeUnpin for IronSpartanBuilderChannel<F>
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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