#grpc #multiplexing #geyser #yellowstone #block #subscription #connect

geyser-grpc-connector

Multiplexing and Reconnection on Yellowstone gRPC Geyser client streaming

5 unstable releases

0.7.2+yellowstone.1.11 Jan 7, 2024
0.7.1+yellowstone.1.11 Dec 22, 2023
0.7.0+yellowstone.1.11 Dec 21, 2023
0.6.0+yellowstone.1.11 Dec 21, 2023
0.5.0+yellowstone.1.11 Dec 20, 2023

#13 in #geyser

41 downloads per month

Apache-2.0

40KB
467 lines

Solana Geyser gRPC Multiplexing and Reconnect

This project provides multiplexing of multiple Yellowstone gRPC subscriptions based on Fastest Wins Strategy.

  • Multiple Futures get merged where the first next block that arrives will be emitted.
  • No guarantees are made about if the messages are continuous or not.
  • Reconnects are handled transparently inside the Futures.

Disclaimer: The library is designed with the needs of LiteRPC in mind yet might be useful for other projects as well.

The implementation is based on Rust Futures.

Please open an issue if you have any questions or suggestions -> New Issue.

Installation and Usage

cargo add geyser-grpc-connector

An example how to use the library is provided in stream_blocks_mainnet.rs.

Known issues

  • Library does not support other data than Blocks/Slots very well.
  • Should not be used with commitment level PROCESSED because slot numbers are not monotoic.
  • Library needs messages to be in order and provide slot information to work properly.

Dependencies

~43–61MB
~1M SLoC