A verified job's committee can be drawn from every staked validator by a published rule instead of being picked by the client. The provider checks the draw before it approves the committee, so neither side chooses the validators. The evaluator contract is unchanged: the drawn committee is configured and approved exactly like a hand-picked one.
The rule
- Seed:
keccak256(abi.encode("arl-committee-draw/1", chainId, evaluator, specHash, blockHash)).blockHashis the hash of a block mined after the job was created. The client names the block; the provider checks that it is not older than the job. - Eligible: every validator whose free stake (stake minus locked bonds) on the evaluator is at least the job's bond, except the client, the provider and the arbiter. Each address counts once, and the list is sorted by address.
- Committee: the first
sizeentries of a Fisher–Yates shuffle of the eligible list. Swapidrawskeccak256(abi.encode(seed, i)) mod (n - i).
Anyone with the same inputs gets the same committee. The code is
packages/protocol/src/committee.ts.
In code
import { checkCommitteeDraw, drawVerifiedCommittee, openVerifiedJob } from "arl-protocol-sdk";
// Client: draw, then open the job with that committee.
const draw = await drawVerifiedCommittee(client, { specHash, bond, exclude: [me, provider] });
await openVerifiedJob(clients, {
provider,
specUri,
specHash,
committee: draw.committee,
threshold: 2,
});
// Provider: approve only if the committee is the draw for the block the client named.
const ok = await checkCommitteeDraw(client, committee, {
specHash,
bond,
exclude: [jobClient, me],
blockNumber,
});
Next
A later evaluator version can run the draw on-chain and pay committee members a share of a job fee. That is a new contract and a new deployment.