pub struct ExecutedTransaction { /* private fields */ }Expand description
Describes the result of executing a transaction program for the Miden protocol.
Executed transaction serves two primary purposes:
- It contains a complete description of the effects of the transaction. Specifically, it contains all output notes created as the result of the transaction and describes all the changes made to the involved account (i.e., the account delta).
- It contains all the information required to re-execute and prove the transaction in a stateless manner. This includes all public transaction inputs, but also all nondeterministic inputs that the host provided to Miden VM while executing the transaction (i.e., advice witness).
Implementations§
Source§impl ExecutedTransaction
impl ExecutedTransaction
Sourcepub fn new(
tx_inputs: TransactionInputs,
tx_outputs: TransactionOutputs,
account_delta: AccountDelta,
tx_measurements: TransactionMeasurements,
) -> Self
pub fn new( tx_inputs: TransactionInputs, tx_outputs: TransactionOutputs, account_delta: AccountDelta, tx_measurements: TransactionMeasurements, ) -> Self
Returns a new ExecutedTransaction instantiated from the provided data.
§Panics
Panics if input and output account IDs are not the same.
Sourcepub fn id(&self) -> TransactionId
pub fn id(&self) -> TransactionId
Returns a unique identifier of this transaction.
Sourcepub fn account_id(&self) -> AccountId
pub fn account_id(&self) -> AccountId
Returns the ID of the account against which this transaction was executed.
Sourcepub fn initial_account(&self) -> &PartialAccount
pub fn initial_account(&self) -> &PartialAccount
Returns the partial state of the account before the transaction was executed.
Sourcepub fn final_account(&self) -> &AccountHeader
pub fn final_account(&self) -> &AccountHeader
Returns the header of the account state after the transaction was executed.
Sourcepub fn input_notes(&self) -> &InputNotes<InputNote>
pub fn input_notes(&self) -> &InputNotes<InputNote>
Returns the notes consumed in this transaction.
Sourcepub fn output_notes(&self) -> &OutputNotes
pub fn output_notes(&self) -> &OutputNotes
Returns the notes created in this transaction.
Sourcepub fn fee(&self) -> FungibleAsset
pub fn fee(&self) -> FungibleAsset
Returns the fee of the transaction.
Sourcepub fn expiration_block_num(&self) -> BlockNumber
pub fn expiration_block_num(&self) -> BlockNumber
Returns the block number at which the transaction will expire.
Sourcepub fn tx_args(&self) -> &TransactionArgs
pub fn tx_args(&self) -> &TransactionArgs
Returns a reference to the transaction arguments.
Sourcepub fn block_header(&self) -> &BlockHeader
pub fn block_header(&self) -> &BlockHeader
Returns the block header for the block against which the transaction was executed.
Sourcepub fn account_delta(&self) -> &AccountDelta
pub fn account_delta(&self) -> &AccountDelta
Returns a description of changes between the initial and final account states.
Sourcepub fn tx_inputs(&self) -> &TransactionInputs
pub fn tx_inputs(&self) -> &TransactionInputs
Returns a reference to the inputs for this transaction.
Sourcepub fn advice_witness(&self) -> &AdviceInputs
pub fn advice_witness(&self) -> &AdviceInputs
Returns all the data requested by the VM from the advice provider while executing the transaction program.
Sourcepub fn measurements(&self) -> &TransactionMeasurements
pub fn measurements(&self) -> &TransactionMeasurements
Returns a reference to the transaction measurements which are the cycle counts for each stage.
Sourcepub fn into_parts(
self,
) -> (TransactionInputs, TransactionOutputs, AccountDelta, TransactionMeasurements)
pub fn into_parts( self, ) -> (TransactionInputs, TransactionOutputs, AccountDelta, TransactionMeasurements)
Returns individual components of this transaction.
Trait Implementations§
Source§impl Clone for ExecutedTransaction
impl Clone for ExecutedTransaction
Source§fn clone(&self) -> ExecutedTransaction
fn clone(&self) -> ExecutedTransaction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ExecutedTransaction
impl Debug for ExecutedTransaction
Source§impl Deserializable for ExecutedTransaction
impl Deserializable for ExecutedTransaction
Source§fn read_from<R: ByteReader>(
source: &mut R,
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R, ) -> Result<Self, DeserializationError>
source, attempts to deserialize these bytes
into Self, and returns the result. Read moreSource§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
Source§impl From<ExecutedTransaction> for TransactionInputs
impl From<ExecutedTransaction> for TransactionInputs
Source§fn from(tx: ExecutedTransaction) -> Self
fn from(tx: ExecutedTransaction) -> Self
Source§impl From<ExecutedTransaction> for TransactionMeasurements
impl From<ExecutedTransaction> for TransactionMeasurements
Source§fn from(tx: ExecutedTransaction) -> Self
fn from(tx: ExecutedTransaction) -> Self
Source§impl PartialEq for ExecutedTransaction
impl PartialEq for ExecutedTransaction
Source§impl Serializable for ExecutedTransaction
impl Serializable for ExecutedTransaction
Source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
self into bytes and writes these bytes into the target.Source§fn get_size_hint(&self) -> usize
fn get_size_hint(&self) -> usize
impl StructuralPartialEq for ExecutedTransaction
Auto Trait Implementations§
impl Freeze for ExecutedTransaction
impl RefUnwindSafe for ExecutedTransaction
impl Send for ExecutedTransaction
impl Sync for ExecutedTransaction
impl Unpin for ExecutedTransaction
impl UnwindSafe for ExecutedTransaction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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 moreSource§impl<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more