Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #6175

Closed (moved)
Open
Opened Jun 16, 2012 by Aaron Gibson@aagbsn

BridgeDB learns to choose a reasonable number of bridges to give out

BridgeDB should learn to give out a variable number of bridges based on the number of bridges available.

For example, if a user requests bridges with transport foo, and there are only 20 bridges with this transport, BridgeDB could choose to give out 1 bridge. If there are 21-100 bridges available, give out 2, and more than 100: 3 bridges (or the distributor maximum)

e.g.

if len(ring) < 20: n_bridges_per_answer = 1
if 20 < len(ring) < 100: n_bridges_per_answer = min(2,DISTRIBUTOR_N_BRIDGES_PER_ANSWER)
if len(ring) > 100: n_bridges_per_answer = DISTRIBUTOR_N_BRIDGES_PER_ANSWER

Or, BridgeDB could choose to avoid giving out more than 5 percent of bridges at a time; and return a minimum of 1 bridge and maximum of the configured DISTRIBUTOR_N_BRIDGES_PER_ANSWER

e.g.

n_bridges_per_answer =  min(min(len(ring) * .05,1),DISTRIBUTOR_N_BRIDGES_PER_ANSWER)
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#6175