Sigil documentation
ReferenceRust referencesigil-compute

sigil-compute · dispatch

Source declarations, signatures and documentation for dispatch.

Source: sigil/node/sigil-compute/src/dispatch.rs. SHA-256: 9d5406b05356ad6b5438a2eb00b4f7c64fb06e9330dea03257bc4e61b7421bc0.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

dispatch::ComputeJob

A compute job submitted by a consumer and assigned to a provider.

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ComputeJob {
/// Unique identifier for this job (UUID v7 recommended).

pub job_id: String,
/// OAS DID of the consumer requesting compute.

pub consumer_did: String,
/// OAS DID of the selected provider.

pub provider_did: String,
/// Identifier of the model or computation to run.

pub model_id: String,
/// BLAKE3 hash of the input payload.

pub input_hash: SigilHash,
/// Maximum budget in micro-MINT the consumer will pay.

pub max_cost: u64,
/// ISO 8601 timestamp when the job was created.

pub created_at: String,
/// Current lifecycle status of the job.

pub status: JobStatus,
/// Level of result verification required.

pub verification_tier: VerificationTier
}

Source line: 13.

dispatch::JobStatus

Lifecycle status of a compute job.

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum JobStatus {
    /// Job created, awaiting dispatch.
    Pending,
    /// Job sent to the provider.
    Dispatched,
    /// Provider is executing the job.
    Running,
    /// Job completed successfully; result available.
    Completed,
    /// Job failed during execution.
    Failed,
    /// Job result is under dispute.
    Challenged,
}

Source line: 37.

dispatch::JobStatus::is_terminal

Returns true if the job is in a terminal state.

pub fn is_terminal(&self) -> bool;

Source line: 54.

dispatch::JobStatus::is_active

Returns true if the job is still in progress.

pub fn is_active(&self) -> bool;

Source line: 59.

dispatch::VerificationTier

Verification tier controlling how compute results are validated.

#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[serde(tag = "tier", rename_all = "snake_case")]
pub enum VerificationTier {
    /// Optimistic verification: trust the provider, challenge on dispute.
    T1Optimistic,
    /// Lumen verification: provider supplies a signed inference commitment.
    T15Lumen,
    /// Redundant verification: run on `n_providers` and compare results.
    T2Redundant {
        /// Number of providers that must produce matching results.
        n_providers: usize,
    },
    /// Trusted execution environment: provider uses hardware attestation.
    T3Tee,
}

Source line: 67.

On this page