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
  • #1680

Closed (moved)
Open
Opened Jul 08, 2010 by Roger Dingledine@arma

Implicit (default) state file lines hard for external apps to know

Right now we have stanzas in relay state files like:

BWHistoryReadEnds 2010-07-08 17:52:41 BWHistoryReadValues 438064128,395179008,...

but we leave "BWHistoryReadInterval 900" implicit because it's the default value from config.c.

That's fine -- if we ever change the default, we'll have to teach Tor to look at the TorVersion line in the state file, and derive the correct default when loading the state file.

But now we have apps like arm looking at our state file. Those apps need to know that a missing value means 900, and if we ever change it, they need to know what Tor versions have what defaults. Having that logic separately in every controller app is the wrong place for it.

Does that mean we want a "getstate" controller option (along with a getinfo state/names), and it will write out the lines it would write to the state file, but include the defaults?

Or should we just write the defaults to the state file, and call that close enough? It seems we shouldn't do that, since I can imagine two classes of defaults (first is "I don't care what the value is, please choose the right number for me Tor", and the second is "I am relying on this number, and it happens to be the default number") and we don't distinguish between them. On the third hand, I don't actually see any of the former category in _state_vars[] in config.c, so maybe I'm generalizing too much.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: unspecified
Milestone
Tor: unspecified
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#1680