Crate parachains_common
source ·Re-exports§
pub use opaque::*;
Modules§
- Auxiliary struct/enums for parachain runtimes. Taken from polkadot/runtime/common (at a21cd64) and adapted for parachains.
- Helpers to deal with configuring the message queue in the runtime.
- Opaque types. These are used by the CLI to instantiate machinery that don’t need to know the specifics of the runtime. They can then be made to be agnostic over specific formats of data like extrinsics, allowing for them to continue syncing the network through upgrades to even the core data structures.
Constants§
- We assume that ~5% of the block weight is consumed by
on_initialize
handlers. This is used to limit the maximal weight of a single extrinsic. - We allow for 0.5 seconds of compute with a 6 second average block time.
- This determines the average expected block time that we are targeting. Blocks will be produced at a minimum duration defined by
SLOT_DURATION
.SLOT_DURATION
is picked up bypallet_timestamp
which is in turn picked up bypallet_aura
to implementfn slot_duration()
. - We allow
Normal
extrinsics to fill up the block up to 75%, the rest can be used by Operational extrinsics. - Treasury pallet id of the local chain, used to convert into AccountId
Type Aliases§
- Some way of identifying an account on the chain. We intentionally make it equivalent to the public key of our transaction signing scheme.
- The type for looking up accounts. We don’t expect more than 4 billion of them, but you never know…
- Balance of an account.
- An index to a block.
- Digest item type.
- A hash of some data used by the chain.
- Index of a transaction in the chain.
- Alias to 512-bit hash when used in the context of a transaction signature on the chain.