Opened 5 months ago

Closed 4 months ago

#24679 closed enhancement (fixed)

Remove custom weights from each fallback in the fallback list

Reported by: teor Owned by: teor
Priority: Medium Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Fallback Scripts Version:
Severity: Normal Keywords: fallback, review-group-28
Cc: teor@… Actual Points: 0.2
Parent ID: #22271 Points: 0.1
Reviewer: pastly Sponsor: Sponsor8-can

Description

This makes the fallback list 1 byte smaller per fallback, or ~150 bytes.

Child Tickets

Change History (16)

comment:1 Changed 5 months ago by teor

Sponsor: Sponsor8-can

This makes my Tor binary 1% smaller.

comment:2 Changed 5 months ago by Sebastian

Just scrap the weights?

comment:3 in reply to:  2 Changed 5 months ago by teor

Status: newneeds_revision

There's some code for weight=9 in https://github.com/ingoglia/tor_bugs/tree/bug24679

Replying to Sebastian:

Just scrap the weights?

Yeah, let's try that.

It needs the following changes:

  • remove weights entirely from the script output
  • update the default in parse_dir_fallback_line() to N
  • update the man page to reflect the new default

We just need to choose a sensible N.
It can be as big as we like, because clients try authorities for bootstrapping anyway after a few seconds.

N=1.0 (no tor code change) makes 5% of client bootstraps go to authorities
N=10.0 (old value) makes 0.5% of client bootstraps go to authorities

comment:4 Changed 5 months ago by teor

Summary: Make the default fallback weight 9, not 10Remove weights in the fallback list

Let's backport the list without the weights, but only change the default weight in Tor master (#24681), and maybe 0.3.2.

comment:5 Changed 5 months ago by teor

Actual Points: 0.2
Keywords: easy intro removed
Owner: set to teor
Status: needs_revisionassigned
Type: defectenhancement

Hi minik, thanks for your help with this patch, but we decided to remove the weights line entirely. I'm going to do it along with #24600 and #22759, which also change the file format.

Pastly, I was wrong about the 1% saving on binary size for the 10 to 9 change.
For removing " weight=10" and "\n", it's actually: 150 * 11 bytes = 1650 bytes / 14603332 bytes binary size = 0.01% of binary size. (Those pesky decimals and megabytes!)

Still, while we're changing the format, let's ditch the redundant weight line.

comment:6 Changed 5 months ago by teor

Status: assignedneeds_review

Please see my branch ticket24679, which updates the script and modifies the existing fallback entries. We should merge it along with #24681.

comment:7 Changed 5 months ago by teor

I have merged all fallback format 2.0.0 changes into my branch fallback-format-2.

comment:8 Changed 5 months ago by teor

Now this branch is fallback-format-2-v2.
There are no changes to the commits for this ticket.

comment:9 Changed 5 months ago by teor

I squashed the original branch into fallback-format-2-v3 on https://github.com/teor2345/tor.git

comment:10 Changed 5 months ago by nickm

Keywords: review-group-28 added

comment:11 Changed 5 months ago by teor

Summary: Remove weights in the fallback listRemove custom weights from each fallback in the fallback list

comment:12 Changed 5 months ago by teor

Please see my revised branch fallback-format-2-v4 at https://github.com/teor2345/tor.git

pastly found some whitelist and blacklist changes from #22321 that I'd accidentally included in some commits, so I took them out.

comment:13 Changed 5 months ago by pastly

Status: needs_reviewmerge_ready

fallback-format-2-v4 does in fact remove the weights. LGTM, but make sure all the tickets for this branch are merge_ready (oooo fun)

comment:14 Changed 5 months ago by teor

This code is now in my branch fallback-code-2018-01 at https://github.com/teor2345/tor.git

comment:15 Changed 5 months ago by teor

Reviewer: pastly

pastly reviewed all of these

comment:16 Changed 4 months ago by teor

Resolution: fixed
Status: merge_readyclosed

This branch has been merged, so these tickets are now implemented,

Note: See TracTickets for help on using tickets.