On June 30th, 2018, aelf launched their much anticipated testnet v1.0 to the public. Due to the complex and revolutionary concepts behind aelf, this process needed to be taken more slowly than other blockchain testnet releases. In aelf’s case, it was crucial that the team work with each component before approaching the next level. One of the foundational layers on which the aelf blockchain is built lies their cluster nodes and parallel processing. As such, this was a primary focus of optimization with the initial launch. Within 4 weeks, the developers have reached an efficient environment where those elements were able to work as intended, and the speed of the network reached 15,000 TPS.
Initially the testnet ran with just the basic aelf blockchain with no optimization on an individual computer. This had a base TPS of 1,800.
From here, the first step was to introduce the parallel processing element. This required a number of smaller components to already be in place, like the scheduler which organizes dependant transactions. You can read more about this here. In essence, this is similar to a program that is able to utilize multiple threads in a CPU. For simplicity, I’ll refer to the blockchain processing streams the same way. By incorporating parallel processing on this computer, this node is now able to process multiple transactions simultaneously through multiple ‘threads’. The development team found that the optimum number of ‘threads’ was 12. At this point, the TPS increased to 6,100. This maximizes the performance of the computer’s and uses its full capabilities and the limiting factor now becomes the hardware of the computer.
This is where the scalability of many blockchains drops off since they run linearly. What this means is that once they have reached the maximum performance for the one computer (node) then the slowest computer (hardware) becomes the limiting factor. In order to improve the overall network performance, the hardware of all nodes would need to be upgraded.
The aelf network removed this limitation through the use of cluster nodes. Instead of upgrading the hardware of the computer, aelf can add another computer to a cluster which essentially makes a single large computer setup in two or more separate locations.
This was the next step to improving the performance of the testnet. It was determined that the performance peaked with 4 servers per node at over 10,200 TPS. This cluster node setup was only made possible through the use of parallel processing. This peak will continue to grow as the network is configured to allow the addition of more servers.
Now that the team had removed the bottleneck created by the hardware, the next hurdle to cross was a little trickier. In basic terms, it related to the writing speed for the database of the blockchain. Since current blockchains run one computer for one full node, this means that the computer not only has to process the transactions but also write the data to file. Obviously, this has its own limitations. Again, aelf’s cluster nodes allow for another approach. Although the fundamentals are the same, and the full database is stored on every node, because a node consists of multiple computers, different devices can process the transactions and the data. Aelf has actually taken this a step further, something no other blockchain has attempted. They have completely separated the database component from the processing component of the blockchain. In an aelf cluster node, there are actually sub-clusters; one sub-cluster prioritises the processing component while another takes care of the database. By separating these two components and organizing designated clusters of computers to each, the team was able improve the speed to a very solid 15,000 TPS.
More Improvements to Come
This is just the beginning, and aelf expects that the performance continues to increase as they add larger nodes and better configuration optimizations. These results clearly show that each component of this initial testnet scenario directly adds to the overall network performance. That is:
· Parallel processing
· Cluster nodes
· Database separation
In the next few phases of testnet improvements, the team will be looking towards the network layer and the Consensus Protocol layer. Aelf has ensured that all codes are available on GitHub and a guide has been created to welcome developers to recreate and improve the above mentioned results.
Mappo has been investing and trading in fiat currencies since 2013. He has recently moved into the crypto world spreading his portfolio over long term coin investments, ICOs and day trading.