Struct frame_executive::Executive [−][src]
pub struct Executive<System, Block, Context, UnsignedValidator, AllPallets, OnRuntimeUpgrade = ()>(_);
Expand description
Main entry point for certain runtime actions as e.g. execute_block
.
Generic parameters:
System
: Something that implementsframe_system::Config
Block
: The block type of the runtimeContext
: The context that is used when checking an extrinsic.UnsignedValidator
: The unsigned transaction validator of the runtime.AllPallets
: Tuple that contains all modules. Will be used to call e.g.on_initialize
.OnRuntimeUpgrade
: Custom logic that should be called after a runtime upgrade. Modules are already called byAllPallets
. It will be called before all modules will be called.
Implementations
impl<System: Config + EnsureInherentsAreFirst<Block>, Block: Block<Header = System::Header, Hash = System::Hash>, Context: Default, UnsignedValidator, AllPallets: OnRuntimeUpgrade + OnInitialize<System::BlockNumber> + OnIdle<System::BlockNumber> + OnFinalize<System::BlockNumber> + OffchainWorker<System::BlockNumber>, COnRuntimeUpgrade: OnRuntimeUpgrade> Executive<System, Block, Context, UnsignedValidator, AllPallets, COnRuntimeUpgrade> where
Block::Extrinsic: Checkable<Context> + Codec,
CheckedOf<Block::Extrinsic, Context>: Applyable + GetDispatchInfo,
CallOf<Block::Extrinsic, Context>: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
OriginOf<Block::Extrinsic, Context>: From<Option<System::AccountId>>,
UnsignedValidator: ValidateUnsigned<Call = CallOf<Block::Extrinsic, Context>>,
impl<System: Config + EnsureInherentsAreFirst<Block>, Block: Block<Header = System::Header, Hash = System::Hash>, Context: Default, UnsignedValidator, AllPallets: OnRuntimeUpgrade + OnInitialize<System::BlockNumber> + OnIdle<System::BlockNumber> + OnFinalize<System::BlockNumber> + OffchainWorker<System::BlockNumber>, COnRuntimeUpgrade: OnRuntimeUpgrade> Executive<System, Block, Context, UnsignedValidator, AllPallets, COnRuntimeUpgrade> where
Block::Extrinsic: Checkable<Context> + Codec,
CheckedOf<Block::Extrinsic, Context>: Applyable + GetDispatchInfo,
CallOf<Block::Extrinsic, Context>: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
OriginOf<Block::Extrinsic, Context>: From<Option<System::AccountId>>,
UnsignedValidator: ValidateUnsigned<Call = CallOf<Block::Extrinsic, Context>>,
Execute all OnRuntimeUpgrade
of this runtime, and return the aggregate weight.
Execute all OnRuntimeUpgrade
of this runtime, including the pre and post migration checks.
This should only be used for testing.
Start the execution of a particular block.
Actually execute all transitions for block
.
Finalize the block - it is up the caller to ensure that all header fields are valid except state-root.
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::Extrinsic,
block_hash: Block::Hash
) -> TransactionValidity
pub fn validate_transaction(
source: TransactionSource,
uxt: Block::Extrinsic,
block_hash: Block::Hash
) -> TransactionValidity
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.
Start an offchain worker and generate extrinsics.
Trait Implementations
impl<System: Config + EnsureInherentsAreFirst<Block>, Block: Block<Header = System::Header, Hash = System::Hash>, Context: Default, UnsignedValidator, AllPallets: OnRuntimeUpgrade + OnInitialize<System::BlockNumber> + OnIdle<System::BlockNumber> + OnFinalize<System::BlockNumber> + OffchainWorker<System::BlockNumber>, COnRuntimeUpgrade: OnRuntimeUpgrade> ExecuteBlock<Block> for Executive<System, Block, Context, UnsignedValidator, AllPallets, COnRuntimeUpgrade> where
Block::Extrinsic: Checkable<Context> + Codec,
CheckedOf<Block::Extrinsic, Context>: Applyable + GetDispatchInfo,
CallOf<Block::Extrinsic, Context>: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
OriginOf<Block::Extrinsic, Context>: From<Option<System::AccountId>>,
UnsignedValidator: ValidateUnsigned<Call = CallOf<Block::Extrinsic, Context>>,
impl<System: Config + EnsureInherentsAreFirst<Block>, Block: Block<Header = System::Header, Hash = System::Hash>, Context: Default, UnsignedValidator, AllPallets: OnRuntimeUpgrade + OnInitialize<System::BlockNumber> + OnIdle<System::BlockNumber> + OnFinalize<System::BlockNumber> + OffchainWorker<System::BlockNumber>, COnRuntimeUpgrade: OnRuntimeUpgrade> ExecuteBlock<Block> for Executive<System, Block, Context, UnsignedValidator, AllPallets, COnRuntimeUpgrade> where
Block::Extrinsic: Checkable<Context> + Codec,
CheckedOf<Block::Extrinsic, Context>: Applyable + GetDispatchInfo,
CallOf<Block::Extrinsic, Context>: Dispatchable<Info = DispatchInfo, PostInfo = PostDispatchInfo>,
OriginOf<Block::Extrinsic, Context>: From<Option<System::AccountId>>,
UnsignedValidator: ValidateUnsigned<Call = CallOf<Block::Extrinsic, Context>>,
Execute the given block
. Read more
Auto Trait Implementations
impl<System, Block, Context, UnsignedValidator, AllPallets, OnRuntimeUpgrade> RefUnwindSafe for Executive<System, Block, Context, UnsignedValidator, AllPallets, OnRuntimeUpgrade> where
AllPallets: RefUnwindSafe,
Block: RefUnwindSafe,
Context: RefUnwindSafe,
OnRuntimeUpgrade: RefUnwindSafe,
System: RefUnwindSafe,
UnsignedValidator: RefUnwindSafe,
impl<System, Block, Context, UnsignedValidator, AllPallets, OnRuntimeUpgrade> Send for Executive<System, Block, Context, UnsignedValidator, AllPallets, OnRuntimeUpgrade> where
AllPallets: Send,
Block: Send,
Context: Send,
OnRuntimeUpgrade: Send,
System: Send,
UnsignedValidator: Send,
impl<System, Block, Context, UnsignedValidator, AllPallets, OnRuntimeUpgrade> Sync for Executive<System, Block, Context, UnsignedValidator, AllPallets, OnRuntimeUpgrade> where
AllPallets: Sync,
Block: Sync,
Context: Sync,
OnRuntimeUpgrade: Sync,
System: Sync,
UnsignedValidator: Sync,
impl<System, Block, Context, UnsignedValidator, AllPallets, OnRuntimeUpgrade> Unpin for Executive<System, Block, Context, UnsignedValidator, AllPallets, OnRuntimeUpgrade> where
AllPallets: Unpin,
Block: Unpin,
Context: Unpin,
OnRuntimeUpgrade: Unpin,
System: Unpin,
UnsignedValidator: Unpin,
impl<System, Block, Context, UnsignedValidator, AllPallets, OnRuntimeUpgrade> UnwindSafe for Executive<System, Block, Context, UnsignedValidator, AllPallets, OnRuntimeUpgrade> where
AllPallets: UnwindSafe,
Block: UnwindSafe,
Context: UnwindSafe,
OnRuntimeUpgrade: UnwindSafe,
System: UnwindSafe,
UnsignedValidator: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
The counterpart to unchecked_from
.
Consume self to return an equivalent value of T
.
pub fn vzip(self) -> V