pub struct ReplayChannel<F: Field> { /* private fields */ }Expand description
A channel that replays recorded interaction values through a WitnessGenerator, filling
both inout and private wires in the outer witness.
This mirrors
IronSpartanBuilderChannel
but uses concrete evaluation instead of symbolic constraint building. Each operation consumes
the next value and writes it to the corresponding inout wire in the WitnessGenerator. When
the verifier’s arithmetic runs on the returned CircuitElem values, the WitnessGenerator
fills private wires.
Implementations§
Source§impl<F: Field> ReplayChannel<F>
impl<F: Field> ReplayChannel<F>
Sourcepub fn new(layout: Arc<WitnessLayout<F>>, keys: Vec<F>, events: Vec<F>) -> Self
pub fn new(layout: Arc<WitnessLayout<F>>, keys: Vec<F>, events: Vec<F>) -> Self
Creates a new replay channel.
TODO: Document args. Keys are the symmetric OTP keys for the received values.
Takes a shared Arc<WitnessLayout<F>>, not a borrow.
The backing WitnessGenerator must be 'static: its CircuitElems outlive this call.
The Arc is a bumped reference count on the layout the config already owns, not a clone.
Sourcepub fn finish(self) -> Result<Witness<F>, WitnessError>
pub fn finish(self) -> Result<Witness<F>, WitnessError>
Consumes the channel and builds the outer witness.
Trait Implementations§
Source§impl<F: Field> IOPVerifierChannel<F> for ReplayChannel<F>
impl<F: Field> IOPVerifierChannel<F> for ReplayChannel<F>
type Oracle = ()
Source§fn remaining_oracle_specs(&self) -> &[OracleSpec]
fn remaining_oracle_specs(&self) -> &[OracleSpec]
Source§impl<F: Field> IPVerifierChannel<F> for ReplayChannel<F>
impl<F: Field> IPVerifierChannel<F> for ReplayChannel<F>
Source§type Elem = CircuitElem<F, WitnessGenerator<F>>
type Elem = CircuitElem<F, WitnessGenerator<F>>
Source§fn recv_one(&mut self) -> Result<Self::Elem, Error>
fn recv_one(&mut self) -> Result<Self::Elem, Error>
Source§fn recv_public_claim(&mut self) -> Result<Self::Elem, Error>
fn recv_public_claim(&mut self) -> Result<Self::Elem, Error>
Source§fn observe_one(&mut self, _val: F) -> Self::Elem
fn observe_one(&mut self, _val: F) -> Self::Elem
Source§fn assert_zero(&mut self, val: Self::Elem) -> Result<(), Error>
fn assert_zero(&mut self, val: Self::Elem) -> Result<(), Error>
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>
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>
Source§impl<F: BinaryField> WordIPVerifierChannel<F> for ReplayChannel<F>
impl<F: BinaryField> WordIPVerifierChannel<F> for ReplayChannel<F>
Source§fn observe_words(&mut self, words: &[Word]) -> Vec<Word>
fn observe_words(&mut self, words: &[Word]) -> Vec<Word>
Auto Trait Implementations§
impl<F> !RefUnwindSafe for ReplayChannel<F>
impl<F> !Send for ReplayChannel<F>
impl<F> !Sync for ReplayChannel<F>
impl<F> !UnwindSafe for ReplayChannel<F>
impl<F> Freeze for ReplayChannel<F>
impl<F> Unpin for ReplayChannel<F>where
F: Unpin,
impl<F> UnsafeUnpin for ReplayChannel<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
§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>
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