RChain platform executive summary
The RChain execution model is derived from the syntax and semantics of rho-calculus. The rho-calculus is a variant of the π-calculus that was introduced in 2004 to provide the first model of concurrent computation with reflection. “Rho” stands for reflective, higher-order.
The π-calculus is the first formal system to successfully model networks where nodes may regularly join and drop from the network. It assumes fine-grained concurrency and process communication i.e. two processes may be introduced by a third process.
Rholang is a new language for writing smart contracts that run on the RChain virtual machine.
- Staking tokens are those required to run consensus, including the RChain Rev token. Additional staking tokens may be introduced through official software releases. A staking token is required to pay for node resources.
- Phlogiston is RChain’s measure of the cost of resources (similar to gas in Ethereum), and it is multi-dimensional and depends on usage of compute (depending on instruction), storage (depending on size and duration), and bandwidth (quality-of-service and throughput) resource
Used loosely as ‘contract’, a smart contract is a process with:
- Persistent state
- Associated code
- Associated RChain address(es)
- triggered by messages
- messages are sent by agents
- agents can be either other smart contracts or external systems/users
- messages are sent in named channels
- a transaction is an acknowledgment that a message has been received in a channel
- transactions can be grouped in a transaction block
Named channels are:
- “locations” where otherwise independent processes synchronize.
- used by processes to send and receive messages between each other
- unguessable and anonymous unless deliberately made known by someone
Casper is a group of proof-of-stake algorithms that validate transactions to keep the blockchain consistent.
Storage is asynchronous and decentralised, appears as ‘local’ to nodes.
A variety of data is supported, including public unencrypted json, encrypted BLOBs, or a mix. This data can also be simple pointers (e.g. URLs) or content-hashes referencing off-platform data stored in private, public, or consortium locations and formats.
SpecialK is the name of the tool for data access.
Differences with Ethereum platform
- Rholang and RhoVM both implement concurrency natively -> makes the platform much more scalable (mostly in the sense of number of nodes and transaction throughput)
- Ethereum transactions fail completely if gas runs out midway, and the whole transaction is then rolled back. RChain transactions are much more stateful because they work in steps.