* Fix std, runtime-benchmarks and try-runtime features zepter lint propagate-feature --feature try-runtime --left-side-feature-missing=ignore --workspace --fix --feature-enables-dep="try-runtime:frame-try-runtime" zepter lint propagate-feature --feature runtime-benchmarks --left-side-feature-missing=ignore --workspace --fix --feature-enables-dep="runtime-benchmarks:frame-benchmarking" zepter lint propagate-feature --feature std --left-side-feature-missing=ignore --workspace --fix Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add propagate feature CI check Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Test CI by adding an error Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use --locked Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Add help msg Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Revert "Test CI by adding an error" This reverts commit cf4ff6cc0632269b0a109e547686e5e3314b02de. * Test CI by adding an error Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * No newline in help msg Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Revert "Test CI by adding an error" This reverts commit 5daa06ada8e01f5bebafb9d1c76804dd79bc1006. * Test CI by adding an error Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Revert "Test CI by adding an error" This reverts commit ca15de5729507a564f140a10ec2e87b19516ec4c. * Fix msg Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Revert back to master Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Re-do with Zepter v0.7.4 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update Zepter to 0.7.4 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Disable rococo try-runtime check Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Apply suggestions from code review Co-authored-by: Bastian Köcher <git@kchr.de> * More review fixes Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Bastian Köcher <git@kchr.de>
Executive Module
The Executive module acts as the orchestration layer for the runtime. It dispatches incoming extrinsic calls to the respective modules in the runtime.
Overview
The executive module is not a typical pallet providing functionality around a specific feature. It is a cross-cutting framework component for the FRAME. It works in conjunction with the FRAME System module to perform these cross-cutting functions.
The Executive module provides functions to:
- Check transaction validity.
- Initialize a block.
- Apply extrinsics.
- Execute a block.
- Finalize a block.
- Start an off-chain worker.
Implementations
The Executive module provides the following implementations:
Executive: Type that can be used to make the FRAME available from the runtime.
Usage
The default Substrate node template declares the Executive type in its library.
Example
Executive type declaration from the node template.
#
/// Executive: handles dispatch to the various modules.
pub type Executive = executive::Executive<
Runtime,
Block,
Context,
Runtime,
AllPallets,
>;
Custom OnRuntimeUpgrade logic
You can add custom logic that should be called in your runtime on a runtime upgrade. This is done by setting an optional generic parameter. The custom logic will be called before the on runtime upgrade logic of all modules is called.
#
struct CustomOnRuntimeUpgrade;
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
// Do whatever you want.
frame_support::weights::Weight::zero()
}
}
pub type Executive = executive::Executive<
Runtime,
Block,
Context,
Runtime,
AllPallets,
CustomOnRuntimeUpgrade,
>;
License: Apache-2.0