> For the complete documentation index, see [llms.txt](https://docs.rome.builders/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rome.builders/zh/rome-zk-evm/verification-key.md).

# 验证密钥

构建一个链专用的 batch guest，并请求注册其 ZisK 验证密钥。

每条链都有其专属的批处理 guest。该 guest 包含该链的 genesis 和费用接收方。它会检查批处理数据和执行情况，然后提交 Solana 结算所检查的公开值。该 guest 的 `programVK` 用于标识正在证明的程序。

一个无许可链使用空的验证密钥注册表进行注册。在 Rome 为该链添加密钥之前，它无法发布最终根。链的授权方不能在其注册交易中包含密钥。这是 Solana devnet 上的 v0.3.0 流程。

## 构建 guest

从 `deploy/rollup` 在 v0.3.0 检出版本中，使用发布设置 `ROME_ZK_TAG=v0.3.0`, `ROME_ZK_GUEST_TAG=v0.3.0` 和 `ZISK_RELEASE=1.3.1-alpha`。运行 `./rollup init` 先运行它，以便渲染 genesis 和 chain ID。你需要在发送请求之前先完成链注册。然后运行：

```sh
./rollup guest-build
```

该命令使用 ZisK 工具链构建一个镜像，在这些标签下克隆 rollup 和 guest 源码，根据你的 genesis 构建 guest，并检查其中是否包含你的 chain ID。它会输出 guest ELF 的 SHA-256。生成的元数据会记录该哈希、genesis 哈希、chain ID、ZisK 发行版及其方案编号。对于此发行版，最后两个值是 `1.3.1-alpha` 和 `2`.

要计算 `programVK` 在本地，构建需要匹配的 ZisK 证明密钥和约 36 GB 内存。该步骤大约需要 40 秒。如果你跳过这一步或没有这些密钥，构建会报告 `ProgramVkNotComputed`。证明器会拒绝缺少以下内容的元数据： `programVK`；请使用匹配的密钥计算它，或在开始证明之前向 Rome 索取。

在这些标签下构建同一份 genesis 的两台机器会得到相同的 ELF 哈希。更改 genesis 意味着不同的 guest，而在链注册后 genesis 不能再更改。如果 genesis 的 chain ID 与你的链 ID 不同（`ChainIdMismatch`）以及使多个账户获得余额的 genesis（`GenesisFundedAccountLimit`).

## 请让 Rome 将其注册

使用 [验证密钥申请表](https://github.com/rome-protocol/solana-zk-evm/issues/new?template=vkey-request.yml)。请准备好你的 chain ID、链授权方的公钥以及注册该链的交易签名。附上 guest 标签和生成的元数据：ELF 哈希、genesis 哈希， `programVK`, `zisk` 和 `方案`。附上或粘贴渲染后的 genesis。如果 genesis 声明了有抵押余额，请准备好相应的已注资 vault。附上一个 `./rollup check` 除等待密钥的项目外均通过的结果。

Rome 会根据该标签和 genesis 重新构建 guest。它会检查 chain ID、genesis、ELF 哈希以及 `programVK` 与你的请求进行比对，然后在对应的 ZisK 发行版下注册该密钥。Rome 会在 issue 中回复密钥注册交易的签名。该密钥会在其记录的激活槽位开始可用；请在 `./rollup check` 该槽位之后。启用证明器后， `验证密钥` 检查应当通过。具备存款能力的密钥检查也应当通过。

Rome 会注册一个 **完整请求，并在两个工作日内完成**。如果请求不完整，Rome 会告知缺少哪些内容。这两个工作日从请求完整之时开始计算。

时序很重要，因为回收窗口从你注册链时开始计算，而不是从其密钥变为可用时开始。v0.3.0 devnet 的窗口为 6,480,000 个槽位，约 30 天。如果在窗口结束时仍未发布根，任何人都可以回收该链，其 5 SOL 存款将进入国库。Rome 的注册表权限方可以调整全局窗口，但最低限制为 216,000 个槽位。

激活后，将匹配的 guest、元数据和 ZisK 证明密钥提供给证明器，并启用 `PROVER=on`，然后运行 `./rollup init`, `./rollup up` 和 `./rollup check`。该证明必须使用为此链注册且处于激活状态的密钥。之后若切换到不同的 ZisK 发行版，则需要重新构建 guest 并新增一条已注册条目；参见 [发行版](/zh/rome-zk-evm/releases.md).

完整的请求字段和操作步骤见 [在 v0.3.0 的 devnet 上运行](https://github.com/rome-protocol/solana-zk-evm/blob/v0.3.0/docs/RUN-ON-DEVNET.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.rome.builders/zh/rome-zk-evm/verification-key.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
