canton-network-repos by 0xbigboss/claude-code
npx skills add https://github.com/0xbigboss/claude-code --skill canton-network-repos此技能提供关于 Canton Network 开源生态系统、代码仓库关系及构建流程的全面知识。
在以下情况下使用此技能:
┌─────────────────────────────────────────────────────────────────┐
│ Splice 版本 (例如:0.5.4) │
│ github.com/digital-asset/decentralized-canton-sync │
│ 应用程序:验证器、SV、钱包、扫描、Amulet (CC) │
└─────────────────────────┬───────────────────────────────────────┘
│ 依赖于
▼
┌─────────────────────────────────────────────────────────────────┐
│ Canton 版本 (例如:3.4.9) │
│ github.com/digital-asset/canton │
│ 运行时:参与者节点、排序器、协调器、管理 API │
└─────────────────────────┬───────────────────────────────────────┘
│ 依赖于
▼
┌─────────────────────────────────────────────────────────────────┐
│ DAML SDK (例如:3.4.9) │
│ github.com/digital-asset/daml │
│ 编译器:damlc、LF 引擎、账本 API、标准库、protobuf │
└─────────────────────────────────────────────────────────────────┘
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
github.com/digital-asset/daml)用途:智能合约语言、编译器及运行时库。
关键目录:
daml/
├── sdk/
│ ├── compiler/damlc/ # Haskell 编译器源代码
│ │ └── lib/DA/Cli/Options.hs # --target 版本验证
│ ├── daml-lf/
│ │ ├── language/ # LF 版本定义 (Scala)
│ │ ├── engine/ # LF 执行引擎
│ │ └── archive/ # DALF protobuf 格式
│ └── canton/ # Canton 运行时 (子模块)
├── ledger-api/ # gRPC API 定义
└── VERSION # SDK 版本字符串
LF 版本定义 (LanguageVersion.scala 在 v3.4.9 版本):
// V2 版本定义
val List(v2_1, v2_2, v2_dev) = AllV2 // 第 51 行 - v2_2 已定义
// 版本范围
case Major.V2 => VersionRange(v2_1, v2_2) // 第 171 行 - StableVersions 包含 v2_2
def AllVersions = VersionRange(v2_1, v2_dev)
// v2_2 版本特性:
val flatArchive = v2_2
val kindInterning = flatArchive
val exprInterning = flatArchive
val explicitPkgImports = v2_2
val unsafeFromInterfaceRemoved = v2_2
注意:v2_2 存在于 SDK v3.4.9 源代码中。较早的快照版本可能不包含它。
damlc 目标版本验证 (Options.hs):
lfVersionOpt :: Parser LF.Version
-- 根据 LF.supportedOutputVersions 进行验证
-- 如果不在列表中,则报错:"Unknown Daml-LF version: X"
github.com/digital-asset/canton)用途:实现 Canton 协议的分布式账本运行时。
关键目录:
canton/
├── community/ # 开源版 Canton
│ ├── app/ # CantonCommunityApp 入口点
│ ├── participant/ # 参与者节点实现
│ ├── domain/ # 嵌入式域 (排序器/协调器)
│ └── common/src/main/daml/ # 内置 DAML 包
│ └── AdminWorkflows/ # Ping、参与方复制 DAR 文件
├── daml/ # DAML SDK 子模块
├── daml_dependencies.json # LF 库版本
├── VERSION # Canton 版本
└── version.sbt # SBT 版本配置
内置 DAR 文件 (嵌入在 JAR 中):
canton-builtin-admin-workflow-ping.darcanton-builtin-admin-workflow-party-replication-alpha.darCantonExamples.dar企业版与社区版对比:
| 特性 | 企业版 | 社区版 |
|---|---|---|
| 主类 | CantonEnterpriseApp | CantonCommunityApp |
| 交易处理 | 并行 | 串行 |
| 数据清理 | 可用 | 有限 |
| 数据库 | PostgreSQL、Oracle | 仅 PostgreSQL |
| 高可用域 | 支持 | 仅嵌入式 |
github.com/digital-asset/decentralized-canton-sync)用途:去中心化同步器治理、Amulet (Canton Coin) 及网络应用程序。
关键目录:
decentralized-canton-sync/
├── project/
│ ├── CantonDependencies.scala # 版本配置,LF 版本
│ └── DamlPlugin.scala # DAR 构建逻辑
├── daml/
│ ├── splice-amulet/ # Canton Coin 代币合约
│ ├── splice-wallet/ # 钱包合约
│ ├── splice-dso-governance/ # DSO 治理
│ └── */daml.yaml # 包含 --target 的包配置
├── apps/
│ ├── sv/ # 超级验证器应用
│ ├── validator/ # 验证器应用
│ ├── wallet/ # 钱包后端
│ └── scan/ # 支付扫描服务
├── cluster/images/ # Docker 镜像构建
│ └── canton-community/ # 社区参与者节点镜像
└── daml-compiler-sources.json # 编译器版本参考
关键配置 (CantonDependencies.scala):
object CantonDependencies {
val version: String = "3.4.9"
val daml_language_versions = Seq("2.1") // ← LF 目标版本
val daml_libraries_version = version
val daml_compiler_version = sys.env("DAML_COMPILER_VERSION")
}
包目标版本 (daml/splice-amulet/daml.yaml):
sdk-version: 3.3.0-snapshot.20250502.13767.0.v2fc6c7e2
build-options:
- --target=2.1 # 显式指定 LF 2.1 目标
| Splice | Canton | DAML SDK | 协议 | LF (默认) | LF (使用 SDK 3.4.9) |
|---|---|---|---|---|---|
| 0.5.4 | 3.4.9 | 3.4.9 | PV34 | 2.1* | 2.2 (已验证) |
| 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 |
开源的 Splice 0.5.4 附带的是 SDK 快照 3.3.0-snapshot.20250502,该版本早于 LF 2.2。
根本原因 (已验证):公开的 Splice 版本使用的是 2025年5月2日 的 SDK 快照,但 LF 2.2 是在 2025年10月3日 才添加到 SDK 中的。升级到 SDK 3.4.9 即可启用 LF 2.2 构建。
关键洞察:LF 2.2 在开源 SDK v3.4.9 中完全可用。Splice 项目只需更新以使用较新的 SDK 即可。
包 ID 是根据以下内容派生的加密哈希值:
--target)更改 LF 版本 = 不同的包 ID = 不兼容的包
Canton 会验证包升级:
cd canton
sbt "community/app/assembly"
# 输出:community/app/target/scala-2.13/canton-community.jar
cd decentralized-canton-sync
sbt compile # 需要 DAML_COMPILER_VERSION 环境变量
LF 2.2 在 SDK v3.4.9 中可用。以下步骤已验证可行:
编辑 project/CantonDependencies.scala:
val daml_language_versions = Seq("2.2")
更新 nix/daml-compiler-sources.json:
{ "version": "3.4.9" }
更新所有 daml/*/daml.yaml 文件:
sdk-version: 3.4.9
build-options:
- --target=2.2
移除无效的警告标志 (SDK 3.4.9 中不存在):
# 从所有 daml.yaml 文件中移除 -Wno-ledger-time-is-alpha
构建包:
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"
已验证:splice-util 和 splice-amulet 使用 LF 2.2 和 SDK 3.4.9 成功构建。
Splice 和 Canton 都可以使用完全开源的代码构建为 LF 2.2 版本:
更新 Canton 的 daml.yaml 文件:
cd canton/community
# 更新所有 daml.yaml 文件为 sdk-version: 3.4.9 和 --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
重新构建 Canton:
sbt "canton-community-app/assembly"
社区构建的 DAR 文件与企业版具有相同的包 ID:
canton-builtin-admin-workflow-ping-3.4.9-fbeb863dab36da66d99...这证实了与企业版部署的完全兼容性。
| 用途 | 仓库 | 文件 |
|---|---|---|
| LF 版本 (Scala) | daml | sdk/daml-lf/language/.../LanguageVersion.scala |
| damlc 验证 | daml | sdk/compiler/damlc/lib/DA/Cli/Options.hs |
| Canton 版本 | canton | VERSION |
| Canton DAR 文件 | canton | community/common/src/main/daml/ |
| Splice LF 配置 | splice | project/CantonDependencies.scala |
| 包目标版本 | splice | daml/*/daml.yaml |
| Docker 构建 | splice | cluster/images/*/Dockerfile |
supportedOutputVersions 中不支持 2.2daml damlc --help 查看支持的目标版本unzip -p package.dar META-INF/MANIFEST.MF | grep Sdk-Version--target每周安装次数
87
代码仓库
GitHub 星标数
37
首次出现
2026年1月21日
安全审计
安装于
gemini-cli70
codex70
claude-code70
opencode67
cursor62
github-copilot61
This skill provides comprehensive knowledge about the Canton Network open-source ecosystem, repository relationships, and build processes.
Use this skill when:
┌─────────────────────────────────────────────────────────────────┐
│ 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 │
└─────────────────────────────────────────────────────────────────┘
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
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.darcanton-builtin-admin-workflow-party-replication-alpha.darCantonExamples.darEnterprise 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 |
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
| 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.
Package IDs are cryptographic hashes derived from:
--target)Changing LF version = Different package IDs = Incompatible packages
Canton validates package upgrades:
cd canton
sbt "community/app/assembly"
# Output: community/app/target/scala-2.13/canton-community.jar
cd decentralized-canton-sync
sbt compile # Requires DAML_COMPILER_VERSION env var
LF 2.2 is available in SDK v3.4.9. The following steps have been verified to work :
Edit project/CantonDependencies.scala:
val daml_language_versions = Seq("2.2")
Update nix/daml-compiler-sources.json:
{ "version": "3.4.9" }
Update all daml/*/daml.yaml files:
sdk-version: 3.4.9
build-options:
- --target=2.2
Remove invalid warning flags (not present in SDK 3.4.9):
# Remove -Wno-ledger-time-is-alpha from all daml.yaml files
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.
Both Splice and Canton can be built with LF 2.2 from entirely open-source code:
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"
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.
| 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 |
supportedOutputVersionsdaml damlc --help for supported targetsunzip -p package.dar META-INF/MANIFEST.MF | grep Sdk-Version--target across all buildsWeekly Installs
87
Repository
GitHub Stars
37
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
gemini-cli70
codex70
claude-code70
opencode67
cursor62
github-copilot61
CoinGecko API 集成 - 实时加密货币价格、市场数据与区块链分析工具
4,000 周安装
| Package targets | splice | daml/*/daml.yaml |
| Docker builds | splice | cluster/images/*/Dockerfile |