pub trait BlockEngineRelayer:
Send
+ Sync
+ 'static {
type SubscribeAccountsOfInterestStream: Stream<Item = Result<AccountsOfInterestUpdate, Status>> + Send + 'static;
type SubscribeProgramsOfInterestStream: Stream<Item = Result<ProgramsOfInterestUpdate, Status>> + Send + 'static;
type StartExpiringPacketStreamStream: Stream<Item = Result<StartExpiringPacketStreamResponse, Status>> + Send + 'static;
// Required methods
fn subscribe_accounts_of_interest<'life0, 'async_trait>(
&'life0 self,
request: Request<AccountsOfInterestRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeAccountsOfInterestStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe_programs_of_interest<'life0, 'async_trait>(
&'life0 self,
request: Request<ProgramsOfInterestRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeProgramsOfInterestStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn start_expiring_packet_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<PacketBatchUpdate>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StartExpiringPacketStreamStream>, 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 BlockEngineRelayerServer.
Required Associated Types§
Sourcetype SubscribeAccountsOfInterestStream: Stream<Item = Result<AccountsOfInterestUpdate, Status>> + Send + 'static
type SubscribeAccountsOfInterestStream: Stream<Item = Result<AccountsOfInterestUpdate, Status>> + Send + 'static
Server streaming response type for the SubscribeAccountsOfInterest method.
Sourcetype SubscribeProgramsOfInterestStream: Stream<Item = Result<ProgramsOfInterestUpdate, Status>> + Send + 'static
type SubscribeProgramsOfInterestStream: Stream<Item = Result<ProgramsOfInterestUpdate, Status>> + Send + 'static
Server streaming response type for the SubscribeProgramsOfInterest method.
Sourcetype StartExpiringPacketStreamStream: Stream<Item = Result<StartExpiringPacketStreamResponse, Status>> + Send + 'static
type StartExpiringPacketStreamStream: Stream<Item = Result<StartExpiringPacketStreamResponse, Status>> + Send + 'static
Server streaming response type for the StartExpiringPacketStream method.
Required Methods§
Sourcefn subscribe_accounts_of_interest<'life0, 'async_trait>(
&'life0 self,
request: Request<AccountsOfInterestRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeAccountsOfInterestStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe_accounts_of_interest<'life0, 'async_trait>(
&'life0 self,
request: Request<AccountsOfInterestRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeAccountsOfInterestStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
/ The block engine feeds accounts of interest (AOI) updates to the relayer periodically. / For all transactions the relayer receives, it forwards transactions to the block engine which write-lock / any of the accounts in the AOI.
fn subscribe_programs_of_interest<'life0, 'async_trait>(
&'life0 self,
request: Request<ProgramsOfInterestRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::SubscribeProgramsOfInterestStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sourcefn start_expiring_packet_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<PacketBatchUpdate>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StartExpiringPacketStreamStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_expiring_packet_stream<'life0, 'async_trait>(
&'life0 self,
request: Request<Streaming<PacketBatchUpdate>>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::StartExpiringPacketStreamStream>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Validators can subscribe to packets from the relayer and receive a multiplexed signal that contains a mixture of packets and heartbeats. NOTE: This is a bi-directional stream due to a bug with how Envoy handles half closed client-side streams. The issue is being tracked here: https://github.com/envoyproxy/envoy/issues/22748. In the meantime, the server will stream heartbeats to clients at some reasonable cadence.