jam_types

Type Alias WorkItem

Source
pub type WorkItem = GenericWorkItem<ExtrinsicSpec>;
Expand description

A definition of work to be done by the Refinement logic of a service and transformed into a WorkOutput for its Accumulation logic.

This is a concrete version of the work-item, which only commits to extrinsic data but does not supply it.

Aliased Type§

struct WorkItem {
    pub service: u32,
    pub code_hash: CodeHash,
    pub payload: WorkPayload,
    pub refine_gas_limit: i64,
    pub accumulate_gas_limit: i64,
    pub import_segments: BoundedVec<ImportSpec, ConstU32<2048>>,
    pub extrinsics: Vec<ExtrinsicSpec>,
    pub export_count: u16,
}

Fields§

§service: u32

Service identifier to which this work item relates.

§code_hash: CodeHash

The service’s code hash at the time of reporting. This must be available in-core at the time of the lookup-anchor block.

§payload: WorkPayload

Opaque data passed in to the service’s Refinement logic to describe its workload.

§refine_gas_limit: i64

Gas limit with which to execute this work item’s Refine logic.

§accumulate_gas_limit: i64

Gas limit with which to execute this work item’s Accumulate logic.

§import_segments: BoundedVec<ImportSpec, ConstU32<2048>>

Sequence of imported data segments.

§extrinsics: Vec<ExtrinsicSpec>

Additional data available to the service’s Refinement logic while doing its workload.

§export_count: u16

Number of segments exported by this work item.