Skip to content

Commit

Permalink
fix:grammar,words,punctuations
Browse files Browse the repository at this point in the history
  • Loading branch information
masiedu4 committed Aug 7, 2024
1 parent 5f41825 commit 569215b
Show file tree
Hide file tree
Showing 9 changed files with 173 additions and 167 deletions.
30 changes: 15 additions & 15 deletions cartesi-rollups/core-concepts/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ resources:
title: Dave
---

The Cartesi Rollups framework is designed to enable complex computations off-chain while maintaining the security guarantees of blockchain technology. It consists of two primary components: **the on-chain base layer** (such as Ethereum) where the dApp contract is deployed, and **the off-chain execution layer** where the dApp's backend logic operates.
The Cartesi Rollups framework is designed to enable complex computations off-chain while maintaining the security guarantees of blockchain technology. It consists of two primary components: **the on-chain base layer** (such as Ethereum), where the dApp contract is deployed, and **the off-chain execution layer**, where the dApp's backend logic operates.

A decentralized application (dApp) built on Cartesi incorporates several key elements:

- Cartesi Rollups: A set of _on-chain(rollups contracts)_ and _off-chain(rollups node)_ components that implement an Optimistic Rollup solution, providing the general framework for building dApps.

- Cartesi Machine: A virtual machine (VM) that runs a complete Linux operating system, serving as the environment for executing the dApp's backend.

- Backend: The application's state and verifiable logic, which runs inside the Cartesi Machine as a standard Linux application.
- Backend: The application's state and verifiable logic run inside the Cartesi Machine as a standard Linux application.

- Frontend: The user-facing interface of the application, typically implemented as a web application or a command-line interface tool.
- Frontend: The application’s user-facing interface, typically implemented as a web application or a command-line interface tool.


![img](../../static/img/v1.5/architecture-overview.jpg)
Expand All @@ -41,7 +41,7 @@ Key features of the Cartesi Machine include:

- Scalability: By leveraging significant off-chain computing power, the Cartesi Machine enables complex computations while maintaining blockchain-level security.

- The Cartesi machine is self-contained and can't make an external request. To achieve reproducibility,it runs in isolation from any external influence on the computation.
- The Cartesi machine is self-contained and can't make an external request. It runs in isolation from any external influence on the computation to achieve reproducibility.

The Cartesi Machine achieves its unique balance of scalability and security by performing computations off-chain but providing mechanisms to verify these computations on-chain when necessary.

Expand Down Expand Up @@ -71,10 +71,10 @@ Portal contracts facilitate the secure transfer of assets between the base layer
- [ERC-1155 Single transfers](../rollups-apis/json-rpc/portals/ERC1155SinglePortal.md)
- [ERC-1155 Batch transfers](../rollups-apis/json-rpc/portals/ERC1155BatchPortal.md)

These Portal contracts implement the logic to "teleport" assets safely between layers, maintaining the integrity and ownership of the assets throughout the transfer process.
These Portal contracts implement the logic to "teleport" assets safely between layers, maintaining their integrity and ownership throughout the transfer process.

## Off-chain layer
The off-chain execution layer is centered around the Cartesi Rollups Node, which serves as the crucial middleware between the on-chain contracts and the Cartesi Machine. The node is responsible for:
The off-chain execution layer is centered around the Cartesi Rollups Node, the crucial middleware between the on-chain contracts and the Cartesi Machine. The node is responsible for:

1. Processing inputs: It reads inputs from the base layer and forwards them to the Cartesi Machine for processing.

Expand All @@ -93,7 +93,7 @@ The Cartesi Rollups Node can operate in two primary modes:
**2. Reader Nodes (In Development)**: These nodes focus on advancing the off-chain state and making it publicly available. They consume information from the blockchain but do not participate in the validation process.

:::caution important
Currently, all Cartesi Nodes function as Validator Nodes, with Reader Node functionality under active development.
All Cartesi Nodes function as Validator Nodes, with Reader Node functionality under active development.
:::


Expand All @@ -105,23 +105,23 @@ The Cartesi architecture facilitates several key processes that enable the funct

![img](../../static/img/v1.5/node-advance.jpg)

The advance state process changes the application state and it involves the following steps:
The `advance-state` process changes the application state, and it involves the following steps:

- The application frontend submits an advance-state input to the `InputBox` smart contract on the base layer.

- The node monitors events from the `InputBox` contract and retrieves the input data.

- The node sends the input to the application backend running inside the Cartesi Machine.
- The node sends the input to the application backend inside the Cartesi Machine.

- The Cartesi Machine processes the input and generates verifiable outputs ([vouchers](../rollups-apis/backend/vouchers.md), [notices](../rollups-apis/backend/notices.md), and [reports](../rollups-apis/backend/reports.md)).

- The application frontend can then query these outputs using the node's [GraphQL API](../rollups-apis/graphql/basics.md).
- The application frontend can query these outputs using the node's [GraphQL API](../rollups-apis/graphql/basics.md).

### Inspect state

![img](../../static/img/v1.5/node-inspect.jpg)

The inspect state process allows for querying the application backend without altering its state:
The `inspect-state` process allows for querying the application backend without altering its state:

- The application frontend sends an inspect-state input directly to the Cartesi Node.

Expand All @@ -132,7 +132,7 @@ The inspect state process allows for querying the application backend without al
- The node returns this report to the frontend via a [REST API](../rollups-apis/backend/introduction.md/#advance-and-inspect).

:::note Inspect requests
It's important to note that inspect-state inputs do not produce vouchers or notices, and the current implementation processes inputs sequentially, which may impact scalability for applications heavily reliant on inspect-state functionality.
It's important to note that `inspect-state` inputs do not produce vouchers or notices, and the current implementation processes inputs sequentially, which may impact scalability for applications heavily reliant on inspect-state functionality.
:::

### Validation
Expand All @@ -141,15 +141,15 @@ It's important to note that inspect-state inputs do not produce vouchers or noti

The validation process ensures the integrity of the off-chain computations:

- The Cartesi Node bundles multiple advance-state inputs into an epoch.
- The Cartesi Node bundles multiple `advance-state` inputs into an epoch.

- At the end of an epoch, the node computes a claim summarizing the epoch's state changes.

- The node submits this claim to the Cartesi Rollups smart contracts on the base layer.

- The application frontend can fetch proofs for specific outputs within a closed epoch.

- These proofs can be used to validate outputs on-chain, such as validating notices or executing vouchers.
- These proofs can validate outputs on-chain, such as validating notices or executing vouchers.

## Introducing Dave — an interactive fraud-proof system

Expand All @@ -159,4 +159,4 @@ Dave introduces an approach where the resources required to defend against dispu

With Dave, a single honest participant can effectively defend their claims on-chain, ensuring the integrity of transactions without relying on trust in validators. Based on the [Permissionless Refereed Tournaments algorithm](https://arxiv.org/abs/2212.12439), this protocol empowers anyone to validate rollups and uphold correct states on-chain, enhancing transaction security and reliability.

In a way similar to how a consensus algorithm is crucial for achieving agreement on a single state of the blockchain among all nodes in a base layer chain, Dave plays a fundamental role in ensuring the integrity and trustworthiness of state transitions within Cartesi Rollups.
Similar to how a consensus algorithm is crucial for achieving agreement on a single state of the blockchain among all nodes in a base-layer chain, Dave plays a fundamental role in ensuring the integrity and trustworthiness of state transitions within Cartesi Rollups.
9 changes: 5 additions & 4 deletions cartesi-rollups/core-concepts/mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,16 @@ Developers and users should factor this risk into their decision to use Cartesi
## Security


The Cartesi Rollups infrastructure is being built based on careful design decisions and a strong code review process that aligns with the mainstream dogma of blockchain technology.
The Cartesi Rollups infrastructure is being built based on careful design decisions and a robust code review process that aligns with the mainstream dogma of blockchain technology.

When it comes to dApp safety, the developers must also implement the same level of concern in their process. A culture of code reviews, auditing, and extensively testing their code is paramount to avoid hacks or bugs that would lead to loss of funds from users.
When it comes to dApp safety, developers must also implement the same level of concern in their process. A culture of code reviews, auditing, and extensively testing their code is paramount to avoid hacks or bugs that could lead to user funds being lost.

**The Honeypot** is a dApp designed to demonstrate the security capabilities of Cartesi Rollups.
**The Honeypot** is a dApp designed to demonstrate Cartesi Rollups’ security capabilities.

As the Honeypot is tested and fortified, users and developers will have increased confidence in the security of Cartesi Rollups. Want to help test the security of Cartesi Rollups? [Try your hand at cracking the Honeypot](https://honeypot.cartesi.io/).


## Scams
Like Ethereum, Cartesi Rollups are permissionless—anybody can deploy any smart contract code they want. Interact with contracts on Cartesi Rollups precisely as you do with Ethereum, only doing so if you’ve independently verified that the application is secure.
Like Ethereum, Cartesi Rollups are permissionless—anybody can deploy any smart contract code. You can interact with contracts on Cartesi Rollups precisely as you do with Ethereum, but only if you’ve independently verified that the application is secure.


7 changes: 4 additions & 3 deletions cartesi-rollups/core-concepts/optimistic-rollups.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ A rollup is a blockchain scalability solution that offloads complex computations
When employing rollups, the blockchain receives and logs transactions. In rare instances of an active attack or the involvement of a malicious agent, parties may disagree with a computation’s outcomes, and the blockchain will resolve these disputes. However, it's important to note that disagreements are not expected to occur under normal circumstances.


Users interact with a rollup through transactions on the base layer. They send messages (inputs) to the rollup on-chain smart contracts to define a computation to be processed and, as such, advance the state of the computing environment on the execution layer. Interested parties run an off-chain component (a node on the execution layer) that watches the blockchain for inputs, understanding and executing the state updates.
Users interact with a rollup through transactions on the base layer. They send messages (inputs) to the rollup on-chain smart contracts to define a computation to be processed and, as such, advance the state of the computing environment on the execution layer. Interested parties run an off-chain component (a node on the execution layer) that watches the blockchain for inputs, understanding, and executing the state updates.

Once in a while, the state is checkpointed on the chain, at which point it is considered finalized and can thus be accepted by any smart contract on the base layer.
Once in a while, the state is checkpointed on the chain; at this point, it is considered finalized and can thus be accepted by any smart contract on the base layer.

Ensuring this operation is secure is vital, meaning that the execution layer node must somehow prove the new state to the base layer.

Expand Down Expand Up @@ -54,7 +54,7 @@ This optimism is reinforced by financial incentives that reward honest behavior.

The main advantage of Optimistic Rollups is that they are much cheaper than ZK Rollups. Posting a state update on-chain is minimal, and challenging a state update is also low.

The main disadvantage is that state updates are not immediately final. It takes time for a state update to be fully accepted, and during this period, the state update is considered "optimistic" and can be challenged.
The main disadvantage is that state updates take time to finalize and are not entirely accepted immediately. During this period, they are considered "optimistic" and can be challenged.


## Cartesi Rollups
Expand All @@ -67,3 +67,4 @@ Transactions and computations occur off-chain, leading to more intricate logic w

Cartesi's architecture specializes in app-specific rollups(appchains). Each dApp has its dedicated rollup for off-chain computation, enhancing scalability and performance.


Loading

0 comments on commit 569215b

Please sign in to comment.