Struct miden_processor::AdviceInputs
source · pub struct AdviceInputs { /* private fields */ }
Expand description
Inputs container to initialize advice provider for the execution of Miden VM programs.
The program may request nondeterministic advice inputs from the prover. These inputs are secret inputs. This means that the prover does not need to share them with the verifier.
There are three types of advice inputs:
- Single advice tape which can contain any number of elements.
- Multiple advice tapes that can be appended to the main tape, and are mapped by 32 bytes keys.
- Merkle sets list, which are used to provide nondeterministic inputs for instructions that operates with Merkle trees.
Implementations§
source§impl AdviceInputs
impl AdviceInputs
sourcepub fn with_tape_values<I>(self, iter: I) -> Result<Self, InputError>where
I: IntoIterator<Item = u64>,
pub fn with_tape_values<I>(self, iter: I) -> Result<Self, InputError>where I: IntoIterator<Item = u64>,
Attempts to extend the tape values with the given sequence of integers, returning an error
if any of the numbers fails while converting to an element [Felt]
.
sourcepub fn with_tape<I>(self, iter: I) -> Selfwhere
I: IntoIterator<Item = Felt>,
pub fn with_tape<I>(self, iter: I) -> Selfwhere I: IntoIterator<Item = Felt>,
Extends the tape with the given elements.
sourcepub fn with_values_map<I>(self, iter: I) -> Selfwhere
I: IntoIterator<Item = ([u8; 32], Vec<Felt>)>,
pub fn with_values_map<I>(self, iter: I) -> Selfwhere I: IntoIterator<Item = ([u8; 32], Vec<Felt>)>,
Extends the map of values with the given argument, replacing previously inserted items.
sourcepub fn with_merkle_sets<I>(self, iter: I) -> Result<Self, InputError>where
I: IntoIterator<Item = MerkleSet>,
pub fn with_merkle_sets<I>(self, iter: I) -> Result<Self, InputError>where I: IntoIterator<Item = MerkleSet>,
Attempts to extend the Merkle sets with the given argument, failing if a duplicated root is provided.
Trait Implementations§
source§impl Clone for AdviceInputs
impl Clone for AdviceInputs
source§fn clone(&self) -> AdviceInputs
fn clone(&self) -> AdviceInputs
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AdviceInputs
impl Debug for AdviceInputs
source§impl Default for AdviceInputs
impl Default for AdviceInputs
source§fn default() -> AdviceInputs
fn default() -> AdviceInputs
Returns the “default value” for a type. Read more
source§impl From<AdviceInputs> for MemAdviceProvider
impl From<AdviceInputs> for MemAdviceProvider
source§fn from(inputs: AdviceInputs) -> Self
fn from(inputs: AdviceInputs) -> Self
Converts to this type from the input type.