Struct snarkvm_synthesizer::Trace
source · pub struct Trace<N>where
N: Network,{ /* private fields */ }
Implementations§
source§impl<N> Trace<N>where
N: Network,
impl<N> Trace<N>where N: Network,
sourcepub fn transitions(&self) -> &[Transition<N>]
pub fn transitions(&self) -> &[Transition<N>]
Returns the list of transitions.
sourcepub fn call_metrics(&self) -> &[CallMetrics<N>]
pub fn call_metrics(&self) -> &[CallMetrics<N>]
Returns the call metrics.
source§impl<N> Trace<N>where
N: Network,
impl<N> Trace<N>where N: Network,
sourcepub fn insert_transition(
&mut self,
input_ids: &[InputID<N>],
transition: &Transition<N>,
_: (ProvingKey<N>, Assignment<<N as Environment>::Field>),
metrics: CallMetrics<N>
) -> Result<(), Error>
pub fn insert_transition( &mut self, input_ids: &[InputID<N>], transition: &Transition<N>, _: (ProvingKey<N>, Assignment<<N as Environment>::Field>), metrics: CallMetrics<N> ) -> Result<(), Error>
Inserts the transition into the trace.
source§impl<N> Trace<N>where
N: Network,
impl<N> Trace<N>where N: Network,
sourcepub fn is_fee_private(&self) -> bool
pub fn is_fee_private(&self) -> bool
Returns true
if the trace is for a private fee transition.
sourcepub fn is_fee_public(&self) -> bool
pub fn is_fee_public(&self) -> bool
Returns true
if the trace is for a public fee transition.
source§impl<N> Trace<N>where
N: Network,
impl<N> Trace<N>where N: Network,
sourcepub fn prepare(&mut self, query: impl QueryTrait<N>) -> Result<(), Error>
pub fn prepare(&mut self, query: impl QueryTrait<N>) -> Result<(), Error>
Returns the inclusion assignments and global state root for the current transition(s).
sourcepub fn prove_execution<A, R>(
&self,
locator: &str,
rng: &mut R
) -> Result<Execution<N>, Error>where
A: Aleo<Network = N>,
R: Rng + CryptoRng,
pub fn prove_execution<A, R>( &self, locator: &str, rng: &mut R ) -> Result<Execution<N>, Error>where A: Aleo<Network = N>, R: Rng + CryptoRng,
Returns a new execution with a proof, for the current inclusion assignments and global state root.
sourcepub fn prove_fee<A, R>(&self, rng: &mut R) -> Result<Fee<N>, Error>where
A: Aleo<Network = N>,
R: Rng + CryptoRng,
pub fn prove_fee<A, R>(&self, rng: &mut R) -> Result<Fee<N>, Error>where A: Aleo<Network = N>, R: Rng + CryptoRng,
Returns a new fee with a proof, for the current inclusion assignment and global state root.
sourcepub fn verify_execution_proof(
locator: &str,
verifier_inputs: Vec<(VerifyingKey<N>, Vec<Vec<<N as Environment>::Field>>)>,
execution: &Execution<N>
) -> Result<(), Error>
pub fn verify_execution_proof( locator: &str, verifier_inputs: Vec<(VerifyingKey<N>, Vec<Vec<<N as Environment>::Field>>)>, execution: &Execution<N> ) -> Result<(), Error>
Checks the proof for the execution. Note: This does not check that the global state root exists in the ledger.
sourcepub fn verify_fee_proof(
verifier_inputs: (VerifyingKey<N>, Vec<Vec<<N as Environment>::Field>>),
fee: &Fee<N>
) -> Result<(), Error>
pub fn verify_fee_proof( verifier_inputs: (VerifyingKey<N>, Vec<Vec<<N as Environment>::Field>>), fee: &Fee<N> ) -> Result<(), Error>
Checks the proof for the fee. Note: This does not check that the global state root exists in the ledger.
Trait Implementations§
source§impl<N> Clone for Trace<N>where
N: Clone + Network,
<N as Environment>::Field: Clone,
<N as Network>::StateRoot: Clone,
impl<N> Clone for Trace<N>where N: Clone + Network, <N as Environment>::Field: Clone, <N as Network>::StateRoot: Clone,
Auto Trait Implementations§
impl<N> RefUnwindSafe for Trace<N>where N: UnwindSafe + RefUnwindSafe, <N as Network>::BlockHash: UnwindSafe + RefUnwindSafe, <N as Environment>::Field: UnwindSafe + RefUnwindSafe, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe, <N as Environment>::Projective: UnwindSafe + RefUnwindSafe, <N as Environment>::Scalar: RefUnwindSafe, <N as Network>::StateRoot: UnwindSafe + RefUnwindSafe, <N as Network>::TransactionID: UnwindSafe + RefUnwindSafe, <N as Network>::TransitionID: RefUnwindSafe,
impl<N> Send for Trace<N>
impl<N> Sync for Trace<N>
impl<N> Unpin for Trace<N>where N: Unpin, <N as Network>::BlockHash: Unpin, <N as Environment>::Field: Unpin, <N as Environment>::Projective: Unpin, <N as Environment>::Scalar: Unpin, <N as Network>::StateRoot: Unpin, <N as Network>::TransactionID: Unpin, <N as Network>::TransitionID: Unpin,
impl<N> UnwindSafe for Trace<N>where N: UnwindSafe, <N as Network>::BlockHash: UnwindSafe, <N as Environment>::Field: UnwindSafe + RefUnwindSafe, <<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe, <N as Environment>::Projective: UnwindSafe, <N as Environment>::Scalar: UnwindSafe, <N as Network>::StateRoot: UnwindSafe, <N as Network>::TransactionID: UnwindSafe, <N as Network>::TransitionID: UnwindSafe,
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