Transaction flow

The transaction flow described here highlights the interaction between nodes in a P2P network layer. The following diagram displays the transaction flow for the Ethereum blockchain:

Blockchain transaction flow

The following bullet points highlight the transaction flow of Ethereum blockchain, as shown in the preceding diagram:

  • Transaction Initiated: A light node or a full node that has an Ethereum client digitally signs and initiates the transaction
  • Local Node Verification: Once the local Ethereum node receives the transaction, the local Ethereum node will perform the following checks:
    • Check the digital signature's consistency with the sender's address and transaction's content
    • Check if the sender has enough gas to fuel the transaction being processed
    • Check if the transaction will result in a smart contract's functions to fail
  • Broadcast to Blockchain Network: Transactions are broadcasted to the blockchain P2P network, where the full nodes will perform the following checks:
    • Repeat the aforementioned validation checks
    • Full nodes communicate with each other 
    • Miner nodes will put the transaction in a pending block and start the consensus (for example, PoW) so that it can try to solve the puzzle
  • Validated, mined, and added to the block: Following steps ensure the block validation and addition to blockchain :
    • Once the transaction is validated and mined, it's added to the valid block
    • The miner will solve the puzzle and find the valid block, which will be added to the blockchain
  • Valid Block added to the Blockchain: The valid block is appended to the blockchain and broadcasted to nodes:
    • The miner node will append the valid block to the blockchain.
    • The miner will broadcast the valid block to nodes.
    • Upon appending the block to the blockchain, the miner will broadcast this to blockchain peer nodes, and each node will again validate the block to ensure the consistency of the current (new) block with the previous block. Once validation is successful, the node will broadcast to its nodes and so on.
  • Transaction Completed: The initiating node will sync the local copy with the blockchain and execute the transaction:
    • Finally, the block reaches the node that initiated the transaction
    • The local node will sync its local copy with the blockchain and will execute the transactions in the block
    • Transaction is marked as completed
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset