paint-brush
Meetings with Remarkable Tech: Can RChain Solve Scaling Limitations in Blockchain?by@ralphbenko
1,387 reads
1,387 reads

Meetings with Remarkable Tech: Can RChain Solve Scaling Limitations in Blockchain?

by Ralph BenkoJune 24th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

RChain lets users mount the chain as if it were a local file system, in the same manner that Dropbox and other internet storage solutions do. Users can use their local file browser to drag and drop digital assets onto chain. RChain’s smart contracting language, rholang, is a concurrent smart contract language, it is also a transactional query language integrating the best of. SQL and no-SQL queries can be used in conjunction with digital processing algorithms to search resources on chain on the basis of the resources’ content.
featured image - Meetings with Remarkable Tech: Can RChain Solve Scaling Limitations in Blockchain?
Ralph Benko HackerNoon profile picture

by Lucius Gregory Meredith & Ralph Benko

The internet as originally envisioned by its creators is a decentralized global compute and storage infrastructure accessible by anyone from anywhere in the world. That vision has not been realized, due to the dominance of the de facto gatekeepers. Google, Meta, Apple, Microsoft, Amazon offer socially vital information utilities that are held behind corporate firewalls.

The tantalizing promise of the blockchain to restore the vision has been stymied by blockchain’s scaling limitations. Specifically, existing chains get slower as nodes are added. It is not feasible to store consequential data assets directly on chain. And, if even assets could be stored on chain, no chains offer meaningful search capabilities. Until now. RChain is uniquely qualified to deliver on the promise of the decentralized internet because:

RChain gets faster as you add nodes to the network. 

RChain gets about 1000  transactions per second (tps) per node per CPU. So, a network of 10 nodes, each of which has 10 CPUs, gets 10,000 tps; a network of 20 nodes, each of which has 20 CPUs, gets 20,000 tps; etc. Bitcoin gets 6 or 7 tps. Ethereum gets around 20 tps. And while Solana reports 30,000 tps, if a chain scales, it will not have a fixed tps.

RChain lets you store digital assets directly on chain. 

RChain lets users mount the chain as if it were a local file system, in the same manner that Dropbox and other internet storage solutions do. Thus users can use their local file browser to drag and drop digital assets onto chain. These assets include the usual suspects such as documents, audio, and video data.

Likewise, using their local file browser users can mint these resources as NFTs, and in the case of audio and video data they can stream these data assets back from chain using their locally installed players.

RChain lets you search for digital assets stored on chain. 

For example, in the case of audio data, digital audio recordings of music can be processed to detect tempo, time signature, key, instrumentation, and much more. Song libraries can be searched by their musical content. 

While RChain’s smart contracting language, rholang, is a concurrent smart contracting language, it is also a transactional query language integrating the best of SQL and no-SQL. This query capability can be used in conjunction with digital processing algorithms to search resources on chain on the basis of the resources’ content.

Welcome to Web 3.0. If your interest is piqued, read on.

Preamble to your acquisition of new superpowers. 

What you have in your hand is the secret decoder ring for the most scalable blockchain on planet Earth. 

In a few short sentences you will be able to win friends and defeat rivals with your understanding of key solutions to blockchain’s persistent scaling problems.

In a few more sentences you will find your powers of perception and persuasion increasing as you understand that beyond the first layer of scaling problems – can you add nodes to your network and make it go faster? – there are more challenges. These too can be addressed simply and effectively.

Finally, after acquiring these siddhis you will find yourself bathed in the light of compassion for the suffering users who have been struggling with the stone knives and bearskins that are Bitcoin and Ethereum and the other also-ran solutions. You will discover how Web 3.0 is so much more than scalable blockchain.

Web 3.0 presents a clearly identifiable set of features that bring about the next wave of global information utilities right when they are most needed.

The secret to scaling the blockchain. 

The solution to blockchain’s persistent scaling problems turns out to be the same solution needed to address the problem plaguing the software industry. Concurrency.

It used to be that a programmer could write some C code and sit on her hands for 18 months. Her code would become 2X faster just because the new chipset had come out. That was Moore’s law in a nutshell. That stopped in 2005.

Since then, scaling all software, including blockchain, has been about concurrency. While the industry has struggled to come to grips with this shift, new models of computation (the mobile process calculi of which the π-calculus and rho-calculus are paradigmatic examples) have been developed to take full advantage of this sea change. That’s what RChain is all about.

A programmer can write code in rholang and sit on their hands for 18 months and their code will just get faster.

Yes, RChain’s block merge feature will make their deployment process faster.

Yes, rholang will be updated with the 1.1 optimization release, and that will dramatically speed up rholang code.

But more importantly, the hardware market has been on a 20+ year trajectory — which is only sharpening — to deliver more physical threads per cubic centimeter at lower power consumption and lower cost each development cycle.

This is the new Moore’s law. RChain was made for that.

RChain delivers a model of computing that allows it to get faster as nodes are added to the network, unlike all other blockchains. Currently, RChain gets about 1000 tps per node per CPU.

So, a network of 10 nodes each of which has 10 CPUs gets 10,000 tps; a network of 20 nodes each of which has 20 CPUs gets 20,000 tps; etc.

Basically, RChain’s software (think about it as a virtual computer) uses all the hardware, turning hardware computing capacity into software performance.

Scaling the blockchain was never about some mystical consensus algorithm. It was and is all about concurrency.

The reason is simple: most transactions are isolated. Imagine someone buying empanadas in Santiago while someone else is simultaneously buying grilled tofu in Shanghai.

Almost certainly these transactions are isolated, and so can be run concurrently without any problems. In fact, that’s what happens on today’s financial networks, which is why they scale.

Ethereum and Cardano and Solana and the rest all run these transactions in sequence. That’s why they don’t scale and cannot scale.

RChain runs as many transactions concurrently as possible. It can detect when two transactions step on each other’s toes and sequentializes these. It runs everything else concurrently.

Running as many transactions concurrently as possible means eating all the physical threads you can throw at RChain. And turning that into performance.

Scaling beyond scaling. 

RChain is based on Turing-award-winning computer science and it changes how people think about computing. But let’s keep our eyes on the prize.

The next most important thing to understand about scaling the blockchain is that as soon as you add smart contracting to a blockchain you are adding an entirely new kind of risk.

The core protocol could be written by the angels themselves and yet, because the pesky, fallible humans are adding smart contracts into the mix, very very bad things can happen.

One example of this is the infamous DAO smart contract. That Solidity contract was audited top to bottom and still it contained many serious errors. One, the famous reentrancy error, allowed an exploit which drained $50M worth of ETH from a contract funded with $150M worth of ETH.

None of this had to happen. 30-year-old developments in computer science provide automated safety, liveness, and security guarantees for programs written in the style afforded by a language like rholang. 

As soon as the error happened the RChain team rewrote the buggy DAO contract in rholang and showed that the error would have been caught at compile time. Thus, the buggy code would never have been checked in, let alone deployed.

What saved Ethereum was the fact that it doesn’t scale. At the time it was running at about 7 tps. So, the network had an entire month to rectify the problem. 

If Ethereum had been running at Visa level speeds (some 40K tps) all the ETH would have been drained from the contract in 1 second and the network would have never recovered. So, even were a smart contracting network to get to scalability, it faces the new challenge of defending against egregious user-introduced errors.

None of the incumbent networks are ready for this challenge. Being ready for this challenge has been part of RChain’s design since before Bitcoin was a gleam in Satoshi’s eye. In fact, RChain is 4th generation smart contracting technology, the first generation of which was Microsoft’s BizTalk Process Orchestration. The lead author of this article was the principal architect of that solution which delivered internet scale smart contracts in 2000.

Will the real Web 3.0 please stand up? 

Why do we need a scalable blockchain? To paraphrase James Carville’s admonition to Candidate Bill Clinton: It’s the data, stupid.

When you pick up your mobile device or your laptop, how often are you clicking a button to make a payment versus how often are you engaging an app to do a data transaction? As you read tweets about RChain, and as you tweet about it, you have no click-to-pay event.

Rather, you are engaged in lots of data transactions. Same with Google Maps and Gmail and YouTube and Facebook and Instagram.

Data dominates Internet transactions. Following this basic observation, you want a chain that can do data and compute first and foremost.

That is where the vast majority of the transactions are. Payments, by comparison, are subsidiary.

But what does it mean to do data and compute first? Among other things, it means you can store data assets directly on chain.

RChain just demonstrated storing video data on chain and streaming it back from chain. In fact, RChain demonstrated mounting RChain as if it were a local file system, in the same manner that Dropbox and other internet storage solutions do, and allowing users to drag and drop resources onto chain using their local file browser.

Specifically, users can drag and drop documents, photos, audio files, and video files onto chain.

Further, they can mint these resources as NFTs, using same said local file browser.

And in the case of audio and video data they can stream these data assets back from chain using their locally installed players. Easy to use on chain storage is a necessary condition to making Web 3.0 ubiquitous. Yet, not sufficient.

The other thing that becomes important, and what made the global digital economy, is search.

It’s all very well to be able to store digital assets on chain. For this to be useful, you need to be able to find them again.

Just as Google made it possible to find any resource on the internet — websites, goods, services, people, reviews, analysis — RChain makes it possible to search for digital assets stored on chain, and not just on the basis of metadata but also on the basis of objective algorithmically detectable properties of the digital assets.

For a simple example, in the case of audio data, digital audio recordings of music can be processed to detect tempo, time signature, key, instrumentation, and much more. Song libraries can be searched on the basis of their musical content.

Rholang is not just a concurrent smart contracting language. It is also a transactional query language integrating the best of SQL and no-SQL.

This query capability can be used in conjunction with digital processing algorithms to search resources on chain based on their content.

By way of comparison, platforms like OpenSea keep digital assets associated with NFTs stored off chain in an unsearchable storage mechanism like IPFS behind an unsearchable blockchain, like Ethereum.

This is a step backwards from what users have had from Web 2.0 for over a decade. It will not stand as a viable Web 3.0 solution. RChain takes search capability forward to a Web 3.0 that delivers new and exciting discovery capabilities.

You’ve taken your first step into a larger world.

We could go on and talk about how Web 3.0 needs advertising even more than Web 2.0, and how RChain provides an on-chain decentralized advertising solution that avoids the moral hazards of the nonconsensual collection of personally identifiable or sensitive data.

Instead, we will take this opportunity to remind you that with great power comes great responsibility.

What responsibility are we talking about? The world is beyond the tipping point. Many of the consequences of climate change are now unavoidable. The last two IPCC reports state that unless we take painful and unprecedented action we are going to surpass 2.7C temperature rise in the next 30 years. Barring a miracle, we will not be able to prevent the rise above 1.5C.

Just past 1.5C the tropical zone of the planet becomes uninhabitable. Forty percent of the world’s population lives in the tropical zone. That means that, if the IPCC projections are correct, in 20 years or less, 2.8B people are going to have to relocate. This is a humanitarian crisis the scope and scale of which humanity has never seen before.

With your newfound superpowers, hereby conferred to you by the RChain tech, you will be able to build global telecommunications, compute, storage, and smart power grid solutions that can reroute against the disasters that will threaten Earth’s electronic infrastructure – so that we won’t become isolated, disconnected enclaves. We will be able to remain in dialogue about local and global solutions as we find them to give humanity a fighting chance.

For now, we will leave you here to contemplate your destiny.

Stay free!

Lucius Gregory (Greg) Meredith is president and founder of RChain Cooperative. Greg is a mathematician, and the discoverer of the rho-calculus, a co-inventor of OSLF (Operational Semantics in Logic Form), and the inventor of the ToGL approach to graph theory.

Ralph Benko an advisor to RChain Cooperative, is a former White House official, a lawyer and consultant specializing in Government and Public Relations, Strategic Communications, Law, Finance, and Blockchain. He also serves as senior counselor to the American Blockchain PAC.


Lead Photo by Michael Dziedzic on Unsplash