As described in detail in the Descartes SDK section, a Descartes DApp requires that a certain set of components and resources be available in order to effectively run. There are numerous alternative topologies in which this architecture can be deployed depending on the users' interests and resources. Moreover, the DApp can also choose from a range of supported blockchain networks on which the Descartes smart contracts are deployed and available.
However, for the purposes of these tutorials (and general rapid Descartes DApp prototyping), the Cartesi team has provided a ready-to-use Descartes SDK Environment with all the on-chain and off-chain components necessary to build a Descartes DApp out-of-the-box. This environment is configured for a scenario with two actors, denominated
bob, who will respectively perform the roles of claimer and challenger for all Descartes computations.
The Descartes SDK Environment basically consists of a Docker Compose specification that spins up services corresponding to the components described below.
The environment starts up a local blockchain network using Ganache CLI, which is accessible on port
8545. This network instance comes pre-installed with exactly two accounts, one for
alice and one for
bob, with addresses respectively at
Moreover, the network is instantiated with all the Descartes smart contracts already deployed. As such, these smart contracts are readily available for our tutorial DApps to use.
For each of the two actors,
bob, the environment provides a corresponding off-chain Descartes node, which is responsible for carrying out computations on their behalf. In practice, each node is composed of a number of internal services, but DApp developers can safely abstract away these details completely.
The Descartes SDK Environment is available on the Descartes Tutorials GitHub repo.
You can download and extract a ready-to-use artifact by executing:
wget https://github.com/cartesi/descartes-tutorials/releases/download/v0.2.0/descartes-env-0.2.0.tar.gztar -xzvf descartes-env-0.2.0.tar.gz
Then, start it up by running:
cd descartes-envdocker-compose up