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 stack which can contain any number of elements.
- Key-mapped element lists which can be pushed onto the advice stack.
- Merkle store, which is used to provide nondeterministic inputs for instructions that operates with Merkle trees.
Implementations§
source§impl AdviceInputs
impl AdviceInputs
sourcepub fn with_stack_values<I>(self, iter: I) -> Result<Self, InputError>where
I: IntoIterator<Item = u64>,
pub fn with_stack_values<I>(self, iter: I) -> Result<Self, InputError>where
I: IntoIterator<Item = u64>,
Attempts to extend the stack 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_stack<I>(self, iter: I) -> Selfwhere
I: IntoIterator<Item = Felt>,
pub fn with_stack<I>(self, iter: I) -> Selfwhere
I: IntoIterator<Item = Felt>,
Extends the stack with the given elements.
sourcepub fn with_map<I>(self, iter: I) -> Self
pub fn with_map<I>(self, iter: I) -> Self
Extends the map of values with the given argument, replacing previously inserted items.
sourcepub fn with_merkle_store(self, store: MerkleStore) -> Self
pub fn with_merkle_store(self, store: MerkleStore) -> Self
Replaces the MerkleStore with the provided argument.
sourcepub fn extend_stack<I>(&mut self, iter: I)where
I: IntoIterator<Item = Felt>,
pub fn extend_stack<I>(&mut self, iter: I)where
I: IntoIterator<Item = Felt>,
Extends the stack with the given elements.
sourcepub fn extend_map<I>(&mut self, iter: I)
pub fn extend_map<I>(&mut self, iter: I)
Extends the map of values with the given argument, replacing previously inserted items.
sourcepub fn extend_merkle_store<I>(&mut self, iter: I)where
I: Iterator<Item = InnerNodeInfo>,
pub fn extend_merkle_store<I>(&mut self, iter: I)where
I: Iterator<Item = InnerNodeInfo>,
Extends the MerkleStore with the given nodes.
sourcepub fn extend(&mut self, other: Self)
pub fn extend(&mut self, other: Self)
Extends the contents of this instance with the contents of the other instance.
sourcepub fn mapped_values(&self, key: &RpoDigest) -> Option<&[Felt]>
pub fn mapped_values(&self, key: &RpoDigest) -> Option<&[Felt]>
Fetch a values set mapped by the given key.
sourcepub const fn merkle_store(&self) -> &MerkleStore
pub const fn merkle_store(&self) -> &MerkleStore
Returns the underlying MerkleStore.
Trait Implementations§
source§impl Clone for AdviceInputs
impl Clone for AdviceInputs
source§fn clone(&self) -> AdviceInputs
fn clone(&self) -> AdviceInputs
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more