Transaction Lifecycle
Transactions in the æternity blockchain follow a distinct lifecycle from creation to confirmation, influenced by the network's Bitcoin-NG consensus mechanism and micro block structure. Understanding this lifecycle is crucial for developers and users interacting with the network.
Transaction Creation and Signing
The transaction lifecycle begins when a transaction is created and signed by its originator. During creation, the transaction is structured according to its type-specific format and includes essential elements such as the sender's account, nonce, fee, and any type-specific data. The originator signs the transaction using their private key, creating a cryptographic proof of authorization.
Network Propagation
Once signed, transactions enter the network propagation phase. Nodes receiving new transactions perform initial validation checks, verifying the transaction format, signature, and basic requirements like adequate fees and correct nonce values. Valid transactions are added to the node's transaction pool and propagated to peer nodes across the network.
Transaction Pool Management
While transactions wait for inclusion in blocks, they reside in nodes' transaction pools. Nodes maintain these pools, regularly updating transaction status and removing transactions that become invalid or expire. The pool management system prioritizes transactions based on fees and other criteria, helping miners select transactions for inclusion in blocks.
Block Inclusion Process
The Bitcoin-NG consensus model used by æternity creates a unique block inclusion process. Unlike traditional blockchains where transactions are included in proof-of-work blocks, æternity separates leader election (key blocks) from transaction processing (micro blocks). The current leader, elected through key block mining, creates micro blocks containing transactions approximately every three seconds.
Confirmation and State Updates
When a transaction is included in a micro block, it undergoes execution, updating the blockchain state according to its type and parameters. The transaction's effects become visible in the network state, though full confirmation requires additional key blocks to ensure finality. This dual-block structure enables faster transaction processing while maintaining security.
Finality and Reorgs
Transaction finality in æternity considers both micro block acceptance and key block confirmations. While transactions in micro blocks update the state quickly, the possibility of chain reorganizations means that participants should wait for several key block confirmations before considering high-value transactions fully final.
Fork Resolution
During network operation, temporary forks may occur when multiple valid chain versions exist. The network's fork resolution rules determine which chain version prevails, potentially affecting transaction inclusion and ordering. Transactions in orphaned blocks return to transaction pools for inclusion in the winning chain.
State Channel Processing
Transactions within state channels follow a modified lifecycle. They are processed off-chain between channel participants, with only channel opening, dispute resolution, and closing transactions appearing on the main chain. This approach enables high-throughput applications while maintaining security through main chain anchoring.
Transaction Monitoring
Throughout their lifecycle, transactions can be monitored through node APIs and blockchain explorers. These tools provide information about transaction status, including pool inclusion, block inclusion, and confirmation depth, helping users and applications track their transactions' progress through the system.
Last updated