Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIMD 0195 - tpu vote using QUIC #195

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

lijunwangs
Copy link

Added SIMD for tpu vote using QUIC

@lijunwangs lijunwangs marked this pull request as draft November 14, 2024 20:48
@lijunwangs lijunwangs marked this pull request as ready for review November 14, 2024 20:48
transaction transportation. The client and server both uses their validator's
identity key to sign the certificate which is used to validate the validator's
identity especially on the server side for the purpose of provding QOS based on
the client's stakes by checking the client's Pubkey -- stake weighted QOS.
Copy link

@wen-coding wen-coding Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just saying: validator id to vote account association and the stake distribution could change at the Epoch boundary. At Epoch boundary you probably need to accept if the validator has stake in either the old Epoch or the new Epoch.


Once a QUIC connection is established, the client can send vote transaction
using QUIC UNI streams. In this design, a stream is used to send one single Vote
transaction. After that the stream is closed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How fast is it to open and close a stream? The QUIC connection will be persistent I assume?

The following QOS mechanisms are employed:

* Connection Rate Limiting from all clients
* Connection Rate Limiting from a particular IpAddress

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the limits here? I thought in QUIC we rate limit by pubkey instead of IP? Because others can spoof your IP.


* Connection Rate Limiting from all clients
* Connection Rate Limiting from a particular IpAddress
* Total concurrent connections from all clients -- this is set to 2500

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it dangerous to increase this limit? What if we suddenly have >2500 clients?

* Total concurrent connections from all clients -- this is set to 2500
* Max concurrent connections from a client Pubkey -- this is set to 1 for votes.
* Max concurrent streams per connection -- this is allocated based on the ratio
of the validator's stake over the total stakes of the network.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reasoning here? Why does higher-staked validator need more concurrent streams per connection?

@lijunwangs lijunwangs changed the title Added SIMD for tpu vote using QUIC SIMD 0195 - tpu vote using QUIC Nov 15, 2024
Comment on lines 69 to 77
The following QOS mechanisms are employed:

* Connection Rate Limiting from all clients
* Connection Rate Limiting from a particular IpAddress
* Total concurrent connections from all clients -- this is set to 2500
* Max concurrent connections from a client Pubkey -- this is set to 1 for votes.
* Max concurrent streams per connection -- this is allocated based on the ratio
of the validator's stake over the total stakes of the network.
* Maximum of vote transactions per unit time which is also stake weighted
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Firedancer won't enforce any of these limits server-side.
These should more like implementation-specific behavior, so I suggest removing them from the SIMD.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants