跳到主要内容

Ultrahonk Verifier

settlementUltrahonkPallet

Statement hash components

  • context: keccak256(b"ultrahonk")
  • vk: keccak256(vk.encode())
  • pubs: keccak256(pubs)

Supported versions

The pallet accepts proofs wrapped in a VersionedProof / VersionedVk enum. The variant selects both the verification backend and the statement-hash encoding.

VariantBackendVK hashverifier_version_hashWhen to use
V0_84bb v0.84keccak256(SCALE(vk))sha256("ultrahonk:v0.84")New integrations that still produce proofs with bb v0.84.
V3_0bb v3.xkeccak256(SCALE(vk))sha256("ultrahonk:v3.0")New integrations on the current bb toolchain.
Legacybb v0.84sha256(vk_bytes)NO_VERSION_HASH (zero hash)Integrations that submitted UltraHonk proofs before versioning was introduced and need the same statement hash as before, so their existing on-chain (e.g. Solidity) contracts keep working unchanged.

Legacy is a backward-compatibility shim: same proof payload format and same verifier as V0_84, but the VK bytes are hashed with SHA2-256 of the raw VK (no enum prefix) and the verifier-version component of the statement hash is zeroed out — exactly matching what the pallet emitted prior to runtime v1.6.0. Any new integration should pick V0_84 or V3_0 instead.

Verifier 实现

该 pallet 验证由 barretenberg 生成的 UltraHonk 证明(Aztec 工具链)。Noir 编译器以其为后端生成 UltraHonk zk-SNARK,生成证明使用 nargo。当前限制:

  1. 仅支持 bb 生成的 zk 版证明;
  2. 仅支持 Keccak256 作为 transcript 哈希;
  3. 不支持递归。