pub struct OracleSetupChannel { /* private fields */ }Expand description
An IOPVerifierChannel that records the OracleSpec of each received oracle.
This performs no verification.
Every receive returns a dummy value, and sampling, observing, and asserting are no-ops.
Drive an IOP verifier with it, then read back what it recorded.
The channel carries one protocol-level zero-knowledge flag.
An oracle is zero-knowledge only if that flag is set and the oracle is witness-dependent.
§What is recorded
Two views of the same dry run, differing only in whether round boundaries survive.
- The flat sequence of oracles, in arrival order.
- That same sequence, grouped into the rounds the oracles are committed in.
A round closes wherever a challenge could be drawn.
That is where a decorator committing a round as one oracle stops taking members.
Implementations§
Source§impl OracleSetupChannel
impl OracleSetupChannel
Sourcepub const fn new(is_zk: bool) -> Self
pub const fn new(is_zk: bool) -> Self
Creates a new setup channel with the given protocol-level zero-knowledge flag.
Sourcepub fn oracle_specs(&self) -> &[OracleSpec]
pub fn oracle_specs(&self) -> &[OracleSpec]
Returns the oracle specs recorded so far.
Sourcepub fn into_oracle_specs(self) -> Vec<OracleSpec>
pub fn into_oracle_specs(self) -> Vec<OracleSpec>
Consumes the channel and returns the recorded oracle specs, in the order received.
Sourcepub fn into_oracle_schedule(self) -> OracleSchedule
pub fn into_oracle_schedule(self) -> OracleSchedule
Consumes the channel and returns the recorded oracles, grouped by commit round.
The round left open at the end of the dry run is closed here.
So every recorded oracle belongs to some round.
Trait Implementations§
Source§impl Clone for OracleSetupChannel
impl Clone for OracleSetupChannel
Source§fn clone(&self) -> OracleSetupChannel
fn clone(&self) -> OracleSetupChannel
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OracleSetupChannel
impl Debug for OracleSetupChannel
Source§impl Default for OracleSetupChannel
impl Default for OracleSetupChannel
Source§fn default() -> OracleSetupChannel
fn default() -> OracleSetupChannel
Source§impl<F: Field> IOPVerifierChannel<F> for OracleSetupChannel
impl<F: Field> IOPVerifierChannel<F> for OracleSetupChannel
type Oracle = ()
Source§fn remaining_oracle_specs(&self) -> &[OracleSpec]
fn remaining_oracle_specs(&self) -> &[OracleSpec]
Source§impl<F: Field> IPVerifierChannel<F> for OracleSetupChannel
impl<F: Field> IPVerifierChannel<F> for OracleSetupChannel
Source§fn recv_one(&mut self) -> Result<DummyElem<F>, Error>
fn recv_one(&mut self) -> Result<DummyElem<F>, Error>
Source§fn recv_many(&mut self, n: usize) -> Result<Vec<DummyElem<F>>, Error>
fn recv_many(&mut self, n: usize) -> Result<Vec<DummyElem<F>>, Error>
n field elements from the prover.Source§fn recv_array<const N: usize>(&mut self) -> Result<[DummyElem<F>; N], Error>
fn recv_array<const N: usize>(&mut self) -> Result<[DummyElem<F>; N], Error>
Source§fn observe_one(&mut self, _val: F) -> DummyElem<F>
fn observe_one(&mut self, _val: F) -> DummyElem<F>
Source§fn observe_many(&mut self, vals: &[F]) -> Vec<DummyElem<F>>
fn observe_many(&mut self, vals: &[F]) -> Vec<DummyElem<F>>
Source§fn assert_zero(&mut self, _val: DummyElem<F>) -> Result<(), Error>
fn assert_zero(&mut self, _val: DummyElem<F>) -> Result<(), Error>
Source§impl<F: BinaryField> WordIPVerifierChannel<F> for OracleSetupChannel
impl<F: BinaryField> WordIPVerifierChannel<F> for OracleSetupChannel
Source§fn observe_words(&mut self, words: &[Word]) -> Vec<Word>
fn observe_words(&mut self, words: &[Word]) -> Vec<Word>
Auto Trait Implementations§
impl Freeze for OracleSetupChannel
impl RefUnwindSafe for OracleSetupChannel
impl Send for OracleSetupChannel
impl Sync for OracleSetupChannel
impl Unpin for OracleSetupChannel
impl UnsafeUnpin for OracleSetupChannel
impl UnwindSafe for OracleSetupChannel
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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