referrerpolicy=no-referrer-when-downgrade

Trait pallet_bridge_parachains::CallSubType

source ·
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§

source

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.

source

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.

source

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.

Implementors§

source§

impl<T, I: 'static> CallSubType<T, I> for T::RuntimeCall
where T: Config<I>, T::RuntimeCall: IsSubType<CallableCallFor<Pallet<T, I>, T>>,