Transaction Lifecycle

Transaction Lifecycle

  1. Creation:

    • A user initiates a transaction by signing it with their private key.

    • The transaction includes inputs, outputs, gas limit, gas price, and a nonce.

  2. Broadcasting:

    • The signed transaction is broadcast to the network nodes.

    • It enters the Mempool, a collection of all unconfirmed transactions.

  3. Validation:

    • Nodes validate the transaction:

      • Syntax and Format: Ensuring the transaction adheres to protocol specifications.

      • Signature Verification: Confirming the authenticity of the sender.

      • Nonce Verification: Checking that the nonce is correct to prevent replay attacks.

      • Gas Limit and Fees: Ensuring the sender has sufficient balance to cover costs.

      • State Checks: Verifying the sender's account balance and contract state.

  4. Inclusion in a Block:

    • Miners select transactions from the mempool based on gas price (fees).

    • Transactions are ordered and included in the candidate block.

  5. Mining and Block Propagation:

    • Miners solve the PoW puzzle to create a new block.

    • The new block is broadcast to the network.

    • Nodes validate the block and update their local copy of the blockchain.

  6. Confirmation:

    • Once a transaction is included in a block and that block is accepted by the network, the transaction is considered confirmed.

    • Due to rapid block times, confirmations occur within seconds.

Last updated