Skip to main content

Crate yellowstone_jet_tpu_client

Crate yellowstone_jet_tpu_client 

Source
Expand description

Yellowstone jet-tpu-client

This crate is port of the custom TPU-QUIC client used by Yellowstone Jet a subsystem of Cascade-Marketplace,

This crates expose a generic TPU sender implementation TpuSender that can be used with different TPU info services, stake info services, eviction strategies, and leader schedule predictors.

The cores async event-loop engine uses quinn and tokio crates to provide a high-performance QUIC-based transport protocol implementation. It is designed to handle the latest Agave network changes and covers all the edge-cases observed in production usage:

  1. Automatic leader schedule tracking and slot updates
  2. Automatic TPU contact-info handling:
    • Contact info discovery using latest gossip information from the network.
    • Handles TPU endpoint changes due to leader contact info flapping (e.g. Jito validators)
  3. Automic connection manamgent: reconnect, connection-prediction, failures handling.
  4. Rescue transaction on connection dropped (e.g. due to remote peer connection eviction)
  5. Stake-aware TPU selection and eviction strategies.

§YellowstoneTpuSender : Smart TPU sender implementation

This crate come with a smart TPU sender implementation: YellowstoneTpuSender

This sender implementation supports three different sending strategies:

  1. Send transaction to one or more remote peers
  2. Send to the current leader
  3. Send to the the curent leader AND the next N-1 leaders in the schedule.

The sender automatically tracks the current slot and leader schedule.

§Example

See repository for more examples.

§feature-flag supports

  • prometheus: Enable prometheus metrics exposition module [crate::prom]
  • yellowstone-grpc: Enable Yellowstone gRPC based TPU sender implementation crate::yellowstone_grpc
  • bytes : Enable bytes crate based transaction representation support in TPU sender

Modules§

config
module for top-level cnfiguration objects
core
module for the core tpu sending driver logic
rpc
module for RPC utilities
sender
module for common tpu sender implementation
slot
module for slot tracking
yellowstone_grpc
module to host utility that utilize Yellowstone gRPC services