Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#5954 closed enhancement (implemented)

export predicted-ports via control interface

Reported by: arma Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

In #4718 Mike made Torbutton launch a new request every 12 hours.

This basically torpedos Tor's "go idle and don't build circuits or fetch descriptors when no requests lately" code.

We should export "whether we're dormant" via a getinfo.

I set the milestone to 0.2.2 since I think Mike is expecting his feature to get into a TBB 2.2 release.

Child Tickets

Change History (8)

comment:1 Changed 8 years ago by nickm

The ticket's title and description don't match well. Do we want to export "predicted ports" or "we seem to be idle"?

For Mike's purposes, the latter approach (getinfo hey-tor-are-you-idle) seems better; it would keep working even if we do port prediction differently in the future. We can implement it internally as "predicted ports are nonempty" or something.

comment:2 Changed 8 years ago by nickm

Status: newneeds_review

See branch bug5954 in my public repository.

comment:3 Changed 8 years ago by arma

Milestone: Tor: 0.2.2.x-finalTor: 0.2.3.x-final

Patch looks good. Good idea about not sending out predicted ports Thanks!

I'm moving this to 0.2.3.x though since it looks like Mike doesn't need it for Torbutton (yet).

One last thought though -- should we make our getinfo api here support #2149? There will come a time, and I have no idea when, when we rush through a patch for #2149 so, say, Ubuntu doesn't destroy the Tor network.

comment:4 in reply to:  3 Changed 8 years ago by nickm

Replying to arma:

One last thought though -- should we make our getinfo api here support #2149? There will come a time, and I have no idea when, when we rush through a patch for #2149 so, say, Ubuntu doesn't destroy the Tor network.

Hm. You mean, instead of having the GETINFO return 0 or 1, saying that it can return 0,1,or 2 (2 meaning extra-dormant), and documenting that even though it only says 0 or 1 today, it could do 2 in the future?

Or couldn't we just call "extra-dormant" another kind of "idle", since the controller's action in either case should be basically the same?

comment:5 Changed 8 years ago by arma

Returning 0 for false and non-zero for true sounds like it should leave us some flexibility for the future.

Or as you say we could just return 1 in the case of dormant or the case of extra-dormant. We need to predict the future where we want to do something else with this getinfo.

I'd say "0 and non-0" is a fine simple way forward.

comment:6 Changed 8 years ago by nickm

Resolution: implemented
Status: needs_reviewclosed

Okay, merging this onto master and updating control-spec.

comment:7 Changed 7 years ago by nickm

Keywords: tor-client added

comment:8 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.