Crate jam_types

Source
Expand description

JAM types used within the PVM instances (service code and authorizer code).

Macros§

index_for_hostcall

Structs§

AccumulateItem
The result and surrounding context of a single Refinement operation passed in to the Accumulation logic.
AuthOutput
Output data of Is Authorized operation, passed into both Refinement and Accumulation.
AuthParam
Authorization parameter.
Authorization
Data constituting the Authorization Token in a Work Package.
Authorizer
The authorizer tuple which together identifies a means of determining whether a Work Package is acceptable to execute on a core.
AuthorizerHash
Hash of an encoded Authorizer value.
CodeHash
Hash of PVM program code.
ExtrinsicHash
Hash of a piece of extrinsic data.
ExtrinsicSpec
Specification of a single piece of extrinsic data.
FixedVec
Vector type with a fixed length.
GenericWorkItem
A definition of work to be done by the Refinement logic of a service and transformed into a WorkOutput for its Accumulation logic.
GenericWorkPackage
A work-package, a collection of work-items together with authorization and contextual information. This is processed in-core with Is-Authorized and Refine logic to produce a work-report.
HeaderHash
Hash of an encoded block header.
ImportSpec
Import segments specification, which identifies a single exported segment.
Memo
Transfer memo data, included with balance transfers between services.
OpaqueBandersnatchPublic
Plain-old-data struct of the same length as an encoded Bandersnatch public key.
OpaqueEd25519Public
Plain-old-data struct of the same length as an encoded Ed25519 public key.
OpaqueValKeyset
Plain-old-data struct of the same length and layout to ValKeyset struct. This does not bring in any cryptography.
OpaqueValidatorMetadata
Additional information on a validator, opaque to the actual usage.
PackageInfo
Information on the Work Package, passed into Refine.
PayloadHash
Hash of a Work Item’s WorkPayload.
RefineContext
Various pieces of information helpful to contextualize the Refinement process.
SegmentHash
Hash of a Segment value.
SegmentTreeRoot
Hash of a segment tree root node.
ServiceInfo
Information concerning a particular service’s state.
TransferRecord
A single deferred transfer of balance and/or data, passed in to the invocation of On Transfer.
VecMap
An mapping of key/value pairs stored as pairs ordered by their key in a Vec.
VecSet
An set of items stored in order in a Vec.
WorkOutput
Output data of Refinement operation, passed into Accumulation.
WorkPackageHash
Hash of an encoded Work Package.
WorkPayload
Payload data defining a Work Item.

Enums§

RootIdentifier
Reference to a sequence of import segments, which when combined with an index forms a commitment to a specific segment of data.

Constants§

AUTH_QUEUE_LEN
Number of authorizations in a queue allocated to a core.
CHUNKS_PER_SEGMENT
Number of chunks in a segment.
CHUNK_LEN
Number of bytes in a chunk.
CHUNK_POINTS
Number of points in a chunk.
MAX_IMPORTS
Maximum number of imports in a Work Package.
MAX_WORK_ITEMS
Maximum number of Work Items in a Work Package.
MEMO_LEN
Size of memo in transfers.
MIN_TURNAROUND_PERIOD
Minimum period in blocks between going from becoming Available to Zombie, and then again from Zombie to non-existent.
POINT_LEN
Number of bytes in an erasure-coding point.
SEGMENT_LEN
Number of bytes in a segment.
VAL_COUNT
Total number of validators.

Traits§

BoundedMap
Trait for vector types which have a bounded length allowing element-wise transformation.
MapLike
A data-structure providing the storage and lookup of key/value pairs with exclusive keys.
SetLike
A data-structure providing the storage of non-duplicated items and the querying of their inclusion.

Type Aliases§

AuthQueue
A queue of AuthorizerHashs, each of which will be rotated into the authorizer pool for a core.
Balance
Type to represent a balance.
CoreIndex
Type to represent the index of a compute core.
Gas
Type to represent some gas.
GenericWorkItems
Sequence of GenericWorkItems within a GenericWorkPackage and thus limited in length to MAX_WORK_ITEMS.
Hash
A basic 256-bit data value.
OpaqueValKeysets
The opaque keys for each validator.
Segment
A segment of data.
ServiceId
Type to represent the index of a service.
Slot
Type that represents a time slot of six seconds.
ValIndex
Type to represent the index of a validator.
WorkItem
A definition of work to be done by the Refinement logic of a service and transformed into a WorkOutput for its Accumulation logic.
WorkItemImportsVec
A sequence of import specifications.
WorkPackage
A work-package, a collection of work-items together with authorization and contextual information. This is processed in-core with Is-Authorized and Refine logic to produce a work-report.