Trait SessionValidatorManagementQueryApi

Source
pub trait SessionValidatorManagementQueryApi {
    // Required methods
    fn get_epoch_committee(
        &self,
        epoch_number: u64,
    ) -> QueryResult<GetCommitteeResponse>;
    fn get_registrations<'life0, 'async_trait>(
        &'life0 self,
        mc_epoch_number: McEpochNumber,
        stake_pool_public_key: StakePoolPublicKey,
    ) -> Pin<Box<dyn Future<Output = QueryResult<Vec<CandidateRegistrationEntry>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_ariadne_parameters<'life0, 'async_trait>(
        &'life0 self,
        epoch_number: McEpochNumber,
    ) -> Pin<Box<dyn Future<Output = QueryResult<AriadneParameters>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

API for Session Validator Management Queries

Required Methods§

Source

fn get_epoch_committee( &self, epoch_number: u64, ) -> QueryResult<GetCommitteeResponse>

Returns the committee for given sidechain epoch. The order of the list represents the order of slot allocation.

Source

fn get_registrations<'life0, 'async_trait>( &'life0 self, mc_epoch_number: McEpochNumber, stake_pool_public_key: StakePoolPublicKey, ) -> Pin<Box<dyn Future<Output = QueryResult<Vec<CandidateRegistrationEntry>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

returns: Last active and valid registration followed by all newer invalid registrations for mc_epoch_number and stake_pool_public_key. Regardless of mc_epoch_number value, it always uses validation api from the latest sidechain block.

Source

fn get_ariadne_parameters<'life0, 'async_trait>( &'life0 self, epoch_number: McEpochNumber, ) -> Pin<Box<dyn Future<Output = QueryResult<AriadneParameters>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Regardless of epoch_number value, all the candidates data validation is done based on the validation api from the latest sidechain block.

Implementors§

Source§

impl<C, Block, CommitteeMember> SessionValidatorManagementQueryApi for SessionValidatorManagementQuery<C, Block, CommitteeMember>
where Block: BlockT, NumberFor<Block>: From<u32> + Into<u32>, CommitteeMember: CommitteeMemberT + Decode + Encode + Send + Sync + 'static, CommitteeMember::AuthorityKeys: Decode + Encode, CommitteeMember::AuthorityId: AsRef<[u8]> + Decode + Encode + Send + Sync + 'static, C: Send + Sync + 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>, C::Api: Core<Block> + GetSidechainStatus<Block> + SessionValidatorManagementApi<Block, CommitteeMember, AuthoritySelectionInputs, ScEpochNumber> + GetGenesisUtxo<Block> + CandidateValidationApi<Block>,