pub trait CallSubType<T: Config<I, RuntimeCall = Self>, I: 'static>: IsSubType<CallableCallFor<Pallet<T, I>, T>> {
// Provided methods
fn one_entry_submit_parachain_heads_info(
&self,
) -> Option<SubmitParachainHeadsInfo> { ... }
fn submit_parachain_heads_info_for(
&self,
para_id: u32,
) -> Option<SubmitParachainHeadsInfo> { ... }
fn check_obsolete_submit_parachain_heads(
&self,
) -> Result<Option<VerifiedSubmitParachainHeadsInfo>, TransactionValidityError>
where Self: Sized { ... }
}
Expand description
Trait representing a call that is a sub type of this pallet’s call.
Provided Methods§
sourcefn one_entry_submit_parachain_heads_info(
&self,
) -> Option<SubmitParachainHeadsInfo>
fn one_entry_submit_parachain_heads_info( &self, ) -> Option<SubmitParachainHeadsInfo>
Create a new instance of SubmitParachainHeadsInfo
from a SubmitParachainHeads
call with
one single parachain entry.
sourcefn submit_parachain_heads_info_for(
&self,
para_id: u32,
) -> Option<SubmitParachainHeadsInfo>
fn submit_parachain_heads_info_for( &self, para_id: u32, ) -> Option<SubmitParachainHeadsInfo>
Create a new instance of SubmitParachainHeadsInfo
from a SubmitParachainHeads
call with
one single parachain entry, if the entry is for the provided parachain id.
sourcefn check_obsolete_submit_parachain_heads(
&self,
) -> Result<Option<VerifiedSubmitParachainHeadsInfo>, TransactionValidityError>where
Self: Sized,
fn check_obsolete_submit_parachain_heads(
&self,
) -> Result<Option<VerifiedSubmitParachainHeadsInfo>, TransactionValidityError>where
Self: Sized,
Validate parachain heads in order to avoid “mining” transactions that provide outdated bridged parachain heads. Without this validation, even honest relayers may lose their funds if there are multiple relays running and submitting the same information.
This validation only works with transactions that are updating single parachain head. We can’t use unbounded validation - it may take too long and either break block production, or “eat” significant portion of block production time literally for nothing. In addition, the single-parachain-head-per-transaction is how the pallet will be used in our environment.