Types
Transaction types in Quai Network.
Overview
Quai Network transactions are split into 3 different types, or categories depending on where they are executed.
- Type 0: Quai Transaction: A transaction executed on the Quai ledger within a single shard.
- Type 1: External Transaction: Transactions that cross shards or serve special network functions, such as miner payouts or Quai/Qi conversions.
- Type 2: Qi Transaction: UTXO style transactions processed on the Qi Ledger.
Type 0: Quai Transaction
Type 0 transactions are transactions that are executed within a single shard on the Quai ledger. They follow a similar format to traditional EVM transactions and can be used to transfer Quai tokens, interact with a smart contract, or deploy a new smart contract.
Structure
type
field is always 0x0
. The etxType
is always empty.Key Properties
- ECDSA signatures (V, R, S)
- Includes
chainID
andnonce
fields for replay protection - Support for EIP-1559 style gas pricing
- Includes
accessList
field for EIP-2930 support
Type 1: External Transaction
Type 1 transactions can be split into 3 sub-types:
- Cross-Shard Transactions: Used for transferring value or data between different shards.
- Coinbase Transactions: Special transactions that payout block rewards and fees.
- Conversion Transactions: Native protocol conversions between Quai and Qi.
Type 1 transactions, regardless of subtype, are never directly initiated by a user. They are always intiated directly by the protocol, following either a Type 0 or Type 2 transferring value across shards, a network designated miner payout, or a Quai/Qi conversion also initiated following a Type 0 or Type 2 transaction.
Structure
Key Properties
- Includes
etxType
property to indicate the transaction sub-type. Available subtypes arecoinbase
,conversion
, andetx
- Contains the
originatingTxHash
to identify the transaction that initiated the Type 1 transaction - Includes
ETXIndex
for ordering multiple external transactions from a single origin - Does not include or require any signatures
Type 2: Qi Transaction
Type 2 transactions are transactions that are executed within a single shard on the Qi ledger. They follow a similar format to traditional UTXO transactions and can be used to transfer Qi tokens of specific denominations.
Qi Transactions utilize previous unspent outputs of an address as inputs for every transaction.
Structure
txType
field is always 2
for Qi transactions.Key Properties
- Uses Schnorr and Musig signatures
- UTXO-like input and output transaction structures
- Does not include gas or data related fields
Was this page helpful?