An Interview with True Satoshi: Cartesi's Blockchain Computation Layer and its Layer-2 Ambitions

share
An Interview with True Satoshi: Cartesi

On November 21, 2019, Satoshi Nakamoto, Winkrypto, and Cartesi jointly organized the "Talk with Satoshi Nakamoto" AMA event. This AMA invited Cartesi's co-founder, Erick, who detailed Cartesi's solutions, innovations, governance mechanisms, and shared opinions on "other Layer 2 solutions" and "how to build killer applications."

Table of Contents

Here are the questions to Erick and his answers, Enjoy it!

Q1: Can you briefly introduce the Cartesi project? What is the project's vision and what problems does it solve?

Cartesi is an off-chain decentralized computation platform. Its superiority lies in allowing decentralized applications to run directly on the Linux operating system, without being limited by the computational capacity of the blockchain main chain itself and the (expensive) on-chain transaction fees. Complex processing can be executed off-chain, free from the computational restrictions and associated costs of the blockchain.

Cartesi provides a Linux runtime environment, the only software-verifiable off-chain computing system, offering developers access to a vast array of software programs developed over the past 30 years, making it possible for the applications we use on the Internet today.

Q2: Can you explain in detail the relevance of providing Linux and its supported software stack?

All application development is not standalone. The development tools on which current mainstream mobile/desktop/web applications rely have taken decades to mature on Linux and other operating systems.

Cartesi brings all software programs into the blockchain, allowing mainstream developers to easily develop applications. Without Cartesi, blockchain applications cannot use mainstream software, libraries, and services, unless sacrificing the decentralization feature of the blockchain.

In addition to the hindrance of insufficient development software infrastructure, DApps are also known to be limited by on-chain transaction processing capacity (TPS).

Therefore, they find it challenging to provide competitive alternatives to mainstream centralized applications. DApps are often difficult to build, cumbersome, and inflexible, unfriendly to both developers and users.

Cartesi solves these three problems:

  • Provides developers with software and tools with full Linux operating system support;
  • Eliminates the heavy computation of large amounts of data that the blockchain cannot complete;
  • Provides services and token economy, allowing users to securely rely on the network without the inconveniences of blockchain technology (such as slow confirmation times, the need to stay online to resolve disputes, etc.)

Q3: How do you view the impact of Cartesi's new infrastructure on the ecosystem?

Without Cartesi's infrastructure for the ecosystem, it is difficult to imagine the future of decentralized applications.

Cartesi's existence provides infrastructure for decentralized applications. With Cartesi network support, developers find it easier to develop DApps, and users get a user experience equivalent to Internet applications.

Similarly, for mainstream Internet developers to develop decentralized applications, the entry barrier will be lower.

Q4: Can you briefly introduce your background? How did you get involved in cryptocurrencies and blockchain, and under what circumstances did you establish Cartesi?

I have been in the software industry for over 20 years. Usually as an architect and team leader, I have gained rich experience in software best practices and development processes. I have had many opportunities to develop and manage solutions for multiple specific vertical domains.

I started consulting work in 2012 and collaborated with my remote team to create and maintain complex scalable systems. These systems include big data and analytics systems that collect and process data from thousands of mobile and infrastructure network devices, including major telecom companies in South America (such as Oi and Claro), using this data to optimize their engineering and business KPIs.

I began seriously studying cryptocurrencies and blockchain in 2017. I initially participated in a personal project collecting and analyzing cryptocurrency market data, but later, as Cartesi took shape, all my energy and passion went into this project.

It is a great honor to develop it together with my good friend since school days, Diego Nehab. After several discussions with him and Augusto Teixeira, I realized that we were building something very meaningful and interesting.

Q5: Can you briefly explain the working principle of Cartesi? Could you provide some simple examples?

The infrastructure of the blockchain currently and in the future will not support the computations that we currently run on computers or even mobile devices (the famous impossible triangle theory). Typically, computations involved in real business applications include billions or tens of billions of logical steps and massive amounts of data, far exceeding the blockchain's capacity.

We also see many Ethereum competing public chains proposing on-chain scaling solutions, but no public chain has achieved convincing results.

With Cartesi's support, we can truly achieve computation results that run off-chain in a Linux environment and are verifiable on-chain, and are as efficient as real-world computing. DApp users can achieve on-chain consensus in the Cartesi network, and if there is fraudulent behavior, Cartesi network participants will arbitrate on-chain, identifying and punishing dishonest parties.

In very rare cases, when these dispute arbitrations occur, the blockchain can run the original calculation in an interactive verification manner with negligible computational overhead (we use a verification game similar to Truebit to achieve this).

This verification process has a negligible impact on the main chain. Furthermore, unlike other Layer 2 solutions, Cartesi does not necessarily require all participants of the DApp to be online simultaneously. Therefore, the decentralization of the Cartesi platform is user-friendly.

Finally, the Cartesi network and Cartesi's economic model ensure the security and long-term incentives of the network, allowing users to safely and conveniently participate in decentralized applications.

For a complete introduction, please see the article: https://zhuanlan.zhihu.com/p/68021149

For example, I can briefly explain the work we have done for the first DApp. We are currently developing a fully decentralized tower defense game.

We chose to code the game logic using a popular programming language, TypeScript. In fact, we can use any language, framework, or library to develop our DApp without sacrificing decentralization.

With Cartesi's infrastructure, the entire game logic can run off-chain in a fully reproducible virtual machine (VM). The VM is a core component of Cartesi nodes. Each player is represented by their own node they run or a trusted person.

All Cartesi nodes have incentives to reach honest agreements off-chain. Otherwise, if there is malicious behavior, Cartesi nodes ensure that any honest player can defend against dishonest opponents.

In very rare cases, disputes will be resolved through an interactive dispute resolution protocol called "verification game" (similar to the platform relied on by Truebit). This verification game allows the main chain to run a single step of the original calculation with logarithmic overhead for all content processed on-chain.

In addition, disputes are rare because economically incentivized DApp participants interact with the system in the most scalable and cost-effective manner.

Q6: What are the innovations brought by Cartesi, and has it been academically verified?

The biggest innovation brought by Cartesi is the ability to run typical real-world computations off-chain in a Linux environment, verifiable on-chain.

DApp users can achieve off-chain consensus, and if there is an attempt at fraudulent computation, Cartesi will use the blockchain as the supreme court to identify and punish dishonest parties.

Cartesi Core has been researched and developed by two Ph.D. researchers, Diego Nehab and Augusto Teixeira, and reviewed by Cartesi's advisor, Luiz Henrique de Figueiredo. Cartesi is actually an academic research project, and our technical whitepaper has been released, which can be found at: https://cartesi.io/cartesi_whitepaper.pdf

Q7: What is Cartesi's reproducibility? Is it really reproducible in the Linux system and VM?

Cartesi has implemented an independent and deterministic VM that mimics the RISC-V architecture. This means that given a specification of the initial state of the VM (such as input data and the program to run) and considering a given number of processing steps, the VM state advances in the same way precisely, regardless of the system hosting the VM.

RISC-V is an open-source instruction set architecture (ISA) that is designed from scratch to support modern operating systems. RISC-V is not much more complex than smart contract virtual machines, and it is more suitable for running programs we interact with on top of an OS.

The Linux kernel and several Linux distributions (as well as other OS) have already been ported to RISC-V, and RISC-V has mature compilers. This is the best match for the problem Cartesi is trying to solve: bringing real-world computation capabilities into the blockchain.

About RISC-V: RISC-V is an open-source hardware instruction set architecture (ISA) based on the principles of reduced instruction set computing (RISC).

The project started at the University of California, Berkeley in 2010, but many contributors are volunteers not associated with the university.

Q8: What is the verifiability of Cartesi, and is it really secure and trustworthy?

The verifiability component of Cartesi Core allows these complex computations on the blockchain to be arbitrated securely and in a decentralized manner at negligible cost.

In fact, this means that any honest participant of a DApp running on Cartesi can prove to the blockchain that they are correct, even if all other participants are malicious. This is a way users can rely on the blockchain's strong security guarantees when needed.

As mentioned above, Cartesi uses the blockchain as the supreme court to identify and punish dishonest parties. In very rare cases when dispute resolutions occur, the blockchain will run an interactive dispute resolution protocol and allow it to run a single step of the original computation in an interactive manner with logarithmic overhead, while the data processed on-chain can be negligible.

It is secure and trustworthy. To better understand the key principles that make Cartesi secure, we recommend reading our article "About Linux and Blockchain" or technical articles. We are also happy to answer all security-related questions on our Discord channel.

Q9: Is Cartesi a Layer2, and what are the differences between it and other Layer1 or Layer2 solutions, and why was it designed this way?

Current Layer 1 (Layer1) scaling solutions include:

  • DPoS: Let a small set of super nodes validate all transactions, with nodes elected through democratic voting
  • Sharding: Sharing the account ledger into different "shards" and then linking these independent shard chains to the main chain for cross-shard settlements.
  • Various BFT, PBFT: Can achieve faster consensus compared to POW but can only accommodate a limited number of participants.

All these innovations are to enhance the transaction processing capacity of the blockchain, but inevitably, the final confirmation of these transactions still requires global consensus, and when the computational requirements of smart contracts or the number of interacting accounts exceed a certain threshold, even with sharding technology, reaching global consensus will grow superlinearly, thereby severely limiting or making it impractical.

Cartesi is only attempting to achieve local unification of relevant computations, precisely, only stakeholders (or agents chosen by stakeholders) need to execute intensive off-chain computations and have them verified by on-chain contracts to resolve the inherent extreme redundancy of the consensus layer.

Nevertheless, these new Layer 1 solutions can be integrated into Cartesi to combine the advantages of both.

About Layer 2: In fact, Layer 2 solutions have been proposed to improve the performance of the blockchain, such as Plasma, state channels.

However, the essence of these solutions is to allow a large number of transactions to be conducted off-chain and only submit to the chain for final confirmation when needed, or when disputes arise. These solutions typically require the blockchain to resolve any disputes that may arise (when Plasma exits, or state channels are closed).

In the worst-case scenario, these solutions will transmit a large amount of computation to the main chain when the channels are opened, limiting the maximum transaction volume (computational volume), as the main chain cannot effectively address such issues.

However, Cartesi can significantly improve the shortcomings of these technologies, as it allows Plasma or state channels to better utilize the full computational power of Cartesi's virtual machine and efficiently resolve any disputes through the main chain at low cost and efficiently, regardless of how complex the contract is.

Q10: What are the differences between Cartesi and Truebit?

At first glance, Cartesi and TrueBit may seem similar, but in fact, there are significant differences in design decisions.

First, the biggest difference between Trubit and Cartesi is the virtual machine. TrueBit is based on the WebAssembly monster as its virtual machine, WASM is an instruction set architecture (ISA) used to support efficient web applications by the W3C Community Group, while Cartesi is based on the RISC-V open instruction set architecture, a set designed by UC Berkeley for hardware implementation.

TrueBit's technology focuses on improving the computational power of smart contracts, which run in a simple runtime environment. However, as mentioned earlier, the programs we use on the web or devices cannot exist in isolation as they need support from modern operating systems and many software layers.

Our architectural choice allows Cartesi computations to run in the proper place in the operating system. In this environment, more powerful DApps can be developed.

Another issue with TrueBit is that its incentive network is not efficient enough; to maintain the enthusiasm and participation of network members, computations with erroneous results (bait) must be artificially injected into the incentive layer to keep members excited and engaged, a low-efficiency incentive that is a necessary part of TrueBit's design.

Conversely, Cartesi can be seen as a form of offline computation endorsed by smart contracts, where all parties influenced by this endorsement are responsible for executing offline computations, while ensuring full decentralization and user participation privacy.

Q11: What areas does Cartesi's use cases focus on? DeFi, logistics and optimization, or games? How does Cartesi collaborate with other public chains to create these use cases?

Cartesi solves many foundational infrastructure problems of the blockchain, supporting DApps to achieve unprecedented accelerated deployment. Cartesi is not just a simple Layer 2 technical innovation but a highly flexible platform that is very convenient for the decentralized deployment of applications in any industry.

Cartesi's advantage lies in the easy deployment of applications in any industry to become DApps on its platform.

Having said that, our first decentralized application will be the first decentralized tower defense tournament game running on Linux. We believe that games are a simple entry point for the first batch of DApp users, as the blockchain brings many benefits to the gaming industry.

For those interested, please check out our latest article on blockchain games: https://medium.com/cartesi/how-to-make-more-impressive-decentralized-games-120636cb5712

In addition to providing powerful infrastructure for the decentralized gaming ecosystem, we also expect Cartesi to help create powerful open finance applications by allowing the processing of large amounts of real-world financial data using potential complex financial algorithms.

Cartesi was initially built on Ethereum, and our plan is to be not only on a single blockchain in the future. We are seeking strategic partnerships with several public blockchains to benefit each other, rapidly increase adoption, and release killer DApps that the community is looking for.

Q12: How does Cartesi achieve decentralization in the system?

At Cartesi, we are committed to maintaining decentralization guarantees in other aspects. For example, we do not intend to achieve scalability by using "super nodes," but rather want our nodes to run on consumer-grade hardware.

We achieve scalability through locality (as mentioned above, not everyone needs to understand all content in the system).

Q13: What is Cartesi's governance mechanism?

Initially, Cartesi will be managed by the foundation and our Staking/Mining pool release mechanism. As the circulation supply of the Cartesi network comes into full effect, in the absence of a managing entity, the network will evolve towards complete decentralization. The Cartesi foundation will then focus solely on further developing the Cartesi infrastructure.

Q14: How do you view the competition among public chains, and who do you think will be the next generation of public chains?

Although Cartesi was initially built on Ethereum, our long-term goal is to be agnostic to any blockchain, so we do not have to worry about which blockchain will ultimately win.

We believe that there will be some dominant public blockchains in the future, but it is currently difficult to say which one.

Furthermore, developers not related to the blockchain can easily migrate DApps built on Cartesi to any blockchain they desire, which will provide greater flexibility and reduce reliance on building platforms.

Finally, our vision includes making DApp development as close as possible to the experience of coding regular applications using the mainstream software stack supported by Linux today - this will bridge the enormous knowledge gap that exists today with the characteristics of each new blockchain protocol.

Q15: How is the project progressing, when will the mainnet and testnet launch, and what are the related plans?

The Cartesi team has now released and open-sourced Cartesi Core (excluding the DAG feature) as per the technical whitepaper. With this milestone, we have achieved verifiability, which means we can arbitrate a large number of computations correctly on the blockchain at negligible cost in a secure and decentralized manner. Cartesi Core is available for open-source use on Github.

Over the next few weeks, we will release our first DApp - a tower defense game competition. The game demonstrates how to develop fully decentralized games using regular software libraries on Linux, which typically require billions of microprocessor instructions (unable to run on-chain).