The first generation of network consensus was sequential, as the blockchain has a linear structure. Sequential processing is a manifestation of every new technology. Low efficiency usually prevents mass adoption or greater use of the technology. In history, you can find many technologies where parallelism led to higher adoption or efficiency. We will show a few examples. Already today we can see examples of parallelization in the blockchain industry. Cardano has several trumps up its sleeve.
Characteristics of the Sequential System
In computer technology, a sequential system is one where operations are performed one after the other in a specific order. Tasks or instructions are executed one at a time, in the order they are received or programmed.
Sequential systems typically involve a single processor, which executes one instruction at a time. They are typically deterministic, meaning that given the same input, they will always produce the same output. This is because the order of execution is fixed and does not change.
Synchronization is inherent because each operation must be completed before the next one begins. There’s no need for explicit synchronization mechanisms like locks or semaphores that are required in parallel systems to prevent race conditions.
In general, it can be said that sequential systems are simpler to understand, design, and implement. They are deterministic and do not have synchronization issues. However, their biggest disadvantage is low performance, which is limited by the speed of the single processor executing the instructions.
Improving performance in a sequential system typically involves increasing the speed of the processor or optimizing the code to reduce the number of instructions. They may not scale well with increasing workloads because all tasks must be processed one at a time. Resources may be underutilized.
A common decentralized network with a simple network consensus, to which Cardano currently belongs, has both sequential and parallel aspects. However, projects may differ in a few details.
Blockchain has a linear structure. A new block is always appended after the previous block. The current version of Ouroboros PoS is sequential in nature, as one new block is produced at regular intervals. Bitcoin and Ethereum are the same in this regard. The difference is only in the length of the time interval.
There are many nodes (CPUs) in a distributed network, but due to block production timing, a new block is produced by one node at a time. Each node in the network may have similar transactions in the mem-pool (which may have arrived in a different order), but only transactions from one mem-pool are used during block production. Diffusion of the block in the network takes place in parallel.
Characteristics of the Parallel System
A parallel system refers to a system where multiple tasks or operations are executed simultaneously, ie at the same time. These systems typically require the involvement of multiple processors or cores, which can execute different tasks simultaneously.
Parallel systems support concurrency, where several tasks appear to run at the same time. Synchronization mechanisms like locks or semaphores are often used to prevent race conditions and ensure that concurrent threads run mutually exclusive operations correctly.
Parallel systems can better utilize the capabilities of multi-core processors or distributed computing resources. It improves performance and scalability. However, this also brings several technological challenges. Parallel systems are generally more complex to design and implement than sequential systems due to the need for synchronization and communication between concurrent tasks. Synchronization and communication can pose significant overhead which can reduce performance gains.
The current Ethereum PoS involves a form of parallelism where many validators attest to a proposed block. A new block is approved by many validators before it is added to the blockchain. However, this approval process does not mean that the block is finalized. Ethereum's consensus mechanism can validate blocks more efficiently and reduce time-to-finality dramatically.
Finality refers to the point at which transactions in a block are considered irreversible.
Both Bitcoin and Cardano use a probabilistic consensus mechanism, which means that the finality of transactions is probabilistic and increases with every newly added block. Finality is achieved in a sequential manner as each new block added to the chain increases the finality of previous transactions. This can be considered a slow and inefficient process (which, however, has other advantages, such as robustness).
In Ethereum, the finality is more explicit and can be achieved more quickly. A block is considered finalized when it has been included in the chain and enough validators have attested to its validity. This process can be done in parallel as different validators can attest to different blocks at the same time.
This is one example of how parallelization can make network consensus more efficient.
Parallelization Brings Efficiency and Adoption
I believe that one of the reasons for the current low adoption of blockchain networks is hindered by low scalability and efficiency. Global decentralized transaction networks or even decentralized applications (mainly DeFi) are a sound concept that can disrupt many industries and push the capabilities of the Internet to a new level. The implementation of other elements of parallelization will enable a higher adoption of blockchain networks within a decade (or two).
Let's take a look back in history at some technologies that were sequential in the beginning and that parallelism helped to gain greater adoption and use.
Do you know what the first connection between computers looked like? It was sequential. A single path was used to transmit data between two points. Data (bytes) were sent sequentially from point A to point B. If the Internet was like that, it would never have taken off. Modern networks use multipath routing techniques to transmit data over multiple paths concurrently. It can increase bandwidth by creating multiple transmission queues. It also provides a degree of fault tolerance.
In traditional HDDs, data is read sequentially from a spinning disk. The discs had one reading (and writing) head that had to be positioned at the place where the data was located. Data was mostly stored sequentially so that it could be read in one go. However, with the advent of RAID (Redundant Array of Independent Disks) technology, data can be distributed across multiple drives and read or written in parallel, significantly improving performance.
Traditional CPUs were single-core, meaning they could only process one operation at a time. When it was necessary to work on multiple tasks in parallel, the CPUs had to quickly switch between individual tasks (mostly UI and some other tasks). Modern CPUs are multi-core, meaning they can process multiple operations simultaneously by dividing the workload among multiple cores. Thanks to this, it is possible to listen to a song, download data from the Internet, write a message, and have an antivirus running in the background.
A traditional database system processes queries in a sequential manner. This means that when a query is executed, the database system retrieves or updates data one record at a time. For example, if you're running a query to fetch data from a table with a million records, the database system would scan through each record one by one until it finds the records that match the query criteria. However, as data volumes have grown, this sequential approach has become less efficient. In a parallel database, when a query is executed, the database system divides the data into subsets and processes each subset concurrently.
Multiplexing is a method by which multiple analog or digital signals are combined into one signal over a shared medium. The aim is to share a scarce resource – a physical transmission medium. For example, in telecommunications, several telephone calls may be carried out using one wire. The multiplexed signal is transmitted over a communication channel such as a cable. The multiplexing divides the capacity of the communication channel into several logical channels, one for each message signal or data stream to be transferred. A reverse process, known as demultiplexing, extracts the original channels on the receiver end.
There are many more similar examples, and elements of parallelization can be found in almost every modern technology, especially in the world of computers and networks.
Achieving network consensus in a decentralized network is very inefficient. Inefficiency increases with the number of nodes between which consensus occurs because mutual communication is necessary. This sequential processing can become a bottleneck when the network is handling a large volume of transactions. The sequential nature of block production can limit the speed at which transactions are confirmed and added to the blockchain.
Let's look at possible forms of parallelization in the blockchain industry.
Parallelization in the Blockchain Industry
There are more options to achieve higher parallelization in the blockchain industry. Layered architecture appears to be a simpler solution.
Layered architecture is a method of organizing systems into separate layers, where each layer provides services to the layer above it and uses services from the layer below it.
A more complex solution is the effort to achieve parallelization on the first layer, i.e. in the network consensus of the blockchain.
The layered architecture allows for parallel processing of transactions, improving scalability and efficiency. However, the second layers (it is still early for the third layers) are still quite significantly dependent on the scalability of the blockchain. Transferring assets back and forth between layers usually requires on-chain transactions.
Transaction processing in the second layer is not dependent on the network consensus of the first layer (blockchain). Different second layers can have different characters. Higher scalability is usually achieved at the cost of lower decentralization and security.
Parallelization in Hydra or Lightning Network occurs by creating communication channels between users. Transactions in channels are verified only by the users to whom the transactions relate. Lightning Network will allow to opening of one channel between 2 participants. Hydra will allow users to open multiple channels for a smaller number of participants.
Thus, multiple parallel transactions in different channels can take place at the same time. Since the channels are independent of each other, nodes do not block each other in verifying transactions.
Sidechains and Rollups are other solutions that enable parallel processing of transactions and execution of smart contracts. Processing is done off-chain, but there is still a dependency on on-chain transactions. Each type of second layer has some advantages and disadvantages, and it is difficult to predict which type will be the most popular in the future.
Communication between layers is still a potential bottleneck. If the blockchain network consensus does not scale well, it may be difficult for users to take advantage of the second layer. Thus, second layers may not be the final solution, and teams must achieve higher parallelization at the network consensus level.
Technologies such as Input Endorsers or sharding enable higher parallelization of network consensus.
Input Endorser enables separation of selection and pre-validation of transactions from block production. In the network, there are several types of blocks on which nodes can work in parallel. Each type of block has a different purpose. There is some dependency between all block types and only one block type is used to maintain linearity. Computing resources are better utilized in the network and Input Endorsers increase transaction throughput.
Sharding is a technique where the network is divided into smaller parts (or shards), each of which is able to process transactions and smart contracts independently. This allows for a degree of parallelism, as transactions in different shards can be processed simultaneously. However, shards are still dependent on each other and therefore inter-shard communication occurs. It is necessary to maintain a uniform global state throughout the system, i.e. across shards.
Cardano has a certain advantage due to the fact that the team decided to use the UTxO accounting model. With this model, it is relatively easy to achieve higher parallelization of the network consensus. Validation of transactions and smart contracts are largely independent of each other. The UTxO model made it easy for the team to design Input Endorsers.
On the other hand, this model is a challenge for application developers. Ideally, they should consider designing applications with an awareness of parallelization. It may take some time before we see applications that fully utilize the potential of parallelization.
Ethereum is more sequential in this regard. Building an application is relatively easy, and teams don't have to deal with concurrency. On the other hand, it can be difficult to achieve higher parallelization of the system.
Parallelization has had a profound impact on the world. Without parallelization, many of the technological advances we see today would not have been possible. The ability to perform multiple tasks simultaneously has been crucial in handling the increasing volumes of data generated in our digital age.
Parallel computing has enabled the development of high-performance computers and servers that can handle large volumes of data and perform complex computations quickly. It is fundamental to the training of complex AI models. Parallelization in networking has significantly improved the speed, reliability, and efficiency of data transmission and processing. Currently, many teams, including IOG, use parallelization techniques to improve the scalability and efficiency of blockchain networks. This will enable the wider use of this technology and the disruption of many industries, essentially in a similar way to how computers or the Internet succeeded in the past.