Trait SessionValidatorManagementRpcApiServer

Source
pub trait SessionValidatorManagementRpcApiServer:
    Sized
    + Send
    + Sync
    + 'static {
    // Required methods
    fn get_epoch_committee(
        &self,
        epoch_number: u64,
    ) -> RpcResult<GetCommitteeResponse>;
    fn get_registrations<'life0, 'async_trait>(
        &'life0 self,
        mc_epoch_number: McEpochNumber,
        stake_pool_public_key: StakePoolPublicKey,
    ) -> Pin<Box<dyn Future<Output = RpcResult<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 = RpcResult<AriadneParameters>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the SessionValidatorManagementRpcApi RPC API.

Required Methods§

Source

fn get_epoch_committee( &self, epoch_number: u64, ) -> RpcResult<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 = RpcResult<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 mc_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 = RpcResult<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.

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> SessionValidatorManagementRpcApiServer for SessionValidatorManagementRpc<T>
where T: SessionValidatorManagementQueryApi + Send + Sync + 'static,