Verifies a RISC Zero proof for standard successful execution.
Constructs a [ReceiptClaim] with default parameters (no input, halted
exit code, no assumptions) and delegates to verify_integrity.
fn verify(
env: soroban_sdk::Env,
seal: soroban_sdk::Bytes,
image_id: soroban_sdk::BytesN<32>,
journal: soroban_sdk::BytesN<32>,
) -> Result<(), VerifierError>
Returns the RISC Zero verifier version string.
This corresponds to the RISC Zero release that produced the parameters embedded in this contract.
fn version(env: soroban_sdk::Env) -> soroban_sdk::String
Returns the 4-byte selector that identifies this verifier.
The selector is the first 4 bytes of every seal targeting this verifier. The router uses it to dispatch verification calls.
fn selector(env: soroban_sdk::Env) -> soroban_sdk::BytesN<4>
Verifies a Groth16 proof against the embedded verification key.
Implements the core Groth16 verification algorithm using the BN254 pairing-friendly elliptic curve. The verification checks the pairing equation:
e(-A, B) * e(alpha, beta) * e(vk_x, gamma) * e(C, delta) == 1
where vk_x is computed as a linear combination of the verification
key's IC points weighted by the public signals.
proof -- the Groth16 proof containing curve points A (G1), B (G2),
and C (G1)pub_signals -- the public input signals as BN254 scalar field
elements. For RISC Zero receipts these are: [control_root_0, control_root_1, claim_0, claim_1, bn254_control_id] (5 elements)Ok(true) if the pairing check passes, Ok(false) if it fails.
Returns [VerifierError::MalformedPublicInputs] if the number of public
signals does not match the verification key (expected: IC.len() - 1).
fn verify_proof(
env: soroban_sdk::Env,
proof: Groth16Proof,
pub_signals: soroban_sdk::Vec,
) -> Result
Verifies a full RISC Zero receipt with an arbitrary claim digest.
Decodes the seal into a Groth16Seal, checks the
selector, constructs the public signals from the control root, claim
digest, and BN254 control ID, then runs the Groth16 pairing check.
fn verify_integrity(
env: soroban_sdk::Env,
receipt: Receipt,
) -> Result<(), VerifierError>