Expand description
A module that re-exports relevant relay chain definitions.
Modules§
- runtime_
api - Runtime API module declares the
trait ParachainHost
which is part of the Runtime API exposed from the Runtime to the Host. - v2
V2
primitives.- v9
V9
Primitives.- vstaging
- Staging Primitives.
Structs§
- Abridged
Host Configuration - Abridged version of
HostConfiguration
(from theConfiguration
parachains host runtime module) meant to be used by a parachain or PDK such as cumulus. - Abridged
Hrmp Channel - Abridged version of
HrmpChannel
(from theHrmp
parachains host runtime module) meant to be used by a parachain or PDK such as cumulus. - Approval
Vote - A vote of approval on a candidate.
- Approval
Vote Multiple Candidates - A vote of approval for multiple candidates.
- Approval
Voting Params - Approval voting configuration parameters
- Async
Backing Params - Candidate’s acceptance limitations for asynchronous backing per relay parent.
- Availability
Bitfield - A bitfield concerning availability of backed candidates.
- Backed
Candidate - A backed (or backable, depending on context) candidate.
- Blake
Two256 - Blake2-256 Hash implementation.
- Candidate
Commitments - Commitments made in a
CandidateReceipt
. Many of these are outputs of validation. - Candidate
Descriptor V2 - A unique descriptor of the candidate receipt.
- Candidate
Hash - Unit type wrapper around
Hash
that represents a candidate hash. - Candidate
Receipt V2 - A candidate-receipt at version 2.
- Checked
Dispute Statement Set - A checked set of dispute statements.
- Chunk
Index - Index of an availability chunk.
- Claim
Queue Offset - An offset in the relay chain claim queue.
- Committed
Candidate Receipt V2 - A candidate-receipt with commitments directly included.
- Core
Index - The unique (during session) index of a core.
- Core
Selector - A strictly increasing sequence number, typically this would be the least significant byte of the block number.
- Dispute
State - The entire state of a dispute.
- Dispute
Statement Set - A set of statements about a specific candidate.
- Executor
Params - Deterministically serialized execution environment semantics
- Executor
Params Hash - Unit type wrapper around
Hash
that represents an execution parameter set hash. - Executor
Params Prep Hash - Unit type wrapper around
Hash
that represents a hash of preparation-related executor parameters. - Explicit
Dispute Statement - An explicit statement on a candidate issued as part of a dispute.
- Group
Index - The unique (during session) index of a validator group.
- Group
Rotation Info - A helper data-type for tracking validator-group rotations.
- Head
Data - Parachain head data included in the chain.
- Hrmp
Channel Id - 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.
- Inbound
Downward Message - A wrapped version of
DownwardMessage
. The difference is that it has attached the block number when the message was sent. - Inbound
Hrmp Message - An HRMP message seen from the perspective of a recipient.
- Indexed
Vec IndexedVec
struct indexed by type specific indices.- Inherent
Data - Parachains inherent-data passed into the runtime by a block author
- Internal
Version - A type representing the version of the candidate descriptor and internal version number.
- Occupied
Core - Information about a core which is currently occupied.
- Outbound
Hrmp Message - An HRMP message seen from the perspective of a sender.
- Parathread
Claim - A claim on authoring the next block for a given parathread (on-demand parachain).
- Parathread
Entry - An entry tracking a claim to ensure it does not pass the maximum number of retries.
- Persisted
Validation Data - The validation data provides information about how to create the inputs for validation of a candidate. This information is derived from the chain state and will vary from para to para, although some fields may be the same for every para.
- PvfCheck
Statement - A statement from the specified validator whether the given validation code passes PVF pre-checking or not anchored to the given session index.
- Runtime
Metric Label - A metric label.
- Runtime
Metric Labels - A set of metric labels.
- Runtime
Metric Update - Runtime metric update event.
- Scheduled
Core - Information about a core which is currently occupied.
- Scheduler
Params - Scheduler configuration parameters. All coretime/ondemand parameters are here.
- Scraped
OnChain Votes - Scraped runtime backing votes and resolved disputes.
- Session
Info - Information about validator sets of a session.
- Signed
- Signed data with signature already verified.
- Signing
Context - A type returned by runtime with current session index and a parent hash.
- Slot
- Unit type wrapper that represents a slot.
- Unchecked
Extrinsic - Simple blob to hold an extrinsic without committing to its format and ensure it is serialized correctly.
- Unchecked
Signed - Unchecked signed data, can be converted to
Signed
by checking the signature. - Validation
Code - Parachain validation code.
- Validation
Code Hash - Unit type wrapper around
Hash
that represents the blake2-256 hash of validation code in particular. - Validator
Index - Index of the validator is used as a lightweight replacement of the
ValidatorId
when appropriate.
Enums§
- Candidate
Descriptor Version - A type representing the version of the candidate descriptor.
- Candidate
Event - An event concerning a candidate.
- Committed
Candidate Receipt Error - CommittedCandidateReceiptError construction errors.
- Compact
Statement - Statements that can be made about parachain candidates. These are the actual values that are signed.
- Consensus
Log - A consensus log item for polkadot validation. To be used with
POLKADOT_ENGINE_ID
. - Core
State - The state of a particular availability core.
- Dispute
Offence Kind - Supercedes the old ‘SlashingOffenceKind’ enum.
- Dispute
Statement - A statement about a candidate, to be used within the dispute resolution process.
- Executor
Param - The different executor parameters for changing the execution environment semantics.
- Executor
Param Error - Possible inconsistencies of executor params.
- Invalid
Dispute Statement Kind - Different kinds of statements of invalidity on a candidate.
- Occupied
Core Assumption - An assumption being made about the state of an occupied core.
- PvfExec
Kind - Type discriminator for PVF execution.
- PvfPrep
Kind - Type discriminator for PVF preparation.
- Runtime
Metric Op - Runtime metric operations.
- UMPSignal
- Signals that a parachain can send to the relay chain via the UMP queue.
- Upgrade
GoAhead - A struct that the relay-chain communicates to a parachain indicating what course of action the parachain should take in the coordinated parachain validation code upgrade process.
- Upgrade
Restriction - A possible upgrade restriction that prevents a parachain from performing an upgrade.
- Valid
Dispute Statement Kind - Different kinds of statements of validity on a candidate.
- Validity
Attestation - An either implicit or explicit attestation to the validity of a parachain candidate.
- Validity
Error - Custom validity errors used in Polkadot while validating transactions.
Constants§
- ASSIGNMENT_
KEY_ TYPE_ ID - The key type ID for parachain assignment key.
- DEFAULT_
CLAIM_ QUEUE_ OFFSET - The default claim queue offset to be used if it’s not configured/accessible in the parachain runtime
- DEFAULT_
SCHEDULING_ LOOKAHEAD - Default value for
SchedulerParams.lookahead
- LEGACY_
MIN_ BACKING_ VOTES - Backing votes threshold used from the host prior to runtime API version 6 and from the runtime prior to v9 configuration migration.
- LOWEST_
PUBLIC_ ID - The ID of the first publicly registrable parachain.
- MAX_
CODE_ SIZE - Maximum compressed code size we support right now. At the moment we have runtime upgrade on chain, which restricts scalability severely. If we want to have bigger values, we should fix that first.
- MAX_
HEAD_ DATA_ SIZE - Maximum head data size we support right now.
- MAX_
POV_ SIZE - Maximum PoV size we support right now.
- MIN_
CODE_ SIZE - Compressed or not the wasm blob can never be less than 9 bytes.
- ON_
DEMAND_ DEFAULT_ QUEUE_ MAX_ SIZE - Default queue size we use for the on-demand order book.
- ON_
DEMAND_ MAX_ QUEUE_ MAX_ SIZE - Maximum for maximum queue size.
- PARACHAINS_
INHERENT_ IDENTIFIER - Unique identifier for the Parachains Inherent
- PARACHAIN_
KEY_ TYPE_ ID - The key type ID for a parachain validator key.
- UMP_
SEPARATOR - Separator between
XCM
andUMPSignal
.
Traits§
- AppVerify
- Means of signature verification of an application key.
- Encode
As - This helper trait ensures that we can encode
Statement
asCompactStatement
, and anything as itself. - HashT
- Abstraction around hashing
- Mutate
Descriptor V2 - A trait to allow changing the descriptor field values in tests.
Functions§
- byzantine_
threshold - The maximum number of validators
f
which may safely be faulty. - check_
candidate_ backing - Verify the backing of the given candidate.
- effective_
minimum_ backing_ votes - Adjust the configured needed backing votes with the size of the backing group.
- skip_
ump_ signals - Utility function for skipping the ump signals.
- supermajority_
threshold - The supermajority threshold of validators which represents a subset guaranteed to have at least f+1 honest validators.
- transpose_
claim_ queue - Returns a mapping between the para id and the core indices assigned at different depths in the claim queue.
Type Aliases§
- Account
Id - Alias to the opaque account ID type for this chain, actually a
AccountId32
. This is always 32 bytes. - Account
Index - The type for looking up accounts. We don’t expect more than 4 billion of them.
- Account
Public - 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. - Approved
Peer Id - Approved PeerId type. PeerIds in polkadot should typically be 32 bytes long but for identity multihash can go up to 64. Cannot reuse the PeerId type definition from the networking code as it’s too generic and extensible.
- Assignment
Id - The public key of a keypair used by a validator for determining assignments to approve included parachain candidates.
- Assignment
Pair - The full keypair used by a validator for determining assignments to approve included parachain candidates.
- Authority
Discovery Id - 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), 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
- Block type.
- BlockId
- Block ID.
- Block
Number - The block number type used by Polkadot. 32-bits will allow for 136 years of blocks assuming 1 block per second.
- Candidate
Index - The index of the candidate in the list of candidates fully included as-of the block.
- ChainId
- Identifier for a chain. 32-bit should be plenty.
- Checked
Multi Dispute Statement Set - A set of checked dispute statements.
- Collator
Id - Identity that collators use.
- Collator
Pair - A Parachain collator keypair.
- Collator
Signature - Signature on candidate’s block data by a collator.
- Downward
Message - 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.
- Horizontal
Messages - Moment
- An instant or duration in time.
- Multi
Dispute Statement Set - A set of dispute statements.
- Node
Features - Bit indices in the
HostConfiguration.node_features
that correspond to different node features. - Nonce
- Index of a transaction in the relay chain. 32-bit should be plenty.
- Remark
- The information that goes alongside a
transfer_into_parachain
operation. Entirely opaque, it will generally be used for identifying the reason for the transfer. Typically it will hold the destination account to which the transfer should be credited. If still more information is needed, then this should be a hash with the pre-image presented via an off-chain mechanism on the parachain. - Runtime
Metric Label Value - A metric label value.
- Runtime
Metric Label Values - A set of metric label values.
- Session
Index - 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.
- Signed
Availability Bitfield - A bitfield signed by a particular validator about the availability of pending candidates.
- Signed
Availability Bitfields - A set of signed availability bitfields. Should be sorted by validator index, ascending.
- Signed
Statement - A signed compact statement, suitable to be sent to the chain.
- Transposed
Claim Queue - The claim queue mapped by parachain id.
- Unchecked
Signed Availability Bitfield - A signed bitfield with signature not yet checked.
- Unchecked
Signed Availability Bitfields - A set of unchecked signed availability bitfields. Should be sorted by validator index, ascending.
- Unchecked
Signed Statement - A signed compact statement, with signature not yet checked.
- Upward
Message - A message from a parachain to its Relay Chain.
- Validator
Id - Identity that parachain validators use when signing validation messages.
- Validator
Pair - A Parachain validator keypair.
- Validator
Signature - Signature with which parachain validators sign blocks.