Crate polkadot_primitives
source ·Expand description
Polkadot types shared between the runtime and the Node-side code.
Re-exports§
pub use v8::async_backing;
pub use v8::byzantine_threshold;
pub use v8::check_candidate_backing;
pub use v8::collator_signature_payload;
pub use v8::effective_minimum_backing_votes;
pub use v8::executor_params;
pub use v8::metric_definitions;
pub use v8::node_features;
pub use v8::slashing;
pub use v8::supermajority_threshold;
pub use v8::well_known_keys;
pub use v8::AbridgedHostConfiguration;
pub use v8::AbridgedHrmpChannel;
pub use v8::ApprovalVote;
pub use v8::ApprovalVoteMultipleCandidates;
pub use v8::ApprovalVotingParams;
pub use v8::AssignmentId;
pub use v8::AsyncBackingParams;
pub use v8::AvailabilityBitfield;
pub use v8::BackedCandidate;
pub use v8::CandidateCommitments;
pub use v8::CandidateDescriptor;
pub use v8::CandidateEvent;
pub use v8::CandidateIndex;
pub use v8::CandidateReceipt;
pub use v8::CheckedDisputeStatementSet;
pub use v8::CheckedMultiDisputeStatementSet;
pub use v8::ChunkIndex;
pub use v8::CollatorId;
pub use v8::CollatorSignature;
pub use v8::CommittedCandidateReceipt;
pub use v8::CompactStatement;
pub use v8::ConsensusLog;
pub use v8::CoreIndex;
pub use v8::CoreState;
pub use v8::DisputeState;
pub use v8::DisputeStatement;
pub use v8::DisputeStatementSet;
pub use v8::EncodeAs;
pub use v8::ExecutorParam;
pub use v8::ExecutorParamError;
pub use v8::ExecutorParams;
pub use v8::ExecutorParamsHash;
pub use v8::ExecutorParamsPrepHash;
pub use v8::ExplicitDisputeStatement;
pub use v8::GroupIndex;
pub use v8::GroupRotationInfo;
pub use v8::IndexedVec;
pub use v8::InherentData;
pub use v8::InvalidDisputeStatementKind;
pub use v8::MultiDisputeStatementSet;
pub use v8::NodeFeatures;
pub use v8::OccupiedCore;
pub use v8::OccupiedCoreAssumption;
pub use v8::ParathreadClaim;
pub use v8::ParathreadEntry;
pub use v8::PersistedValidationData;
pub use v8::PvfCheckStatement;
pub use v8::PvfExecKind;
pub use v8::PvfPrepKind;
pub use v8::RuntimeMetricLabel;
pub use v8::RuntimeMetricLabelValue;
pub use v8::RuntimeMetricLabelValues;
pub use v8::RuntimeMetricLabels;
pub use v8::RuntimeMetricOp;
pub use v8::RuntimeMetricUpdate;
pub use v8::ScheduledCore;
pub use v8::SchedulerParams;
pub use v8::ScrapedOnChainVotes;
pub use v8::SessionInfo;
pub use v8::Signed;
pub use v8::SignedAvailabilityBitfield;
pub use v8::SignedAvailabilityBitfields;
pub use v8::SignedStatement;
pub use v8::SigningContext;
pub use v8::UncheckedSigned;
pub use v8::UncheckedSignedAvailabilityBitfield;
pub use v8::UncheckedSignedAvailabilityBitfields;
pub use v8::UncheckedSignedStatement;
pub use v8::UpgradeGoAhead;
pub use v8::UpgradeRestriction;
pub use v8::ValidDisputeStatementKind;
pub use v8::ValidatorId;
pub use v8::ValidatorIndex;
pub use v8::ValidatorSignature;
pub use v8::ValidityAttestation;
pub use v8::ValidityError;
pub use v8::ASSIGNMENT_KEY_TYPE_ID;
pub use v8::LEGACY_MIN_BACKING_VOTES;
pub use v8::MAX_CODE_SIZE;
pub use v8::MAX_HEAD_DATA_SIZE;
pub use v8::MAX_POV_SIZE;
pub use v8::MIN_CODE_SIZE;
pub use v8::ON_DEMAND_DEFAULT_QUEUE_MAX_SIZE;
pub use v8::ON_DEMAND_MAX_QUEUE_MAX_SIZE;
pub use v8::PARACHAINS_INHERENT_IDENTIFIER;
pub use v8::PARACHAIN_KEY_TYPE_ID;
pub use v8::AssignmentPair;
pub use v8::CollatorPair;
pub use v8::ValidatorPair;
Modules§
- Runtime API module declares the
trait ParachainHost
which is part of the Runtime API exposed from the Runtime to the Host. V7
Primitives.- Staging Primitives.
Structs§
- Blake2-256 Hash implementation.
- Unit type wrapper around
Hash
that represents a candidate hash. - Parachain head data included in the chain.
- 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. - Unique identifier of a parachain.
- A wrapped version of
DownwardMessage
. The difference is that it has attached the block number when the message was sent. - An HRMP message seen from the perspective of a recipient.
- An HRMP message seen from the perspective of a sender.
- Unit type wrapper that represents a slot.
- Parachain validation code.
- Unit type wrapper around
Hash
that represents the blake2-256 hash of validation code in particular.
Constants§
- The ID of the first publicly registrable parachain.
Traits§
- Abstraction around hashing
Type Aliases§
- Alias to the opaque account ID type for this chain, actually a
AccountId32
. This is always 32 bytes. - The type for looking up accounts. We don’t expect more than 4 billion of them.
- 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. - An authority discovery authority identifier.
- 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), or10^18
total atomic units, to grow at 50%/year for 51 years (10^9
multiplier) for an eventual total of10^27
units (27 significant decimal figures). We round denomination to10^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 type.
- Block ID.
- The block number type used by Polkadot. 32-bits will allow for 136 years of blocks assuming 1 block per second.
- A message sent from the relay-chain down to a parachain.
- A hash of some data used by the relay chain.
- Header type.
- An instant or duration in time.
- Index of a transaction in the relay chain. 32-bit should be plenty.
- Simple index type with which we can count sessions.
- 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.
- A message from a parachain to its Relay Chain.