[][src]Struct exonum_explorer::CommittedTransaction

pub struct CommittedTransaction { /* fields omitted */ }

Information about a particular transaction in the blockchain.

JSON presentation

NameEquivalent typeDescription
messageVerified<AnyTx>Transaction as recorded in the blockchain
locationTxLocationLocation of the transaction in the block
location_proofListProof<Hash>Proof of transaction inclusion into a block
status(custom; see below)Execution status
timeDateTime<Utc>Commitment time*

* By commitment time we mean an approximate commitment time of the block which includes the transaction. This time is a median time of the precommit local times of each validator.

status field

The status field is a more readable representation of the ExecutionStatus type.

For successfully executed transactions, status is equal to

{ "type": "success" }

For transactions that cause an ExecutionError, status contains the error code and an optional description, i.e., has the following type in the TypeScript notation:

type Error = {
  type: 'service_error' | 'core_error' | 'common_error' | 'runtime_error' | 'unexpected_error',
  code?: number,
  description?: string,
  runtime_id: number,
  call_site?: CallSite,

type CallSite = MethodCallSite | HookCallSite;

type MethodCallSite = {
  call_type: 'method',
  instance_id: number,
  interface?: string,
  method_id: number,

type HookCallSite = {
  call_type: 'constructor' | 'before_transactions' | 'after_transactions',
  instance_id: number,


  • Error.type determines the component responsible for the error. Usually, errors are generated by the service code, but they can also be caused by the dispatch logic, runtime associated with the service, or come from another source (unexpected_errors).
  • Error.code is the error code. For service errors, this code is specific to the service instance (which can be obtained from call_site), and for runtime errors - to the runtime. For core errors, the codes are fixed; their meaning can be found in the CoreError docs. The code is present for all error types except unexpected_errors, in which the code is always absent. Besides types listed above, there is also a set of errors that can occur within any context, which are organized in the CommonError.
  • Error.description is an optional human-readable description of the error.
  • Error.runtime_id is the numeric ID of the runtime in which the error has occurred. Note that the runtime is defined for all error types, not just runtime_errors, since for any request it's possible to say which runtime is responsible for its processing.
  • Error.call_site provides most precise known location of the call in which the error has occurred.


impl CommittedTransaction[src]

pub fn message(&self) -> &Verified<AnyTx>[src]

Returns the content of the transaction.

pub fn location(&self) -> &TxLocation[src]

Returns the transaction location in block.

pub fn location_proof(&self) -> &ListProof<Hash>[src]

Returns a proof that transaction is recorded in the blockchain.

pub fn status(&self) -> Result<(), &ExecutionError>[src]

Returns the status of the transaction execution.

pub fn time(&self) -> &DateTime<Utc>[src]

Returns an approximate commit time of the block which includes this transaction.

Trait Implementations

impl Debug for CommittedTransaction[src]

impl<'de> Deserialize<'de> for CommittedTransaction[src]

impl Serialize for CommittedTransaction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,