Skip to main content

TASK_SUBMIT, TASK_RESPONSE, TASK_PROGRESS, TASK_VALIDATE, TASK_REWARD

The five-stage AI task pipeline.

USER MINER VALIDATOR CHAIN
[TASK_SUBMIT] ─────► (poll) ──► run LLM ──► [TASK_RESPONSE] ─────► validate ──► [TASK_VALIDATE]


[TASK_REWARD]

A miner may also emit TASK_PROGRESS mid-inference for long jobs (informational only).

TASK_SUBMIT

FieldTypeNotes
type"TASK_SUBMIT"
fromstringSubmitter
taskIdstringCaller-generated unique ID (typically 32 hex from randomBytes(16))
taskTypestringOne of: chat, code_simple, code_agentic, image, audio, video, embedding, nft_svg, challenge
promptstringUser input
feestring (bigint)Micro-OMBRA, must be >= MIN_TASK_FEE = 10_000
timeoutMsnumberAuto-computed from TASK_TIMEOUTS[taskType]
nonce, timestamp

Validation:

  • taskType is a known value
  • fee >= MIN_TASK_FEE
  • state.balance(from) >= fee
  • taskId not already used in state

Effect:

  • state.balance(from) -= fee (escrow)
  • state.tasks[taskId] = { status: "submitted", submitter: from, fee, prompt, taskType, timeoutMs, ... }

TASK_RESPONSE

FieldTypeNotes
type"TASK_RESPONSE"
fromstringMiner wallet
taskIdstringRefers to existing TASK_SUBMIT
minerIdstringMiner NFT id (sha256 of MINER_REGISTER hash)
contentHashstringsha256(content) — for verification
contentstringInference output
thinking?stringOptional chain-of-thought (for reasoning models)
model?stringModel identifier (e.g., "llama-server:Qwen2.5-7B")
tokensIn?numberInput tokens (informational)
tokensOut?numberOutput tokens (used for PoATU reward)
thinkingTokens?numberReasoning tokens (used for PoATU)
durationMs?numberInference duration

Validation:

  • Referenced task exists and status == "submitted"
  • Submitter is a registered miner (MINER_REGISTER tx exists for from)
  • contentHash == sha256(content)
  • Tx submitted within submittedAt + timeoutMs

Effect:

  • Append to state.taskResponses[taskId]
  • If first response, set state.tasks[taskId].firstResponseAt

TASK_PROGRESS

FieldTypeNotes
type"TASK_PROGRESS"
fromstringMiner wallet
taskIdstring
minerIdstring
messagestringFree-form progress note

Effect: Append to state.taskProgress[taskId]. Pure informational, no balance changes.

TASK_VALIDATE

FieldTypeNotes
type"TASK_VALIDATE"
fromstringValidator (registered miner with judge capability)
taskIdstring
validatorAddressstringSame as from
scoresarray[{ minerId, score (0-100), reasoning }]
bestMinerIdstringThe winning response's minerId
validatorModel?stringJudge model used
judgeRawOutput?stringRaw LLM scoring response

Effect:

  • state.tasks[taskId].status = "validated"
  • Stores bestMinerId, scores for downstream TASK_REWARD

TASK_REWARD

FieldTypeNotes
type"TASK_REWARD"
fromstringValidator (issuing reward)
taskIdstring
rewardsarray[{ address, amount (string bigint), reason }] where reason ∈ {"miner", "validator", "burn"}

Validation:

  • Task is in "validated" status
  • Sum of rewards matches task.fee (modulo rounding)
  • Reward distribution matches FEE_SPLIT_V2 (70/25/5)

Effect:

  • For each reward: credit address, or burn (no recipient)
  • state.tasks[taskId].status = "rewarded"

Builders

sdk.tasks.submitTask({ taskType, prompt, fee, taskId? }) // high-level: build+sign+broadcast
buildTaskSubmitTx(from, taskId, taskType, prompt, fee, nonce, privKey)
buildTaskResponseTx(from, taskId, minerId, content, nonce, privKey, opts)
buildTaskProgressTx(from, taskId, minerId, message, nonce, privKey)
buildTaskValidateTx(from, taskId, validatorAddress, scores, bestMinerId, nonce, privKey, opts)
buildTaskRewardTx(from, taskId, rewards, nonce, privKey)

Next: MINER_REGISTER, NFT_SETNAME, NFT_TRANSFER →