referrerpolicy=no-referrer-when-downgrade
rococo_parachain_runtime

Type Alias Executive

Source
pub type Executive = Executive<Runtime, Block, ChainContext<Runtime>, Runtime, AllPalletsWithSystem, RemoveCollectiveFlip>;
Expand description

Executive: handles dispatch to the various modules.

Aliased Type§

struct Executive(/* private fields */);

Implementations

Source§

impl<System, Block, Context, UnsignedValidator, AllPalletsWithSystem, COnRuntimeUpgrade> Executive<System, Block, Context, UnsignedValidator, AllPalletsWithSystem, COnRuntimeUpgrade>
where System: Config + EnsureInherentsAreFirst<Block>, Block: Block<Header = <<System as Config>::Block as HeaderProvider>::HeaderT, Hash = <System as Config>::Hash>, Context: Default, AllPalletsWithSystem: OnRuntimeUpgrade + BeforeAllRuntimeMigrations + OnInitialize<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OnIdle<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OnFinalize<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OffchainWorker<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OnPoll<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + TryState<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + TryDecodeEntireStorage, COnRuntimeUpgrade: OnRuntimeUpgrade, <Block as Block>::Extrinsic: Checkable<Context> + Codec, <<Block as Block>::Extrinsic as Checkable<Context>>::Checked: Applyable + GetDispatchInfo, <<<Block as Block>::Extrinsic as Checkable<Context>>::Checked as Applyable>::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>, <<<<Block as Block>::Extrinsic as Checkable<Context>>::Checked as Applyable>::Call as Dispatchable>::RuntimeOrigin: From<Option<<System as Config>::AccountId>>, UnsignedValidator: ValidateUnsigned<Call = <<<Block as Block>::Extrinsic as Checkable<Context>>::Checked as Applyable>::Call>,

Source

pub fn try_execute_block( block: Block, state_root_check: bool, signature_check: bool, select: Select, ) -> Result<Weight, &'static str>

Execute given block, but don’t as strict is the normal block execution.

Some checks can be disabled via:

  • state_root_check
  • signature_check

Should only be used for testing ONLY.

Source

pub fn try_runtime_upgrade( checks: UpgradeCheckSelect, ) -> Result<Weight, DispatchError>

Execute all Migrations of this runtime.

The checks param determines whether to execute pre/post_upgrade and try_state hooks.

frame_system::LastRuntimeUpgrade is set to the current runtime version after migrations execute. This is important for idempotency checks, because some migrations use this value to determine whether or not they should execute.

Source§

impl<System, Block, Context, UnsignedValidator, AllPalletsWithSystem, COnRuntimeUpgrade> Executive<System, Block, Context, UnsignedValidator, AllPalletsWithSystem, COnRuntimeUpgrade>
where System: Config + EnsureInherentsAreFirst<Block>, Block: Block<Header = <<System as Config>::Block as HeaderProvider>::HeaderT, Hash = <System as Config>::Hash>, Context: Default, AllPalletsWithSystem: OnRuntimeUpgrade + BeforeAllRuntimeMigrations + OnInitialize<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OnIdle<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OnFinalize<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OffchainWorker<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OnPoll<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>, COnRuntimeUpgrade: OnRuntimeUpgrade, <Block as Block>::Extrinsic: Checkable<Context> + Codec, <<Block as Block>::Extrinsic as Checkable<Context>>::Checked: Applyable + GetDispatchInfo, <<<Block as Block>::Extrinsic as Checkable<Context>>::Checked as Applyable>::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>, <<<<Block as Block>::Extrinsic as Checkable<Context>>::Checked as Applyable>::Call as Dispatchable>::RuntimeOrigin: From<Option<<System as Config>::AccountId>>, UnsignedValidator: ValidateUnsigned<Call = <<<Block as Block>::Extrinsic as Checkable<Context>>::Checked as Applyable>::Call>,

Source

pub fn execute_on_runtime_upgrade() -> Weight

Execute all OnRuntimeUpgrade of this runtime, and return the aggregate weight.

Source

pub fn initialize_block( header: &<<System as Config>::Block as HeaderProvider>::HeaderT, ) -> ExtrinsicInclusionMode

Start the execution of a particular block.

Source

pub fn execute_block(block: Block)

Actually execute all transitions for block.

Source

pub fn inherents_applied()

Logic that runs directly after inherent application.

It advances the Multi-Block-Migrations or runs the on_poll hook.

Source

pub fn finalize_block() -> <<System as Config>::Block as HeaderProvider>::HeaderT

Finalize the block - it is up the caller to ensure that all header fields are valid except state-root.

Source

pub fn apply_extrinsic( uxt: <Block as Block>::Extrinsic, ) -> Result<Result<(), DispatchError>, TransactionValidityError>

Apply extrinsic outside of the block execution function.

This doesn’t attempt to validate anything regarding the block, but it builds a list of uxt hashes.

Source

pub fn validate_transaction( source: TransactionSource, uxt: <Block as Block>::Extrinsic, block_hash: <Block as Block>::Hash, ) -> Result<ValidTransaction, TransactionValidityError>

Check a given signed transaction for validity. This doesn’t execute any side-effects; it merely checks whether the transaction would panic if it were included or not.

Changes made to storage should be discarded.

Source

pub fn offchain_worker( header: &<<System as Config>::Block as HeaderProvider>::HeaderT, )

Start an offchain worker and generate extrinsics.

Trait Implementations

Source§

impl<System, Block, Context, UnsignedValidator, AllPalletsWithSystem, COnRuntimeUpgrade> ExecuteBlock<Block> for Executive<System, Block, Context, UnsignedValidator, AllPalletsWithSystem, COnRuntimeUpgrade>
where System: Config + EnsureInherentsAreFirst<Block>, Block: Block<Header = <<System as Config>::Block as HeaderProvider>::HeaderT, Hash = <System as Config>::Hash>, Context: Default, AllPalletsWithSystem: OnRuntimeUpgrade + BeforeAllRuntimeMigrations + OnInitialize<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OnIdle<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OnFinalize<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OffchainWorker<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> + OnPoll<<<<System as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>, COnRuntimeUpgrade: OnRuntimeUpgrade, <Block as Block>::Extrinsic: Checkable<Context> + Codec, <<Block as Block>::Extrinsic as Checkable<Context>>::Checked: Applyable + GetDispatchInfo, <<<Block as Block>::Extrinsic as Checkable<Context>>::Checked as Applyable>::Call: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>, <<<<Block as Block>::Extrinsic as Checkable<Context>>::Checked as Applyable>::Call as Dispatchable>::RuntimeOrigin: From<Option<<System as Config>::AccountId>>, UnsignedValidator: ValidateUnsigned<Call = <<<Block as Block>::Extrinsic as Checkable<Context>>::Checked as Applyable>::Call>,

Source§

fn execute_block(block: Block)

Execute the given block. Read more