Enum westend_runtime::EPMCall [−][src]
pub enum EPMCall<T> where
T: Config, {
submit_unsigned {
raw_solution: Box<RawSolution<<T as Config>::Solution>, Global>,
witness: SolutionOrSnapshotSize,
},
set_minimum_untrusted_score {
maybe_next_score: Option<[u128; 3]>,
},
set_emergency_election_result {
supports: Vec<(<T as Config>::AccountId, Support<<T as Config>::AccountId>), Global>,
},
submit {
raw_solution: Box<RawSolution<<T as Config>::Solution>, Global>,
num_signed_submissions: u32,
},
// some variants omitted
}Expand description
Contains one variant per dispatchable that can be called by an extrinsic.
Variants
Submit a solution for the unsigned phase.
The dispatch origin fo this call must be none.
This submission is checked on the fly. Moreover, this unsigned solution is only validated when submitted to the pool from the local node. Effectively, this means that only active validators can submit this transaction when authoring a block (similar to an inherent).
To prevent any incorrect solution (and thus wasted time/weight), this transaction will panic if the solution submitted by the validator is invalid in any way, effectively putting their authoring reward at risk.
No deposit or reward is associated with this submission.
Fields of submit_unsigned
raw_solution: Box<RawSolution<<T as Config>::Solution>, Global>witness: SolutionOrSnapshotSizeSet a new value for MinimumUntrustedScore.
Dispatch origin must be aligned with T::ForceOrigin.
This check can be turned off by setting the value to None.
Set a solution in the queue, to be handed out to the client of this pallet in the next
call to ElectionProvider::elect.
This can only be set by T::ForceOrigin, and only when the phase is Emergency.
The solution is not checked for any feasibility and is assumed to be trustworthy, as any feasibility check itself can in principle cause the election process to fail (due to memory/weight constrains).
Fields of set_emergency_election_result
Submit a solution for the signed phase.
The dispatch origin fo this call must be signed.
The solution is potentially queued, based on the claimed score and processed at the end of the signed phase.
A deposit is reserved and recorded for the solution. Based on the outcome, the solution might be rewarded, slashed, or get all or a part of the deposit back.
Queue size must be provided as witness data.
Fields of submit
Implementations
pub fn new_call_variant_submit_unsigned(
raw_solution: Box<RawSolution<<T as Config>::Solution>, Global>,
witness: SolutionOrSnapshotSize
) -> Call<T>
pub fn new_call_variant_submit_unsigned(
raw_solution: Box<RawSolution<<T as Config>::Solution>, Global>,
witness: SolutionOrSnapshotSize
) -> Call<T>
Create a call with the variant submit_unsigned.
Create a call with the variant set_minimum_untrusted_score.
Create a call with the variant set_emergency_election_result.
pub fn new_call_variant_submit(
raw_solution: Box<RawSolution<<T as Config>::Solution>, Global>,
num_signed_submissions: u32
) -> Call<T>
pub fn new_call_variant_submit(
raw_solution: Box<RawSolution<<T as Config>::Solution>, Global>,
num_signed_submissions: u32
) -> Call<T>
Create a call with the variant submit.
Trait Implementations
Return the function name of the Call.
Return all function names.
Return a DispatchInfo, containing relevant information of this dispatch. Read more
impl<T> TypeInfo for Call<T> where
T: Config + 'static,
PhantomData<(T,)>: 'static,
PhantomData<(T,)>: TypeInfo,
Box<RawSolution<<T as Config>::Solution>, Global>: 'static,
Box<RawSolution<<T as Config>::Solution>, Global>: TypeInfo,
Vec<(<T as Config>::AccountId, Support<<T as Config>::AccountId>), Global>: 'static,
Vec<(<T as Config>::AccountId, Support<<T as Config>::AccountId>), Global>: TypeInfo,
impl<T> TypeInfo for Call<T> where
T: Config + 'static,
PhantomData<(T,)>: 'static,
PhantomData<(T,)>: TypeInfo,
Box<RawSolution<<T as Config>::Solution>, Global>: 'static,
Box<RawSolution<<T as Config>::Solution>, Global>: TypeInfo,
Vec<(<T as Config>::AccountId, Support<<T as Config>::AccountId>), Global>: 'static,
Vec<(<T as Config>::AccountId, Support<<T as Config>::AccountId>), Global>: TypeInfo,
The origin type of the runtime, (i.e. frame_system::Config::Origin).
pub fn dispatch_bypass_filter(
self,
origin: <Call<T> as UnfilteredDispatchable>::Origin
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn dispatch_bypass_filter(
self,
origin: <Call<T> as UnfilteredDispatchable>::Origin
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Dispatch this call but do not check the filter in origin.
Auto Trait Implementations
impl<T> RefUnwindSafe for Call<T> where
T: RefUnwindSafe,
<T as Config>::AccountId: RefUnwindSafe,
<T as Config>::Solution: RefUnwindSafe,
impl<T> UnwindSafe for Call<T> where
T: UnwindSafe,
<T as Config>::AccountId: UnwindSafe,
<T as Config>::Solution: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
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
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
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
Compare self to key and return true if they are equal.
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when
Debug-formatted. Read more
Causes self to use its LowerExp implementation when
Debug-formatted. Read more
Causes self to use its LowerHex implementation when
Debug-formatted. Read more
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when
Debug-formatted. Read more
Causes self to use its UpperExp implementation when
Debug-formatted. Read more
Causes self to use its UpperHex implementation when
Debug-formatted. Read more
Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe
function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe
function. Read more
Borrows self, then passes self.deref() into the pipe function.
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
Pipes a dereference into a function that cannot normally be called in suffix position. Read more
Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release
builds. Read more
Calls .tap_borrow() only in debug builds, and is erased in release
builds. Read more
Calls .tap_borrow_mut() only in debug builds, and is erased in release
builds. Read more
Calls .tap_ref() only in debug builds, and is erased in release
builds. Read more
Calls .tap_ref_mut() only in debug builds, and is erased in release
builds. Read more
Calls .tap_deref() only in debug builds, and is erased in release
builds. Read more
Provides immutable access to the reference for inspection.
Calls tap_ref in debug builds, and does nothing in release builds.
Provides mutable access to the reference for modification.
Calls tap_ref_mut in debug builds, and does nothing in release builds.
Provides immutable access to the borrow for inspection. Read more
Calls tap_borrow in debug builds, and does nothing in release builds.
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Provides mutable access to the borrow for modification.
Immutably dereferences self for inspection.
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Calls tap_deref in debug builds, and does nothing in release builds.
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Mutably dereferences self for modification.
The counterpart to unchecked_from.
Consume self to return an equivalent value of T.
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more