Skip to content

TPU client connections should be keyed by socket address instead of public key #10124

@buffalu

Description

@buffalu

Problem

There is an increasing number of validators which share the same QUIC server (IP:port) for the same connection (BAM, Harmonic, and others).

However, several pieces of TPU-related code in the validator client do take this into account. Several versions of TPU code floating around key connections based on the public key.

When connections are keyed by public key instead of socket address, the same validator client can establish multiple connections to the same QUIC server. If the QUIC server isn't customized to handle this, there ends up being multiple duplicate connections and potential connection thrashing. This can lead to challenges sending transactions from clients that don't handle this properly.

Proposed Solution

  • All TPU related code should key connections and maintain connection caches keyed by SocketAddr instead of Pubkey. It should assume there are multiple validators behind a shared TPU.
  • When sending transactions, a public key -> tpu address transformation should be done (using contact info from gossip). It should then find the correct connection to send it. If one doesn't exist, it should establish that connection.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions