An on-chain task/reward orchestrator that delegates every accept/reject decision to a pluggable verifier -- so 'how do we know a proof is valid' stays fully swappable.
The interface every verifier implements. One function:
function verify(bytes calldata proof, bytes32 publicInputsHash)
external view returns (bool);publicInputsHash is keccak256 of the exact .zkasm program text -- the program fully determines (initial value, instructions, result), so hashing it is enough to pin down what's being claimed.
Every call reverts. Exists so ProofOrchestrator has a default verifier that fails closed rather than silently accepting anything — "no real on-chain STARK verifier exists yet" is a compileable, testable fact, not just a line in documentation.
Checks an ECDSA signature from one designated attester key over the claimed proof result — not the STARK proof itself. See the Threat Model page for the exact trust assumption this creates, and what a real verifier would require instead.
Access-control and state-machine coverage for "who can trigger a payment, and when" — not the cryptography, which is zkvm-stark's job and is tested separately in Rust.
test_submitProof_alwaysRevertsWithoutARealVerifierPayment without a real verifier configured -- the default state is "pays nothing," not "pays on faith."
test_paysOutOnlyAfterAttestationA prover collecting a reward before the attester has actually attested.
test_rejectsProofBytesThatDontMatchTheAttestationSubmitting different proof bytes than the ones the attester actually attested to.
test_onlyAttesterCanAttestAnyone other than the configured attester address calling attest().
test_cannotDoubleFulfillClaiming the same reward twice for one task.
test_onlyTheClaimingProverCanSubmitA different address than the one that claimed the task submitting a proof for it.
test_cannotClaimAnAlreadyClaimedTaskTwo provers racing to claim the same task and both succeeding.
test_cannotClaimOrSubmitForAnUnknownTaskReferencing a task ID that was never created.
cd contracts && forge test. Checked in CI: the CI page.