IRONQ

Job

Represents a single unit of work

The Job account tracks a single task through its lifecycle.

Seeds: ["job", queue, job_id_le_bytes] — unique per queue + monotonic ID.

Fields

FieldTypeDescription
queuePubkeyParent queue
job_idu64Unique ID (from queue's monotonic counter)
creatorPubkeyWho posted the job
workerPubkeyWho claimed it (default pubkey if unclaimed)
statusJobStatusCurrent state — one of 7 variants
reward_amountu64Tokens escrowed in vault for this job
data_hash[u8; 32]Blake3 hash of the off-chain job payload
created_ati64Unix timestamp
claimed_ati64Unix timestamp (0 if unclaimed)
deadlinei64claimed_at + job_timeout
priorityu80=Low, 1=Medium, 2=High
max_retriesu8How many times to re-open after expiry
retry_countu8Current retry count

JobStatus Enum

pub enum JobStatus {
    Open,       // Waiting for a worker
    Claimed,    // Worker assigned, deadline ticking
    Submitted,  // Result submitted, awaiting review
    Completed,  // Terminal — result approved
    Disputed,   // Awaiting arbiter resolution
    Expired,    // Terminal — deadline passed, retries exhausted
    Cancelled,  // Terminal — creator cancelled before claim
}

Notes

  • Priority is metadata only. There is no on-chain priority queue — workers freely choose which open jobs to claim. Priority serves as a signal to off-chain clients that can sort/filter.
  • data_hash follows the off-chain data pattern: store the actual job specification on IPFS/Arweave and commit only the hash on-chain. This keeps account size fixed at 186 bytes.
  • The job_id is derived from total_jobs_created on the queue at creation time, ensuring unique sequential IDs.