Deku is a framework for developing high-performance, application specific sidechains that interop with the Tezos blockchain.
Deku blockchains use a fast, deterministic consensus algorithm based on Tendermint to acheive consensus on blocks. Deku is parametric with respect to the virtual machine being run, allowing developers to write custom virtual machine tailored to their application. SDK's for the VM exist in NodeJS and OCaml, but the VM protocol can be implemented in any language.
Deku has native support for Tezos tickets, allowing virtually any type of asset to be transferred to and from Deku networks via the bridge contract in the timespan of a single Tezos block.
Deku is used to power Deku Canonical - an L2 WebAssembly smart contract platform for Tezos operated by Marigold.
To develop and deploy a WASM smart contract to Deku-C, head over to the Tuna compiler docs.
To develop DApps and client-side applications for Deku networks, see the client library and the the OpenAPI schema. You can fork the Deku-C DApp template to get started developing DApps Deku-C.
To get started developing your own Deku network, you can fork the Deku template.
We currently support building from source on Linux x86_64 and MacOS M1 systems.
Deku is packaged with Nix. See the Nix docs for instructions for your system. Additionally, ensure Nix flakes are enabled.
Once Nix is installed, the dev environment can build built with:
nix develop .
Tests and benchmarks can be run with the respective commands:
nix develop -c dune build @runtest
nix run .#benchmark
Our sandbox network uses Flextesa to run a local Tezos network
via docker compose
. Additionally, our compose file includes a local instance of https://better-call.dev
that can be used to inspect and interact with any contracts you deploy to the Tezos sandbox network.
First, start the Flextesa sandbox. You'll need to login it the Github container registery which you can do by following these instructions.
docker compose up -d
Deku chains are CPU-intensive, so depending on your available resources you may want to lower the default block size (default is 10000 operations/block):
export DEKU_DEFAULT_BLOCK_SIZE=100
You can start the chain with:
./start.sh
This will run nodes listening for gossip on ports 4440, 4441, 4442, and 4443 respectively. Node 0 will also run a user-facing API on port 8080. E.g.:
curl http://localhost:8080/api/v1/chain/blocks/head