For the complete documentation index, see llms.txt. This page is also available as Markdown.

Task State Transitions

Task as Finite State Machine (FSM)

State Transition Graph

Relay owns task deadlines. A task can be aborted only by the deadline rule for its current state, or by its creator while it is still Queued. A selected node cannot abort a task.

The task state transition graph is given below. Deadline transitions to EndAborted are listed separately after the graph:

Deadline Transitions

Only the row matching the current state applies. A state transition invalidates the preceding deadline.

Current state
Deadline
Transition
Fee handling
Node handling

Queued

Ordinary GPT and Stable Diffusion: CreateTime + queue_timeout_seconds. Stable Diffusion fine-tuning: CreateTime + 3 minutes + Timeout.

Queued → EndAborted, reason TaskAbortTimeout

Full refund

No selected node and no penalty

Started or ParametersUploaded

StartTime + Timeout

Current state → EndAborted, reason TaskAbortTimeout

Full refund

Execution-timeout health penalty, then release

ScoreReady or ErrorReported

ScoreReadyTime + app_validation_timeout_seconds

Current state → EndAborted, reason TaskAbortCreatorValidationTimeout

No refund; distribute this task's fee using the successful-task fee split

No penalty, then release

Validated or GroupValidated

ValidatedTime + result_upload_timeout_seconds

Current state → EndAborted, reason TaskAbortResultUploadTimeout

Full refund

Result-upload-timeout health penalty, then release

For ordinary GPT and Stable Diffusion tasks, Relay calculates execution Timeout after selecting the exact GPU variant, from the calibrated execution-time estimate for that GPU and model. The estimate and timeout conversion are described here:

Task Execution Time Estimation

The execution parameters are estimates only; they do not determine validation, consensus, payment, or slashing.

TaskAbortCreatorValidationTimeout means the creator did not complete validation by the deadline. Its fee distribution compensates the node operator and eligible delegators for node time already occupied. The task remains EndAborted, and the distribution does not mean the result was correct. This applies to both ScoreReady and ErrorReported.

If any validation-group member reaches EndAborted for TaskAbortCreatorValidationTimeout, Relay permanently rejects validation of the whole group. The group cannot be validated by excluding that member. Other members retain their own deadlines and current states until they independently reach terminal states.

The creator can cancel only a task whose current state is Queued. This transition uses the creator-cancellation reason, gives a full refund, and does not penalize a node.

Group Validation Results

When a task is validated in a validation group, its result state is determined according to the table below:

Rows containing EndAborted apply only when no member has ended with TaskAbortCreatorValidationTimeout. That reason permanently makes the group ineligible for validation.

Task 1 Before
Task 2 Before
Task 3 Before
Task 1 After
Task 2 After
Task 3 After

ScoreReady (A)

ScoreReady (A)

ScoreReady (A)

GroupValidated

EndGroupRefund

EndGroupRefund

ScoreReady (A)

ScoreReady (A)

ScoreReady (B)

GroupValidated

EndGroupRefund

EndInvalidated

ScoreReady (A)

ScoreReady (B)

ScoreReady (C)

EndAborted

EndAborted

EndAborted

ScoreReady (A)

ScoreReady (A)

ErrorReported

GroupValidated

EndGroupRefund

EndInvalidated

ScoreReady (A)

ScoreReady (B)

ErrorReported

EndAborted

EndAborted

EndAborted

ScoreReady (A)

ScoreReady (A)

EndAborted

GroupValidated

EndGroupRefund

EndAborted

ScoreReady (A)

ScoreReady (B)

EndAborted

EndAborted

EndAborted

EndAborted

ScoreReady

ErrorReported

ErrorReported

EndInvalidated

EndAborted

EndAborted

ScoreReady

ErrorReported

EndAborted

EndAborted

EndAborted

EndAborted

ScoreReady

EndAborted

EndAborted

EndAborted

EndAborted

EndAborted

ErrorReported

ErrorReported

ErrorReported

EndAborted

EndAborted

EndAborted

ErrorReported

ErrorReported

EndAborted

EndAborted

EndAborted

EndAborted

ErrorReported

EndAborted

EndAborted

EndAborted

EndAborted

EndAborted

EndAborted

EndAborted

EndAborted

EndAborted

EndAborted

EndAborted

Actions for Each State

State
Action

Group Validated

Record the address of all the 3 nodes in the validation group.

End Success

Settle the payment. Release the node.

End Group Refund

Refund the payment. Release the node.

End Group Success

Distribute payment to 3 nodes. Release the node.

End Invalidated

Refund the payment. Slash the node.

End Aborted: CreatorValidationTimeout

Distribute this task's fee using the successful-task fee split as compensation for occupied node time. Do not mark the result correct. Do not penalize the node. Release the node.

End Aborted: all other reasons

Refund the payment. Apply a node health penalty only when the specific reason assigns the timeout to the node. Release a selected node.

Last updated