pub trait NodeService:
Send
+ Sync
+ 'static {
Show 13 methods
// Required methods
fn get_transaction_count<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTransactionCountRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TransactionCountResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_payload_size<'life0, 'async_trait>(
&'life0 self,
request: Request<GetPayloadSizeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PayloadSizeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_sync_status<'life0, 'async_trait>(
&'life0 self,
request: Request<GetSyncStatusRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SyncStatusResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_reward<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBlockRewardRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockRewardResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_node_block_height<'life0, 'async_trait>(
&'life0 self,
request: Request<GetNodeBlockHeightRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NodeBlockHeightResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_header_window<'life0, 'async_trait>(
&'life0 self,
request: Request<GetHeaderWindowRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HeaderWindowResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_vid_share<'life0, 'async_trait>(
&'life0 self,
request: Request<GetVidShareRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<VidShareResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_node_limits<'life0, 'async_trait>(
&'life0 self,
request: Request<GetNodeLimitsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NodeLimitsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_stake_table<'life0, 'async_trait>(
&'life0 self,
request: Request<GetStakeTableRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<StakeTableResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_validators<'life0, 'async_trait>(
&'life0 self,
request: Request<GetValidatorsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_all_validators<'life0, 'async_trait>(
&'life0 self,
request: Request<GetAllValidatorsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_proposal_participation<'life0, 'async_trait>(
&'life0 self,
request: Request<GetProposalParticipationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ParticipationResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_vote_participation<'life0, 'async_trait>(
&'life0 self,
request: Request<GetVoteParticipationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ParticipationResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Generated trait containing gRPC methods that should be implemented for use with NodeServiceServer.
Required Methods§
Sourcefn get_transaction_count<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTransactionCountRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TransactionCountResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_transaction_count<'life0, 'async_trait>(
&'life0 self,
request: Request<GetTransactionCountRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<TransactionCountResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Count the transactions in a block range, optionally in one namespace
Sourcefn get_payload_size<'life0, 'async_trait>(
&'life0 self,
request: Request<GetPayloadSizeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PayloadSizeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_payload_size<'life0, 'async_trait>(
&'life0 self,
request: Request<GetPayloadSizeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PayloadSizeResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the cumulative payload size of a block range, optionally of one namespace
Sourcefn get_sync_status<'life0, 'async_trait>(
&'life0 self,
request: Request<GetSyncStatusRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SyncStatusResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_sync_status<'life0, 'async_trait>(
&'life0 self,
request: Request<GetSyncStatusRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<SyncStatusResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get which blocks, leaves and VID common data this node stores, still fetches, or has pruned
Sourcefn get_block_reward<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBlockRewardRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockRewardResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_reward<'life0, 'async_trait>(
&'life0 self,
request: Request<GetBlockRewardRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlockRewardResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the block reward for an epoch
Sourcefn get_node_block_height<'life0, 'async_trait>(
&'life0 self,
request: Request<GetNodeBlockHeightRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NodeBlockHeightResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_node_block_height<'life0, 'async_trait>(
&'life0 self,
request: Request<GetNodeBlockHeightRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NodeBlockHeightResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the height of the chain as this node sees it. /v2/status/block-height answers the same
question; both exist because v1 has both, and a client watching one module should not have to
call into another.
Sourcefn get_header_window<'life0, 'async_trait>(
&'life0 self,
request: Request<GetHeaderWindowRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HeaderWindowResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_header_window<'life0, 'async_trait>(
&'life0 self,
request: Request<GetHeaderWindowRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<HeaderWindowResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the headers whose timestamps fall in a window, plus the headers either side of it. The window starts at exactly one of start_time, start_height or start_hash
Get this node’s VID share for a block, selected by exactly one of height, hash or payload_hash
Sourcefn get_node_limits<'life0, 'async_trait>(
&'life0 self,
request: Request<GetNodeLimitsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NodeLimitsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_node_limits<'life0, 'async_trait>(
&'life0 self,
request: Request<GetNodeLimitsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<NodeLimitsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get this node’s request limits
Sourcefn get_stake_table<'life0, 'async_trait>(
&'life0 self,
request: Request<GetStakeTableRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<StakeTableResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_stake_table<'life0, 'async_trait>(
&'life0 self,
request: Request<GetStakeTableRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<StakeTableResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the consensus stake table for an epoch
Sourcefn get_validators<'life0, 'async_trait>(
&'life0 self,
request: Request<GetValidatorsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_validators<'life0, 'async_trait>(
&'life0 self,
request: Request<GetValidatorsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the validators eligible for consensus in an epoch
Sourcefn get_all_validators<'life0, 'async_trait>(
&'life0 self,
request: Request<GetAllValidatorsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_all_validators<'life0, 'async_trait>(
&'life0 self,
request: Request<GetAllValidatorsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ValidatorsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a page of every registered validator in an epoch, eligible or not
Sourcefn get_proposal_participation<'life0, 'async_trait>(
&'life0 self,
request: Request<GetProposalParticipationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ParticipationResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_proposal_participation<'life0, 'async_trait>(
&'life0 self,
request: Request<GetProposalParticipationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ParticipationResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get, per validator, the proposals it made as a fraction of the views it led in an epoch
Sourcefn get_vote_participation<'life0, 'async_trait>(
&'life0 self,
request: Request<GetVoteParticipationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ParticipationResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_vote_participation<'life0, 'async_trait>(
&'life0 self,
request: Request<GetVoteParticipationRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ParticipationResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get, per validator, the votes it cast as a fraction of an epoch’s views
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".