Skip to content

canton-rs v0.8.1

Choose a tag to compare

@github-actions github-actions released this 26 Nov 02:56
· 1 commit to main since this release

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