Follow a transaction’s journey from submission through execution to finality on the Sui blockchain.
Understanding how transactions move through Sui’s system helps you build more efficient applications and debug issues effectively. The lifecycle varies based on whether the transaction uses owned or shared objects.
After execution, the transaction produces effects:
Status
Success or failure with error details
Gas Summary
pub struct GasCostSummary { /// Cost of computation/execution pub computation_cost: u64, /// Storage cost, it's the sum of all storage cost for all objects created or mutated pub storage_cost: u64, /// The amount of storage cost refunded to the user for all objects deleted or mutated pub storage_rebate: u64, /// The fee for the rebate. The portion of the storage rebate kept by the system pub non_refundable_storage_fee: u64,}
/// Summary of the charges in a transaction./// Storage is charged independently of computation./// There are 3 parts to the storage charges:/// `storage_cost`: it is the charge of storage at the time the transaction is executed./// The cost of storage is the number of bytes of the objects being mutated/// multiplied by a variable storage cost per byte/// `storage_rebate`: this is the amount a user gets back when manipulating an object./// The `storage_rebate` is the `storage_cost` for an object minus fees./// `non_refundable_storage_fee`: not all the value of the object storage cost is/// given back to user and there is a small fraction that/// is kept by the system. This value tracks that charge.////// When looking at a gas cost summary the amount charged to the user is/// `computation_cost + storage_cost - storage_rebate`/// and that is the amount that is deducted from the gas coins.
Transactions are grouped into checkpoints for additional finality guarantees:
pub struct ChangeEpoch { /// The next (to become) epoch ID pub epoch: EpochId, /// The protocol version in effect in the new epoch pub protocol_version: ProtocolVersion, /// The total amount of gas charged for storage during the epoch pub storage_charge: u64, /// The total amount of gas charged for computation during the epoch pub computation_charge: u64, /// The amount of storage rebate refunded to the txn senders pub storage_rebate: u64, /// The non-refundable storage fee pub non_refundable_storage_fee: u64, /// Unix timestamp when epoch started pub epoch_start_timestamp_ms: u64,}