Expand description
JAM types used within the PVM instances (service code and authorizer code).
Macros§
Structs§
- Accumulate
Item - The result and surrounding context of a single Refinement operation passed in to the Accumulation logic.
- Auth
Output - Output data of Is Authorized operation, passed into both Refinement and Accumulation.
- Auth
Param - Authorization parameter.
- Auth
Queue Len - Number of authorizations in a queue allocated to a core.
- 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.
- Authorizer
Hash - Hash of an encoded Authorizer value.
- Code
Hash - Hash of PVM program code.
- Extrinsic
Hash - Hash of a piece of extrinsic data.
- Extrinsic
Spec - Specification of a single piece of extrinsic data.
- Fixed
Vec - Vector type with a fixed length.
- Header
Hash - Hash of an encoded block header.
- Import
Spec - Import segments specification, which identifies a single exported segment.
- Invoke
Args - Args for invoking an inner PVM.
- MaxImports
- Maximum number of imports in a Work Package.
- MaxWork
Items - Maximum number of Work Items in a Work Package.
- Memo
- Transfer memo data, included with balance transfers between services.
- Opaque
Bandersnatch Public - Plain-old-data struct of the same length as an encoded Bandersnatch public key.
- Opaque
Ed25519 Public - Plain-old-data struct of the same length as an encoded Ed25519 public key.
- Opaque
ValKeyset - Plain-old-data struct of the same length and layout to
ValKeyset
struct. This does not bring in any cryptography. - Opaque
Validator Metadata - Additional information on a validator, opaque to the actual usage.
- Parameters
- Baseline parameters for the JAM protocol.
- Payload
Hash - Hash of a Work Item’s WorkPayload.
- Refine
Context - Various pieces of information helpful to contextualize the Refinement process.
- Segment
Hash - Hash of a Segment value.
- Segment
Len - Number of bytes in a segment. This is fixed.
- Segment
Slice Len - Returns the number of bytes in a segment slice.
- Segment
Tree Root - Hash of a segment tree root node.
- Service
Info - Information concerning a particular service’s state.
- Transfer
Record - A single deferred transfer of balance and/or data, passed in to the invocation of On Transfer.
- ValCount
- Total number of validators in the JAM.
- 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.
- Work
Item - A definition of work to be done by the Refinement logic of a service and transformed into a WorkOutput for its Accumulation logic.
- Work
Output - Output data of Refinement operation, passed into Accumulation.
- Work
Package - 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.
- Work
Package Hash - Hash of an encoded Work Package.
- Work
Payload - Payload data defining a Work Item.
Enums§
- Root
Identifier - Reference to a sequence of import segments, which when combined with an index forms a commitment to a specific segment of data.
Constants§
- JAM_
COMMON_ ERA - Beginning of the Jam “Common Era” (1200 UTC on January 1, 2025), as seconds after the Unix epoch.
- MEMO_
LEN - Length of a transfer memo in bytes.
- POINT_
LEN - Number of bytes in an erasure-coding point.
- SEGMENT_
LEN - Number of bytes in a segment. This is fixed.
Traits§
- Bounded
Map - Trait for vector types which have a bounded length allowing element-wise transformation.
- Get
- A trait for querying a single value from a type.
- 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.
- ToAtomic
Functions§
- auth_
queue_ len - Number of authorizations in a queue allocated to a core.
- basic_
piece_ len - Number of bytes in a basic EC piece.
- basic_
piece_ points - Number of points in a piece.
- max_
dependencies - Maximum number of dependencies (total of prerequisites and SR lookup entries).
- max_
exports - Maximum number of exports in a Work Package.
- max_
extrinsics - Maximum number of extrinsics in a Work Package.
- max_
imports - Maximum number of imports in a Work Package.
- max_
input - Maximum size of a Work Package together with all extrinsic data and imported segments.
- max_
work_ items - Maximum number of Work Items in a Work Package.
- min_
turnaround_ period - Minimum period in blocks between going from becoming
Available
toZombie
, and then again fromZombie
to non-existent. - pieces_
per_ segment - Returns the number of pieces in a segment.
- segment_
len - Number of bytes in a segment. This is fixed.
- segment_
slice_ len - Returns the number of bytes in a segment slice.
- val_
count - Total number of validators in the JAM.
Type Aliases§
- Auth
Queue - A queue of AuthorizerHashs, each of which will be rotated into the authorizer pool for a core.
- Balance
- Type to represent a balance.
- Core
Index - Type to represent the index of a compute core.
- Hash
- A basic 256-bit data value.
- Opaque
ValKeysets - The opaque keys for each validator.
- Segment
- A segment of data.
- Service
Id - Type to represent the index of a service.
- Signed
Gas - Type to represent some gas which may be below zero. This is used primarily for the
invoke
hostcall API which must be able to return a negative gas amount in case of a gas overrun. - Slot
- Type that represents a time slot of six seconds.
- ValIndex
- Type to represent the index of a validator.
- Work
Item Imports Vec - A sequence of import specifications.