Skip to content

Releases

canton-rs v0.9.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 02:59

Summary: canton-rs v0.9.0 introduces a cleaner 13-command hierarchical CLI (with full backward-compatible aliases), an embedded Canton Studio web UI, a read-only MCP server for AI tools, declarative project deployment with remote DAR lockfiles, a full transaction simulation & parallel testing suite, and broad security hardening.

🔒 Security & Integrity

  • Workspace-Wide Security Hardening: Resolved 43 red-team audit findings across protobuf/Daml-LF decoding depth limits, mediator quorum saturation, HTTP/JSON escaping, symlink traversal checks in snapshot/HTML export, and bounded memory limits on long-running server collections.
  • Read-Only Isolation by Default: Both canton-rs ui (Canton Studio Live Inspector) and canton-rs mcp enforce loopback binding by default and block ledger mutations, preventing accidental writes against connected Canton nodes.
  • Verified Remote DAR Lockfiles: canton-rs deploy validates remote https://, gh:, and oci:// DAR artifacts with SHA-256 digests and supports --frozen-lockfile and --offline reproducible deployments.

✨ Highlights & New Features

  • 13-Command Hierarchical CLI (Backward-Compatible): Consolidated 22 flat commands into 13 top-level commands grouped around daily workflows (test, simulate, deploy, ui, mcp, trace, console), cluster/token ops (daemon, token), and 4 domain namespaces (node, dar, splice, db). All 10 legacy commands (participant, sequencer, mediator, json-api, ledger-api, dpm, script, scan, pqs, localnet) remain available as hidden aliases with a single-line stderr deprecation notice (suppressible via CANTON_RS_NO_DEPRECATION_WARNINGS=1) and are scheduled for removal in v1.0.0.
  • Canton Studio Embedded Web UI (canton-rs ui): Zero-Docker, zero-NPM, zero-CDN local web UI combining an isolated In-Memory Lab (Scenarios & Sandbox) with a strictly read-only Live Node Inspector (ACS, SSE updates, DAR browser, node telemetry, and copyable CLI/curl snippets) that works with both canton-rs and existing JVM Canton nodes.
    canton-rs ui --url http://127.0.0.1:7575
  • Read-Only MCP Server (canton-rs mcp): Local stdio and Streamable HTTP Model Context Protocol server exposing read-only ledger, ACS, PQS, DAR inspection, and diagnostics tools for AI coding assistants.
  • Declarative Project Deploy & Remote DARs (canton-rs deploy): One-command idempotent deployment from project profiles with package vetting, party reconciliation, and content-addressed https:// / gh: / oci:// DAR caching.
  • Transaction Simulator, Parallel Test Runner & .simrun Viewer (canton-rs simulate, canton-rs test): Dry-run commands on live or snapshot forks with zero side effects, inspect sequencer traffic byte breakdowns and contention hotspots (--diagnose, --fail-on-contention), run parallel isolated Daml Script suites (--format text|json|junit, --shuffle-seed), and inspect .simrun/1 bundles in a 5-tab TUI or zero-network offline HTML report.
  • SCU Downgrade Warnings, CIP-0056/0112 Presets & OTel Tracing: Added canton-rs dar check-upgrade --downgrade-risk, multi-party synchronizer routing diagnostics, local CIP-0056/0112 pre-approval presets, Terraform-style daemon plan / apply --plan-hash safety gates, and pure-Rust OTLP tracing with canton-rs trace.

🛠️ Fixes & Improvements

  • Supervisor Snapshot & Restore DAR Paths: Normalized relative dars: paths from daemon init --with-sample-dar and bundled .dar artifacts cleanly across daemon snapshot, daemon restore, and simulate --from-snapshot.
  • Accurate SCU Plan Diffs: Updated daemon plan to compare main_package_id via lf_archive instead of raw .dar file SHA-256, eliminating false-positive upgrade warnings on unchanged packages.
  • CLI Flag Consistency: Unified --url / --token-env aliases on db pqs sync, symmetric signer-key aliases on db verify-archive and dar audit-pack verify, and global connection/auth flags across token, daemon contracts, and daemon tx.

📦 Install & Upgrade

macOS & Linux (install.sh)

CANTON_RS_VERSION=v0.9.0 curl -fsSL https://getcantonrs.dev/install.sh | sh

Homebrew (macOS & Linux)

brew upgrade cantonrs/tap/canton-rs

Verify Checksums

shasum -a 256 -c SHA256SUMS --ignore-missing

🧭 Upstream Compatibility & Scope

  • Protocol Compatibility: Canton 3.7.x (PV 36–37) · Daml-LF 2.1–2.4 (default 2.3) · Splice 0.10.x · PostgreSQL 16 (oracle-verified against Canton 3.7.2 and Splice 0.10.1).
  • Known Scope: Deprecated top-level CLI aliases remain functional throughout v0.9.x and will be removed in v1.0.0. canton-rs is a local development, testing, simulation, and compatible runtime tool; it does not replace public Canton Network Global Synchronizer SV operations.

Full Changelog: v0.8.1...v0.9.0

canton-rs v0.8.1

Choose a tag to compare

@github-actions github-actions released this 26 Nov 02:56

canton-rs v0.8.1

Summary: v0.8.1 is a DX and patch release that makes zero-config LocalNet boot work out of the box in any empty directory after brew install or install.sh, adds loopback-safe --dev-auth auto-signing across management CLIs, and fixes built-in smoke-create scenario discovery.

🔒 Security & Integrity

  • Loopback-Only --dev-auth Auto-Signing: daemon snapshot, daemon contracts, daemon tx, and daemon scenario automatically sign short-lived (60-second TTL) HS256 JWTs from the local instance's dev-jwt.key when targeting loopback addresses (127.0.0.1 / localhost) with no explicit token configured. Auto-signing is strictly disabled for non-loopback --url targets.
  • Explicit --token-env / --token-file Auth Override: Added consistent --token-env <VAR> and --token-file <PATH> flags to daemon snapshot, daemon contracts, daemon tx, and daemon scenario so caller-supplied bearer tokens always take precedence over local dev auto-signing.
  • Offline Embedded Sample DAR: The starter sample DAR (sample-contract.dar) is embedded directly inside the checksum-verified canton-rs binary, eliminating unverified remote binary downloads and working fully offline.
  • Mid-Boot Failure Rollback: When a node fails before reaching readiness during daemon up, previously started nodes (sequencer1, mediator1) are automatically stopped so failed launches do not leave orphaned background processes.

✨ New Features

  • Zero-DAR Default Cluster Boot: canton-rs daemon init now emits dars: [] by default, enabling daemon init → daemon doctor → daemon up to succeed in any empty directory outside the source repository. Participants start with an empty package store and accept dynamic DAR uploads via Ledger API v2 (POST /v2/packages) or canton-rs dpm packages.
    canton-rs daemon init -o canton-daemon.yaml
    canton-rs daemon doctor -f canton-daemon.yaml --name dev
    canton-rs daemon up -f canton-daemon.yaml -d --name dev
  • Offline Sample Contract Bootstrapping (--with-sample-dar): Pass --with-sample-dar to canton-rs daemon init to extract the embedded sample-contract.dar (AssetHolding:AssetHolding) next to canton-daemon.yaml and wire it into dars: for immediate contract creation and smoke testing.
    canton-rs daemon init -o canton-daemon.yaml --with-sample-dar
    canton-rs daemon up -f canton-daemon.yaml -d --name dev --dev-auth
    canton-rs daemon scenario run smoke-create --name dev
  • Named Instance Support on daemon scenario: Added --name to canton-rs daemon scenario list and canton-rs daemon scenario run so registered supervisor instances can be targeted by name without passing --state-dir.

🛠️ Fixes & Improvements

  • Live Template Discovery in daemon scenario run smoke-create: Fixed step 2 (submit_create) template resolution by inspecting live GET /v2/packages responses on the running participant. Works with or without --dev-auth, matches AssetHolding and single-party creatable templates, and returns clear remediation diagnostics on zero-DAR stacks.
  • Normalized Relative Path Display: Removed duplicated ././ prefixes from relative paths displayed by daemon config and daemon doctor.
  • Resilient daemon remove --force Cleanup: Handled IPC EOF safely when force-removing partially failed or crashed instances instead of aborting removal.
  • CLI Documentation Alignment: Updated public README.md examples to match exact CLI syntax (canton-rs daemon snapshot --name dev --out dev.tar and canton-rs console attach --state-dir ...).

📦 Install & Upgrade

macOS & Linux (install.sh)

CANTON_RS_VERSION=v0.8.1 curl -fsSL https://getcantonrs.dev/install.sh | sh

Homebrew (macOS & Linux)

brew upgrade cantonrs/tap/canton-rs

Verify Checksums

shasum -a 256 -c SHA256SUMS --ignore-missing
canton-rs --version
canton-rs localnet audit

Supported Prebuilt Targets

Target Platform
x86_64-unknown-linux-gnu Linux x86_64 (glibc 2.31+)
aarch64-unknown-linux-gnu Linux ARM64 (glibc 2.31+)
aarch64-apple-darwin macOS Apple Silicon
x86_64-apple-darwin macOS Intel

🧭 Upstream Compatibility & Scope

  • Target Baseline: Independent Rust implementation oracle-tested against Canton 3.7.2 (Protocol Versions 36–37) · Daml-LF 2.1–2.4 (default 2.3) · Splice 0.10.1 · PostgreSQL 16
  • Known Scope: Pre-1.0 preview intended for LocalNet development, CI testing, and read-only brownfield evaluation. Zero-side-effect transaction simulation (canton-rs simulate) and parallel isolated script testing (canton-rs test) are scheduled for an upcoming v0.9.0 release. MainNet/TestNet live state forking and automatic CC/USD fiat conversion are out of scope.

Full Changelog: v0.8.0...v0.8.1

canton-rs v0.8.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 07:48

canton-rs v0.8.0

First public pre-1.0 preview release of canton-rs—a single-binary, zero-JVM Rust runtime for Canton & Splice covering Participant, Sequencer (Database & BFT), Mediator, LocalNet DX, PQS, and interactive Console.

Pre-1.0 Preview Notice: v0.8.0 is ready for LocalNet development, CI testing, and read-only brownfield evaluation beside existing JVM hubs. See Scope & Upcoming below before production use.


✨ Highlights

Single-Binary LocalNet & Supervisor DX

  • Zero-JVM Local Cluster: Generate a declarative manifest with canton-rs daemon init -o canton-daemon.yaml and boot Sequencer, Mediator, and Participant nodes from one native Rust binary via canton-rs daemon up -f canton-daemon.yaml -d --name dev.
  • Read-Only Host Diagnostics: Run canton-rs daemon doctor -f canton-daemon.yaml --name dev (D1–D10) to validate ports, disk space, PostgreSQL connectivity, and DAR readiness without mutating state.
  • Named Multi-Instance Isolation & Snapshots: Run isolated stacks side by side (--name, --port-offset), export connection endpoints (daemon env), save and restore local ledger state (daemon snapshot / restore), and attach an Erlang-style REPL over daemon.sock (canton-rs console attach).
  • DAR Inspection, CIP-0112 Token CLI & Dev Auth: Built-in dar inspect / diff / check-upgrade, canton-rs token commands, canton-rs script runner, canton-rs pqs projection, and --dev-auth / daemon creds workflow.

🔒 Security & Integrity

  • Loopback-Only Observability Defaults: Supervisor metrics (:9464/metrics) and monitoring templates bind to 127.0.0.1 by default, with authenticated Admin APIs and zero contract payloads exposed in opt-in X-Ray telemetry.
  • Rust Memory & Panic Discipline: Zero production .unwrap() calls across workspace crates, cargo clippy --workspace --all-targets -- -D warnings with 0 warnings, and deterministic BTreeMap/BTreeSet serialization.
  • Oracle-Verified Correctness: Verified against official Canton 3.7.2, Splice 0.10.1, Wallet SDK 1.7.0, and Scribe 3.5.8 oracles (Ledger JSON API v2 382/382 with 0 diffs; 4 unmodified Splice DARs 1,168 scenarios with 0 findings; Wallet SDK 0 gaps; mixed Scala BFT consensus interoperability).

📦 Install

macOS & Linux (install.sh)

curl -fsSL https://getcantonrs.dev/install.sh | sh

Homebrew (macOS & Linux)

brew install cantonrs/tap/canton-rs

Verify Binary & Checksums

shasum -a 256 -c SHA256SUMS --ignore-missing
canton-rs --version
canton-rs localnet audit

Supported Prebuilt Targets

Target Platform
x86_64-unknown-linux-gnu Linux x86_64 (glibc 2.31+)
aarch64-unknown-linux-gnu Linux ARM64 (glibc 2.31+)
aarch64-apple-darwin macOS Apple Silicon
x86_64-apple-darwin macOS Intel

🧭 Protocol Compatibility Target (Oracle-Tested Against)

  • Compatibility Target: Independent Rust implementation oracle-tested against Canton 3.7.2 (Protocol Versions 36–37) · Daml-LF 2.1–2.4 (default 2.3) · Splice 0.10.1 · PostgreSQL 16
  • Scope & Upcoming (v0.8.x / v0.9.0):
    • Zero-side-effect transaction simulator (canton-rs simulate) and parallel isolated script test runner (canton-rs test) are currently in review and scheduled for an upcoming release.
    • MainNet/TestNet live state forking and automatic CC/USD fiat conversion are out of scope.

📚 Links & Contact

Apache-2.0 · Independent open-source project, not affiliated with Digital Asset (Switzerland) GmbH.