Trait linera_rpc::grpc::api::validator_node_server::ValidatorNode
source · pub trait ValidatorNode: Send + Sync + 'static {
type SubscribeStream: Stream<Item = Result<Notification, Status>> + Send + 'static;
Show 17 methods
// Required methods
fn handle_block_proposal<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockProposal>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_lite_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<LiteCertificate>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_confirmed_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<HandleConfirmedCertificateRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_validated_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<HandleValidatedCertificateRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_timeout_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<HandleTimeoutCertificateRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_chain_info_query<'life0, 'async_trait>(
&'life0 self,
request: Request<ChainInfoQuery>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscriptionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_version_info<'life0, 'async_trait>(
&'life0 self,
request: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<VersionInfo>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_genesis_config_hash<'life0, 'async_trait>(
&'life0 self,
request: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<CryptoHash>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn download_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<BlobId>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlobContent>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn download_pending_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<PendingBlobRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PendingBlobResult>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn handle_pending_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<HandlePendingBlobRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn upload_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<BlobContent>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlobId>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn download_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<CryptoHash>,
) -> Pin<Box<dyn Future<Output = Result<Response<Certificate>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn download_certificates<'life0, 'async_trait>(
&'life0 self,
request: Request<CertificatesBatchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CertificatesBatchResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn blob_last_used_by<'life0, 'async_trait>(
&'life0 self,
request: Request<BlobId>,
) -> Pin<Box<dyn Future<Output = Result<Response<CryptoHash>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn missing_blob_ids<'life0, 'async_trait>(
&'life0 self,
request: Request<BlobIds>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlobIds>, 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 ValidatorNodeServer.
Required Associated Types§
sourcetype SubscribeStream: Stream<Item = Result<Notification, Status>> + Send + 'static
type SubscribeStream: Stream<Item = Result<Notification, Status>> + Send + 'static
Server streaming response type for the Subscribe method.
Required Methods§
sourcefn handle_block_proposal<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockProposal>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_block_proposal<'life0, 'async_trait>(
&'life0 self,
request: Request<BlockProposal>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Propose a new block.
sourcefn handle_lite_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<LiteCertificate>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_lite_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<LiteCertificate>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process a certificate without value.
fn handle_confirmed_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<HandleConfirmedCertificateRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_validated_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<HandleValidatedCertificateRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_timeout_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<HandleTimeoutCertificateRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
sourcefn handle_chain_info_query<'life0, 'async_trait>(
&'life0 self,
request: Request<ChainInfoQuery>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_chain_info_query<'life0, 'async_trait>(
&'life0 self,
request: Request<ChainInfoQuery>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle information queries for this chain.
sourcefn subscribe<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscriptionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe<'life0, 'async_trait>(
&'life0 self,
request: Request<SubscriptionRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Subscribe to notifications for a set of Chain Ids.
sourcefn get_version_info<'life0, 'async_trait>(
&'life0 self,
request: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<VersionInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_version_info<'life0, 'async_trait>(
&'life0 self,
request: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<VersionInfo>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Request the node’s version info.
sourcefn get_genesis_config_hash<'life0, 'async_trait>(
&'life0 self,
request: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<CryptoHash>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_genesis_config_hash<'life0, 'async_trait>(
&'life0 self,
request: Request<()>,
) -> Pin<Box<dyn Future<Output = Result<Response<CryptoHash>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Request the genesis configuration hash of the network this node is part of.
sourcefn download_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<BlobId>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlobContent>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn download_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<BlobId>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlobContent>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Download a blob.
sourcefn download_pending_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<PendingBlobRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PendingBlobResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn download_pending_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<PendingBlobRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<PendingBlobResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Download a blob that belongs to a pending block on the given chain.
sourcefn handle_pending_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<HandlePendingBlobRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle_pending_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<HandlePendingBlobRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ChainInfoResult>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handle a blob that belongs to a pending block on the given chain.
sourcefn upload_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<BlobContent>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlobId>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn upload_blob<'life0, 'async_trait>(
&'life0 self,
request: Request<BlobContent>,
) -> Pin<Box<dyn Future<Output = Result<Response<BlobId>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Upload a blob. Returns an error if the validator has not seen a certificate using this blob.
sourcefn download_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<CryptoHash>,
) -> Pin<Box<dyn Future<Output = Result<Response<Certificate>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn download_certificate<'life0, 'async_trait>(
&'life0 self,
request: Request<CryptoHash>,
) -> Pin<Box<dyn Future<Output = Result<Response<Certificate>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Download a certificate.
sourcefn download_certificates<'life0, 'async_trait>(
&'life0 self,
request: Request<CertificatesBatchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CertificatesBatchResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn download_certificates<'life0, 'async_trait>(
&'life0 self,
request: Request<CertificatesBatchRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<CertificatesBatchResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Download a batch of certificates.