Co-Pilot
Updated 3 months ago

canton-network-repos

00xBigBoss
0.0k
0xBigBoss/claude-code/.claude/skills/canton-network-repos
82
Agent Score

πŸ’‘ Summary

This skill provides insights into the Canton Network, DAML, and Splice repositories for compatibility and debugging.

🎯 Target Audience

DAML developersBlockchain engineersProject managers in decentralized applicationsTechnical support teamsOpen-source contributors

πŸ€– AI Roast: β€œPowerful, but the setup might scare off the impatient.”

Security AnalysisMedium Risk

Risk: Medium. Review: shell/CLI command execution; outbound network access (SSRF, data egress); API keys/tokens handling and storage. Run with least privilege and audit before enabling in production.


name: canton-network-repos description: Canton Network, DAML, and Splice repository knowledge. Use when working with Canton participants, DAML smart contracts, Splice applications, LF version compatibility, or package ID mismatches. Triggers on Canton, DAML, Splice, decentralized-canton-sync, or LF version queries.

Canton Network Open-Source Repositories

This skill provides comprehensive knowledge about the Canton Network open-source ecosystem, repository relationships, and build processes.

Activation

Use this skill when:

  • Working with Canton Network, DAML, or Splice repositories
  • Investigating version compatibility issues
  • Understanding enterprise vs community differences
  • Debugging LF version or package ID mismatches
  • Building Canton participants or Splice applications

Repository Hierarchy

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Splice Version (e.g., 0.5.4)                 β”‚
β”‚         github.com/digital-asset/decentralized-canton-sync     β”‚
β”‚   Applications: Validator, SV, Wallet, Scan, Amulet (CC)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚ depends on
                          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Canton Version (e.g., 3.4.9)                  β”‚
β”‚               github.com/digital-asset/canton                   β”‚
β”‚     Runtime: Participant, Sequencer, Mediator, Admin API       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β”‚ depends on
                          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    DAML SDK (e.g., 3.4.9)                       β”‚
β”‚                github.com/digital-asset/daml                    β”‚
β”‚    Compiler: damlc, LF Engine, Ledger API, stdlib, protobuf    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Repository Details

1. DAML SDK (github.com/digital-asset/daml)

Purpose: Smart contract language, compiler, and runtime libraries.

Key Directories:

daml/
β”œβ”€β”€ sdk/
β”‚   β”œβ”€β”€ compiler/damlc/          # Haskell compiler source
β”‚   β”‚   └── lib/DA/Cli/Options.hs  # --target version validation
β”‚   β”œβ”€β”€ daml-lf/
β”‚   β”‚   β”œβ”€β”€ language/            # LF version definitions (Scala)
β”‚   β”‚   β”œβ”€β”€ engine/              # LF execution engine
β”‚   β”‚   └── archive/             # DALF protobuf format
β”‚   └── canton/                  # Canton runtime (submodule)
β”œβ”€β”€ ledger-api/                  # gRPC API definitions
└── VERSION                      # SDK version string

LF Version Definitions (LanguageVersion.scala at v3.4.9):

// V2 versions defined val List(v2_1, v2_2, v2_dev) = AllV2 // Line 51 - v2_2 IS defined // Version ranges case Major.V2 => VersionRange(v2_1, v2_2) // Line 171 - StableVersions includes v2_2 def AllVersions = VersionRange(v2_1, v2_dev) // Features at v2_2: val flatArchive = v2_2 val kindInterning = flatArchive val exprInterning = flatArchive val explicitPkgImports = v2_2 val unsafeFromInterfaceRemoved = v2_2

Note: v2_2 IS in SDK v3.4.9 source. Older snapshots may not include it.

damlc Target Validation (Options.hs):

lfVersionOpt :: Parser LF.Version -- Validates against LF.supportedOutputVersions -- Error: "Unknown Daml-LF version: X" if not in list

2. Canton (github.com/digital-asset/canton)

Purpose: Distributed ledger runtime implementing the Canton Protocol.

Key Directories:

canton/
β”œβ”€β”€ community/                   # Open-source Canton
β”‚   β”œβ”€β”€ app/                     # CantonCommunityApp entry point
β”‚   β”œβ”€β”€ participant/             # Participant node implementation
β”‚   β”œβ”€β”€ domain/                  # Embedded domain (sequencer/mediator)
β”‚   └── common/src/main/daml/    # Built-in DAML packages
β”‚       └── AdminWorkflows/      # Ping, party replication DARs
β”œβ”€β”€ daml/                        # DAML SDK submodule
β”œβ”€β”€ daml_dependencies.json       # LF library versions
β”œβ”€β”€ VERSION                      # Canton version
└── version.sbt                  # SBT version config

Built-in DARs (embedded in JAR):

  • canton-builtin-admin-workflow-ping.dar
  • canton-builtin-admin-workflow-party-replication-alpha.dar
  • CantonExamples.dar

Enterprise vs Community: | Feature | Enterprise | Community | |---------|------------|-----------| | Main class | CantonEnterpriseApp | CantonCommunityApp | | Transaction processing | Parallel | Sequential | | Pruning | Available | Limited | | Database | PostgreSQL, Oracle | PostgreSQL only | | HA Domain | Supported | Embedded only |

3. Splice (github.com/digital-asset/decentralized-canton-sync)

Purpose: Decentralized synchronizer governance, Amulet (Canton Coin), and network applications.

Key Directories:

decentralized-canton-sync/
β”œβ”€β”€ project/
β”‚   β”œβ”€β”€ CantonDependencies.scala  # Version config, LF versions
β”‚   └── DamlPlugin.scala          # DAR build logic
β”œβ”€β”€ daml/
β”‚   β”œβ”€β”€ splice-amulet/            # Canton Coin token contracts
β”‚   β”œβ”€β”€ splice-wallet/            # Wallet contracts
β”‚   β”œβ”€β”€ splice-dso-governance/    # DSO governance
β”‚   └── */daml.yaml               # Package configs with --target
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ sv/                       # Super Validator app
β”‚   β”œβ”€β”€ validator/                # Validator app
β”‚   β”œβ”€β”€ wallet/                   # Wallet backend
β”‚   └── scan/                     # Payment scan service
β”œβ”€β”€ cluster/images/               # Docker image builds
β”‚   └── canton-community/         # Community participant image
└── daml-compiler-sources.json    # Compiler version reference

Critical Configuration (CantonDependencies.scala):

object CantonDependencies { val version: String = "3.4.9" val daml_language_versions = Seq("2.1") // ← LF target version val daml_libraries_version = version val daml_compiler_version = sys.env("DAML_COMPILER_VERSION") }

Package Target (daml/splice-amulet/daml.yaml):

sdk-version: 3.3.0-snapshot.20250502.13767.0.v2fc6c7e2 build-options: - --target=2.1 # Explicit LF 2.1 target

Version Mapping

| Splice | Canton | DAML SDK | Protocol | LF (Default) | LF (With SDK 3.4.9) | |--------|--------|----------|----------|--------------|---------------------| | 0.5.4 | 3.4.9 | 3.4.9 | PV34 | 2.1* | 2.2 (verified) | | 0.5.3 | 3.4.8 | 3.4.8 | PV34 | 2.1* | 2.2 | | 0.4.x | 3.3.x | 3.3.x | PV33 | 2.1 | 2.1 |

*Open-source Splice 0.5.4 ships with SDK snapshot 3.3.0-snapshot.20250502 which predates LF 2.2.

Root Cause (Verified): The public Splice release uses an SDK snapshot from May 2, 2025, but LF 2.2 was added to the SDK on October 3, 2025. Updating to SDK 3.4.9 enables LF 2.2 builds.

Key insight: LF 2.2 is fully available in open-source SDK v3.4.9. The Splice project simply needs to be updated to use the newer SDK.

LF Version Implications

Package ID Derivation

Package IDs are cryptographic hashes derived from:

  1. Package source content
  2. LF version used (--target)
  3. SDK/stdlib versions
  4. Dependency package IDs

Changing LF version = Different package IDs = Incompatible packages

Upgrade Validation

Canton validates package upgrades:

  • Upgraded packages must use equal or newer LF version
  • LF 2.1 package cannot "upgrade" to LF 2.2 package (different IDs)
  • Mixing LF versions on same ledger causes validation failures

Building from Open-Source

Community Canton Participant

cd canton sbt "community/app/assembly" # Output: community/app/target/scala-2.13/canton-community.jar

Splice Applications

cd decentralized-canton-sync sbt compile # Requires DAML_COMPILER_VERSION env var

Building with LF 2.2 (Verified Working)

LF 2.2 is available in SDK v3.4.9. The following steps have been verified to work:

  1. Edit project/CantonDependencies.scala:

    val daml_language_versions = Seq("2.2")
  2. Update nix/daml-compiler-sources.json:

    { "version": "3.4.9" }
  3. Update all daml/*/daml.yaml files:

    sdk-version: 3.4.9 build-options: - --target=2.2
  4. Remove invalid warning flags (not present in SDK 3.4.9):

    # Remove -Wno-ledger-time-is-alpha from all daml.yaml files
  5. Build packages:

    cd decentralized-canton-sync nix-shell -p daml-sdk --run "daml build -p daml/splice-util" nix-shell -p daml-sdk --run "daml build -p daml/splice-amulet"

Verified: splice-util and splice-amulet build successfully with LF 2.2 and SDK 3.4.9.

Fully Open-Source LF 2.2 Build (Verified)

Both Splice and Canton can be built with LF 2.2 from entirely open-source code:

Canton Built-in DARs

Update Canton's daml.yaml files:

cd canton/community # Update all daml.yaml files to sdk-version: 3.4.9 and --target=2.2 perl -pi -e 's/sdk-version: 3\.3\.0-snapshot\.[^\n]*/sdk-version: 3.4.9/g' **/daml.yaml perl -pi -e 's/--target=2\.1/--target=2.2/g' **/daml.yaml

Rebuild Canton:

sbt "canton-community-app/assembly"

Verified Results (2025-12-24)

Community-built DARs have identical package IDs to enterprise:

  • canton-builtin-admin-workflow-ping-3.4.9-fbeb863dab36da66d99...

This confirms full compatibility with enterprise deployments.

Key Files Reference

| Purpose | Repository | File | |---------|------------|------| | LF versions (Scala) | daml | sdk/daml-lf/language/.../LanguageVersion.scala | | damlc validation | daml | sdk/compiler/damlc/lib/DA/Cli/Options.hs | | Canton version | canton | VERSION | | Canton DARs | canton | community/common/src/main/daml/ | | Splice LF config | splice | project/CantonDependencies.scala | | Package targets | splice | daml/*/daml.yaml | | Docker builds | splice | `cluster/images/*/Dock

5-Dim Analysis
Clarity8/10
Novelty7/10
Utility9/10
Completeness9/10
Maintainability8/10
Pros & Cons

Pros

  • Comprehensive knowledge base
  • Supports debugging and compatibility checks
  • Facilitates understanding of complex dependencies

Cons

  • May require deep technical knowledge
  • Complexity could overwhelm new users
  • Limited to specific ecosystems

Related Skills

pytorch

S
toolCode Lib
92/ 100

β€œIt's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.”

agno

S
toolCode Lib
90/ 100

β€œIt promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.”

nuxt-skills

S
toolCo-Pilot
90/ 100

β€œIt's essentially a well-organized cheat sheet that turns your AI assistant into a Nuxt framework parrot.”

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author 0xBigBoss.