Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: exception
title: Exception
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The `/exception` endpoint is used to register an exception when the dApp cannot proceed with request processing. This should be the last method called by the dApp backend while processing a request.

When an exception occurs during request processing, the dApp backend should:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: finish
title: Finish
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The `/finish` endpoint is used to indicate that any previous processing has been completed and the backend is ready to handle the next request. The subsequent request is returned as the call's response.

The dApp backend should call the `/finish` endpoint to start processing rollup requests. The Rollup HTTP Server returns the next rollup request in the response body.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: introduction
title: Introduction
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The backend of a Cartesi dApp processes requests in the following manner:

- **Finish** — Called via [`/finish`](./finish.md), indicates that any previous processing has been completed and the backend is ready to handle the next request. The subsequent request is returned as the call's response and can be of the following types:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: notices
title: Notices
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

A notice is a verifiable data declaration that attests to off-chain events or conditions and is accompanied by proof.

Notices provide a mechanism to communicate essential off-chain events from the execution layer to the base layer in a verifiable manner.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: reports
title: Reports
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

Reports are stateless logs, offering a means to record read-only information without changing the state. Primarily used for logging and diagnostic purposes, reports provide valuable insights into the operation and performance of a dApp.

Unlike notices, reports lack any association with proof and are therefore unsuitable for facilitating trustless interactions, such as on-chain processing or convincing independent third parties of dApp outcomes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: DELEGATECALL Opcode
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

Vouchers serve as a mechanism for facilitating on-chain actions initiated in the execution layer.

Imagine vouchers as digital authorization tickets that grant dApps the authority to execute specific actions directly on the base layer. These vouchers encapsulate the details of the desired on-chain action, such as a token swap request or asset transfer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: Application Factory contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **ApplicationFactory** contract is a tool for reliably deploying new instances of the [`Application`](../contracts/application.md) contract with or without a specified salt value for address derivation.

Additionally, it provides a function to calculate the address of a potential new `CartesiDApp` contract based on input parameters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ resources:
title: OpenZeppelin Contracts
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **Application** contract serves as the base layer representation of the application running on the execution layer. The application can interact with other smart contracts through the execution and validation of outputs. These outputs, generated by the application backend on the execution layer, can be proven in the base layer through claims submitted by a consensus contract.

Every Application is subscribed to a consensus contract and governed by a single address (owner). The consensus has the authority to submit claims, which are then used to validate outputs. The owner has complete control over the Application and can replace the consensus at any time. Consequently, users of an Application must trust both the consensus and the application owner. Depending on centralization or ownership concerns, the ownership model can be modified. This process is managed by the consensus contract. For more information about different ownership and consensus models, refer to the [consensus contracts](./consensus/overview.md).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: AbstractConsensus Contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **AbstractConsensus** contract provides an abstract implementation of `IConsensus` with common consensus functionality.

## Functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: AuthorityFactory Contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **AuthorityFactory** contract allows anyone to reliably deploy new `IAuthority` contracts.

## Functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: Authority Contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **Authority** contract implements a single-owner consensus mechanism where only the contract owner can submit and accept claims.

## Functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: IAuthorityFactory Interface
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **IAuthorityFactory** interface defines the contract for deploying new `IAuthority` contracts.

## Events
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: IAuthority Interface
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The `IAuthority` interface defines a consensus contract controlled by a single address, the owner.

## Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: IConsensus Interface
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The `IConsensus` interface defines the main consensus contract behavior for validating and accepting claims submitted by validators.

## Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: IOutputsMerkleRootValidator Interface
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The `IOutputsMerkleRootValidator` interface provides valid outputs Merkle roots for validation.

## Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: Consensus Smart Contracts
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The consensus mechanism in Cartesi Rollups is responsible for validating and accepting claims submitted by validators. These contracts ensure the integrity of the rollup by validating outputs Merkle roots.

## Consensus Contracts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: IQuorumFactory Interface
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **IQuorumFactory** interface defines the contract for deploying new `IQuorum` contracts.

## Events
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: IQuorum Interface
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The `IQuorum` interface defines a consensus model controlled by a small, immutable set of validators.

## Description
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: QuorumFactory Contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **QuorumFactory** contract allows anyone to reliably deploy new `IQuorum` contracts.

## Functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: Quorum Contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **Quorum** contract implements a multi-validator consensus mechanism where claims are accepted when a majority of validators vote in favor.

## Functions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: InputBox contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **InputBox** is a trustless and permissionless contract that receives arbitrary data blobs (called "inputs") from any sender and adds a compound hash to an append-only list (the "input box").

The hash stored on-chain comprises the hash of the input blob, block number, timestamp, input sender address, and input index.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ resources:
title: Smart Contracts for Cartesi Rollups
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The Cartesi Rollups framework consists of components on two layers: the base layer (the foundational blockchain where an application contract is deployed, such as Ethereum) and the execution layer (the Cartesi off-chain layer where the application runs its backend logic).

The frontend interacts with base layer smart contracts to send inputs to the backend, deposit assets, and process outputs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ resources:
title: ERC1155BatchPortal contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **ERC1155BatchPortal** allows anyone to perform batch transfers of
ERC-1155 tokens to a dApp while informing the off-chain machine.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ resources:
title: ERC1155SinglePortal contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **ERC1155SinglePortal** allows anyone to perform single transfers of ERC-1155 tokens to a dApp while informing the off-chain machine.

### `depositSingleERC1155Token()`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ resources:
title: ERC20Portal contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **ERC20Portal** allows anyone to perform transfers of
ERC-20 tokens to a dApp while informing the off-chain machine.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ resources:
title: ERC721Portal contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **ERC721Portal** allows anyone to perform transfers of
ERC-721 tokens to a dApp while informing the off-chain machine.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ resources:
title: EtherPortal contract
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

The **EtherPortal** allows anyone to perform transfers of
Ether to a dApp while informing the off-chain machine.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ resources:
title: Smart Contracts for Cartesi Rollups
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

In a Cartesi dApp, the frontend and backend components communicate through the Rollups framework using HTTP and JSON-RPC APIs.

When designing the APIs for this communication framework, we aimed to ensure that developers could create their applications without excessive concern about the low-level components of Cartesi Rollups.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ hide_title: true
custom_edit_url: null
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

import ApiLogo from "@theme/ApiLogo";
import Heading from "@theme/Heading";
import SchemaTabs from "@theme/SchemaTabs";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ info_path: cartesi-rollups/_versioned_docs/version-2.0/rollups-apis/inspect/insp
custom_edit_url: null
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: methods
title: Methods
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# JSON-RPC API Methods

This page provides a quick reference to all available JSON-RPC methods in the Cartesi Rollups Node API. For each method, you will find:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: applications-get
title: Get Application
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# Get Application

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: applications-list
title: List Applications
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# List Applications

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: epochs-get
title: Get Epoch
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# Get Epoch

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: jsonrpc-epochs-last-accepted
title: Get Last Accepted Epoch Index
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# Get Last Accepted Epoch Index

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: epochs-list
title: List Epochs
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# List Epochs

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: inputs-get
title: Get Input
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# Get Input

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: inputs-list
title: List Inputs
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# List Inputs

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: jsonrpc-inputs-processed-count
title: Get Processed Input Count
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# Get Processed Input Count

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: node-chain-id
title: Get Chain ID
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# Get Chain ID

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: node-version
title: Get Node Version
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# Get Node Version

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: outputs-get
title: Get Output
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# Get Output

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: outputs-list
title: List Outputs
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# List Outputs

## Example Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: reports-get
title: Get Report
---

<!-- Reviewed for Cartesi Rollups v2.0 documentation. -->

# Get Report

## Example Request
Expand Down
Loading
Loading