Ordering Transactions in a Blockchain
Learn how transactions are propagated in the blockchain.
We'll cover the following
Overview
As outlined in this section, transactions are propagated by a flooding algorithm, such that every transaction passes node by node through the network. However, this approach is problematic since the underlying system is, in fact, a fully asynchronous peer-to-peer network, such that the message order is also asynchronous (cf. this definition
Therefore, there’s no guarantee that the order of transactions that a node receives actually corresponds to the order in which the transactions were originally released. As a consequence, there’s a need to develop a mechanism for the ability to maintain the order of the transactions, whereas the entire network should agree on a single version regarding the history of orders of transactions. Of course, the naive solution is to mark each transaction with a timestamp such that the nodes would be allowed to order them based on an objective criterion, namely time. But this approach doesn’t work because the clocks aren’t synchronized in an asynchronous system.
Definition:
Transactions are the primitives that allow the transfer of value, whereas blocks are used to synchronize the state across all nodes in the network (
Note: From this point of view, a blockchain network is a distributed system that exhibits partial synchrony as we defined in this section.
In the next step, the blocks are connected with each other like a chain, which is typically done with a back-linking pointer from a block to its preceding block, as shown in this figure. This results in an ordered list of blocks and, therefore in a total ordering of transactions. Consequently, we obtain a single, unique history of transactions. This is why a blockchain is also called a ledger of transactions.
Figure 1
Get hands-on with 1400+ tech skills courses.