Canton 3 Prerequisites: Java, dpm, Docker and Nix Explained | Canton Network Tutorial #02
Code & Test Automation
0:00 / 0:00
Canton 3 Prerequisites: Java, dpm, Docker and Nix Explained | Canton Network Tutorial #02
4 просмотра · 1 дн. назад
Code & Test Automation
17 подписчиков
4 просмотра · 1 дн. назад
Code & Test Automation | / @codetestautomation
What do you need to install before you build on Canton 3? It depends on the path. For Daml development with dpm (dpm new, build, test and the sandbox), the official docs ask for a JDK 17 or newer in JAVA_HOME, and on Apple Silicon, Rosetta 2. The Canton Network Quickstart and its LocalNet add Docker Desktop with 8 GB of memory, curl, direnv and Nix, and WSL 2 on Windows. We check all of it on a real Linux machine with a small read-only script: Java 21 and dpm 1.0.22 are there, Docker, Nix, direnv and make are not. We download the official dpm installer and read what it does, install the Daml SDK 3.6.4 with dpm install, and create, build and test a first project with dpm new, which in SDK 3.6.4 is a multi-package project with a main and a test package. Then we fetch the Quickstart's own toolchain files from GitHub: its Nix shell asks for dpm, JDK 21 and Node.js 20, and its dpm.nix pins dpm 3.5.2. Corrections to older guides: Docker and Nix are not needed for plain Daml development, only for the Quickstart; the networks run 3.6.3 and 3.6.4 while the Quickstart still pins 3.5.2; and the Quickstart also needs make.
Video 2 of 10 in Canton Network Tutorial, for fresher and experienced engineers: what Canton Network and Canton 3 are, the toolchain (dpm, Java, Docker and Nix), the Quickstart and LocalNet, participants, synchronizers and topology, parties and identity, building and running Daml contracts, privacy and sub-transaction visibility, the JSON Ledger API, the Canton Console, logs and debugging, and moving from LocalNet to DevNet.
CHAPTERS
0:00 Introduction
1:06 Two paths, two toolchains
3:27 Java and dpm
5:58 A first project
8:57 Docker, Nix and direnv
13:55 Recap
15:24 Subscribe
HOW THE DEMOS WERE MADE
Every command and terminal output in this video was run for real (Daml SDK 3.6.4 via dpm 1.0.22, Canton 3.6.4 (open-source edition), OpenJDK 21.0.13 2026-10-20 LTS; Debian 13 Linux, 8 CPU, 15 GB RAM, no Docker) in throwaway folders created for this video. Canton nodes were started locally on that machine and bound to 127.0.0.1 only; no account was signed into anywhere, and nothing connected to DevNet, TestNet or MainNet. Timestamps, ids and fingerprints in the output are whatever that run produced. Typed only, not run: Docker, Nix, direnv and make are not installed on the recording machine, so docker info, the Nix installer, nix --version, the direnv hook, direnv allow and wsl --install are shown as typed-only commands, clearly marked, with no output. Everything else ran for real: java -version, the dpm installer's help, dpm install 3.6.4, the prerequisites script, dpm new, dpm build, dpm test, and the downloads of the Quickstart files from GitHub. No account was used and nothing connected to DevNet, TestNet or MainNet. Screens marked REAL SCREENSHOT are real captures of docs.canton.network, taken with headless Chrome 156 (no account, no sign-in) on October 31, 2026. Screens marked TYPED ONLY show commands that were not run on this machine, with no output. Any screen marked ILLUSTRATION is a simplified diagram, not a screenshot or real output.
PRACTICE
Run practice/check-prereqs.sh from this video's project on your own machine and note which path you can use today. Then run dpm new hello-canton, dpm build and dpm test, and add a second check to Test.daml: query Bob's Asset contracts at the end of the script and assert that he holds none.
Practice tip: pause at each terminal and code scene, run the same commands on your own machine, and compare your output with what you see on screen. Ids, fingerprints and timestamps will differ on your machine; the shape of the output should not. Use the SDK version your target network runs (dpm version --all shows the devnet, testnet and mainnet tags).
Next video: #03 Canton Network Quickstart and LocalNet.
#Canton #CantonNetwork #Daml #Blockchain #CodeAndTestAutomation
Subscribe to Code & Test Automation for more Canton, Daml, coding and test automation tutorials: / @codetestautomation