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
- Types relevant for approval.
- Disputes related types.
Macros
- Create a new checked
SessionWindowSize
which cannot be 0.
Structs
- This is the data we keep available for each candidate included in the relay chain.
- BABE epoch information
- Configuration data used by the BABE consensus engine that may change with epochs.
- Parachain block data.
- The output of a collator.
- Configuration for the collation generator
- Result of the
CollatorFn
invocation. - Signal that is being returned when a collation was seconded by a validator.
- A chunk of erasure-encoded block data.
- A Proof-of-Validity
- This is a convenience type to allow the Erasure chunk proof to Decode into a nested BoundedVec
- Type of a session window size.
Enums
- Types of allowed slots.
- Candidate invalidity details
- A type that represents a maybe compressed
PoV
. - Possible errors when converting from
Vec<Vec<u8>>
intoProof
. - A statement, where the candidate receipt is included in the
Seconded
variant. - Result of the validation of the candidate.
Constants
- The amount of time to spend on execution during approval or disputes.
- The amount of time to spend on execution during backing.
- How many blocks after finalization an information about backed/included candidate should be kept.
- 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.
- Linked to
MAX_FINALITY_LAG
in relay chain selection,MAX_HEADS_LOOK_BACK
inapproval-voting
andMAX_BATCH_SCRAPE_ANCESTORS
indispute-coordinator
- The bomb limit for decompressing PoV blobs.
- The bomb limit for decompressing code blobs.
Functions
- Compress a PoV, unless it exceeds the
POV_BOMB_LIMIT
.
Type Definitions
- The cumulative weight of a block in a fork-choice rule.
- Collation function.
- A statement, the corresponding signature, and the index of the sender.
- Variant of
SignedFullStatement
where the signature has not yet been verified.