レッスン3

Develop on Cartesi

The Cartesi development environment allows developers to use familiar tools and programming languages on the Linux system. This not only simplifies the creation process of complex, scalable decentralized applications (dApps), but also provides powerful off-chain computing capabilities.

How to develop on Cartesi

As mentioned earlier, developers can create dApps on Cartesi using the same tools and languages as conventional software development.

Here are some main tools that developers can use:

Linux-based tools

Developers can write application logic in any Linux-supported programming language, including C, C++, and Python. Cartesi Machine provides a familiar development environment with standard Linux compilers, debuggers, and libraries.

By integrating a full Linux operating system into its virtual machine, Cartesi expands the development ecosystem, with a large number of software tools and libraries that are typically inaccessible on traditional blockchains. This reduces the entry barriers for developers who are proficient in regular software development but unfamiliar with blockchain programming, while also making it possible to develop more complex and feature-rich dApps. Developers can implement complex algorithms, use advanced data processing techniques, and even run AI/ML models in their applications.

Applications developed on Cartesi are cross-compiled to run on Cartesi Machine's RISC-V architecture. Cross-compilation ensures that applications can be executed in Cartesi Machine's deterministic environment, maintaining compatibility and performance.

The development process itself often involves using Docker to containerize Cartesi Machine, allowing developers to isolate their applications and ensure consistency across different stages of development. This helps manage dependencies and maintain a controlled environment.

Smart contract integration

The application logic running on the Cartesi Machine interacts with the on-chain smart contracts. These smart contracts are mainly responsible for three tasks: triggering off-chain computations, processing data inputs, and anchoring the computation results back to the blockchain. The key task for developers is to design efficient smart contracts to properly manage these interaction processes, ensuring the security and integrity of the entire system.

Cartesi advocates modular design, separating computationally intensive tasks from on-chain logic. This allows developers to focus on writing efficient smart contracts while delegating resource-intensive operations to the Cartesi Machine.

Cartesi's innovation

Scalable off-chain computing

Cartesi's off-chain computing model allows dApps to handle large-scale computations without increasing the burden on the blockchain, which is very useful for applications that require a lot of processing power, such as simulation, data analysis, or scientific computing.

Although the computation is performed off-chain, Cartesi ensures the security of the computation results through cryptographic proofs and dispute resolution mechanisms. This approach ensures that off-chain computations are as trustworthy as on-chain operations.

Data availability and management

Cartesi manages data in a scalable and cost-effective way, supporting applications that require ad-hoc access to large amounts of data, without the high cost of on-chain storage.

Noether's decentralized architecture ensures data availability is not controlled by a single party, reducing the risk of data tampering or loss. This helps maintain the integrity and availability of off-chain data, especially in decentralized applications.

How to get started with development on Cartesi?

Developers can start building on Cartesi by setting up the Cartesi Machine, which runs the Linux operating system on the RISC-V architecture. The process includes:

  • Environment Settings:Installing Docker and Python 3 is crucial for running Cartesi dApp examples.
  • Using Cartesi Rollups:Use Cartesi Rollups to create dedicated environments for each dApp, allowing for full Linux operating system usage for off-chain computation.
  • Write code:Develop applications using traditional programming languages (such as Python and C++) to avoid the need to learn specialized blockchain languages.
  • Testing & Deployment:Before deploying to the blockchain, locally test the application in the Cartesi Machine environment, where smart contracts anchor the off-chain computation results.

Advantages of developing on Cartesi

  • Familiar development environment:Reduce the need to learn new languages specific to blockchain development by using mainstream programming languages and tools.
  • Scalability:Off-chain computing lightens the burden of the blockchain, allowing for more scalable and complex dApps.
  • Interoperability:Cartesi is compatible with multiple blockchains, providing flexibility for dApps to choose the underlying blockchain.
  • Complex application support:Cartesi supports the development of complex dApps that require complex file systems, databases, and machine learning models.

inferior position

  • Learning Curve:There may be a learning curve for developers who are unfamiliar with Docker, Linux, or the specific environment of Cartesi.
  • Reliance on off-chain computation:Relying heavily on off-chain computation can present challenges in ensuring data availability and security.
  • Ecosystem Maturity:Cartesi's ecosystem is still growing and may have restricted resources and community support compared to more mature platforms.

Developer Cost

  • Development cost:Cartesi can reduce development costs by using existing tools and libraries.
  • Trading Fees:Developers are required to pay CTSI (Cartesi's native token) as a transaction fee when using Cartesi's services and interacting with the blockchain. These fees are usually lower due to the off-chain computation model.
  • Pledge cost:Developers may need to stake CTSI tokens to participate in the network or ensure data availability and computational integrity. The specific staking requirements depend on the characteristics of their applications.

Highlights

  • Linux-based tools: developers use traditional programming languages (such as Python and C++) on the Linux operating system, which reduces the entry barriers for blockchain development beginners.
  • Smart Contract Integration: Applications built on Cartesi can efficiently interact with smart contracts, manage off-chain computations, and anchor data on the blockchain.
  • Computational Innovation: Cartesi supports scalable off-chain computation and ensures secure and verifiable results through cryptographic proofs.
  • Getting Started: Developers start by setting up Cartesi Machines and using Cartesi Rollups to facilitate the development and deployment of dApps.
  • Advantages and Costs: Cartesi provides scalability, interoperability, and reduced development costs, but requires familiarity with its specific environment and may involve staking CTSI tokens to participate in the network.
免責事項
* 暗号資産投資には重倧なリスクが䌎いたす。泚意しお進めおください。このコヌスは投資アドバむスを目的ずしたものではありたせん。
※ このコヌスはGate Learnに参加しおいるメンバヌが䜜成したものです。䜜成者が共有した意芋はGate Learnを代衚するものではありたせん。
カタログ
レッスン3

Develop on Cartesi

The Cartesi development environment allows developers to use familiar tools and programming languages on the Linux system. This not only simplifies the creation process of complex, scalable decentralized applications (dApps), but also provides powerful off-chain computing capabilities.

How to develop on Cartesi

As mentioned earlier, developers can create dApps on Cartesi using the same tools and languages as conventional software development.

Here are some main tools that developers can use:

Linux-based tools

Developers can write application logic in any Linux-supported programming language, including C, C++, and Python. Cartesi Machine provides a familiar development environment with standard Linux compilers, debuggers, and libraries.

By integrating a full Linux operating system into its virtual machine, Cartesi expands the development ecosystem, with a large number of software tools and libraries that are typically inaccessible on traditional blockchains. This reduces the entry barriers for developers who are proficient in regular software development but unfamiliar with blockchain programming, while also making it possible to develop more complex and feature-rich dApps. Developers can implement complex algorithms, use advanced data processing techniques, and even run AI/ML models in their applications.

Applications developed on Cartesi are cross-compiled to run on Cartesi Machine's RISC-V architecture. Cross-compilation ensures that applications can be executed in Cartesi Machine's deterministic environment, maintaining compatibility and performance.

The development process itself often involves using Docker to containerize Cartesi Machine, allowing developers to isolate their applications and ensure consistency across different stages of development. This helps manage dependencies and maintain a controlled environment.

Smart contract integration

The application logic running on the Cartesi Machine interacts with the on-chain smart contracts. These smart contracts are mainly responsible for three tasks: triggering off-chain computations, processing data inputs, and anchoring the computation results back to the blockchain. The key task for developers is to design efficient smart contracts to properly manage these interaction processes, ensuring the security and integrity of the entire system.

Cartesi advocates modular design, separating computationally intensive tasks from on-chain logic. This allows developers to focus on writing efficient smart contracts while delegating resource-intensive operations to the Cartesi Machine.

Cartesi's innovation

Scalable off-chain computing

Cartesi's off-chain computing model allows dApps to handle large-scale computations without increasing the burden on the blockchain, which is very useful for applications that require a lot of processing power, such as simulation, data analysis, or scientific computing.

Although the computation is performed off-chain, Cartesi ensures the security of the computation results through cryptographic proofs and dispute resolution mechanisms. This approach ensures that off-chain computations are as trustworthy as on-chain operations.

Data availability and management

Cartesi manages data in a scalable and cost-effective way, supporting applications that require ad-hoc access to large amounts of data, without the high cost of on-chain storage.

Noether's decentralized architecture ensures data availability is not controlled by a single party, reducing the risk of data tampering or loss. This helps maintain the integrity and availability of off-chain data, especially in decentralized applications.

How to get started with development on Cartesi?

Developers can start building on Cartesi by setting up the Cartesi Machine, which runs the Linux operating system on the RISC-V architecture. The process includes:

  • Environment Settings:Installing Docker and Python 3 is crucial for running Cartesi dApp examples.
  • Using Cartesi Rollups:Use Cartesi Rollups to create dedicated environments for each dApp, allowing for full Linux operating system usage for off-chain computation.
  • Write code:Develop applications using traditional programming languages (such as Python and C++) to avoid the need to learn specialized blockchain languages.
  • Testing & Deployment:Before deploying to the blockchain, locally test the application in the Cartesi Machine environment, where smart contracts anchor the off-chain computation results.

Advantages of developing on Cartesi

  • Familiar development environment:Reduce the need to learn new languages specific to blockchain development by using mainstream programming languages and tools.
  • Scalability:Off-chain computing lightens the burden of the blockchain, allowing for more scalable and complex dApps.
  • Interoperability:Cartesi is compatible with multiple blockchains, providing flexibility for dApps to choose the underlying blockchain.
  • Complex application support:Cartesi supports the development of complex dApps that require complex file systems, databases, and machine learning models.

inferior position

  • Learning Curve:There may be a learning curve for developers who are unfamiliar with Docker, Linux, or the specific environment of Cartesi.
  • Reliance on off-chain computation:Relying heavily on off-chain computation can present challenges in ensuring data availability and security.
  • Ecosystem Maturity:Cartesi's ecosystem is still growing and may have restricted resources and community support compared to more mature platforms.

Developer Cost

  • Development cost:Cartesi can reduce development costs by using existing tools and libraries.
  • Trading Fees:Developers are required to pay CTSI (Cartesi's native token) as a transaction fee when using Cartesi's services and interacting with the blockchain. These fees are usually lower due to the off-chain computation model.
  • Pledge cost:Developers may need to stake CTSI tokens to participate in the network or ensure data availability and computational integrity. The specific staking requirements depend on the characteristics of their applications.

Highlights

  • Linux-based tools: developers use traditional programming languages (such as Python and C++) on the Linux operating system, which reduces the entry barriers for blockchain development beginners.
  • Smart Contract Integration: Applications built on Cartesi can efficiently interact with smart contracts, manage off-chain computations, and anchor data on the blockchain.
  • Computational Innovation: Cartesi supports scalable off-chain computation and ensures secure and verifiable results through cryptographic proofs.
  • Getting Started: Developers start by setting up Cartesi Machines and using Cartesi Rollups to facilitate the development and deployment of dApps.
  • Advantages and Costs: Cartesi provides scalability, interoperability, and reduced development costs, but requires familiarity with its specific environment and may involve staking CTSI tokens to participate in the network.
免責事項
* 暗号資産投資には重倧なリスクが䌎いたす。泚意しお進めおください。このコヌスは投資アドバむスを目的ずしたものではありたせん。
※ このコヌスはGate Learnに参加しおいるメンバヌが䜜成したものです。䜜成者が共有した意芋はGate Learnを代衚するものではありたせん。