Skip to content

Treat super low staked as unstaked in streamer QOS#701

Merged
t-nelson merged 4 commits intoanza-xyz:masterfrom
lijunwangs:clamp_down_staked_connection
Apr 10, 2024
Merged

Treat super low staked as unstaked in streamer QOS#701
t-nelson merged 4 commits intoanza-xyz:masterfrom
lijunwangs:clamp_down_staked_connection

Conversation

@lijunwangs
Copy link
Copy Markdown

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
Comment thread streamer/src/nonblocking/stream_throttle.rs Outdated
@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
Copy Markdown

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 6913 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     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread streamer/src/nonblocking/quic.rs Outdated
Comment thread streamer/src/nonblocking/quic.rs Outdated
Comment thread streamer/src/nonblocking/quic.rs Outdated
Copy link
Copy Markdown

@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
@mergify
Copy link
Copy Markdown

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.

@mergify
Copy link
Copy Markdown

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 <83639177+lijunwangs@users.noreply.github.com>
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 <83639177+lijunwangs@users.noreply.github.com>
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.

4 participants