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

Treat super low staked as unstaked in streamer QOS #701

Merged
merged 4 commits into from
Apr 10, 2024

Conversation

lijunwangs
Copy link

Problem

staked nodes with low stakes can abuse the system to get disproportional bandwidth.

Summary of Changes

Treat it as unstaked node for the with stake ratio stake/total_stake < 1 / (max packet per 100 ms)

Fixes #

@lijunwangs lijunwangs requested review from pgarg66 and t-nelson April 10, 2024 02:25
@lijunwangs lijunwangs force-pushed the clamp_down_staked_connection branch from 58dbc37 to 561a28a Compare April 10, 2024 07:35
@lijunwangs lijunwangs changed the title Treat super low staked with QOS of unstaked Treat super low staked as unstaked in streamer QOS Apr 10, 2024
@lijunwangs lijunwangs force-pushed the clamp_down_staked_connection branch from 561a28a to 90921d3 Compare April 10, 2024 08:49
@codecov-commenter
Copy link

codecov-commenter commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.9%. Comparing base (72ee270) to head (c1948ca).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master     #701     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         851      851             
  Lines      230726   230728      +2     
=========================================
- Hits       189009   189008      -1     
- Misses      41717    41720      +3     

Copy link

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

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

r+ SME approval

@t-nelson t-nelson merged commit 92ebf0f into anza-xyz:master Apr 10, 2024
38 checks passed
Copy link

mergify bot commented Apr 10, 2024

Backports to the stable branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule.

Copy link

mergify bot commented Apr 10, 2024

Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis.

mergify bot pushed a commit that referenced this pull request Apr 10, 2024
* Treat super low staked with QOS of unstaked

* simplify

* address some comment from Pankaj

(cherry picked from commit 92ebf0f)

# Conflicts:
#	streamer/src/nonblocking/quic.rs
#	streamer/src/nonblocking/stream_throttle.rs
mergify bot pushed a commit that referenced this pull request Apr 10, 2024
* Treat super low staked with QOS of unstaked

* simplify

* address some comment from Pankaj

(cherry picked from commit 92ebf0f)
lijunwangs pushed a commit that referenced this pull request Apr 11, 2024
…#701) (#732)

* Treat super low staked as unstaked in streamer QOS (#701)
lijunwangs added a commit that referenced this pull request Apr 11, 2024
…#701) (#733)

Treat super low staked as unstaked in streamer QOS (#701)

* Treat super low staked with QOS of unstaked

* simplify

* address some comment from Pankaj

(cherry picked from commit 92ebf0f)

Co-authored-by: Lijun Wang <[email protected]>
anwayde pushed a commit to firedancer-io/agave that referenced this pull request Jul 23, 2024
…anza-xyz#701) (anza-xyz#733)

Treat super low staked as unstaked in streamer QOS (anza-xyz#701)

* Treat super low staked with QOS of unstaked

* simplify

* address some comment from Pankaj

(cherry picked from commit 92ebf0f)

Co-authored-by: Lijun Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants