Type Alias sp_runtime::Justification
source · pub type Justification = (ConsensusEngineId, EncodedJustification);
Expand description
An abstraction over justification for a block’s validity under a consensus algorithm.
Essentially a finality proof. The exact formulation will vary between consensus
algorithms. In the case where there are multiple valid proofs, inclusion within
the block itself would allow swapping justifications to change the block’s hash
(and thus fork the chain). Sending a Justification
alongside a block instead
bypasses this problem.
Each justification is provided as an encoded blob, and is tagged with an ID to identify the consensus engine that generated the proof (we might have multiple justifications from different engines for the same block).
Trait Implementations§
source§impl<'de, T0, T1> Deserialize<'de> for (T0, T1)where
T0: Deserialize<'de>,
T1: Deserialize<'de>,
impl<'de, T0, T1> Deserialize<'de> for (T0, T1)where T0: Deserialize<'de>, T1: Deserialize<'de>,
source§fn deserialize<D>(
deserializer: D
) -> Result<(T0, T1), <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>( deserializer: D ) -> Result<(T0, T1), <D as Deserializer<'de>>::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<A: Clone, B, TupleElement0: MaybeConvert<A, B>, TupleElement1: MaybeConvert<A, B>> MaybeConvert<A, B> for (TupleElement0, TupleElement1)
impl<A: Clone, B, TupleElement0: MaybeConvert<A, B>, TupleElement1: MaybeConvert<A, B>> MaybeConvert<A, B> for (TupleElement0, TupleElement1)
source§fn maybe_convert(a: A) -> Option<B>
fn maybe_convert(a: A) -> Option<B>
Attempt to make conversion.
source§impl<A: Clone, B: Clone, TupleElement0: MaybeConvertBack<A, B>, TupleElement1: MaybeConvertBack<A, B>> MaybeConvertBack<A, B> for (TupleElement0, TupleElement1)
impl<A: Clone, B: Clone, TupleElement0: MaybeConvertBack<A, B>, TupleElement1: MaybeConvertBack<A, B>> MaybeConvertBack<A, B> for (TupleElement0, TupleElement1)
source§fn maybe_convert_back(b: B) -> Option<A>
fn maybe_convert_back(b: B) -> Option<A>
Attempt to make conversion back.
source§impl<A, B, TupleElement0: MaybeEquivalence<A, B>, TupleElement1: MaybeEquivalence<A, B>> MaybeEquivalence<A, B> for (TupleElement0, TupleElement1)
impl<A, B, TupleElement0: MaybeEquivalence<A, B>, TupleElement1: MaybeEquivalence<A, B>> MaybeEquivalence<A, B> for (TupleElement0, TupleElement1)
source§impl<TupleElement0: Printable, TupleElement1: Printable> Printable for (TupleElement0, TupleElement1)
impl<TupleElement0: Printable, TupleElement1: Printable> Printable for (TupleElement0, TupleElement1)
source§impl<T0, T1> Serialize for (T0, T1)where
T0: Serialize,
T1: Serialize,
impl<T0, T1> Serialize for (T0, T1)where T0: Serialize, T1: Serialize,
source§fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>( &self, serializer: S ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where S: Serializer,
Serialize this value into the given Serde serializer. Read more
source§impl<AccountId, Call: Dispatchable, TupleElement0, TupleElement1> SignedExtension for (TupleElement0, TupleElement1)where
TupleElement0: SignedExtension<AccountId = AccountId, Call = Call> + SignedExtension,
TupleElement1: SignedExtension<AccountId = AccountId, Call = Call> + SignedExtension,
impl<AccountId, Call: Dispatchable, TupleElement0, TupleElement1> SignedExtension for (TupleElement0, TupleElement1)where TupleElement0: SignedExtension<AccountId = AccountId, Call = Call> + SignedExtension, TupleElement1: SignedExtension<AccountId = AccountId, Call = Call> + SignedExtension,
source§const IDENTIFIER: &'static str = "You should call `identifier()`!"
const IDENTIFIER: &'static str = "You should call `identifier()`!"
Unique identifier of this signed extension. Read more
§type AdditionalSigned = (<TupleElement0 as SignedExtension>::AdditionalSigned, <TupleElement1 as SignedExtension>::AdditionalSigned)
type AdditionalSigned = (<TupleElement0 as SignedExtension>::AdditionalSigned, <TupleElement1 as SignedExtension>::AdditionalSigned)
Any additional data that will go into the signed payload. This may be created dynamically
from the transaction using the
additional_signed
function.§type Pre = (<TupleElement0 as SignedExtension>::Pre, <TupleElement1 as SignedExtension>::Pre)
type Pre = (<TupleElement0 as SignedExtension>::Pre, <TupleElement1 as SignedExtension>::Pre)
The type that encodes information that can be passed from pre_dispatch to post-dispatch.
source§fn additional_signed(
&self
) -> Result<Self::AdditionalSigned, TransactionValidityError>
fn additional_signed( &self ) -> Result<Self::AdditionalSigned, TransactionValidityError>
Construct any additional data that should be in the signed payload of the transaction. Can
also perform any pre-signature-verification checks and return an error if needed.
source§fn validate(
&self,
who: &Self::AccountId,
call: &Self::Call,
info: &DispatchInfoOf<Self::Call>,
len: usize
) -> TransactionValidity
fn validate( &self, who: &Self::AccountId, call: &Self::Call, info: &DispatchInfoOf<Self::Call>, len: usize ) -> TransactionValidity
Validate a signed transaction for the transaction queue. Read more
source§fn pre_dispatch(
self,
who: &Self::AccountId,
call: &Self::Call,
info: &DispatchInfoOf<Self::Call>,
len: usize
) -> Result<Self::Pre, TransactionValidityError>
fn pre_dispatch( self, who: &Self::AccountId, call: &Self::Call, info: &DispatchInfoOf<Self::Call>, len: usize ) -> Result<Self::Pre, TransactionValidityError>
Do any pre-flight stuff for a signed transaction. Read more
source§fn validate_unsigned(
call: &Self::Call,
info: &DispatchInfoOf<Self::Call>,
len: usize
) -> TransactionValidity
fn validate_unsigned( call: &Self::Call, info: &DispatchInfoOf<Self::Call>, len: usize ) -> TransactionValidity
Validate an unsigned transaction for the transaction queue. Read more
source§fn pre_dispatch_unsigned(
call: &Self::Call,
info: &DispatchInfoOf<Self::Call>,
len: usize
) -> Result<(), TransactionValidityError>
fn pre_dispatch_unsigned( call: &Self::Call, info: &DispatchInfoOf<Self::Call>, len: usize ) -> Result<(), TransactionValidityError>
Do any pre-flight stuff for a unsigned transaction. Read more
source§fn post_dispatch(
pre: Option<Self::Pre>,
info: &DispatchInfoOf<Self::Call>,
post_info: &PostDispatchInfoOf<Self::Call>,
len: usize,
result: &DispatchResult
) -> Result<(), TransactionValidityError>
fn post_dispatch( pre: Option<Self::Pre>, info: &DispatchInfoOf<Self::Call>, post_info: &PostDispatchInfoOf<Self::Call>, len: usize, result: &DispatchResult ) -> Result<(), TransactionValidityError>
Do any post-flight stuff for an extrinsic. Read more
source§impl<A, B> StaticLookup for (A, B)where
A: StaticLookup,
B: StaticLookup<Source = A::Source, Target = A::Target>,
impl<A, B> StaticLookup for (A, B)where A: StaticLookup, B: StaticLookup<Source = A::Source, Target = A::Target>,
Perform a StaticLookup where there are multiple lookup sources of the same type.
source§impl<A, B, TupleElement0: TryConvert<A, B>, TupleElement1: TryConvert<A, B>> TryConvert<A, B> for (TupleElement0, TupleElement1)
impl<A, B, TupleElement0: TryConvert<A, B>, TupleElement1: TryConvert<A, B>> TryConvert<A, B> for (TupleElement0, TupleElement1)
source§fn try_convert(a: A) -> Result<B, A>
fn try_convert(a: A) -> Result<B, A>
Attempt to make conversion. If returning Result::Err, the inner must always be
a
.source§impl<A, B, TupleElement0: TryConvertBack<A, B>, TupleElement1: TryConvertBack<A, B>> TryConvertBack<A, B> for (TupleElement0, TupleElement1)
impl<A, B, TupleElement0: TryConvertBack<A, B>, TupleElement1: TryConvertBack<A, B>> TryConvertBack<A, B> for (TupleElement0, TupleElement1)
source§fn try_convert_back(b: B) -> Result<A, B>
fn try_convert_back(b: B) -> Result<A, B>
Attempt to make conversion back. If returning Result::Err, the inner must always be
b
.