Skip to main content

AvailabilityService

Trait AvailabilityService 

Source
pub trait AvailabilityService:
    Send
    + Sync
    + 'static {
    type StreamLeavesStream: Stream<Item = Result<LeafResponse, Status>> + Send + 'static;
    type StreamHeadersStream: Stream<Item = Result<HeaderResponse, Status>> + Send + 'static;
    type StreamBlocksStream: Stream<Item = Result<BlockResponse, Status>> + Send + 'static;
    type StreamPayloadsStream: Stream<Item = Result<PayloadResponse, Status>> + Send + 'static;
    type StreamVidCommonStream: Stream<Item = Result<VidCommonResponse, Status>> + Send + 'static;
    type StreamTransactionsStream: Stream<Item = Result<TransactionResponse, Status>> + Send + 'static;
    type StreamNamespaceProofsStream: Stream<Item = Result<NamespaceProofResponse, Status>> + Send + 'static;

Show 31 methods // Required methods fn get_limits<'life0, 'async_trait>( &'life0 self, request: Request<GetLimitsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<LimitsResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_header<'life0, 'async_trait>( &'life0 self, request: Request<GetHeaderRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<HeaderResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_header_range<'life0, 'async_trait>( &'life0 self, request: Request<GetHeaderRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<HeaderRangeResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_leaf<'life0, 'async_trait>( &'life0 self, request: Request<GetLeafRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<LeafResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_leaf_range<'life0, 'async_trait>( &'life0 self, request: Request<GetLeafRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<LeafRangeResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_leaf_ranges<'life0, 'async_trait>( &'life0 self, request: Request<GetLeafRangesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<LeafRangeResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_cert2<'life0, 'async_trait>( &'life0 self, request: Request<GetCert2Request>, ) -> Pin<Box<dyn Future<Output = Result<Response<Cert2Response>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block<'life0, 'async_trait>( &'life0 self, request: Request<GetBlockRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_range<'life0, 'async_trait>( &'life0 self, request: Request<GetBlockRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockRangeResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_ranges<'life0, 'async_trait>( &'life0 self, request: Request<GetBlockRangesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockRangeResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_payload<'life0, 'async_trait>( &'life0 self, request: Request<GetPayloadRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PayloadResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_payload_range<'life0, 'async_trait>( &'life0 self, request: Request<GetPayloadRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PayloadRangeResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_vid_common<'life0, 'async_trait>( &'life0 self, request: Request<GetVidCommonRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<VidCommonResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_vid_common_range<'life0, 'async_trait>( &'life0 self, request: Request<GetVidCommonRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<VidCommonRangeResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_vid_common_ranges<'life0, 'async_trait>( &'life0 self, request: Request<GetVidCommonRangesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<VidCommonRangeResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_transaction<'life0, 'async_trait>( &'life0 self, request: Request<GetTransactionRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<TransactionResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_transaction_proof<'life0, 'async_trait>( &'life0 self, request: Request<GetTransactionProofRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<TransactionWithProofResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_summary<'life0, 'async_trait>( &'life0 self, request: Request<GetBlockSummaryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockSummaryResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_summary_range<'life0, 'async_trait>( &'life0 self, request: Request<GetBlockSummaryRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockSummaryRangeResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_namespace_proof<'life0, 'async_trait>( &'life0 self, request: Request<GetNamespaceProofRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<NamespaceProofResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_namespace_proof_range<'life0, 'async_trait>( &'life0 self, request: Request<GetNamespaceProofRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<NamespaceProofRangeResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_incorrect_encoding_proof<'life0, 'async_trait>( &'life0 self, request: Request<GetIncorrectEncodingProofRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<IncorrectEncodingProofResponse>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_state_cert<'life0, 'async_trait>( &'life0 self, request: Request<GetStateCertRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StateCertV1Response>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_state_cert_v2<'life0, 'async_trait>( &'life0 self, request: Request<GetStateCertV2Request>, ) -> Pin<Box<dyn Future<Output = Result<Response<StateCertV2Response>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_leaves<'life0, 'async_trait>( &'life0 self, request: Request<StreamLeavesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamLeavesStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_headers<'life0, 'async_trait>( &'life0 self, request: Request<StreamHeadersRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamHeadersStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_blocks<'life0, 'async_trait>( &'life0 self, request: Request<StreamBlocksRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamBlocksStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_payloads<'life0, 'async_trait>( &'life0 self, request: Request<StreamPayloadsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamPayloadsStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_vid_common<'life0, 'async_trait>( &'life0 self, request: Request<StreamVidCommonRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamVidCommonStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_transactions<'life0, 'async_trait>( &'life0 self, request: Request<StreamTransactionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamTransactionsStream>, Status>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stream_namespace_proofs<'life0, 'async_trait>( &'life0 self, request: Request<StreamNamespaceProofsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamNamespaceProofsStream>, 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 AvailabilityServiceServer.

Required Associated Types§

Source

type StreamLeavesStream: Stream<Item = Result<LeafResponse, Status>> + Send + 'static

Server streaming response type for the StreamLeaves method.

Source

type StreamHeadersStream: Stream<Item = Result<HeaderResponse, Status>> + Send + 'static

Server streaming response type for the StreamHeaders method.

Source

type StreamBlocksStream: Stream<Item = Result<BlockResponse, Status>> + Send + 'static

Server streaming response type for the StreamBlocks method.

Source

type StreamPayloadsStream: Stream<Item = Result<PayloadResponse, Status>> + Send + 'static

Server streaming response type for the StreamPayloads method.

Source

type StreamVidCommonStream: Stream<Item = Result<VidCommonResponse, Status>> + Send + 'static

Server streaming response type for the StreamVidCommon method.

Source

type StreamTransactionsStream: Stream<Item = Result<TransactionResponse, Status>> + Send + 'static

Server streaming response type for the StreamTransactions method.

Source

type StreamNamespaceProofsStream: Stream<Item = Result<NamespaceProofResponse, Status>> + Send + 'static

Server streaming response type for the StreamNamespaceProofs method.

Required Methods§

Source

fn get_limits<'life0, 'async_trait>( &'life0 self, request: Request<GetLimitsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<LimitsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the most objects one range query may load, per object class

Source

fn get_header<'life0, 'async_trait>( &'life0 self, request: Request<GetHeaderRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<HeaderResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get one block header. Exactly one of height, hash or payload_hash selects the block. None or several is a 400

Source

fn get_header_range<'life0, 'async_trait>( &'life0 self, request: Request<GetHeaderRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<HeaderRangeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the headers of a height range, bounded by the large-object range limit

Source

fn get_leaf<'life0, 'async_trait>( &'life0 self, request: Request<GetLeafRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<LeafResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get one leaf with the QC certifying it. Exactly one of height or hash selects it. None or both is a 400

Source

fn get_leaf_range<'life0, 'async_trait>( &'life0 self, request: Request<GetLeafRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<LeafRangeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the leaves of a height range, bounded by the small-object range limit

Source

fn get_leaf_ranges<'life0, 'async_trait>( &'life0 self, request: Request<GetLeafRangesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<LeafRangeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the leaves of several height ranges in one request, for peers catching up. The whole set is served or none of it, in the order the ranges were given

Source

fn get_cert2<'life0, 'async_trait>( &'life0 self, request: Request<GetCert2Request>, ) -> Pin<Box<dyn Future<Output = Result<Response<Cert2Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the new protocol’s phase-2 certificate for a height. Not found before the new protocol took over, or while the node is still fetching it

Source

fn get_block<'life0, 'async_trait>( &'life0 self, request: Request<GetBlockRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get one block, header and payload together. Exactly one of height, hash or payload_hash selects it. None or several is a 400

Source

fn get_block_range<'life0, 'async_trait>( &'life0 self, request: Request<GetBlockRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockRangeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the blocks of a height range, bounded by the large-object range limit

Source

fn get_block_ranges<'life0, 'async_trait>( &'life0 self, request: Request<GetBlockRangesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockRangeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the blocks of several height ranges in one request, for peers catching up. The whole set is served or none of it, in the order the ranges were given

Source

fn get_payload<'life0, 'async_trait>( &'life0 self, request: Request<GetPayloadRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PayloadResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get one payload. Exactly one of height, hash or block_hash selects it. None or several is a 400

Source

fn get_payload_range<'life0, 'async_trait>( &'life0 self, request: Request<GetPayloadRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<PayloadRangeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the payloads of a height range, bounded by the large-object range limit

Source

fn get_vid_common<'life0, 'async_trait>( &'life0 self, request: Request<GetVidCommonRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<VidCommonResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the VID common data of one block. Exactly one of height, hash or payload_hash selects the block. None or several is a 400

Source

fn get_vid_common_range<'life0, 'async_trait>( &'life0 self, request: Request<GetVidCommonRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<VidCommonRangeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the VID common data of a height range, bounded by the small-object range limit

Source

fn get_vid_common_ranges<'life0, 'async_trait>( &'life0 self, request: Request<GetVidCommonRangesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<VidCommonRangeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the VID common data of several height ranges in one request, for peers catching up. The whole set is served or none of it, in the order the ranges were given

Source

fn get_transaction<'life0, 'async_trait>( &'life0 self, request: Request<GetTransactionRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<TransactionResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get one transaction. Either height and index together, or hash, selects it. Anything else is a 400

Source

fn get_transaction_proof<'life0, 'async_trait>( &'life0 self, request: Request<GetTransactionProofRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<TransactionWithProofResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get one transaction with its inclusion proof. Either height and index together, or hash, selects it. Anything else is a 400

Source

fn get_block_summary<'life0, 'async_trait>( &'life0 self, request: Request<GetBlockSummaryRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockSummaryResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a block’s header with its hash, size and transaction count, without the payload

Source

fn get_block_summary_range<'life0, 'async_trait>( &'life0 self, request: Request<GetBlockSummaryRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<BlockSummaryRangeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the block summaries of a height range, bounded by the large-object range limit

Source

fn get_namespace_proof<'life0, 'async_trait>( &'life0 self, request: Request<GetNamespaceProofRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<NamespaceProofResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a namespace’s transactions and its proof against one block’s payload commitment. Exactly one of height, hash or payload_hash selects the block. None or several is a 400

Source

fn get_namespace_proof_range<'life0, 'async_trait>( &'life0 self, request: Request<GetNamespaceProofRangeRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<NamespaceProofRangeResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a namespace’s proofs over a height range, bounded by the namespace-proof range limit

Source

fn get_incorrect_encoding_proof<'life0, 'async_trait>( &'life0 self, request: Request<GetIncorrectEncodingProofRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<IncorrectEncodingProofResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the proof that an AvidM block’s disperser encoded a namespace incorrectly

Source

fn get_state_cert<'life0, 'async_trait>( &'life0 self, request: Request<GetStateCertRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<StateCertV1Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the light-client state certificate finalizing an epoch, in its first form

Source

fn get_state_cert_v2<'life0, 'async_trait>( &'life0 self, request: Request<GetStateCertV2Request>, ) -> Pin<Box<dyn Future<Output = Result<Response<StateCertV2Response>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get the light-client state certificate finalizing an epoch, with both contract signatures

Source

fn stream_leaves<'life0, 'async_trait>( &'life0 self, request: Request<StreamLeavesRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamLeavesStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to leaves from a height onward. Over REST this is server-sent events, one JSON data: frame per leaf. A stream follows the chain head and never ends on its own

Source

fn stream_headers<'life0, 'async_trait>( &'life0 self, request: Request<StreamHeadersRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamHeadersStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to headers from a height onward, as server-sent events

Source

fn stream_blocks<'life0, 'async_trait>( &'life0 self, request: Request<StreamBlocksRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamBlocksStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to blocks from a height onward, as server-sent events

Source

fn stream_payloads<'life0, 'async_trait>( &'life0 self, request: Request<StreamPayloadsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamPayloadsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to payloads from a height onward, as server-sent events

Source

fn stream_vid_common<'life0, 'async_trait>( &'life0 self, request: Request<StreamVidCommonRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamVidCommonStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to VID common data from a height onward, as server-sent events

Source

fn stream_transactions<'life0, 'async_trait>( &'life0 self, request: Request<StreamTransactionsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamTransactionsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to transactions from a height onward, optionally of one namespace, as server-sent events

Source

fn stream_namespace_proofs<'life0, 'async_trait>( &'life0 self, request: Request<StreamNamespaceProofsRequest>, ) -> Pin<Box<dyn Future<Output = Result<Response<Self::StreamNamespaceProofsStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Subscribe to one namespace’s proofs from a height onward, as server-sent events

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§