weld build
Inputs: a policy crate. Steps: nargo check → generate the three bin
packages under target/weld/{initiate,accept,reject} → nargo compile →
bb write_vk (recursive flavor) → hash VKs → sample or reuse vk_salt →
compute vk_root → emit weld.json:
{
"name": "corridor", "version": "1.2.0", "protocol": "weld-v1", "schema_min": 1,
"toolchain": { "nargo": "…", "bb": "…", "weld": "…" },
"phases": {
"initiate": { "vk_hash": "0x…", "gates": 41213 },
"accept": { "vk_hash": "0x…", "gates": 22890 },
"reject": { "vk_hash": "0x<noop>", "gates": 0 }
},
"vk_root": "0x…", "vk_salt_ref": "keychain:corridor/vk_salt",
"params": { "schema_hash": "0x…", "fields": [{ "name": "cap", "type": "u128" }, …] },
"state": null,
"asserts": ["corridor/over-cap", "corridor/blocked", "weld/params-weld", …]
}weld build --check-reproducible rebuilds in a clean sandbox and compares
VK hashes (the salt is excluded from the comparison).