> 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

来源 `部署/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 和链 ID。你需要先完成链注册，然后再发送请求。接着运行：

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

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

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

两台机器在这些标签下构建相同的 genesis，会得到相同的 ELF 哈希。genesis 发生变化意味着不同的 guest，而在链注册后 genesis 不能更改。若某个 genesis 的链 ID 与你的链 ID 不同，构建会拒绝它（`ChainIdMismatch`），并拒绝让多个账户获得余额的 genesis（`GenesisFundedAccountLimit`).

## 请让 Rome 为其注册

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

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

Rome 会注册一个 **在两个工作日内完成的请求**。如果请求不完整，Rome 会回复缺少的内容。这两个工作日从请求补全时开始计算。

时间很重要，因为回收窗口是从你注册链时开始计算，而不是从其密钥变为激活时开始。v0.3.0 devnet 的窗口为 6,480,000 个槽位，约 30 天。如果在该窗口结束时仍未发布 root，任何人都可以回收该链，其 5 SOL 押金将进入国库。Rome 的注册表权威可以更改全局窗口，但最小值为 216,000 个槽位。

激活后，将匹配的 guest、元数据和 ZisK 证明密钥提供给证明器，并开启 `PROVER=on`，然后运行 `./rollup init`, `./rollup up` 和 `./rollup check`。该证明必须使用为此链注册的激活密钥。之后若切换到不同的 ZisK 发布版本，需要重新构建 guest 并新增一条注册记录；参见 [发布版本](https://docs.rome.builders/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.
