跳到主要内容

证明链

域名是批量注册的。每批等待超时约为 10 分钟。每一批都会产生一份证明。这些证明形成了从创世开始的一系列状态转换:

genesis_root (empty tree -- known constant)
| +-- "richard.pivx" registered at block 100,
| +-- "john.pivx" registered at block 110,
| ... (could be more registration/update commands)
| ! Proof 1 is generated
| old_root = genesis_root --> new_root_1
| +-- "richard.pivx" put his name on marketplace at block 200,
| +-- "sam.pivx" registered at block 250,
| ... (could be more registration/update commands)
| ! Proof 2 is generated
| old_root = new_root_1 --> new_root_2 (= current root)

每个证明的 old_root 必须等于前一个证明的 new_root。第一个证明的 old_root 必须等于已知的创世根(空的稀疏 Merkle 树)。

验证链

验证者分五个步骤检查整个注册历史记录:

  1. 获取 SP1 验证密钥 -- 确定性地从来宾程序二进制文件中派生
  2. 从API获取所有证明
  3. 使用验证密钥验证每个 SP1 证明
  4. 检查链条 -- genesis == P1.old_rootP1.new_root == P2.old_root、...、PN.new_root == current_root
  5. 链上抽查 -- 在 PIVX 节点上查找任何已提交的 txid 并确认备忘录、值和区块匹配

如果所有检查都通过,则整个注册历史记录都是正确的——无需信任索引器。

证明管道

扫描仪和验证仪独立运行:

PIVX Blockchain
|
PiNS Registrar Scanner (validates, captures SMT state)
|
Database (status: "pending")
|
SP1 Prover (generates ZK proof, verifies it)
|
Database (status: "proved")
|
New checkpoint published
|
Indexer syncs to the checkpoint
|
API Server (GET /v1.0/resolve/{name})

扫描仪永远不会阻止校样生成。证明者守护程序轮询待处理的记录,并且可以在单独的硬件上运行。