Trait dkg_primitives::DKGApi
pub trait DKGApi<Block, AuthorityId, N, MaxProposalLength, MaxAuthorities>: Core<Block>where
Block: Block,
AuthorityId: Codec + PartialEq<AuthorityId>,
MaxProposalLength: Get<u32> + Clone,
MaxAuthorities: Get<u32> + Clone,
N: Codec + PartialEq<N> + AtLeast32BitUnsigned,{
Show 21 methods
// Provided methods
fn authority_set(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<AuthoritySet<AuthorityId, MaxAuthorities>, ApiError> { ... }
fn get_best_authorities(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<Vec<(u16, AuthorityId), Global>, ApiError> { ... }
fn get_next_best_authorities(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<Vec<(u16, AuthorityId), Global>, ApiError> { ... }
fn get_current_session_progress(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
block_number: N
) -> Result<Option<Permill>, ApiError> { ... }
fn signature_threshold(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<u16, ApiError> { ... }
fn keygen_threshold(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<u16, ApiError> { ... }
fn next_signature_threshold(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<u16, ApiError> { ... }
fn next_keygen_threshold(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<u16, ApiError> { ... }
fn queued_authority_set(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<AuthoritySet<AuthorityId, MaxAuthorities>, ApiError> { ... }
fn should_refresh(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
_block_number: N
) -> Result<bool, ApiError> { ... }
fn next_dkg_pub_key(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<Option<(u64, Vec<u8, Global>)>, ApiError> { ... }
fn dkg_pub_key(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<(u64, Vec<u8, Global>), ApiError> { ... }
fn get_unsigned_proposal_batches(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<Vec<StoredUnsignedProposalBatch<u32, MaxProposalLength, CustomU32Getter<10>, N>, Global>, ApiError> { ... }
fn get_authority_accounts(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<(Vec<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, Global>, Vec<<<MultiSignature as Verify>::Signer as IdentifyAccount>::AccountId, Global>), ApiError> { ... }
fn get_reputations(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
authorities: Vec<AuthorityId, Global>
) -> Result<Vec<(AuthorityId, u128), Global>, ApiError> { ... }
fn get_keygen_jailed(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
set: Vec<AuthorityId, Global>
) -> Result<Vec<AuthorityId, Global>, ApiError> { ... }
fn get_signing_jailed(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
set: Vec<AuthorityId, Global>
) -> Result<Vec<AuthorityId, Global>, ApiError> { ... }
fn next_pub_key_sig(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<Option<Vec<u8, Global>>, ApiError> { ... }
fn refresh_nonce(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<u32, ApiError> { ... }
fn should_execute_new_keygen(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<(bool, bool), ApiError> { ... }
fn should_submit_proposer_vote(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<bool, ApiError> { ... }
}
Provided Methods§
Return the current active authority set
Return the current best authority set chosen for keygen
Return the next best authority set chosen for the queued keygen
fn get_current_session_progress(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
block_number: N
) -> Result<Option<Permill>, ApiError>
fn get_current_session_progress( &self, __runtime_api_at_param__: <Block as Block>::Hash, block_number: N ) -> Result<Option<Permill>, ApiError>
Returns the progress of current session
fn signature_threshold(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<u16, ApiError>
fn signature_threshold( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<u16, ApiError>
Return the current signature threshold for the DKG
fn keygen_threshold(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<u16, ApiError>
fn keygen_threshold( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<u16, ApiError>
Return the current keygen threshold for the DKG
fn next_signature_threshold(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<u16, ApiError>
fn next_signature_threshold( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<u16, ApiError>
Return the next signature threshold for the DKG
fn next_keygen_threshold(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<u16, ApiError>
fn next_keygen_threshold( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<u16, ApiError>
Return the next keygen threshold for the DKG
Return the next authorities active authority set
fn should_refresh(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
_block_number: N
) -> Result<bool, ApiError>
fn should_refresh( &self, __runtime_api_at_param__: <Block as Block>::Hash, _block_number: N ) -> Result<bool, ApiError>
Check if refresh process should start
fn next_dkg_pub_key(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<Option<(u64, Vec<u8, Global>)>, ApiError>
fn next_dkg_pub_key( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<Option<(u64, Vec<u8, Global>)>, ApiError>
Fetch DKG public key for queued authorities
fn dkg_pub_key(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<(u64, Vec<u8, Global>), ApiError>
fn dkg_pub_key( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<(u64, Vec<u8, Global>), ApiError>
Fetch DKG public key for current authorities
fn get_unsigned_proposal_batches(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<Vec<StoredUnsignedProposalBatch<u32, MaxProposalLength, CustomU32Getter<10>, N>, Global>, ApiError>
fn get_unsigned_proposal_batches( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<Vec<StoredUnsignedProposalBatch<u32, MaxProposalLength, CustomU32Getter<10>, N>, Global>, ApiError>
Get list of unsigned proposals
Current and Queued Authority Account Ids [/current_authorities/, /next_authorities/]
fn get_reputations(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
authorities: Vec<AuthorityId, Global>
) -> Result<Vec<(AuthorityId, u128), Global>, ApiError>
fn get_reputations( &self, __runtime_api_at_param__: <Block as Block>::Hash, authorities: Vec<AuthorityId, Global> ) -> Result<Vec<(AuthorityId, u128), Global>, ApiError>
Reputations for authorities
fn get_keygen_jailed(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
set: Vec<AuthorityId, Global>
) -> Result<Vec<AuthorityId, Global>, ApiError>
fn get_keygen_jailed( &self, __runtime_api_at_param__: <Block as Block>::Hash, set: Vec<AuthorityId, Global> ) -> Result<Vec<AuthorityId, Global>, ApiError>
Returns the set of jailed keygen authorities from a set of authorities
fn get_signing_jailed(
&self,
__runtime_api_at_param__: <Block as Block>::Hash,
set: Vec<AuthorityId, Global>
) -> Result<Vec<AuthorityId, Global>, ApiError>
fn get_signing_jailed( &self, __runtime_api_at_param__: <Block as Block>::Hash, set: Vec<AuthorityId, Global> ) -> Result<Vec<AuthorityId, Global>, ApiError>
Returns the set of jailed signing authorities from a set of authorities
fn next_pub_key_sig(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<Option<Vec<u8, Global>>, ApiError>
fn next_pub_key_sig( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<Option<Vec<u8, Global>>, ApiError>
Fetch DKG public key for sig
fn refresh_nonce(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<u32, ApiError>
fn refresh_nonce( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<u32, ApiError>
Get next nonce value for refresh proposal
fn should_execute_new_keygen(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<(bool, bool), ApiError>
fn should_execute_new_keygen( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<(bool, bool), ApiError>
Returns (true, false) if we should execute a new keygen. Returns (true, true) if we should execute a forced new keygen.
fn should_submit_proposer_vote(
&self,
__runtime_api_at_param__: <Block as Block>::Hash
) -> Result<bool, ApiError>
fn should_submit_proposer_vote( &self, __runtime_api_at_param__: <Block as Block>::Hash ) -> Result<bool, ApiError>
Whether to submit proposer vote