Skip to main content
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.

Transaction Lifecycle Overview

1

Transaction Construction

User or application builds a transaction with commands and arguments
2

Signing

Transaction is signed by the sender’s private key
3

Submission

Signed transaction is submitted to a validator or fullnode
4

Validation

Transaction is validated for correctness and gas sufficiency
5

Execution Path Selection

System determines if fast path (owned objects) or consensus path (shared objects) is needed
6

Execution

Transaction executes and produces effects
7

Finalization

Effects are finalized and transaction becomes immutable
8

Indexing

Transaction and effects are indexed for querying

Fast Path vs Consensus Path

Transactions using only owned objects skip consensus:
Benefits:
  • Sub-second finality (~400ms)
  • No consensus overhead
  • Parallel execution
  • Lower latency
Requirements:
  • All objects must be owned by sender
  • No shared objects involved

Transaction Validation

Before execution, transactions undergo multiple validation checks:

Gas Validation

Checks Performed

Gas Price

Must be >= reference gas price and < max gas price

Gas Budget

Sender must have enough SUI in gas coins

Object Ownership

All owned objects must belong to sender

Object Versions

Object versions must match current state

Type Arguments

Type arguments must not exceed depth/count limits

Signature

Transaction signature must be valid

Execution Process

Pre-Execution

  1. Lock Objects: Acquire locks on all input objects
  2. Load State: Read object data from storage
  3. Initialize Gas: Set up gas tracking

Execution

For each command in the transaction:
  1. Charge gas for computation
  2. Execute command (Move call, transfer, etc.)
  3. Update state (modify objects, emit events)
  4. Track changes for gas accounting

Post-Execution

  1. Calculate Storage Costs: Based on object size changes
  2. Apply Storage Rebates: For deleted/modified objects
  3. Update Gas Coin: Deduct total gas cost
  4. Generate Effects: Record all state changes
  5. Release Locks: Free object locks

Transaction Effects

After execution, the transaction produces effects:
Success or failure with error details
  • Created objects
  • Modified objects (with new versions)
  • Deleted objects
  • Wrapped/unwrapped objects
Custom events emitted during execution
Other transactions this one depends on

Gas Computation

Gas is charged for multiple components:

Gas Calculation Formula

Transaction Finality

Transactions achieve finality when:
  1. 2f+1 validators sign the transaction effects
  2. Certificate formed with collected signatures
  3. Immediately final - cannot be reverted
  4. Timeline: ~400ms from submission

Error Handling

Transactions can fail at different stages:

Pre-Execution Errors

  • Invalid signature
  • Insufficient gas
  • Invalid object references
  • Type argument violations

Execution Errors

  • Out of gas
  • Assertion failures
  • Arithmetic overflows
  • Access control violations
Even if a transaction fails during execution, gas is still charged up to the point of failure. This prevents spam attacks.

Checkpoints

Transactions are grouped into checkpoints for additional finality guarantees:

Monitoring Transactions

Query Transaction Status

Wait for Transaction

Best Practices

Always check transaction status before assuming success:
  • Fast path: 1-2 second timeout
  • Consensus path: 5-10 second timeout
  • Network congestion: Add extra buffer
Track actual vs expected gas costs to optimize:
Test transactions before submission:

Transactions

Learn about transaction structure

Gas Pricing

Understand gas costs

Objects

Learn about object model