RChain concurrency model compared to Ethereum, Cardano and EOS sequential model

Written by fabcotech | Published 2021/05/01
Tech Story Tags: blockchain | smart-contracts | fintech | ethereum | cardano | ethereum-concurrency | cardano-concurrency | eos-concurrency

TLDR RChain is the only smart contract platform that allows for safe concurrent execution of transactions at layer one. The maximum number of transactions that can be executed in one second is around 20 in the case of EOS. RChain uses a new programming language called rholang which follows pi-calculus principles developed by Robin Milner, Joachim Parrow and David Walker in the 90's. The platform is decentralized, with each computer within a network maintaining a replica of the virtual machine (VM)via the TL;DR App

This article discusses the scaling limitations for the widely used smart contract platforms Ethereum, Cardano and EOS. We compare the processing of smart contracts at layer one to RChain’s powerful concurrent computation model and describe how RChain achieves scalability.
A smart contract platform is a virtual machine whose state evolves as transactions are executed over time. A platform is decentralized, with each computer within a network maintaining a replica of the virtual machine (VM). A decentralized network, running multiple VM copies, provides the necessary security in the event one or more program instances fail or become malicious.
Ethereum was the first smart contract platform followed by Cardano and EOS. Each new platform promised to outperform the one before. Ethereum uses Solidity language for smart contracts, while Cardano uses Haskell and EOS, C++. Unfortunately, they all work similarly, following the same paradigm.
Ethereum, EOS and Cardano will or already encounter problems, due to the limited work a single processor can perform and to the fact that many nodes have to reach consensus rapidly every x seconds. The maximum number of transactions that can be executed in one second is around 20 in the case of Ethereum. One might think that upgrading the computers to ultra-fast 128 cores processor machines would resolve the first cause of limited transactions throughput, it does not.
Limitations of Traditional Programming Languages
Smart contracts are just code. Solidity and C++ are object oriented programming languages while Haskell is a functional programming language. The disadvantage of using Solidity, C++ or Haskell for smart contract platforms is easy to understand. There is no way to know if two transactions interact with the same resources, the node cannot know if A then B (sequential execution), B then A (sequential execution), or A and B (concurrent execution) will end up changing the virtual machine state the same way. Before you execute them, transactions are essentially black boxes.
For EOS, ethereum and cardano, the ordering of transactions inside a block is therefore part of the protocol. In order to be sure to reach the same state after execution, all nodes have to run transactions in the same order, one after another. Strict ordering and sequential execution of transactions is the main reason for slow transactional throughput speeds. Smart contract platforms right now cannot scale as the hardware scales.
Rholang to the Rescue
RChain is the only smart contract platform that allows for safe concurrent execution of transactions at layer one. It does so by relying on a new programming language called rholang which follows pi-calculus principles developed by Robin Milner, Joachim Parrow and David Walker in the 90's.
RChain nodes that receive smart contracts in the form of rholang terms (code) are able to statically determine that transactions A, B, C and D are independent, do not interact with the same resources and can therefore be dispatched into multiple processing units (e.g. executed concurrently).
Ethereum, Cardano and EOS platforms have no choice but to limit transaction flow. They are dependent on centralized and adventurous layer two solutions for scaling. RChain, however, achieves vertical scalability. As nodes add computer core processors they gain additional compute power to process transactions faster.
Thanks to its unique approach and concurrency model, RChain platform should outperform Ethereum by one or more orders of magnitude, even with keeping the same level of decentralization.
Dappy is building its whole ecosystem on RChain platform, this article was writtent by myself as the guy building dappy, and as a member of the RChain coop. If you would like to learn more about RChain please visit the rchain.coop website and join the pub-RChain Discord community.

Written by fabcotech | Building Dappy, a ultra-secure no-DNS and no-CAs first of its kind web browser.
Published by HackerNoon on 2021/05/01