Crate jam_std_common

Crate jam_std_common 

Source

Modules§

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

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
BlockDesc
BlockInfo
Block information.
BoundedString
A UTF-8 encoded string not exceeding N bytes in length.
ChainSubUpdate
An update from a subscription tracking the “best” or finalized chain.
CoreActivityRecord
CulpritProof
Disputes
DisputesXt
The disputes extrinsic.
Entropy
ErasureRoot
Extrinsic
FaultProof
HashedInput
A wrapper for Input that hashes the bytes as they are read from the underlying input.
Header
ImportData
Judgement
Mmr
NextEpochDescriptor
Information about the next epoch.
Null
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
RecentBlocks
Imported blocks information
ReportGuarantee
A Work Report along with a guarantee of its correctness from staked sources.
SealPayload
SecretKeyset
SegmentSliceVec
Segment shard vector. Size is bound by the maximum number of segments a work package may export.
Service
ServiceActivityRecord
Statistics
StorageKey
SyncState
TicketBody
Ticket data on-chain.
TicketEnvelope
Ticket envelope used during submission.
TicketId
UnresolvedAddr
A (host, port) pair, with the host part being a plain String (ie unresolved).
ValActivityRecord
ValKeyset
ValSignature
ValidatorMetadata
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§

MerkleNodeRef
A node in a Merkle tree.
NodeError
PeerDetailsParseErr
Error parsing peer details (ID and address).
PeerIdParseErr
Error parsing the text form of a peer ID.
ServiceKey
SyncStatus
SystemKey
TicketOrKey
TicketsOrKeys
VerdictKind
VersionedParameters
WorkPackageStatus
Status of a work-package following execution of a block.

Constants§

GUARANTEE_MIN_SIGNATURES
The min. no. of signatures required for a guarantee to be valid.
SANE_MAX_PACKAGE_SIZE
Maximum basic size of a Work Package that we accept. This should be at least ImportSpec::encoded_fixed_size() * max_imports()

Traits§

DecodeInto
IntoStorageKey
IntoTruncated
NewNull
Node
Generic JAM node interface.
NodeExt
An extension trait for Nodes which provides various convenience methods. In particular, it provides wrapper methods which encode/decode data provided to/returned from the underlying Node methods.
RpcClient
Client implementation for the Rpc RPC API.
RpcServer
Server trait implementation for the Rpc RPC API.
Truncated

Functions§

build_encoded_bundle
Construct an encoded Work Package Bundle from its parts
cd_merkle_proof
Returns the root of the “constant-depth” Merkle tree containing the given pre-hashed items or subtree roots plus as many zero-hashes as necessary to bring the number of hashes up to padded_len. Also returns a “proof” of the item/subtree with the specified index.
cd_merkle_root
Returns the root of the “constant-depth” Merkle tree containing the given pre-hashed items or subtree roots plus as many zero-hashes as necessary to bring the number of hashes up to padded_len.
hash_encoded
hash_raw
hash_raw_concat
Compute the hash of the concatenation of byte slices.
import_proof_data
Prepare import proof data for a set of segments. This function splits the segment into PROVEN_PER_SEGMENT pages and for each page returns a page prefix proof along with the vector of PROVEN_PER_SEGMENT hashes that form the page.
import_proofs
Generate import proofs for exported segments. Returns a full import proof for each segment and a tree root.
keccak
keccak_concat
Compute Keccak hash of the concatenation of byte slices.
max_bundle_size
The conservative maximum size of a Work Package Bundle.
max_import_proof_size
max_segment_slice_vec_bytes
Maximum size in bytes for a work package segments shard
max_segment_vec_bytes
Maximum size in bytes for a work package exported segments
merkle_node
Returns the root node of the Merkle tree containing the given items plus as many zero-hashes as necessary to bring the number of items up to padded_len.
slot_duration
Duration of a time slot, as a Rust-native Duration.

Type Aliases§

Accumulated
AccumulationOutput
AssurancesXt
A bunch of assurances.
AuthPool
AuthPools
AuthQueues
AvailabilityAssignments
CdMerkleProof
Proof for an item or subtree in a constant-depth Merkle tree.
ChainSub
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.
NodeResult
OffendersMark
PreimagesXt
A bunch of preimages.
ReadyQueue
SegmentVec
ServicesStats
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
ValidatorsStats
VerdictVotes
Judgements coming from a supermajority of either the active validators set (κ) or the previous epoch’s validator set (λ).