Module polkadot_primitives::v0[][src]

Expand description

Primitives which are necessary for parachain execution from a relay-chain perspective.

Modules

App-specific crypto used for reporting equivocation/misbehavior in BABE, GRANDPA and Parachains, described in the white paper as the fisherman role. Any rewards for misbehavior reporting will be paid out to this account.

Runtime ID module.

V1 primitives.

Structs

An abridged candidate-receipt.

An attested candidate. This is submitted to the relay chain by a block author.

The data that is kept available about a particular parachain block.

Blake2-256 Hash implementation.

Parachain block data.

Commitments made in a CandidateReceipt. Many of these are outputs of validation.

A unique descriptor of the candidate receipt, in a lightweight format.

Unit type wrapper around [Hash] that represents a candidate hash.

All data pertaining to the execution of a parachain candidate.

A full collation.

A collation sent by a collator.

A candidate-receipt with commitments directly included.

Compact-encoded variant of T. This is more space-efficient but less compute-efficient.

The duty roster specifying what jobs each validator must do.

A fee schedule for messages. This is a linear function in the number of bytes of a message.

Extra data that is needed along with the other fields in a CandidateReceipt to fully validate the candidate.

Parachain head data included in the chain.

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.

Information regarding a deployed parachain/thread.

Extra data that is needed along with the other fields in a CandidateReceipt to fully validate the candidate. These fields are parachain-specific.

All the data which is omitted in an AbridgedCandidateReceipt, but that is necessary for validation of the parachain candidate.

An HRMP message seen from the perspective of a sender.

A Proof-of-Validation block.

A type returned by runtime with current session index and a parent hash.

Simple blob to hold an extrinsic without committing to its format and ensure it is serialized correctly.

Parachain validation code.

Index of the validator is used as a lightweight replacement of the ValidatorId when appropriate.

Enums

Identifier for a chain, either one of a number of parachains or the relay chain.

Statements that can be made about parachain candidates. These are the actual values that are signed.

Retriability for a given active para.

Description of how often/when this parachain is scheduled for progression.

An either implicit or explicit attestation to the validity of a parachain candidate.

Custom validity errors used in Polkadot while validating transactions.

Constants

The key type ID for a collator key.

The ID of the first user (non-system) parachain.

An identifier for inherent data that provides new minimally-attested parachain heads.

An Info value for a standard leased parachain.

The key type ID for a parachain validator key.

Traits

Type determining the active set of parachains in current block.

Abstraction around hashing

Some type that is able to be collapsed into an account ID. It is not possible to recreate the original value from the account ID.

The API for querying the state of parachains on-chain.

Auxiliary for when there’s an attempt to swap two parachains/parathreads.

Means of signature verification.

Functions

Get a collator signature payload on a relay-parent, block-data combo.

Type Definitions

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.

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 type.

Block ID.

The block number type used by Polkadot. 32-bits will allow for 136 years of blocks assuming 1 block per second.

Identifier for a chain. 32-bit should be plenty.

Identity that collators use.

A Parachain collator keypair.

Signature on candidate’s block data by a collator.

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.

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.

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.

Identity that parachain validators use when signing validation messages.

A Parachain validator keypair.

Signature with which parachain validators sign blocks.