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> !Freeze for Trace<N>
impl<N> RefUnwindSafe for Trace<N>where
<N as Network>::StateRoot: RefUnwindSafe + UnwindSafe,
<N as Network>::TransitionID: RefUnwindSafe,
<N as Environment>::Projective: RefUnwindSafe + UnwindSafe,
<N as Environment>::Field: RefUnwindSafe + UnwindSafe,
<N as Network>::TransactionID: RefUnwindSafe + UnwindSafe,
<N as Network>::BlockHash: RefUnwindSafe + UnwindSafe,
N: RefUnwindSafe + UnwindSafe,
<N as Environment>::Scalar: RefUnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe,
impl<N> Send for Trace<N>
impl<N> Sync for Trace<N>
impl<N> Unpin for Trace<N>where
<N as Network>::TransitionID: Unpin,
<N as Network>::StateRoot: Unpin,
<N as Environment>::Projective: Unpin,
<N as Environment>::Field: Unpin,
<N as Network>::TransactionID: Unpin,
<N as Network>::BlockHash: Unpin,
N: Unpin,
<N as Environment>::Scalar: Unpin,
impl<N> UnwindSafe for Trace<N>where
<N as Network>::TransitionID: UnwindSafe,
<N as Network>::StateRoot: UnwindSafe,
<N as Environment>::Field: UnwindSafe + RefUnwindSafe,
<N as Environment>::Projective: UnwindSafe,
N: UnwindSafe,
<N as Network>::TransactionID: UnwindSafe,
<N as Network>::BlockHash: UnwindSafe,
<<N as Environment>::PairingCurve as PairingEngine>::G1Affine: RefUnwindSafe,
<N as Environment>::Scalar: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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