referrerpolicy=no-referrer-when-downgrade

polkadot_primitives/
lib.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Polkadot is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Polkadot.  If not, see <http://www.gnu.org/licenses/>.
16
17//! Polkadot types shared between the runtime and the Node-side code.
18
19#![warn(missing_docs)]
20#![cfg_attr(not(feature = "std"), no_std)]
21
22// `v13` is currently the latest stable version of the runtime API, the number below
23// should be incremented when a new version is released and is independent of the
24// released version of the Polkadot runtime.
25pub mod v9;
26
27// The 'staging' version is special - it contains primitives which are
28// still in development. Once they are considered stable, they will be
29// moved to a new versioned module.
30pub mod vstaging;
31
32// `runtime_api` contains the actual API implementation. It contains stable and
33// unstable functions.
34pub mod runtime_api;
35
36extern crate alloc;
37
38// Current primitives not requiring versioning are exported here.
39// Primitives requiring versioning must not be exported and must be referred by an exact version.
40pub use v9::{
41	async_backing, byzantine_threshold, check_candidate_backing, effective_minimum_backing_votes,
42	executor_params, metric_definitions, node_features, skip_ump_signals, slashing,
43	supermajority_threshold, transpose_claim_queue, well_known_keys, AbridgedHostConfiguration,
44	AbridgedHrmpChannel, AccountId, AccountIndex, AccountPublic, ApprovalVote,
45	ApprovalVoteMultipleCandidates, ApprovalVotingParams, ApprovedPeerId, AssignmentId,
46	AsyncBackingParams, AuthorityDiscoveryId, AvailabilityBitfield, BackedCandidate, Balance,
47	BlakeTwo256, Block, BlockId, BlockNumber, CandidateCommitments, CandidateDescriptorV2,
48	CandidateDescriptorVersion, CandidateEvent, CandidateHash, CandidateIndex, CandidateReceiptV2,
49	CheckedDisputeStatementSet, CheckedMultiDisputeStatementSet, ChunkIndex, ClaimQueueOffset,
50	CollatorId, CollatorSignature, CommittedCandidateReceiptError, CommittedCandidateReceiptV2,
51	CompactStatement, ConsensusLog, CoreIndex, CoreSelector, CoreState, DisputeOffenceKind,
52	DisputeState, DisputeStatement, DisputeStatementSet, DownwardMessage, EncodeAs, ExecutorParam,
53	ExecutorParamError, ExecutorParams, ExecutorParamsHash, ExecutorParamsPrepHash,
54	ExplicitDisputeStatement, GroupIndex, GroupRotationInfo, Hash, HashT, HeadData, Header,
55	HorizontalMessages, HrmpChannelId, Id, InboundDownwardMessage, InboundHrmpMessage, IndexedVec,
56	InherentData, InternalVersion, InvalidDisputeStatementKind, Moment, MultiDisputeStatementSet,
57	NodeFeatures, Nonce, OccupiedCore, OccupiedCoreAssumption, OutboundHrmpMessage,
58	ParathreadClaim, ParathreadEntry, PersistedValidationData, PvfCheckStatement, PvfExecKind,
59	PvfPrepKind, RuntimeMetricLabel, RuntimeMetricLabelValue, RuntimeMetricLabelValues,
60	RuntimeMetricLabels, RuntimeMetricOp, RuntimeMetricUpdate, ScheduledCore, SchedulerParams,
61	ScrapedOnChainVotes, SessionIndex, SessionInfo, Signature, Signed, SignedAvailabilityBitfield,
62	SignedAvailabilityBitfields, SignedStatement, SigningContext, Slot, TransposedClaimQueue,
63	UMPSignal, UncheckedSigned, UncheckedSignedAvailabilityBitfield,
64	UncheckedSignedAvailabilityBitfields, UncheckedSignedStatement, UpgradeGoAhead,
65	UpgradeRestriction, UpwardMessage, ValidDisputeStatementKind, ValidationCode,
66	ValidationCodeHash, ValidatorId, ValidatorIndex, ValidatorSignature, ValidityAttestation,
67	ValidityError, ASSIGNMENT_KEY_TYPE_ID, DEFAULT_CLAIM_QUEUE_OFFSET,
68	DEFAULT_SCHEDULING_LOOKAHEAD, LEGACY_MIN_BACKING_VOTES, LOWEST_PUBLIC_ID, MAX_CODE_SIZE,
69	MAX_HEAD_DATA_SIZE, MAX_POV_SIZE, MIN_CODE_SIZE, ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE,
70	ON_DEMAND_MAX_QUEUE_MAX_SIZE, PARACHAINS_INHERENT_IDENTIFIER, PARACHAIN_KEY_TYPE_ID,
71	UMP_SEPARATOR,
72};
73
74#[cfg(feature = "test")]
75pub use v9::{AppVerify, MutateDescriptorV2};
76
77#[cfg(feature = "std")]
78pub use v9::{AssignmentPair, CollatorPair, ValidatorPair};