referrerpolicy=no-referrer-when-downgrade

Crate polkadot_primitives

Source
Expand description

Polkadot types shared between the runtime and the Node-side code.

Re-exports§

pub use v9::async_backing;
pub use v9::byzantine_threshold;
pub use v9::check_candidate_backing;
pub use v9::effective_minimum_backing_votes;
pub use v9::executor_params;
pub use v9::metric_definitions;
pub use v9::node_features;
pub use v9::skip_ump_signals;
pub use v9::slashing;
pub use v9::supermajority_threshold;
pub use v9::transpose_claim_queue;
pub use v9::well_known_keys;
pub use v9::AbridgedHostConfiguration;
pub use v9::AbridgedHrmpChannel;
pub use v9::ApprovalVote;
pub use v9::ApprovalVoteMultipleCandidates;
pub use v9::ApprovalVotingParams;
pub use v9::ApprovedPeerId;
pub use v9::AssignmentId;
pub use v9::AsyncBackingParams;
pub use v9::AvailabilityBitfield;
pub use v9::BackedCandidate;
pub use v9::CandidateCommitments;
pub use v9::CandidateDescriptorV2;
pub use v9::CandidateDescriptorVersion;
pub use v9::CandidateEvent;
pub use v9::CandidateIndex;
pub use v9::CandidateReceiptV2;
pub use v9::CheckedDisputeStatementSet;
pub use v9::CheckedMultiDisputeStatementSet;
pub use v9::ChunkIndex;
pub use v9::ClaimQueueOffset;
pub use v9::CollatorId;
pub use v9::CollatorSignature;
pub use v9::CommittedCandidateReceiptError;
pub use v9::CommittedCandidateReceiptV2;
pub use v9::CompactStatement;
pub use v9::ConsensusLog;
pub use v9::CoreIndex;
pub use v9::CoreSelector;
pub use v9::CoreState;
pub use v9::DisputeOffenceKind;
pub use v9::DisputeState;
pub use v9::DisputeStatement;
pub use v9::DisputeStatementSet;
pub use v9::EncodeAs;
pub use v9::ExecutorParam;
pub use v9::ExecutorParamError;
pub use v9::ExecutorParams;
pub use v9::ExecutorParamsHash;
pub use v9::ExecutorParamsPrepHash;
pub use v9::ExplicitDisputeStatement;
pub use v9::GroupIndex;
pub use v9::GroupRotationInfo;
pub use v9::IndexedVec;
pub use v9::InherentData;
pub use v9::InternalVersion;
pub use v9::InvalidDisputeStatementKind;
pub use v9::MultiDisputeStatementSet;
pub use v9::NodeFeatures;
pub use v9::OccupiedCore;
pub use v9::OccupiedCoreAssumption;
pub use v9::ParathreadClaim;
pub use v9::ParathreadEntry;
pub use v9::PersistedValidationData;
pub use v9::PvfCheckStatement;
pub use v9::PvfExecKind;
pub use v9::PvfPrepKind;
pub use v9::RuntimeMetricLabel;
pub use v9::RuntimeMetricLabelValue;
pub use v9::RuntimeMetricLabelValues;
pub use v9::RuntimeMetricLabels;
pub use v9::RuntimeMetricOp;
pub use v9::RuntimeMetricUpdate;
pub use v9::ScheduledCore;
pub use v9::SchedulerParams;
pub use v9::ScrapedOnChainVotes;
pub use v9::SessionInfo;
pub use v9::Signed;
pub use v9::SignedAvailabilityBitfield;
pub use v9::SignedAvailabilityBitfields;
pub use v9::SignedStatement;
pub use v9::SigningContext;
pub use v9::TransposedClaimQueue;
pub use v9::UMPSignal;
pub use v9::UncheckedSigned;
pub use v9::UncheckedSignedAvailabilityBitfield;
pub use v9::UncheckedSignedAvailabilityBitfields;
pub use v9::UncheckedSignedStatement;
pub use v9::UpgradeGoAhead;
pub use v9::UpgradeRestriction;
pub use v9::ValidDisputeStatementKind;
pub use v9::ValidatorId;
pub use v9::ValidatorIndex;
pub use v9::ValidatorSignature;
pub use v9::ValidityAttestation;
pub use v9::ValidityError;
pub use v9::ASSIGNMENT_KEY_TYPE_ID;
pub use v9::DEFAULT_CLAIM_QUEUE_OFFSET;
pub use v9::DEFAULT_SCHEDULING_LOOKAHEAD;
pub use v9::LEGACY_MIN_BACKING_VOTES;
pub use v9::MAX_CODE_SIZE;
pub use v9::MAX_HEAD_DATA_SIZE;
pub use v9::MAX_POV_SIZE;
pub use v9::MIN_CODE_SIZE;
pub use v9::ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE;
pub use v9::ON_DEMAND_MAX_QUEUE_MAX_SIZE;
pub use v9::PARACHAINS_INHERENT_IDENTIFIER;
pub use v9::PARACHAIN_KEY_TYPE_ID;
pub use v9::UMP_SEPARATOR;
pub use v9::MutateDescriptorV2;
pub use v9::AssignmentPair;
pub use v9::CollatorPair;
pub use v9::ValidatorPair;

Modules§

runtime_api
Runtime API module declares the trait ParachainHost which is part of the Runtime API exposed from the Runtime to the Host.
v9
V9 Primitives.
vstaging
Staging Primitives.

Structs§

BlakeTwo256
Blake2-256 Hash implementation.
CandidateHash
Unit type wrapper around Hash that represents a candidate hash.
HeadData
Parachain head data included in the chain.
HrmpChannelId
A type that uniquely identifies an HRMP channel. An HRMP channel is established between two paras. In text, we use the notation (A, B) to specify a channel between A and B. The channels are unidirectional, meaning that (A, B) and (B, A) refer to different channels. The convention is that we use the first item tuple for the sender and the second for the recipient. Only one channel is allowed between two participants in one direction, i.e. there cannot be 2 different channels identified by (A, B). A channel with the same para id in sender and recipient is invalid. That is, however, not enforced.
Id
Unique identifier of a parachain.
InboundDownwardMessage
A wrapped version of DownwardMessage. The difference is that it has attached the block number when the message was sent.
InboundHrmpMessage
An HRMP message seen from the perspective of a recipient.
OutboundHrmpMessage
An HRMP message seen from the perspective of a sender.
Slot
Unit type wrapper that represents a slot.
ValidationCode
Parachain validation code.
ValidationCodeHash
Unit type wrapper around Hash that represents the blake2-256 hash of validation code in particular.

Constants§

LOWEST_PUBLIC_ID
The ID of the first publicly registrable parachain.

Traits§

AppVerify
Means of signature verification of an application key.
HashT
Abstraction around hashing

Type Aliases§

AccountId
Alias to the opaque account ID type for this chain, actually a AccountId32. This is always 32 bytes.
AccountIndex
The type for looking up accounts. We don’t expect more than 4 billion of them.
AccountPublic
Alias to the public key used for this chain, actually a MultiSigner. Like the signature, this also isn’t a fixed size when encoded, as different cryptos have different size public keys.
AuthorityDiscoveryId
An authority discovery authority identifier.
Balance
The balance of an account. 128-bits (or 38 significant decimal figures) will allow for 10 m currency (10^7) at a resolution to all for one second’s worth of an annualised 50% reward be paid to a unit holder (10^11 unit denomination), or 10^18 total atomic units, to grow at 50%/year for 51 years (10^9 multiplier) for an eventual total of 10^27 units (27 significant decimal figures). We round denomination to 10^12 (12 SDF), and leave the other redundancy at the upper end so that 32 bits may be multiplied with a balance in 128 bits without worrying about overflow.
Block
Block type.
BlockId
Block ID.
BlockNumber
The block number type used by Polkadot. 32-bits will allow for 136 years of blocks assuming 1 block per second.
DownwardMessage
A message sent from the relay-chain down to a parachain.
Hash
A hash of some data used by the relay chain.
Header
Header type.
HorizontalMessages
Moment
An instant or duration in time.
Nonce
Index of a transaction in the relay chain. 32-bit should be plenty.
SessionIndex
Simple index type with which we can count sessions.
Signature
Alias to type for a signature for a transaction on the relay chain. This allows one of several kinds of underlying crypto to be used, so isn’t a fixed size when encoded.
UpwardMessage
A message from a parachain to its Relay Chain.