An efficient base layer for Cartesi Rollups

New POC Proposal

Cartesius: Development of a Cosmos Appchain as a base layer for Cartesi rollups

Core Concept and purpose statement

Cartesi, as an open-source platform, allows developers to use Linux and mainstream software stacks to build scalable DApps. Despite its widespread use, its capabilities can be enhanced to address some potential scalability and interoperability issues. This proposal aims to innovate and redefine the way the Cartesi community interacts with and utilizes rollups.

Our team suggests the creation of a proof-of-concept Cosmos Appchain based on the Cartesi Machine emulator. We are committed to designing and implementing this base layer to function as a high-throughput Data Availability (DA) + ordering layer with capabilities only for limited state transition verification. We believe that introducing a Cosmos Appchain will bring significant benefits to the Cartesi community.

How will you use Cartesi, specifically?

We will be porting the Cartesi machine emulator written in solidity to be used in fraud proof challenges in the appchain

Technical details

A. Cosmos Appchain

The proposed base layer will initially be a port of the Cartesi Machine Solidity step contracts. It is designed to primarily serve as a DA + consensus layer, enhancing throughput and improving the scalability of the network. Additionally, it will have a limited role in state transition verification (ie. only fraud proofs).

B. Permissioned Rollups

We propose deploying all Cartesi rollups on top of the base layer and making them permissioned through on-chain governance. This governance model will allow for community involvement and more democratic control over rollups, ensuring that the network grows sustainably and securely.

C. Economic Security and Initial Bootstrap

The economic security of the proposed base layer will be secured by bridged Cartesi tokens ($CTSI). The initial network will be bootstrapped by burning 1 CTSI token in a public ceremony. The burnt tokens will symbolize community commitment to the development of the network and serve as a symbolic start to the network’s economic security model. Cartesi tokens will then be bridged (eg. through Axelar) and a can be locked/burned for a 1:1 representation minted for the network token. This token can then be staked (by validators, or delegated by users) to provide economic security to the PoS chain.

D. Fraud proofs with slashing

The base layer will be designed to only intervene and trigger expensive computation when a fraud proof for a commitment is submitted. This feature will help maintain a high level of network security while keeping unnecessary computational expenses to a minimum. The initial module will be a direct port of the Cartesi RISC-V Solidity Emulator (GitHub - cartesi/machine-solidity-step: The on-chain implementation of the Cartesi Machine)

Value Proposition

  1. Increased Scalability: With the introduction of a high-throughput DA + consensus layer, Cartesi’s scalability will significantly improve, accommodating more users and more complex applications.
  2. Improved Security: The economic security of the base layer backed by Cartesi tokens and the implementation of fraud proofs will provide an additional layer of security, rather than bootstrapping a network from scratch
  3. Community Governance: Permissioning rollups through on-chain governance will give the Cartesi community a voice in network development and the future of the platform. On-chain governance is a tried and tested module present in the cosmos-sdk, which is available to cartesi token holders from day 1
  4. Interoperability: The use of the Cosmos Appchain protocol will allow for seamless interoperability with other Cosmos-based chains via IBC (Inter-Blockchain Communication Protocol), broadening the utility and application of the Cartesi ecosystem.

By bringing these upgrades to Cartesi, we believe that we can unlock more opportunities for DApp developers and users alike, and contribute to the broader evolution of the blockchain technology landscape.

Estimated Duration and Funds Requested

Milestone 1:

POC to demonstrate the use case of generating a random number with the Convenience tools.

  • Duration: 2 weeks (+1 week)

  • Deliverables:

    1. A golang port of Cartesi RISC-V Solidity Emulator (work underway at GitHub - aerius-labs/cartesi-machine-step-go)
    2. Unit and integration tests
    3. Integrate with a poc appchain with IBC compatibility for CTSI bridging and usage in the larger ecosystem
  • Funds request (USD) for milestone 1: $5000 USD

Milestone 2:

  • Duration: 9 weeks (+1 week)

  • Deliverables:

    1. A functioning appchain with PoA rollups (permissioned nodes)
    2. Permissioning chains and corresponding set of nodes through governance module
    3. Research on single shot and multi-round fraud proofs and try to make a poc
  • Funds request (USD) for milestone 2: $20,000 USD

Total Funds requested - $25,000 USD

Subsequent Vision and Extensibility

For a feature complete appchain, we would integrate the Cartesi machine Emulator directly into the base layer, either callable through a Foreign Function Interface (cgo) EASY but inefficient or by directly porting the Cartesi Emulator to Go DIFFICULT but performant. We would also introduce staking and slashing for rollups, and liquid staking for cartesi tokens, so that they can be used to provide security for the base layer and also used with the rollups to provide complex primitives and use cases.

Reusability and Other Use Cases

The long term project aims to be a fully functioning, high performance base layer for Cartesi rollups, with out of the box governance and inter chain communication

Risks and Contingency Plans

No (apparent) big risks involved with the project, since all of the poc deliverables and long term deliverables are technically feasible given the extensibility of the Cosmos-SDK

Success criteria

A poc appchain with PoA rollups and a mock Cartesi rollup deployed on top of it, correctly permissioned through the governance module

About Your Development team

  1. Rahul Ghangas
    • Role - Protocol Researcher/Engineer (Founder and CEO at Aerius Labs)
  2. Sunil Jalandhra
    • Role - Engineering manager and Cosmos-sdk developer (previously built appchain that served as a trustless poc bridge between NEAR and Cosmos)
  3. Jatin Nagpal
    • Role - Devops (Previously Google)
  4. Yogesh Shahi
    • Role - Golang and typescript developer

ERC-20 Payee address

0x316A9e1A5CDF805C74057385f674977853E97943

8 Likes

Hi, thank you for the proposal, but it does not follow the format of the template that we accept for new grant applications. The template is auto-filled for you when you create a new topic, for your convenience. Please refactor the proposal according to our specified format. Thank you!

Hello!

I find it super cool that you’re building an implementation of the Cartesi Machine in Go! Are you in our discord server? I’m sure you could find people to help out and debate technical stuff there.

I’m super in favor of having more than one implementation of the Cartesi Machine, it’s a very good way of dealing with implementation-specific bugs. Same strategy as the multi-client approach that Ethereum loves.

I really like the idea of having a Cosmos port of Cartesi Rollups and an alternative implementation of the emulator in Go. Could you please adjust the proposal according to Joe’s request?
Pleased to review it again when you do it.

Hey Joe, I have edited the proposal according to the template. Do let me know if we’ve left something out.

cc - @erick.demoura

3 Likes

We’re already in the Cartesi discord, intend to engage in discussion on the appchain design and what modules/functionality the base chain should offer/leverage once our solidity port is done (which is almost nearing completion) GitHub - aerius-labs/cartesi-machine-step-go

I am highly interested in the concept of bringing Cartesi Rollups to the Cosmos ecosystem

Interesting concept, Good luck @rahul.aerius

1 Like

Thanks for adhering to our structured format:)

This type of project is in line with the Community Grants Program’s guidelines as it enhances the technical capabilities of the Cartesi platform and provides a foundation for other devs to continue building on top of it, leveraging not only the strengths of Cartesi tech, but also Cosmos.

A question though- Could you explain in more detail how the economic security model will work, particularly the burning of 1 CTSI token? i.e. How does this translate to economic security for the network?

Thank you for the editing.

Please note that currently, there are only Solidity step contracts available for Cartesi Compute.

The development of arbitration for Cartesi Rollups is still in progress. It is more complex than the step logic of Compute, involving multiple stages and the new emulator microarchitecture. It would be beneficial for you to engage in discussions with other grantee units to gain a better understanding of this topic.

Considering the above, it is not clear how your proposed system can integrate with rollups in its current state. To obtain clarification on this matter, you can reach out to @felipeargento, @milton-cartesi, or @GCdePaula.

Nevertheless, it might be possible to align your project milestones with the progress of Cartesi Rollups. For instance, you could consider developing a simplified version of the Cosmos DApp chain that supports “authority multisig” of permissioned Cartesi nodes. This could serve as an alternative solution until the Solidity Arbitration logic is implemented by the rollups team.

2 Likes

So, the network will initially be bootstrapped with 1 CTSI which will be burned in a public ceremony, and the corresponding will be minted and distributed to validators on genesis. After that, users can bridge cartesi tokens (via Axelar or equivalent bridge for eg) to the appchain. These bridged tokens will then be locked on the appchain, and corresponding native tokens will be minted, which users can then stake with validators to earn yield and provide economic security for the base layer.

It makes sense to have a PoA as an immediate goal, instead of fraud proofs. I will refactor the proposal for the same. However, my team has been working on what a potential fraud proof mechanism would look like, given the high throughput (and relatively cheaper) execution layer offered by a cosmos appchain. We were thinking it could be similar to the approach pursued by Arbitrum, basically bisecting execution steps until the proposing node and the prover disagree on a step. This can be done over multiple blocks, and the challenge period can be parametrized on multiples of epoch/validator set changes

1 Like

Edited to include deployability of PoA rollups through governance. We would like to research a little on a fraud proofs poc as well. Have increased the timeline accordingly, but we understand that fraud proofs might be a larger task and not achievable in the time period, we would still like to take a crack at it (and proceed a conversation with the Cartesi team concurrently as well), since we have already done some research on it and have ideas about the implementation.

What would be the best place to set up a point of communication with the Cartesi team w.r.t fraud proofs?

It is still difficult for me to assess the value of Milestone 1 and the general path toward Arbitration that you propose without some alignment with the team working on rollups. If you haven’t done so, I recommend you connect on Discord with the people I mentioned above or with the Prototype unit (@carlofragni).

You could start the communication about your idea and fraud proofs on the “cartesi-rollups” channel: Discord

1 Like

Hi @erick.demoura , apologies for the radio silence, the team was on a 2 week offsite. I have removed fraud proofs from the milestones, and we will take that discussion with the Prototype unit asynchronously. Even without fraud proofs, we do believe that a base chain for Cartesi rollups with high DA throughput will still be a valuable addition to the Cartesi ecosystem. Meanwhile, fraud proofs can be a longer term goal that can be discussed separately. We’ll be sharing some of our research/review in Discord soon