Learn You Some Canton (34-chapter guide) + canton-rs v0.8.0 (single-binary Rust LocalNet runtime)

Hi everyone — long-time reader here since 2020 (some of my older threads were about Canton multi-node HA and Daml performance).

I’m sharing two independent, open-source (Apache-2.0) community projects I’ve been building for Canton & Daml developers:

1. Learn You Some Canton for Great Good! — 34-Chapter Technical Guide

An illustrated, online technical guide (in English and Korean) walking through Canton and Daml from first principles—from Herstatt risk and Daml privacy / Blinded Merkle trees to BFT ISS ordering, PostgreSQL operations, and Splice/Amulet economics.

2. canton-rs v0.8.0 — Single-Binary Rust Runtime (Pre-1.0 Preview)

While studying the protocol and writing the guide, I also built a zero-JVM Rust runtime that packages Participant, Sequencer (Database & BFT), Mediator, Ledger API v2 (gRPC & HTTP JSON), Splice hosting, PQS projection, and an interactive Canton console into one native executable.

What it does:

  • Loads unmodified .dar archives compiled with official damlc
  • LocalNet DX in one CLI: daemon init / doctor / up / ps / env / snapshot / restore, dar inspect / diff / check-upgrade, canton-rs token (CIP-0112), and console attach
  • Brownfield-safe evaluation beside an existing JVM hub (--port-offset --same-identity --state-in-files)
  • Oracle-tested against official Canton 3.7.2 (PV 36–37), Splice 0.10.1, Wallet SDK 1.7.0, and Scribe 3.5.8 (382/382 JSON API differential cases with 0 diffs; 1,168 scenarios across 4 unmodified Splice DARs with 0 findings; mixed Scala BFT consensus)

Start here (macOS & Linux):

brew install cantonrs/tap/canton-rs
# or
curl -fsSL https://getcantonrs.dev/install.sh | sh

Scope & feedback welcome:
Both projects are independent Apache-2.0 efforts and not affiliated with Digital Asset. canton-rs v0.8.0 is a pre-1.0 preview focused on LocalNet development, CI, and evaluation (not a MainNet production drop-in yet; a zero-side-effect simulate command and parallel canton-rs test runner are in review for an upcoming release).

If you spot any protocol inaccuracies in the guide or run into edge cases with your DARs in canton-rs, I’d really appreciate the feedback!

3 Likes

Hi @yongtaek , I haven’t had a chance to deep dive into either the book or the runtime yet, but both are fantastic contributions to the community, thank you!

As far as I can tell from the docs, canton-rs is in principle usable both as a Sandbox, but also as a standalone validator process. Have you tried running it as a node against Global Synchronizer DevNet already?

Thanks for checking it out. @bernhard

Not yet, I haven’t run canton-rs against the live Global Synchronizer DevNet. So far I’ve only tested wire interoperability locally against official JVM Canton and Splice nodes.

I started both the book and the runtime from my own friction while building and testing on Canton. Setting up the local stack and iterating on Daml contracts felt pretty heavy compared to the fast feedback loops Web3 and smart-contract developers are used to, so my main focus right now is contributing a lighter local dev and CI environment to make getting into Daml and Canton easier.

Running it as a standalone validator against live DevNet (onboarding, live traffic, and long-running peer parity) is the next area I’d like to explore once the local workflow is solid. I’ll share an update here once I actually get to testing it on DevNet.

A useful intermediate step before a full validator on DevNet might be to run canton-rs as a participant-only node against a DevNet sequencer. That isolates ledger and sequencer wire compatibility from onboarding, sponsor/party setup, and validator hosting duties, so mismatches are easier to attribute. If you go straight to a validator, capturing health and peer logs alongside a JVM validator on the same network would make parity issues much easier to diagnose.

Thanks @michaelwhite, that is a clean way to stage it when I get to testing against DevNet.

Starting with a participant-only node against a DevNet sequencer first makes a lot of sense to isolate sequencer and protocol wire parity from Splice validator onboarding and sponsor flows. Running a JVM node side by side for diffing health, topology, and sequencer logs also fits the differential-testing setup I have been using locally against official JVM Canton and Splice nodes.