Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • S sbws
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Network Health
  • sbws
  • Issues
  • #29707

Closed
Open
Created Mar 09, 2019 by teor@teor

sbws does not scale consensus bandwidths to bytes before using them

In this line, desc_bw is in bytes, but consensus_bandwidth is in kilobytes:

min_bandwidth = min(desc_bw, l.consensus_bandwidth)

https://github.com/torproject/sbws/blob/master/sbws/lib/v3bwfile.py#L977

Here's how we could avoid bugs like this in future:

  • We should add some unit tests that only work when this bug is fixed
  • We should work out how to check that our test bandwidth scanners are producing numbers that are the right size

Here are some things we might want to do. But they might not be worth the time:

  • all the variables should be labelled with units?
  • all the bandwidths in this file should be in the same units?
  • sbws should work in bytes, until it formats the file?
Assignee
Assign to
Time tracking