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.
- 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_initializehandlers. 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_DURATIONis picked up bypallet_timestampwhich is in turn picked up bypallet_aurato implementfn slot_duration(). - We allow
Normalextrinsics to fill up the block up to 75%, the rest can be used by Operational extrinsics.
Type Definitions
- 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.