Type Alias moonbeam_runtime::Executive
source · pub type Executive = Executive<Runtime, Block, ChainContext<Runtime>, Runtime, AllPalletsWithSystem>;
Expand description
Executive: handles dispatch to the various pallets.
Aliased Type§
struct Executive(/* private fields */);
Implementations
§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>,
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>,
pub fn execute_on_runtime_upgrade() -> Weight
pub fn execute_on_runtime_upgrade() -> Weight
Execute all OnRuntimeUpgrade
of this runtime, and return the aggregate weight.
pub fn initialize_block(
header: &<<System as Config>::Block as HeaderProvider>::HeaderT,
) -> ExtrinsicInclusionMode
pub fn initialize_block( header: &<<System as Config>::Block as HeaderProvider>::HeaderT, ) -> ExtrinsicInclusionMode
Start the execution of a particular block.
pub fn execute_block(block: Block)
pub fn execute_block(block: Block)
Actually execute all transitions for block
.
pub fn inherents_applied()
pub fn inherents_applied()
Logic that runs directly after inherent application.
It advances the Multi-Block-Migrations or runs the on_poll
hook.
pub fn finalize_block() -> <<System as Config>::Block as HeaderProvider>::HeaderT
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.
pub fn apply_extrinsic(
uxt: <Block as Block>::Extrinsic,
) -> Result<Result<(), DispatchError>, TransactionValidityError>
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.
pub fn validate_transaction(
source: TransactionSource,
uxt: <Block as Block>::Extrinsic,
block_hash: <Block as Block>::Hash,
) -> Result<ValidTransaction, TransactionValidityError>
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.
pub fn offchain_worker(
header: &<<System as Config>::Block as HeaderProvider>::HeaderT,
)
pub fn offchain_worker( header: &<<System as Config>::Block as HeaderProvider>::HeaderT, )
Start an offchain worker and generate extrinsics.
Trait Implementations
§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>,
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>,
§fn execute_block(block: Block)
fn execute_block(block: Block)
block
. Read more