Cartesi: blockchain layers, consensus, and rollups
If you’ve been into the crypto world for some time you may have heard these terms repeteadly from your preferred source of crypto news, but you may not know what are those and why are important. If you don’t, keep reading so can get a grasp of understanding about them.
Consensus algorithms are one of the key features of any blockchain, without them, the computers running the blockchain couldn’t agree on storing blocks and thus we would have just a regular database.
Consensus algorithms can be complex, but the basis is, are a set of rules that each computer of the blockchain (aka validators) must follow in order to mine and store blocks received by the network. Distributed systems (like blockchains) do not rely on a centralized authority that everyone is following as the single source of truth, all members of the network just have to follow the instructions from that source, so it’s simple for the network to work; but several problems are brought by this centralization, like corruption, monopolies, censorship, closeness or lack of resiliency, that’s why blockchain decentralization is such a disruptive technology. On the contrary, distributed systems need to reach to consensus with the majority of the network, in order to take actions, nodes need to be sure that those actions are the right ones to take, and not taking any bad ones introduced by malicious actors in the network. Each node of the network does not know if the actions/information received by other members of the network are true or false, so they get coordinated with the rest of the network by reaching agreements with the majority of the network on what to do (you can read about Byzantine Generals Problem to bet a better understanding on the problematic). This is what consensus algorithms come to play.
Some of the types of consensus algorithms are:
- Proof of Work (PoW): based on loads of computation work that need to be done to prove the autenticity of the information provided to the network. Has been proven to be very secure, but also slow and high energy consuming. Used by first generation blockchain networks such as Bitcoin, Ethereum, or Kadena.
- Proof of Stake (PoS): based on the amount of validator stake (locked tokens) as a proof of authenticity, the more stake a validator has the more trustful it is. Has been proven to be very fast and very low energy consuming, but not as secure as Proof of Work. Used by second generation blockchains like Ethereum 2, Cartesi, Near, Polkadot, Avalanche, Elrond, etc.
- Other types of consensus: Proof of History (PoH) used by Solana, and Proof of Authority (PoA) more oriented to private blockchains.
Blockchain in the first place were built as one independent layer, but can be built with different layers sitting one on top of the other. These layers are used together to form more complex blockchains ecosystems that provide improved connectivity, features and scalability.
- L1: this is the initial implementation of the blockchain and what most people know as a blockchain. Can be deployed and work as a standalone network. Some examples are: Bitcoin, Ethereum, Solana, Cardano, Near, Elrond, Phantom, etc.
- L0: is a layer that seats below the L1 layer, and is designed to interconnect different blockchains, so that they can send back and forth instructions between all the networks interconnected. The most well known examples are: Polkadot, Cosmos, or Avalanche.
- L2: is a layer that seats on top of the L1 layer, and is designed mainly to provide greater application functionality and increase transaction speeds. Some examples are: Cartesi, Lighting Network (Bitcoin), Polygon, Skale, etc.
Maybe new blockchain layers emerge in the future but for now these are the ones forming most of the projects.
L2 and Rollups
As we mentioned in the previous section, L2 blockchains such as Cartesi can provide greater functionality and sustantially increase transaction speeds on L1 blockchains. The thing is that L2 blockchains work along with L1 blockchains, so users interact with the L2 blockchain instead of the L1, and the L2 blockchain is the one in charge of interacting with the L1 blockchain. Because of that, users get the improved experience of interacting with the better features and specs of the L2 but their data finally ends living in the L1, and because of that getting the benefits of both worlds: better functionality, fast transaction speeds and strong security.
But, what are Rollups?
Rollups are an L2 mechanism that was initially proposed for Ethereum to mitigate its scalability problems. In brief, transactions received in the L2 blockchain are aggregated and later submitted in batches to the L1 blockchain and thus paying a much cheaper fee per transaction. Aditionally, as the transactions are sent to the L2, this layer can confirm very fast to the user that the transaction has been finalized correctly, and later the L2 handles the finalization on the L1 transparently, so the user gets a much faster transaction speed than dealing with the L1 directly.
There are two main types of rollups:
- Optimistic rollups: transactions are sent to the optimistic smart contract assuming that the transactions are correct and submit them in batches without performing any computation and providing big scalability improvements. If a fraudulent transaction is detected, the rollup executes a so called fraud proof and runs the correct transaction computation using the data available on Layer 1.
- Zero knowledge rollups (ZK): this ones generate cryptographic proofs that can be used to prove the validity of transactions. Each batch of transactions has its own ‘validity proof’ which is submitted to the main chain. As ZK needs to generate cryptographic proofs are slower than optimistic rollups, but do not need a dispute mechanism to revert fraudulent transactions.
Cartesi a PoS L2 blockchain with Optimistic Rollups
Cartesi is an L2 blockchain that operates connected to Ethereum (can operate connected to other networks too ✌). Cartesi uses a Proof of Stake (PoS) consensus algorithm, and because of that can hadle much more transactions per second than Ethereum itself. Besides from that, Cartesi implements an Optimistic Rollups mechanism, enabling the users to interact with the Ethereum network at much cheaper costs.
In brief, Cartesi provides high transaction speeds, low transaction fees and great security, for implementing Web3 apps that run on Ethereum… or other networks.
Besides that Cartesi brings you the great power of Linux Operating System when developing blockchain apps. In order to get to know what using Linux in dApps mean, please have a read at our previous articles on the topic and understand the real potential of Cartesi in this ecosystem.
Article: What is Cartesi, How it works, and some use cases.
Article: How dApp development benefits from Cartesi?
For more info about the project don’t hesitate to visit Cartesi website and communication channels.
Cartesi - The First Decentralized and Secure Blockchain OS
Cartesi is the first Blockchain OS. It allows developers to build decentralized logic with Linux and standard…
Cartesi is the first OS on the blockchain, and their Layer-2 solution integrates Linux and standard programming…
Join Coinmonks Telegram Channel and Youtube Channel learn about crypto trading and investing