April 2022 Development Recap for The Blockchain OS

The latest development updates on the components of The Blockchain OS

Cartesi Foundation
Cartesi
7 min readApr 20, 2022

--

As a recap, please see below our recently released roadmap diagram for an overview of the components of The Blockchain OS:

The Cartesi Machine

The Cartesi Machine is Cartesi’s deterministic virtual machine that emulates a RISC-V architecture and can run a full-fledged Linux OS. It is a groundbreaking technology that offers a runtime for decentralized applications built with mainstream software.

The Microarchitecture

  • The process of integrating the emulator of the microarchitecture for the Cartesi Machine is still ongoing; the source code has been integrated and the tests for RV64I are passing with success. The next step is to give the microarchitecture access to the internal state of the emulator.

Self-Hosted Distributions

  • The first tests in our proof of concept were done in the development environment including some small fixes in order to pass it to the product team, who will test it from a developer experience perspective. This will bring the necessary inputs to define the requirements for the next step which will be working on an Alpine Linux distribution.

Benchmarks

  • Work on the benchmarks is progressing. We have preliminary results comparing our emulator with TinyEMU (we are somewhat slower but this gap can be closed) and QEMU (as expected, we are significantly slower, but QEMU uses JIT; closing this gap would be considerably harder). We will now start working on benchmarks that compare the Cartesi Machine to the EVM.

Improved APIs

  • The new DApp Rollup HTTP API is undergoing integration tests. All examples were already ported to the new architecture.

New Features’ Documentation

  • The documentation of the host view of the Cartesi Machine is progressing. The command-line interface has been almost completely documented. The next step is to document the changes to the Lua interface (C++ and gRPC interfaces are very similar and are not documented independently).

Cartesi Rollups

Cartesi Rollups is Cartesi’s optimistic rollup layer-2 system relying on the Cartesi Machine to allow developers to create scalable decentralized applications with mainstream software components. It consists of on-chain and off-chain components that allow the blockchain to provide data availability, order input data, bridge tokens between layer-1 and layer-2, and serve as a referee in case of disputes.

Road to Mainnet

Four new examples were added in our official examples repo:

  • Converter — An extension of the Echo DApp (our first Python example) that handles complex input in the form of JSON strings in order to perform transformations on text messages.
  • Echo CPP — Implements the same behavior as the Echo DApp, but with a back-end written in C++.
  • K-nn — A Machine Learning Python application that implements the k-Nearest Neighbors supervised classification algorithm, and applies it to the classic Iris flower dataset.
  • M2cgen — A more generic Machine Learning DApp that illustrates how to use the m2cgen (Model to Code Generator) library to easily leverage widely used Python ML tools such as scikit-learn, NumPy, and pandas.

We have been working hard on the Cartesi Rollups Release 0.2.0, which will be our next deliverable. This release will bring significant steps toward what we planned for milestones II (see section DApp Validator Nodes) and III (economics items below).

Related to economics we will bring:

  • Lower gas consumption on DApp deployment because we developed our smart contracts according to the Diamonds design pattern.
  • The Portal component will be responsible for teleporting assets (tokens) from the Ethereum blockchain to DApps running on Cartesi Rollups. It will support ERC-20 and ERC-721 tokens, not to mention, CTSI, ETH, and MATIC too!
  • A Fee manager component that will act as a token pot specific for paying the validators.
  • For the developer experience, there is a huge simplification for the development of the DApp backend code. Currently, on Cartesi Rollups 0.1.0 developers have to write code that acts as both server and client. With Cartesi Rollups 0.2.0 we changed our API in order to allow developers to write code that is only a client of our infrastructure.
  • Last but not least, we have important news related to security. We have been working to make it possible for developers to check if the artifacts we provide are the same as those built by them using our source code. We also added the Cartesi Machine hash as part of the deployment of the DApp smart contracts to enable them in the future, to check that the received proofs come from the expected Cartesi Machine.
  • As presented in the chart below, our development team is very committed to adopting the culture of frequent and small releases to deliver new features and improvements to our community as soon as it is ready. With that, we aim to receive quick feedback that will allow us to improve our solution in a consistent way, and enable our community to follow the progress of our efforts.

DApp Validator Nodes

  • Our infrastructure team did an awesome job and they were able to deploy all of our official examples to our internal infrastructure (Polygon Mumbai + AWS). By doing that they were able to have the first procedure for deployment that will next be exercised by the product team. Stay tuned because Cartesi DApps on testnet (Milestone II — under Road to Mainnet in the diagram) are coming…

Rollups Enhancements

  • From the feedback of our integrators, we are currently reviewing the design of our HTTP API to make it more powerful and easy to use.
  • The README files on our Rollups repository on Github were updated according to new features that will come in our next release (Cartesi Rollups 0.2.0).
  • As we mentioned before, we have four new examples in our official examples repository to help developers in our community understand how Cartesi Rollups DApps works.
  • Don’t forget that you can contribute to the improvement of Cartesi Rollups through our governance forum. Visit the page, check out the existing CIPs (Cartesi Improvement Proposals), participate in the discussion, and/or propose new ones. Welcome!

Support for Computational Oracles

  • We had some solution design discussions, searching for a way to merge Cartesi Rollups and the computational oracle feature on a single code base, or at least define reusable components to avoid effort duplication when maintaining both. It seems promising but the solution is not fully specified yet.

Arbitration for Rollups

  • The Arbitration code is now more robust since we’ve increased test coverage, and we now have an important intermediary functionality on-chain (proving memory accesses to the blockchain) which is required by the arbitration system.

The next steps are to:

  • Finish the splice component that transitions the machine, on-chain, from the end of an input to the beginning of the next one. This work requires some research;
  • Increase robustness and test coverage;
  • Integrate all the individual components (libraries for algebraic data types, partition library, splice library, memory manager, machine step, clock library, and two-party arbitration library).

Automatic Voucher Execution Incentivized by CTSI

  • We started designing how the payment for vouchers would be, where it will come from and how it will be informed to the executors.
  • It is important to mention that this feature depends on the scheduler component.

Transaction Sequencer Incentivized by CTSI

  • The development for the on-chain part is currently in progress and we have already started to research and implement “prototypes” for BLS signature aggregation, which is an important part of this feature.
  • It is important to mention that this feature depends on the scheduler component.

Noether

Noether is Cartesi’s side chain for data availability. It is the part of Cartesi’s solution that will enable blockchain applications to use much more data than would be possible with Ethereum or other base layers.

Noether Version 2.0: Upgrade from PoS to PoS 2.0

  • The on-chain part of PoS 2.0 was completed! We are currently working on the migration from 1.2 to 2.0.

The Scheduler

  • We started to design a solution for the scheduler which will be the base for “Automatic Voucher Execution Incentivized by CTSI” and “Transaction Sequencer Incentivized by CTSI”.

Explorer

  • Continue evaluating alternative backend solutions for the Cartesi Explorer.

Other important updates were:

  • Migration to Onboard.js V2;
  • Display of pool stake maturation;
  • Investigation of very high Infura usage;
  • Test of ankr instead of Infura;
  • Change of subgraph to support pool activity data.

Contribute to The Blockchain OS

Interested in developing with us? We’re always looking for collaborative team players! Feel free to contact us on Discord, check our current career openings, or send your resume along with an introduction to our HR e-mail: hr@cartesi.io.

About Cartesi

The Blockchain OS is a decentralized layer-2 infrastructure that supports Linux and mainstream software components. For the first time, developers can code scalable smart contracts with rich software tools, libraries, and the services they’re used to, bridging the gap between mainstream software and blockchain.

Cartesi is enabling millions of new startups and their developers to use The Blockchain OS and bring Linux applications on board. With a groundbreaking virtual machine, optimistic rollups, and side-chains, Cartesi paves the way for developers of all kinds, to build the next generation of blockchain apps.

Welcome to The Blockchain OS, home to what’s next.

Follow Cartesi across official channels:

Telegram Announcements | Telegram | Discord (Development Community)| Reddit | Twitter | Facebook | Instagram | Youtube | Github | Cartesi Improvement Proposal (CIP) | Website

--

--