Crate polkadot_node_primitives

Source
Expand description

Primitive types used on the node-side.

Unlike the polkadot-primitives crate, these primitives are only used on the node-side, not shared between the node and the runtime. This crate builds on top of the primitives defined there.

Re-exports§

pub use disputes::dispute_is_inactive;
pub use disputes::CandidateVotes;
pub use disputes::DisputeMessage;
pub use disputes::DisputeMessageCheckError;
pub use disputes::DisputeStatus;
pub use disputes::InvalidDisputeVote;
pub use disputes::SignedDisputeStatement;
pub use disputes::Timestamp;
pub use disputes::UncheckedDisputeMessage;
pub use disputes::ValidDisputeVote;
pub use disputes::ACTIVE_DURATION_SECS;

Modules§

approval
Types relevant for approval.
disputes
Disputes related types.

Macros§

new_session_window_size
Create a new checked SessionWindowSize which cannot be 0.

Structs§

AvailableData
This is the data we keep available for each candidate included in the relay chain.
BabeEpoch
BABE epoch information
BabeEpochConfiguration
Configuration data used by the BABE consensus engine that may change with epochs.
BlockData
Parachain block data.
Collation
The output of a collator.
CollationGenerationConfig
Configuration for the collation generator
CollationResult
Result of the CollatorFn invocation.
CollationSecondedSignal
Signal that is being returned when a collation was seconded by a validator.
ErasureChunk
A chunk of erasure-encoded block data.
PoV
A Proof-of-Validity
Proof
This is a convenience type to allow the Erasure chunk proof to Decode into a nested BoundedVec
SessionWindowSize
Type of a session window size.
SubmitCollationParams
Parameters for CollationGenerationMessage::SubmitCollation.

Enums§

BabeAllowedSlots
Types of allowed slots.
InvalidCandidate
Candidate invalidity details
MaybeCompressedPoV
A type that represents a maybe compressed PoV.
MerkleProofError
Possible errors when converting from Vec<Vec<u8>> into Proof.
Statement
A statement, where the candidate receipt is included in the Seconded variant.
StatementWithPVD
A statement, exactly the same as Statement but where seconded messages carry the PersistedValidationData.
ValidationResult
Result of the validation of the candidate.

Constants§

DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION
How many blocks after finalization an information about backed/included candidate should be pre-loaded (when scraping onchain votes) and kept locally (when pruning).
DISPUTE_WINDOW
It would be nice to draw this from the chain state, but we have no tools for it right now. On Polkadot this is 1 day, and on Kusama it’s 6 hours.
MAX_FINALITY_LAG
Linked to MAX_FINALITY_LAG in relay chain selection, MAX_HEADS_LOOK_BACK in approval-voting and MAX_BATCH_SCRAPE_ANCESTORS in dispute-coordinator
NODE_VERSION
The current node version, which takes the basic SemVer form <major>.<minor>.<patch>. In general, minor should be bumped on every release while major or patch releases are relatively rare.
POV_BOMB_LIMIT
The bomb limit for decompressing PoV blobs.
VALIDATION_CODE_BOMB_LIMITDeprecated
The bomb limit for decompressing code blobs.

Functions§

maybe_compress_pov
Compress a PoV, unless it exceeds the POV_BOMB_LIMIT.

Type Aliases§

BabeRandomness
Randomness type required by BABE operations.
BlockWeight
The cumulative weight of a block in a fork-choice rule.
CollatorFn
Collation function.
HorizontalMessages
SignedFullStatement
A statement, the corresponding signature, and the index of the sender.
SignedFullStatementWithPVD
A statement, the corresponding signature, and the index of the sender.
UncheckedSignedFullStatement
Variant of SignedFullStatement where the signature has not yet been verified.
UpwardMessages