Spore Cluster(type)约束Spore Cluster (type) Constraints
来源:sporeprotocol/spore-contract / contracts/cluster/src/entry.rs · mainnet 0x7366…0075(data1)/ testnet v2 0x0bbe…9058、v1 0x598d…6080(data1)(spore-sdk)Source: sporeprotocol/spore-contract / contracts/cluster/src/entry.rs · mainnet 0x7366…0075 (data1) / testnet v2 0x0bbe…9058, v1 0x598d…6080 (data1) (spore-sdk)
Spore Protocol
- 官网Websitespore.pro
- 文档Docsdocs.spore.pro
- GitHubGitHubgithub.com/sporeprotocol
来源:Source: spore-contract README; sporeprotocol GitHub org profile
0 → 1创建Create
Inputs 输入Inputs
tx.inputs[0]任意 cell(用于计算 cluster_id)any cell (used to derive cluster_id)
➜
Outputs 输出Outputs
cluster cellCell{
type: { codeHash: CLUSTER, hashType: data1,
args: cluster_id = type_id(inputs[0], i) },
data: ClusterData{ name: non-empty, description, mutant_id? }
}
data:ClusterData(molecule table)data: ClusterData (molecule table)
nameBytes
descriptionBytes
mutant_id? (v2)BytesOpt
- name Bytes 名称name 非空non-empty (52)
- description Bytes 描述description — (5)
- mutant_id? (v2) BytesOpt 要求 spore 使用的 Lua 扩展Lua extension spores must apply 扩展 cell 在 cell_depsextension cell in cell_deps (54)
限制Constraints
- group:: 输入、输出各 ≤ 1inputs and outputs ≤ 1 each (50)
- data:: 合法 ClusterData(v1 两字段兼容)valid ClusterData (2-field v1 accepted) (5)
- name:: 非空non-empty (52)
- args[0..32] = type_id(inputs[0], 输出序号)= type_id(inputs[0], output index) (53)
- mutant_id:: 对应扩展在 cell_depsextension is in cell_deps (54)
- witness:: co-build Message 中恰有一个 MintCluster / TransferCluster Action 且字段一致(HEAD 源码,未核实部署版本)exactly one MintCluster / TransferCluster Action in the co-build Message with matching fields (HEAD source, deployed version unverified) (8–13)
1 → 1转移 / 授权铸造 sporeTransfer / authorize a spore mint
Inputs 输入Inputs
clusterCell{ type: CLUSTER(id), data: D }
➜
Outputs 输出Outputs
clusterCell{ type: CLUSTER(id), data: D }
限制Constraints
- data:: 字节完全相同byte-identical (51)
- witness:: co-build Message 中恰有一个 MintCluster / TransferCluster Action 且字段一致(HEAD 源码,未核实部署版本)exactly one MintCluster / TransferCluster Action in the co-build Message with matching fields (HEAD source, deployed version unverified) (8–13)
1 → 0销毁(禁止)Destroy (forbidden)
Inputs 输入Inputs
clusterCell{ type: CLUSTER(id) }
➜
Outputs 输出Outputs
outputs无该 clusterno such cluster
限制Constraints
- group:: cluster 永远不能销毁a cluster can never be destroyed (50)
部署与来源Deployments & source 未核验unverified
源码source sporeprotocol/spore-contract@9a6010e4 · contracts/cluster/src/entry.rs · lib/errors/src/error.rs (default-branch HEAD recorded at backfill 2026-10-21; spec/plugin were written from the default branch shortly before (exact read commit not recorded))
二进制核验binary check 未核验unverified hash appears in the repo only as a deployment record or doc, which does not prove the recorded commit builds this binary (reproducible build not attempted)
0x7366a61534…fe030075: listed in deployment/frozen/testnet.toml; listed in deployment/migration/mainnet/cluster/2024-01-23-0.2.2-beta.1.json; listed in deployment/migration/testnet/cluster/2024-01-19-0.2.1.json
0x0bbe768b51…9f049058: listed in deployment/migration/testnet/cluster/2024-03-16-0.2.2-beta.2.json
0x598d793def…3b856080: listed in deployment/frozen/testnet.toml
0x7366a61534…fe030075: listed in deployment/frozen/testnet.toml; listed in deployment/migration/mainnet/cluster/2024-01-23-0.2.2-beta.1.json; listed in deployment/migration/testnet/cluster/2024-01-19-0.2.1.json
0x0bbe768b51…9f049058: listed in deployment/migration/testnet/cluster/2024-03-16-0.2.2-beta.2.json
0x598d793def…3b856080: listed in deployment/frozen/testnet.toml
| 网络network | code_hash | cell_dep | type_id args | 数据哈希data hash | 部署交易deploy tx |
|---|---|---|---|---|---|
| mainnet | 0x7366a61534fa7c7e6225ecc0d828ea3b5366adec2b58206f2ee84995fe030075 data1 | 0xe464b7fb93…bd0dc938:0 code | — | 0x7366a61534…fe030075 | 0xe464b7fb93…bd0dc938 #12026092 |
| testnet | 0x0bbe768b519d8ea7b96d58f1182eb7e6ef96c541fbd9526975077ee09f049058 data1 | 0xcebb174d6e…0164510a:0 code | 0xbbb44cfa03…293d8fca | 0x0bbe768b51…9f049058 | 0xcebb174d6e…0164510a #12606811 |
| testnet | 0x598d793defef36e2eeba54a9b45130e4ca92822e1d193671f490950c3b856080 data1 | 0x49551a20df…eeb2ca76:0 code | 0x0105d3692d…1c728762 | 0x598d793def…3b856080 | 0x49551a20df…eeb2ca76 #10219183 |
链上数据核对于 on-chain data checked 2026-10-20
错误码:5 InvalidClusterData · 50 InvalidClusterOperation · 51 ModifyClusterPermanentField · 52 EmptyName · 53 InvalidClusterID · 54 MutantNotInDeps;8–13 co-buildError codes: 5 InvalidClusterData · 50 InvalidClusterOperation · 51 ModifyClusterPermanentField · 52 EmptyName · 53 InvalidClusterID · 54 MutantNotInDeps; 8–13 co-build
Cluster Proxy / Agent(错误码 30–33 / 40–47)只在 testnet 由 spore-sdk 列出,暂未加入Cluster Proxy / Agent (errors 30–33 / 40–47) are only listed for testnet in spore-sdk and are not added yet
Cluster Proxy / Agent(错误码 30–33 / 40–47)只在 testnet 由 spore-sdk 列出,暂未加入Cluster Proxy / Agent (errors 30–33 / 40–47) are only listed for testnet in spore-sdk and are not added yet