Crate jam_std_common

Source

Modules§

bandersnatch
VRFs backed by Bandersnatch, an elliptic curve built over BLS12-381 scalar field.
ed25519

Structs§

AvailabilityAssignment
AvailabilityAssurance
Multiple signatures are combined with the statement and consolidated into a single Assurance.
AvailabilityBitfield
AvailabilityStatement
Multiple signatures are consolidated into a single Attestation in a space-efficient manner using a BitVec to succinctly express which validators have attested.
Block
BlockInfo
Block information.
CoreActivityRecord
CoreCount
Number of cores in the JAM.
CulpritProof
Disputes
DisputesXt
The disputes extrinsic.
Entropy
EpochPeriod
The epoch period, defined in number of slots.
ErasureRoot
Extrinsic
FaultProof
Header
Judgement
MaxExportSegments
Maximum number of DA segments that a Work Package can produce.
MaxImportSegments
Maximum number of DA segments that a Work Package can require as imports. This is twice the maximum number of imports because each import may require a proof segment.
MaxTicketsPerBlock
Max tickets allowed to be embedded in each block extrinsic.
Mmr
NextEpochDescriptor
Information about the next epoch.
Null
Parameters
Parameters for the JAM protocol.
PeerAddr
Address of a peer, including UDP port number. Convertible to/from SocketAddr. The reason we don’t just use SocketAddr is that SocketAddr values cannot be directly SCALE encoded/decoded; PeerAddr values can be.
PeerDetails
ID and address of a peer.
PeerId
Identity of a network peer. This is just an Ed25519 public key. The corresponding secret key is used to sign connection handshakes (the TLS protocol is used).
Preimage
Privileges
ReadyRecord
RecentBlockCount
The number of blocks which are kept in the recent block cache. We use a u8 to index into this and therefore it may be no larger than 255.
ReportGuarantee
A Work Report along with a guarantee of its correctness from staked sources.
RotationPeriod
The rotation period, defined in number of slots.
SealPayload
SecretKeyset
Service
ServiceActivityRecord
StateUpdate
An update from a state subscription. header_hash and slot are of the block whose posterior state contains value.
Statistics
StorageKey
TicketBody
Ticket data on-chain.
TicketEnvelope
Ticket envelope used during submission.
TicketId
ValActivityRecord
ValKeyset
ValSignature
ValidatorMetadata
ValsPerCore
The number of validators on each core.
Verdict
Collection of judgements for a given target work report.
WorkPackageSpec
Secure reference to a Work Package.
WorkReport
Execution report of a Work Package, mainly comprising the Results from the Refinement of its Work Items.

Enums§

FootprintItem
PeerDetailsParseErr
Error parsing peer details (ID and address).
PeerIdParseErr
Error parsing the text form of a peer ID.
ServiceKey
SystemKey
TicketOrKey
TicketsOrKeys
VersionedParameters

Constants§

GUARANTEE_MIN_SIGNATURES
The min. no. of signatures required for a guarantee to be valid.
MAX_REPORT_ELECTIVE_DATA
Maximum total output blobs which can be in a Work Report. The maximum encoded size of a Work Report is this together with the portions which are constant or based on the (very limited) number of Work Items.
PROVEN_PER_SEGMENT
The maximum number of segments whose justification can be included in a single segment-sized proof-page. Basically just the highest power of 2 which when multiplied by 32 (the size of a hash) leaves enough room from 4104 (the size of a segment) to fit a partial Merkle proof of 6 branches (6 * 32 = 192) plus the overhead for storing the actual number of hashes (should be one byte for PROVEN_PER_SEGMENT < 128). It turns out that this is 2^6 = 64.
SANE_MAX_PACKAGE_SIZE
Maximum basic size of a Work Package that we accept.
SLOT_PERIOD
Length of a timeslot.
SLOT_PERIOD_IN_NS
Length of a timeslot in nanoseconds.
SUFFIX_SKIP_LEN
The maximum number of levels in the implicit tree derived from the segment hashes in a proof-page.
VALS_PER_CORE
The number of validators on each core.

Traits§

DecodeInto
IntoStorageKey
NewNull
RpcClient
Client implementation for the Rpc RPC API.
RpcServer
Server trait implementation for the Rpc RPC API.

Functions§

availability_timeout
The period in timeslots after which reported but unavailable work may be replaced.
block_gas_limit
The maximum gas which may be used in a single block. At present this is just the product of the maximum gas per work-report and the number of cores. In the future it should probably be more to account for the possibility of always-accumulate services.
core_count
Number of cores in the JAM.
deposit_per_account
deposit_per_byte
deposit_per_item
epoch_period
The epoch period, defined in number of slots.
hash_encoded
hash_raw
hash_raw_concat
Compute the hash of the concatenation of byte slices.
keccak
keccak_concat
Compute Keccak hash of the concatenation of byte slices.
max_accumulate_gas
Maximum gas which may be used to Accumulate a single work-report.
max_bundle_size
The conservative maximum size of a Work Package Bundle. This is basically MAX_INPUT plus sone extra for the import proofs.
max_export_segments
Maximum number of DA segments that a Work Package can produce.
max_import_segments
Maximum number of DA segments that a Work Package can require as imports. This is twice the maximum number of imports because each import may require a proof segment.
max_is_authorized_code_size
max_is_authorized_gas
Maximum gas which may be used to Authorize a single work-package.
max_is_authorized_memory
max_lookup_anchor_age
Maximum age, in blocks, that the lookup anchor may be, taken from the regular anchor.
max_refine_code_size
max_refine_gas
Maximum gas which may be used to Refine a single work-report.
max_refine_memory
max_tickets_per_block
Max tickets allowed to be embedded in each block extrinsic.
recent_block_count
The number of blocks which are kept in the recent block cache. We use a u8 to index into this and therefore it may be no larger than 255.
rotation_period
The rotation period, defined in number of slots.
tickets_attempts_number
Maximum number of tickets which each validator may create.
vals_per_core
The number of validators on each core.

Type Aliases§

Accumulated
AssurancesXt
A bunch of assurances.
AuthPool
AuthPools
AuthQueues
AvailabilityAssignments
CoresStats
EdKeys
EntropyBuffer
Entries relative to epoch N [0]: epoch N entropy accumulator. Updated on each block with fresh entropy. [i], for 1 ≤ i ≤ 3: accumulator snapshot at the begin of epoch N-i+1. If N-i+1 < 0 then the corresponding entry is set to some fixed default value.
EpochIndex
Index of an epoch.
EpochMark
EpochTickets
EpochTicketsAccumulator
GuaranteeSignatures
GuaranteesXt
A bunch of guarantees.
OffendersMark
PreimagesXt
A bunch of preimages.
ReadyQueue
RecentBlocks
SegmentSlice
ServicesStats
TicketAttempt
Index for an attempt at producing a ticket for the right to produce a block.
TicketBodies
A collection of ticket bodies.
TicketSignature
Ticket ring vrf signature.
TicketsMark
TicketsXt
A collection of ticket envelopes.
TrancheIndex
Type to represent the index of a tranche.
ValKeysets
VerdictVotes
Judgements coming from a supermajority of either the active validators set (κ) or the previous epoch’s validator set (λ).