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

Bandwidth estimate as a parameter #941

Merged
merged 3 commits into from
Aug 14, 2023
Merged

Bandwidth estimate as a parameter #941

merged 3 commits into from
Aug 14, 2023

Conversation

diegomrsantos
Copy link
Collaborator

@diegomrsantos diegomrsantos commented Aug 8, 2023

This is to replace the hard-coded value in #911

@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Merging #941 (a4e8833) into unstable (56c23a2) will increase coverage by 0.00%.
Report is 1 commits behind head on unstable.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           unstable     #941   +/-   ##
=========================================
  Coverage     83.51%   83.52%           
=========================================
  Files            91       91           
  Lines         15145    15149    +4     
=========================================
+ Hits          12649    12653    +4     
  Misses         2496     2496           
Files Changed Coverage Δ
libp2p/protocols/pubsub/gossipsub.nim 86.63% <100.00%> (-0.39%) ⬇️
libp2p/transports/wstransport.nim 85.98% <100.00%> (ø)

... and 2 files with indirect coverage changes

lchenut
lchenut previously approved these changes Aug 9, 2023
@@ -74,7 +74,8 @@ proc init*(_: type[GossipSubParams]): GossipSubParams =
behaviourPenaltyWeight: -1.0,
behaviourPenaltyDecay: 0.999,
disconnectBadPeers: false,
enablePX: false
enablePX: false,
bandwidthEstimateMbps: 100
Copy link
Contributor

Choose a reason for hiding this comment

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

0 should disable flood-limiting completely

Copy link
Contributor

Choose a reason for hiding this comment

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

also, I think it would make more sense for the parameter to be expressed in bps - this way, users can implement a parser that understands G, M, k, etc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

also, I think it would make more sense for the parameter to be expressed in bps - this way, users can implement a parser that understands G, M, k, etc

Is it common to specify bandwidth in a unit different than Mb? Maybe in Gb sometimes.

Copy link
Contributor

Choose a reason for hiding this comment

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

I find it more flexible and easier when API:s use basic units rather than pre-baked multiples - there's more flexibility / future-proofing this way for API users (ie imagine working on an embedded system with more aggressive bandwidth constraints).

This is somewhat different from when working with "normal users" or end-user UX.

@Menduist
Copy link
Contributor

What's blocking this?

@diegomrsantos
Copy link
Collaborator Author

What's blocking this?

nothing, just wanted @arnetheduck to take a look again

@diegomrsantos diegomrsantos merged commit f80ce31 into unstable Aug 14, 2023
9 of 10 checks passed
@diegomrsantos diegomrsantos deleted the bandwidth-param branch August 14, 2023 15:03
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.

None yet

4 participants