Struct snarkvm_synthesizer_process::Trace
source · pub struct Trace<N: Network> { /* private fields */ }
Implementations§
source§impl<N: Network> Trace<N>
impl<N: Network> Trace<N>
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: Network> Trace<N>
impl<N: Network> Trace<N>
sourcepub fn insert_transition(
&mut self,
input_ids: &[InputID<N>],
transition: &Transition<N>,
(proving_key, assignment): (ProvingKey<N>, Assignment<N::Field>),
metrics: CallMetrics<N>
) -> Result<()>
pub fn insert_transition( &mut self, input_ids: &[InputID<N>], transition: &Transition<N>, (proving_key, assignment): (ProvingKey<N>, Assignment<N::Field>), metrics: CallMetrics<N> ) -> Result<()>
Inserts the transition into the trace.
source§impl<N: Network> Trace<N>
impl<N: Network> Trace<N>
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: Network> Trace<N>
impl<N: Network> Trace<N>
sourcepub fn prepare(&mut self, query: impl QueryTrait<N>) -> Result<()>
pub fn prepare(&mut self, query: impl QueryTrait<N>) -> Result<()>
Returns the inclusion assignments and global state root for the current transition(s).
sourcepub fn prove_execution<A: Aleo<Network = N>, R: Rng + CryptoRng>(
&self,
locator: &str,
rng: &mut R
) -> Result<Execution<N>>
pub fn prove_execution<A: Aleo<Network = N>, R: Rng + CryptoRng>( &self, locator: &str, rng: &mut R ) -> Result<Execution<N>>
Returns a new execution with a proof, for the current inclusion assignments and global state root.
sourcepub fn prove_fee<A: Aleo<Network = N>, R: Rng + CryptoRng>(
&self,
rng: &mut R
) -> Result<Fee<N>>
pub fn prove_fee<A: Aleo<Network = N>, R: Rng + CryptoRng>( &self, rng: &mut R ) -> Result<Fee<N>>
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::Field>>)>,
execution: &Execution<N>
) -> Result<()>
pub fn verify_execution_proof( locator: &str, verifier_inputs: Vec<(VerifyingKey<N>, Vec<Vec<N::Field>>)>, execution: &Execution<N> ) -> Result<()>
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::Field>>),
fee: &Fee<N>
) -> Result<()>
pub fn verify_fee_proof( verifier_inputs: (VerifyingKey<N>, Vec<Vec<N::Field>>), fee: &Fee<N> ) -> Result<()>
Checks the proof for the fee. Note: This does not check that the global state root exists in the ledger.
Trait Implementations§
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