GenArt is a Dapp which allows us to generate madelbrot images in a deterministic fashion.
This project leverages Cartesi-Lambada (wiki) a modular implementation of the Cartesi tech stack where the execution layer is provided by a Cartesi machine and the DA layer is provided by espresso/celestia.
docker run -p 127.0.0.1:8081:8081 -p 127.0.0.1:8080:8080 -p 127.0.0.1:3033:3033 --privileged zippiehq/cartesi-lambada-devkit:1.1
This opens up a code-server development environment in web browser at http://localhost:8081 Inside the code-server you can clone lambada-primes this repo.
Open up a terminal inside the code-server
cd cartesign-lambada && cartesi-build
After the build is successful you will find a State CID which is an IPFS directory where the entire Cartesi machine state is stored along with some crucial information on how data comes into the cartesi machine.
curl http://127.0.0.1:3033/subscribe/<chain CID>
the node now follows your chain
curl -X POST -d 'transaction data' -H "Content-type: application/octet-stream" http://127.0.0.1:3033/submit/<chain CID>
curl http://127.0.0.1:3033/latest/<chain CID>
http://127.0.0.1:8080/ipfs/<chain or state CID>
http://127.0.0.1:8080/ipfs/<chain or state CID>/output/primes.json
All the relevant logs of the Lambada node and the Cartesi machine can be found inside the files of Docker container
tmp/cartesi-machine.log
tmp/lambada.log
tmp/ipfs-base.log
code-server.log