It may be a common feeling among many people in the cryptocurrency community that with the advent of this bull market in the crypto market, the level of development of blockchain technology by various projects is also rising. The old generation of public chain projects, except for ETH which is expanding because of the application of DeFi, other public chain projects such as EOS, ONT and QTUM are gradually moving away from the core discussion circle of the market, replaced by the new generation of public chain projects such as Polkadot, Near and Solana.
But no matter which generation of projects is old or new, it seems that none of them has really solved the biggest problem of blockchain in large-scale application – “blocking”. From the performance of DeFi ecological development in the past one year, but whenever the market enters a period of fire, the Gas fee on Ether will soar, and the transaction speed has become a practice. The public chain expansion has become the biggest bottleneck in the further development of decentralized finance and the landing of blockchain technology on commercial applications.
The industry has long recognized the performance deficiencies of each public chain, so solutions from different teams from various perspectives have emerged, of which Layer2 and fragmentation are the two most mainstream technical routes.
Although Layer2 solution has also come out of a development path from state channel, side chain, Plasma, ZK-rollup, Optimistic Rollup, and the difficulty of technical development has been rising, the current technology level has never been able to solve the problems of ETH throughput, scalability and security while ensuring de-neutrality. And the slicing method adopted by ETH 2.0 is also much less effective in improving TPS at the cost of losing system availability because of the inability to seamlessly integrate each slice from the technical point of view.
Compared to commercial applications, DeFi is limited by the number of users and the speed of settlement to be considered a very lightweight application. But this is like a mirror reflecting the biggest obstacles that existing public chains encounter in front of large-scale promotion: 1.
- the efficiency of scaling without concurrent execution is very low for Layer2 only or for partitioning.
- even if Layer 2 is adopted, slicing and cross-chaining, what we get is just a bunch of separate sub-chains that cannot collaborate seamlessly with each other.
- the use of fast formal verification to ensure the security of the contract is still an insurmountable mountain.
However, with the recent technical progress of RChain project, there is hope that these problems faced by the current public chain can be completely solved.
The light of the industry comes out of the circle, the only public chain project invited to the IFF conference
In the words of Lucius Gregory Meredith (hereinafter referred to as Greg), the founder of RChain, RChain is to become a decentralized world computer. Essentially, it is another project aiming to beat Ether. In fact, after the rise of Ether, Greg felt that Ether based on the Turing Machine (EVM) system could not become the world computer due to its inherent defects, so he lobbied V-God to adopt the Rho algorithm, which V-God did not adopt due to historical baggage such as the difficulty of adjusting the big car, and that’s why RChain is now.
RChain solves many problems that plague the development of public chains through the revolutionary Rho algorithm, making it possible to make universal computing on the chain for the first time. Based on the fast conflict detection of Rho algorithm and Casper CBC consensus, all nodes can concurrently send out blocks to reach consensus, and for the first time, it achieves single-partition scalability, making it possible to directly upload big data to the chain without the need of IPFS.
Meanwhile, the Rho algorithm-based inter-partition synchronous consensus ensures the atomicity of cross-partition contract calls, allowing inter-partition interaction and collaboration to be seamless for the first time. And its behavior type system can complete fast formal verification under concurrency and slicing, and complete secure and orderly orchestration of a large number of on-chain contracts. rchain’s unique technical route makes it an excellent choice for building the world’s computers.
In terms of applications, the RChain project had its clear direction early on to become a decentralized world computer that can coordinate solutions to global climate change, which is also the core vision of RChain. With an abundance of community development talent and no shortage of whimsical ideas, it also provides ETH contract code one-click conversion tools to facilitate the ecological migration of ETH.
Greg has said at an AMA event, “Climate change is an existential threat to all. The persistence of our global team is dedicated to making this technology a reality in order to make a collaborative technology that is of great significance to the survival of humanity.” It is in this spirit of great love that RChain joined the UN Climate Chain Alliance very early on to promote the use of blockchain technology for climate change mitigation and adaptation.
Based on RChain’s long-term exploration and efforts in the field of blockchain technology for global cooperation in climate monitoring, as well as its innovative attempts in the development of blockchain technology, RChain was invited as the only public chain project to participate in the International Finance Forum (IFF) http://www.iff.org.cn/ Spring Meeting 2021 on May 29-30 this year. RChain is the only public chain project invited to participate in the IFF Spring Conference 2021. In this year’s IFF Spring Conference, for the first time, there was a panel dedicated to digital currency. In the conference, Greg, the founder of RChain, shared the latest progress and technical development direction about RChain, and participated in the discussion on research and exploration of how to promote the digital transformation and development of enterprises, especially the manufacturing industry. He also discussed the relationship between the central bank’s legal tender and digital currency, the function, positioning and application prospect of digital currency with the participating experts.
It is worth mentioning that the International Financial Forum (IFF) is one of the highest international financial summits held in China, and is known as the “F20 (Finance 20)” of the global financial sector. The current chairman of the conference is Zhou Xiaochuan, former governor of the People’s Bank of China. This time, RChain, as the only public chain project invited to participate in the conference, came out of the circle to participate in such a high-profile summit to share cutting-edge innovation technology, which is the first time in the industry. From this, we can also see that although there is speculative chaos in the blockchain industry as an emerging industry, projects that truly pursue technological innovation to solve the pain points of the industry and society will be more recognized by the mainstream society with the precipitation of time.
Technical superiority of RChain
Concurrent execution and block merging
If we generalize Ethernet as a virtual machine, then RChain is a virtual machine with upgraded execution structure. Imagine a highway with a single lane at the beginning and end, no matter how many lanes are parallel in the middle, the overall traffic efficiency of this highway is very low. This is exactly the problem that most public chains have at present.
Although Layer2 can solve the efficiency of transaction execution in the middle part, each Layer2 still has to return to the “single lane” when packaging transactions on the chain. Nowadays, most of the splitting schemes do not support synchronous confirmation across splitting, which is equivalent to many lanes but vehicles cannot change lanes, so the throughput goes up, but the availability drops greatly. Therefore, we need to implement concurrent logic in data transmission, i.e., many nodes can simultaneously issue blocks for other nodes to vote to confirm, so that there will be a sibling relationship between the blocks issued at the same time, making the final formation of DAG structure between blocks.
DAG: Directed Acyclic Graph, which means “directed acyclic graph” in Chinese, is a computer data storage structure, which is like a woolen scarf that can be woven all the time. Benefits: high confirmation time, high throughput, high decentralization, etc. A directed acyclic graph is a way of storing data. “Directed” means that all data is stored in the same direction; “acyclic” means that there is no loop between data structures.
To use an example from life, DAG is equivalent to a traffic network connected by one-way lines, and those one-way lines are connected to each other to form many intersections, but the general direction is the same, so you will not go backwards when you drive on it. Here “one-way” means “directional” and “no backtracking” means “no loop”.
From the perspective of blockchain, the DAG structure is that countless chains are interwoven according to certain rules (no conflicting transactions), and the chains are growing in the same general direction, and there are no loops.
Implementing a DAG structure opens up the possibility of public chains to concurrently issue blocks, which becomes the basis for scaling. However, this is not enough, in order to achieve real scaling, a mechanism is needed to handle this DAG concurrently by virtual machines. This is an important point that distinguishes RChain from other DAG-based projects such as Conflux and Fantom.
Block merging is a very unique design in RChain technology. In mainstream public chain technology, the emphasis is on sequential transaction processing, because there is no concurrent virtual machine, so all transactions received can only be sequenced in some way and then processed sequentially. Block merging, on the other hand, gives the system concurrent execution capabilities. Blocks can be merged into a new state on the chain as long as they are non-conflicting, and new blocks can be created on them, and these non-conflicting blocks can be executed concurrently.
For example, a node can see blocks 1, 2, and 3, and then it prepares its own block 4. As long as there is no conflict between blocks 1, 2, and 3, it can consider blocks 1, 2, and 3 as a whole, and then add block 4 as their sub-blocks to the whole DAG. This process is called “block merging”. It is important to note that the determination of whether blocks 1, 2, and 3 are in conflict is very fast, not by running the transactions in them, but by simply analyzing the characteristics of the Rho algorithm in them.
Block merging can enable each node in the blockchain to continuously issue blocks, confirm, execute transactions, and update status in a concurrent manner, dynamically allowing the whole network consensus to the same DAG, which is truly to eliminate the sequential bottleneck of the traditional blockchain and make unlimited scaling within a single slice possible for the first time.
Partitioning vs. concurrency
On the basis of a clear DAG structure, we also need to distinguish the concepts of slicing and concurrency.
Slicing is a concept inherited from databases, which means that a large database is sliced into many small, processable chunks to improve system performance.
In a blockchain that uses sharding, the entire network’s general ledger is similarly sliced into many subledgers. The nodes in the network are similarly sliced into many groups, and each group is equivalent to an independent blockchain that is responsible for maintaining the corresponding subledger. So each node is only responsible for processing transactions on the corresponding sub-ledger. Finally each sub-group forms a master ledger by way of communication between chains, and in this way the scaling of the main chain throughput is accomplished.
In RChain’s thinking, the concept of a slice is closer to a process. If the blockchain is compared to a global computer, then a slice is similar to an application (process) running on this computer, while the concept of concurrency is more like multiple threads.
A thread is similar to a lightweight sub-process, which is a processing unit one level below the process, and each process can create many threads to run simultaneously. Multi-threading can take advantage of the multiple cores of modern CPUs, while taking advantage of the idle time of a thread waiting for long IO to switch to other threads to run, increasing the overall execution speed. In RChain’s design philosophy, a blockchain consensus on a transaction is similar to a very long delayed IO operation, and using multi-threaded concurrent execution to process a large number of transactions simultaneously is the ideal way to increase system throughput.
RChain believes that slicing is not the best solution to improve the TPS of public chains, because the main purpose of slicing, like process, is to expand the “memory space” of the system, increase the number of applications running on it, and isolate the resources of each application. To really increase the speed of each application, it is necessary to increase the processing power within a single slice, which requires a concurrent way of working. In a nutshell, a slice on the blockchain corresponds to the way tasks are organized in a computer with multiple processes, while concurrency on the chain corresponds to the way single tasks are accelerated in a computer with multiple threads.
After using concurrency to help scale a single slice, the next issue is interoperability between the slices.
Currently, there are two options for consensus on cross-slice transactions: synchronous consensus and asynchronous consensus. rchain belongs to the former, while ETH2.0, DOT, etc. belong to the latter.
The difference between the two lies in the sequential nature of verification. Synchronous consensus, that is, cross-slice transactions need to be approved by the verifiers of both slices at the same time and passed at once, ensuring the atomicity of cross-chain transactions. Asynchronous consensus, on the other hand, splits cross-slice transactions into two stages of submission, with each slice processing only its own portion. This does not guarantee the atomicity of transactions and may create problems.
The atomicity of transactions means that instead of splitting cross-chain transactions into multiple ones and letting each slice confirm them individually, the transactions as a whole let the involved slices confirm them simultaneously, and either they all pass or they all fail. For example, if two people exchange Token A in Slice A for Token B in Slice B, then under a synchronous consensus protocol, the transaction is verified and approved by both Slice A and B and returned at the same time, so that the atomicity of the transaction is guaranteed and there is no problem. If we use the asynchronous consensus protocol, we need to transfer Token A in Slice A first, but the balance of this transfer is temporarily unavailable, and the system temporarily locks and generates a receipt. Then Slice B receives this receipt, and then completes the transfer of Token B. Finally Slice A unlocks that transfer from Token A and makes the balance available. If Token B does not complete the transfer within a certain amount of time, Slice A cancels the transaction for Token A and rolls it back. As you can see, asynchronous consensus that cuts off atomicity not only makes cross-chain transactions very complex, but also requires contracts to provide locking and rollback mechanisms, which greatly increases the complexity of writing cross-chain contracts in general.
However, the basis of synchronous consensus implementation still requires the implementation of block merging. It is because of block merging that the small DAGs of different fractions can be spliced into a total DAG like Lego blocks, which is equivalent to the ability of traffic to change lanes on a highway with many lanes. On the contrary, blockchain without fast merging ability to do synchronous cross-chain consensus is like a multi-lane highway, once a car needs to change lanes, it must compress the multi-lane into a single lane, the efficiency will be greatly reduced and the scalability will disappear.
Fast and low-cost formal verification
Because the contract on public chain involves very high economic value, the code quality of the contract has very high requirements and needs to achieve “zero fault tolerance”. Formal verification is the most fundamental quality assurance solution. Formal verification is a mathematical method to prove that the code is bug-free under any conditions and runs according to the designed scheme.
The formal verification of traditional blockchain projects requires first translating the code of the contract into a mathematical language such as pre-conditions and post-conditions, and then using machine theorem proving to check whether this code satisfies the specified characteristics. Formal verification under concurrency generally uses tools like TLA+ to first abstract the mathematical language of state and state transfer, and then exhaustively enumerate to see if it can be shown that the specified result can be obtained regardless of the execution path. Both of these are not scalable and expensive, greatly limiting the popularity of blockchains.
RChain’s contract language Rholang is based on the Rho algorithm, which is itself a mathematical language that can be logically derived, saving a lot of manual conversion steps to mathematical models. In addition, the behavioral type system built on the OSLF algorithm can automatically and quickly complete formal proofs by means of type checking. That is, as soon as a piece of Rholang code passes a certain type check, then the properties corresponding to that type check are satisfied, e.g., no conflicts and deadlocks are generated, no granted privileges are revealed to third parties, etc. This kind of formal verification based on the type system of behavior can accomplish the secure and orderly orchestration of a large number of on-chain contracts at scale.
At this point, I’m sure many of the technical terms mentioned in this article have been a real headache, but the industry depends on this kind of professional and solid technical advancement. As Greg intended for RChain, it was designed from the beginning as a trustless, completely de-neutralized world computer, a world database, not just a payment network. It was designed to allow grassroots, self-organizing communities to flourish on this planet. Such an ambitious vision must require innovative technology to support it.
Finally, let’s summarize the technical features of RChain in the simplest words again: based on the concurrent virtual machine based on Rho algorithm, it implements block merging technology to make on-chain concurrency a reality and solve the scaling problem within a single slice; and realizes seamless interoperability across slice based on synchronous consensus; and scales up the safe and orderly orchestration of contracts with a behavior type system. These solve the three major problems plaguing the development of current public chains: intra-single-partition concurrency, seamless partitioning, and fast formal verification. At least for now, RChain can be one of the must-have technologies for future large-scale blockchain applications.
Posted by:CoinYuppie，Reprinted with attribution to:https://coinyuppie.com/public-chain-expansion-is-imminent-and-rchain-will-be-an-ice-breaker-to-solve-large-scale-applications/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.