Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-26 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:  closed
 Priority:  High |  Milestone:  Tor:
Component:  Tor  |  0.2.8.x-final
 Severity:  Normal   |Version:  Tor:
 Keywords:  tor-guard, tor-relay, prop237,   |  unspecified
  026-triaged-1, sebastian-review,   | Resolution:  fixed
  027-triaged-1-out, 028-triage, 028-triaged,|  Actual Points:
  mike-can, pre028-patch, TorCoreTeam201512, | Points:
  201511-deferred|  medium/large
Parent ID:   |
  Sponsor:   |
-+-

Comment (by nickm):

 Replying to [comment:99 cypherpunks]:
 > Replying to [comment:98 nickm]:
 > > Fixed the compilation problems and added a comment.
 > Thanks
 >
 > >Not sure what you mean about the comments, or which comments you mean.
 > I'll rephrase to add clarity.

 (Thanks, and sorry for the delay! It's time off for me.)

 > The have_enough_mem_for_dircache function modifies the total_mem
 parameter internally instead of using a separate variable throughout the
 function. Your added comment makes my comment on this obsolete because of
 the possibility that that piece of code will be removed. (A quick look at
 how the options_validate function assigns MaxMemInQueues suggests that it
 already does the necessary checks by calling
 compute_real_max_mem_in_queues making the checks in
 have_enough_mem_for_dircache redundant).
 >
 > My second point was about the get_total_system_memory function having a
 pointer to size_t parameter. Its internals use
 get_total_system_memory_impl which returns an uint64_t. The result is
 clamped to fit within the size_t range. My suggestion is to have
 get_total_system_memory have a pointer to uint64_t parameter so the result
 does not need to be clamped down. It would also remove the need for
 clamping in have_enough_mem_for_dircache.

 Hm. Seems like a good idea, but possibly another ticket.

 > My last sub-point was about statements such as `if (0 == m) {` in
 get_total_system_memory and `if (-1 == (fd =
 tor_open_cloexec("/proc/meminfo",O_RDONLY,0)))` in
 get_total_system_memory_impl. These are called
 [https://en.wikipedia.org/wiki/Yoda_conditions Yoda conditions] and have
 some disadvantages as described in the
 [https://en.wikipedia.org/wiki/Yoda_conditions#Criticism Criticism
 section].
 >

 Hm. I don't find the arguments on that page persuasive; I'm happy to let C
 programmers write `0 == m` or `NULL == x` or whatever, if that's what
 they're used to.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-21 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:  closed
 Priority:  High |  Milestone:  Tor:
Component:  Tor  |  0.2.8.x-final
 Severity:  Normal   |Version:  Tor:
 Keywords:  tor-guard, tor-relay, prop237,   |  unspecified
  026-triaged-1, sebastian-review,   | Resolution:  fixed
  027-triaged-1-out, 028-triage, 028-triaged,|  Actual Points:
  mike-can, pre028-patch, TorCoreTeam201512, | Points:
  201511-deferred|  medium/large
Parent ID:   |
  Sponsor:   |
-+-

Comment (by cypherpunks):

 Replying to [comment:98 nickm]:
 > Fixed the compilation problems and added a comment.
 Thanks

 >Not sure what you mean about the comments, or which comments you mean.
 I'll rephrase to add clarity.

 The have_enough_mem_for_dircache function modifies the total_mem parameter
 internally instead of using a separate variable throughout the function.
 Your added comment makes my comment on this obsolete because of the
 possibility that that piece of code will be removed. (A quick look at how
 the options_validate function assigns MaxMemInQueues suggests that it
 already does the necessary checks by calling
 compute_real_max_mem_in_queues making the checks in
 have_enough_mem_for_dircache redundant).

 My second point was about the get_total_system_memory function having a
 pointer to size_t parameter. Its internals use
 get_total_system_memory_impl which returns an uint64_t. The result is
 clamped to fit within the size_t range. My suggestion is to have
 get_total_system_memory have a pointer to uint64_t parameter so the result
 does not need to be clamped down. It would also remove the need for
 clamping in have_enough_mem_for_dircache.

 My last sub-point was about statements such as `if (0 == m) {` in
 get_total_system_memory and `if (-1 == (fd =
 tor_open_cloexec("/proc/meminfo",O_RDONLY,0)))` in
 get_total_system_memory_impl. These are called
 [https://en.wikipedia.org/wiki/Yoda_conditions Yoda conditions] and have
 some disadvantages as described in the
 [https://en.wikipedia.org/wiki/Yoda_conditions#Criticism Criticism
 section].

 If it's still not clear, I'm willing to submit patches for these points.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-21 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  reopened
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-
Changes (by cypherpunks):

 * status:  closed => reopened
 * resolution:  implemented =>


Comment:

 Jenkins has two complaints.

 {{{
 ../src/test/test_dir.c:29:29: fatal error: test_dir_common.h: No such file
 or directory
  #include "test_dir_common.h"
  ^
 }}}
 This seems to be a header missing from the build configuration.

 {{{
 src/or/config.c:4102:28: error: implicit conversion loses integer
 precision: 'const uint64_t' (aka 'const unsigned long long') to 'size_t'
 (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
   total_mem = options->MaxMemInQueues;
 ~ ~^~
 }}}
 After looking at the have_enough_mem_for_dircache function where this
 error occurred i have some questions.

 * Why overwrite the total_mem parameter instead of using a separate
 variable? It makes it a bit harder to read.
 * Why does the get_total_system_memory function have a size_t parameter
 instead of an uint64_t? Using an uint64_t would simplify the function and,
 after changing the relevant type signatures, would solve the error.
   - Also, what is up with the yoda statements in get_total_system_memory
 and get_total_system_memory_impl?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-21 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:  closed
 Priority:  High |  Milestone:  Tor:
Component:  Tor  |  0.2.8.x-final
 Severity:  Normal   |Version:  Tor:
 Keywords:  tor-guard, tor-relay, prop237,   |  unspecified
  026-triaged-1, sebastian-review,   | Resolution:
  027-triaged-1-out, 028-triage, 028-triaged,|  implemented
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-
Changes (by nickm):

 * status:  needs_review => closed
 * resolution:   => implemented


Comment:

 Okay, merged!

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-21 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:  closed
 Priority:  High |  Milestone:  Tor:
Component:  Tor  |  0.2.8.x-final
 Severity:  Normal   |Version:  Tor:
 Keywords:  tor-guard, tor-relay, prop237,   |  unspecified
  026-triaged-1, sebastian-review,   | Resolution:  fixed
  027-triaged-1-out, 028-triage, 028-triaged,|  Actual Points:
  mike-can, pre028-patch, TorCoreTeam201512, | Points:
  201511-deferred|  medium/large
Parent ID:   |
  Sponsor:   |
-+-
Changes (by nickm):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 Fixed the compilation problems and added a comment. Not sure what you mean
 about the comments, or which comments you mean.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-20 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-

Comment (by nickm):

 wrt f0a4282, I don't think we're changing the sense of the test -- rather,
 we're changing the example-data that the test uses in order to make
 clients behave right.  Clients used to believe anything was a directory if
 it had a dirport -- now they require the is_v2_dir flag.  Also, when we
 fixed the bug that let us pick directory guards that weren't guards, I
 think that did something to mess up the other test, which was testing for
 bad behavior. :/   But I don't know why that didn't show up in master.
 Maybe I/we should investigate more?

 Does that all seem right?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-20 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-

Comment (by teor):

 Replying to [comment:94 nickm]:
 >
 > wrt f0a4282, I don't think we're changing the sense of the test --
 rather, we're changing the example-data that the test uses in order to
 make clients behave right.  Clients used to believe anything was a
 directory if it had a dirport -- now they require the is_v2_dir flag.
 Also, when we fixed the bug that let us pick directory guards that weren't
 guards, I think that did something to mess up the other test, which was
 testing for bad behavior. :/   But I don't know why that didn't show up in
 master.  Maybe I/we should investigate more?

 There is a unit test that makes sure we only choose guards with the guard
 flag, but it only applies to OR guards, not directory guards. I think
 that's why it didn't show up, as the bug was about directory guards.

 > Does that all seem right?

 That seems OK.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-20 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-

Comment (by teor):

 Replying to [comment:92 nickm]:
 > After squashing and merging to master, these tests failed:
 > {{{
 > nodelist/node_is_dir
 > config/directory_fetch
 > routerlist/pick_directory_server_impl
 > }}}
 >
 > I took a shot at fixing them, but I'd like somebody else to sanity-check
 whether my changes make sense in light of the test code.
 >
 > Please see the 3 latest commits on my branch "bug12538_merged":
 > {{{
 > f0a4282 fix routerlist/pick_directory_server_impl in light of 12538
 > f5f35e9 Fix config/directory_fetch after 12538 merge
 > a6c9fcc Fix nodelist/node_is_dir test wrt 12538.
 > }}}
 >
 > They're all very short.

 f0a4282 I can't understand why we're inverting the sense of the tests
 here. But I'm not familiar enough with the code or the tests to make a
 better suggestion.

 f5f35e9 is almost exactly what I expected to have to do once this merged.

 a6c9fcc looks plausible.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-18 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-

Comment (by nickm):

 After squashing and merging to master, these tests failed:
 {{{
 nodelist/node_is_dir
 config/directory_fetch
 routerlist/pick_directory_server_impl
 }}}

 I took a shot at fixing them, but I'd like somebody else to sanity-check
 whether my changes make sense in light of the test code.

 Please see the 3 latest commits on my branch "bug12538_merged":
 {{{
 f0a4282 fix routerlist/pick_directory_server_impl in light of 12538
 f5f35e9 Fix config/directory_fetch after 12538 merge
 a6c9fcc Fix nodelist/node_is_dir test wrt 12538.
 }}}

 They're all very short.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-17 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-

Comment (by teor):

 Replying to [comment:89 nickm]:
 > teor says:
 >
 > >In router_pick_directory_server_impl, we check !status->dir_port and
 skip the server. This should change to the routerstatus_t flag for
 directory servers introduced by this patch.
 >
 > I don't see that code there any more; what am I missing?

 Oops, I must have been looking at the wrong branch.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-17 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-

Comment (by nickm):

 teor says:

 >In router_pick_directory_server_impl, we check !status->dir_port and skip
 the server. This should change to the routerstatus_t flag for directory
 servers introduced by this patch.

 I don't see that code there any more; what am I missing?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-17 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-

Comment (by nickm):

 okay, then I'm good to squash and merge.  I'm planning to wait a little
 while, though, for people to try my #17752 fix, before I merge anything of
 appreciable size.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-16 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-

Comment (by teor):

 Replying to [comment:87 teor]:
 > Looks good, let's get this merged!

 One more thing:

 In router_pick_directory_server_impl, we check `!status->dir_port` and
 skip the server. This should change to the routerstatus_t flag for
 directory servers introduced by this patch.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-16 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-

Comment (by teor):

 Looks good, let's get this merged!

 Two comments that I don't think should delay this merge:
 * This will break a unit test fix I just made in #4483, but I don't know
 which order they'll merge, so I'm happy to fix this after they both merge.
 * This will exacerbate #17848 (tor doesn't check for tunneled directory
 downloads when checking if relays are busy), but we can work on that
 later.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-12-16 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201512, |  Actual Points:
  201511-deferred| Points:
Parent ID:   |  medium/large
  Sponsor:   |
-+-
Changes (by dgoulet):

 * status:  needs_revision => needs_review


Comment:

 I've fixed the latest concerns: `feature12538_028_01` (based on nickm's
 branch `feature12538_rebased_7`)

 Two commits on top, one fixup and one that is fixing a line flagged by
 teor in a commit on master. This is also rebased on latest master for 028
 merge.

 Note for the HS subsystem, the new `DirCache` option is now the way to
 disable the relay to be an HSDir (which was before this patch not having a
 DirPort).

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-25 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_revision
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201511  |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-
Changes (by dgoulet):

 * status:  needs_review => needs_revision


Comment:

 Here is an issue I found:

 * In src/or/or.h:

  `node_is_dir()` checks both the tunnelled support and dir_port which can
 by pass the fact that we shouldn't be advertising to be a dircache:
 {{{
 +return ri->supports_tunnelled_dir_requests ||
 +   ri->dir_port > 0;
 }}}

  It's possible for `supports_tunnelled_dir_requests` to be 0, for instance
 if the Accounting is enabled and we've reached our max. But if we have a
 `DirPort`, it will bypass it and return 1. Seems to me that we maybe don't
 want to be used as a directory cache in that case?

  I think just testing `supports_tunnelled_dir_requests` is enough since it
 will be 1 if the DirPort is set and if the rest of the requirements are
 met (Accounting for instance).

 * Also fun fact, this below will make that a relay can opt-out of being an
 HSDir once it's accounting has reached the max or it's bandwitdh has
 changed dynamically (because of `router_should_be_directory_server()`):

 {{{
 +  return (router->wants_to_be_hs_dir &&
 +  router->supports_tunnelled_dir_requests &&
 ...
 }}}

  which could lead to client reachability issue (I think it won't be
 severe) if an HSDir can come and go at each consensus in a 24 hour period.
 _BUT_ it could also explain why we are seeing HSDir responding NOT_FOUND
 when they are suppose to have the descriptor because Accounting max was
 reached in that time period?...

 The rest lgtm;

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-25 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_revision
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201511  |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by teor):

 Replying to [comment:83 dgoulet]:
 > Here is an issue I found:
 >
 > * In src/or/or.h:
 >
 >  `node_is_dir()` checks both the tunnelled support and dir_port which
 can by pass the fact that we shouldn't be advertising to be a dircache:
 > {{{
 > +return ri->supports_tunnelled_dir_requests ||
 > +   ri->dir_port > 0;
 > }}}
 >
 >  It's possible for `supports_tunnelled_dir_requests` to be 0, for
 instance if the Accounting is enabled and we've reached our max. But if we
 have a `DirPort`, it will bypass it and return 1. Seems to me that we
 maybe don't want to be used as a directory cache in that case?

 Definitely - AccountingMax needs to work properly.

 >  I think just testing `supports_tunnelled_dir_requests` is enough since
 it will be 1 if the DirPort is set and if the rest of the requirements are
 met (Accounting for instance).

 I agree. (See my [comment:78 teor] for the behaviour we're trying for -
 trying to match the current directory-with-DirPort behaviour.)

 > * Also fun fact, this below will make that a relay can opt-out of being
 an HSDir once it's accounting has reached the max or it's bandwitdh has
 changed dynamically (because of `router_should_be_directory_server()`):
 >
 > {{{
 > +  return (router->wants_to_be_hs_dir &&
 > +  router->supports_tunnelled_dir_requests &&
 > ...
 > }}}
 >
 >  which could lead to client reachability issue (I think it won't be
 severe) if an HSDir can come and go at each consensus in a 24 hour period.
 _BUT_ it could also explain why we are seeing HSDir responding NOT_FOUND
 when they are suppose to have the descriptor because Accounting max was
 reached in that time period?...

 Unfortunately, we need AccountingMax to work reliably, even if it causes
 reachability issues for hidden services. But we could fix this behaviour
 in a different ticket so the HSDir flag is more stable. But is there
 anything we could change here to make it more stable?

 > The rest lgtm;

 I agree, it's time!

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-11 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by nickm):

 I've added a commit to feature_12538_rebased_7 to (almost) restore the old
 behavior.  What do we think now?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-11 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch, TorCoreTeam201511  |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-
Changes (by teor):

 * keywords:
 tor-guard, tor-relay, prop237, 026-triaged-1, sebastian-review,
 027-triaged-1-out, 028-triage, 028-triaged, mike-can, pre028-patch
 =>
 tor-guard, tor-relay, prop237, 026-triaged-1, sebastian-review,
 027-triaged-1-out, 028-triage, 028-triaged, mike-can, pre028-patch,
 TorCoreTeam201511


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-10 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by nickm):

 Replying to [comment:74 teor]:
 > I think if an operator sets DirCache 0, caching *and* serving should
 stop.
 > This is analogous with setting DirPort 0, and obeys the "principle of
 least surprise".
 > Otherwise, what can an operator do to stop serving directory documents
 right away?
 > (For example, what if they are close to quota for the month?)

 Right, I agree that DirCache 0 should always mean "don't cache."

 The issue I was thinking about is another part of the definition of
 dir_server_mode:
 {{{
 int
 dir_server_mode(const or_options_t *options)
 {
   if (!options->DirCache)
 return 0;
   return (server_mode(options) || options->DirPort_set) &&
   router_should_be_directory_server(options, 0);
 }
 }}}

 This means that if `router_should_be_directory_server()` returns false,
 we'll stop serving directory information, even if DirCache was set to 1
 and/or we advertised a dir_port.

 And the `router_should_be_directory_server()` function looks not only at
 the configuration, but also at the current accounting state state, which
 is the part that makes me a little concerned.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-10 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by nickm):

 Replying to [comment:76 teor]:
 > Replying to [comment:75 nickm]:
 > > Replying to [comment:74 teor]:
 > > > I think if an operator sets DirCache 0, caching *and* serving should
 stop.
 > > > This is analogous with setting DirPort 0, and obeys the "principle
 of least surprise".
 > > > Otherwise, what can an operator do to stop serving directory
 documents right away?
 > > > (For example, what if they are close to quota for the month?)
 > >
 > > Right, I agree that DirCache 0 should always mean "don't cache."
 > >
 > > The issue I was thinking about is another part of the definition of
 dir_server_mode:
 > > {{{
 > > int
 > > dir_server_mode(const or_options_t *options)
 > > {
 > >   if (!options->DirCache)
 > > return 0;
 > >   return (server_mode(options) || options->DirPort_set) &&
 > >   router_should_be_directory_server(options, 0);
 > > }
 > > }}}
 > >
 > > This means that if `router_should_be_directory_server()` returns
 false, we'll stop serving directory information, even if DirCache was set
 to 1 and/or we advertised a dir_port.
 > >
 > > And the `router_should_be_directory_server()` function looks not only
 at the configuration, but also at the current accounting state state,
 which is the part that makes me a little concerned.
 >
 > There's an existing Tor feature that disables the DirPort if a relay
 operator has bandwidth accounting limits enabled. This is intended to save
 upload bandwidth for (symmetrical) circuit traffic, rather than (upload-
 heavy) directory responses.

 Does this feature turn off the DIrPort entirely, or only prevent us from
 advertising it?

 > Are you suggesting we remove this feature, and, if so, for relays using
 the new all-cache feature, or all directories?

 I was under the assumption that it made us stop advertising our DirPort,
 but that it left the DirPort enabled.  If it turns the DirPort off
 entirely, then it's probably okay to leave the feature as-is in this
 patch, and I am just being a forgetful old hacker.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-10 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by teor):

 Replying to [comment:75 nickm]:
 > Replying to [comment:74 teor]:
 > > I think if an operator sets DirCache 0, caching *and* serving should
 stop.
 > > This is analogous with setting DirPort 0, and obeys the "principle of
 least surprise".
 > > Otherwise, what can an operator do to stop serving directory documents
 right away?
 > > (For example, what if they are close to quota for the month?)
 >
 > Right, I agree that DirCache 0 should always mean "don't cache."
 >
 > The issue I was thinking about is another part of the definition of
 dir_server_mode:
 > {{{
 > int
 > dir_server_mode(const or_options_t *options)
 > {
 >   if (!options->DirCache)
 > return 0;
 >   return (server_mode(options) || options->DirPort_set) &&
 >   router_should_be_directory_server(options, 0);
 > }
 > }}}
 >
 > This means that if `router_should_be_directory_server()` returns false,
 we'll stop serving directory information, even if DirCache was set to 1
 and/or we advertised a dir_port.
 >
 > And the `router_should_be_directory_server()` function looks not only at
 the configuration, but also at the current accounting state state, which
 is the part that makes me a little concerned.

 There's an existing Tor feature that disables the DirPort if a relay
 operator has bandwidth accounting limits enabled. This is intended to save
 upload bandwidth for (symmetrical) circuit traffic, rather than (upload-
 heavy) directory responses.

 Are you suggesting we remove this feature, and, if so, for relays using
 the new all-cache feature, or all directories?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-10 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by sysrqb):

 Replying to [comment:68 nickm]:
 > `feature12538_rebased_7` in my public repository is rebased on master,
 with the NotDir/BelieveNotDir stuff removed, and the bugs mentioned above
 fixed.
 >
 > My only remaining issue is:
 > > * I worry about the definition of dir_server_mode(). Possibly, if we
 have advertised that we're a dirserver, we should actually be a dirserver?

 Alternatively,

 1) if we have the V2Dir flag then dir_server_mode() returns 1, else the
 function is unchanged.
 2) when options->DirCache is disabled, dir_server_mode() only uses
 options->DirCache after the next consensus is published. Serve the
 documents we currently have without caching new docs until then.
 3) split dir_server_mode() into dir_server_mode() and dir_cache_mode(),
 where dir_server_mode() looks at our is_v2_dir flag rather than
 options->DirCache shortcircuit; and dir_cache_mode() is:
 {{{ return options->DirCache && dir_server_mode(); }}}. Then
 directory_permits_begindir_requests() depends on dir_server_mode() and we
 continue serving clients until we notice we lost the V2Dir flag.

 I worry because each of these is slightly surprising for relay operators
 in different ways. Tweaking the man page's description of DirCache so it
 says the relay stops caching new directory documents and stops accepting
 client dir connections after it loses its V2Dir flag (if it earned it), is
 easy. Or, we differentiate between caching and serving, always serving if
 we have V2Dir but only cache if DirCache is set. This could be sad for
 client's though, depending on how often they see cache misses, but maybe
 this is a general improvement and not something to be overly concerned
 about.

 >
 > Also we should test this on chutney to verify that everything works
 correctly for servers without DirPort support.


 Replying to [comment:69 teor]:
 > It's important that these relays work in mixed dirport / no dirport
 networks, which probably means creating a new torrc template and a new
 network, then testing that network as part of make test-network-all in
 tor.
 When I ran previous branches in chutney with mixed versions and mixed
 dirport, I modified them manually. By this I mean I created 100 nodes,
 then disabled the dirport on a handful of them, then I started the test
 network. When all nodes were running, I stopped a few of the dirport-
 enabled instances and restarted them with a binary of a different tor
 version. It wasn't the most elegant, but it worked.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-10 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by teor):

 Replying to [comment:73 sysrqb]:
 > Replying to [comment:68 nickm]:
 > > `feature12538_rebased_7` in my public repository is rebased on master,
 with the NotDir/BelieveNotDir stuff removed, and the bugs mentioned above
 fixed.
 > >
 > > My only remaining issue is:
 > > > * I worry about the definition of dir_server_mode(). Possibly, if we
 have advertised that we're a dirserver, we should actually be a dirserver?
 >
 > Alternatively,
 >
 > 1) if we have the V2Dir flag then dir_server_mode() returns 1, else the
 function is unchanged.
 > 2) when options->DirCache is disabled, dir_server_mode() only uses
 options->DirCache after the next consensus is published. Serve the
 documents we currently have without caching new docs until then.
 > 3) split dir_server_mode() into dir_server_mode() and dir_cache_mode(),
 where dir_server_mode() looks at our is_v2_dir flag rather than
 options->DirCache shortcircuit; and dir_cache_mode() is:
 > {{{ return options->DirCache && dir_server_mode(); }}}. Then
 directory_permits_begindir_requests() depends on dir_server_mode() and we
 continue serving clients until we notice we lost the V2Dir flag.
 >
 > I worry because each of these is slightly surprising for relay operators
 in different ways. Tweaking the man page's description of DirCache so it
 says the relay stops caching new directory documents and stops accepting
 client dir connections after it loses its V2Dir flag (if it earned it), is
 easy. Or, we differentiate between caching and serving, always serving if
 we have V2Dir but only cache if DirCache is set. This could be sad for
 client's though, depending on how often they see cache misses, but maybe
 this is a general improvement and not something to be overly concerned
 about.

 I think if an operator sets DirCache 0, caching *and* serving should stop.
 This is analogous with setting DirPort 0, and obeys the "principle of
 least surprise".
 Otherwise, what can an operator do to stop serving directory documents
 right away?
 (For example, what if they are close to quota for the month?)

 If DirCache is 1 but we don't yet have the V2Dir flag:
 To be consistent with DirPort directories, we could serve as soon as
 DirCache is 1.
 (This also allows self-testing. Do we do that for DirCache directories in
 this patch?)
 Just like DirPort directories, we could trust clients to obey the
 consensus and not contact us until we get the V2Dir flag. (Is there any
 harm here?)

 Clients are already pretty tolerant of directory misses.
 #4483 will make clients much more tolerant of directory misses during
 initial bootstrap.
 (Clients have very little server information during bootstrap, so misses
 on the few servers they have are more of an issue.)

 > > Also we should test this on chutney to verify that everything works
 correctly for servers without DirPort support.
 >
 >
 > Replying to [comment:69 teor]:
 > > It's important that these relays work in mixed dirport / no dirport
 networks, which probably means creating a new torrc template and a new
 network, then testing that network as part of make test-network-all in
 tor.
 > When I ran previous branches in chutney with mixed versions and mixed
 dirport, I modified them manually. By this I mean I created 100 nodes,
 then disabled the dirport on a handful of them, then I started the test
 network. When all nodes were running, I stopped a few of the dirport-
 enabled instances and restarted them with a binary of a different tor
 version. It wasn't the most elegant, but it worked.

 Yes, chutney works well with manual modification - I do it all the time to
 test new features.

 But this feature is so important I want to make sure we test it regularly.
 If we integrate it into chutney's test suite, and then into tor's "make
 test-network-all", it will get tested on a regular basis.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online

Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-10 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by teor):

 Replying to [comment:79 sysrqb]:
 > I'm now wondering if we don't want to use dir_server_mode() other
 places, as well. In particular, currently the behavior is now different
 for caching directory info, too.

 I'm confused. Current / different as in "your latest patch", or "the
 latest master"?

 > Relays won't cache them if they're near their bandwidth usage limit.
 Maybe this is better than the old behavior? I'm thinking we should stick
 with what we currently do unless there's a better reason for doing
 something different.

 It would be helpful to match the current behaviour for DirPort
 directories, so that operators aren't surprised by this new feature. If we
 feel there's a need for a change to directory caching behaviour in
 general, let's do it in a separate ticket.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-10 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by teor):

 Replying to [comment:77 nickm]:
 > Replying to [comment:76 teor]:
 > > Replying to [comment:75 nickm]:
 > > > Replying to [comment:74 teor]:
 > > > > I think if an operator sets DirCache 0, caching *and* serving
 should stop.
 > > > > This is analogous with setting DirPort 0, and obeys the "principle
 of least surprise".
 > > > > Otherwise, what can an operator do to stop serving directory
 documents right away?
 > > > > (For example, what if they are close to quota for the month?)
 > > >
 > > > Right, I agree that DirCache 0 should always mean "don't cache."
 > > >
 > > > The issue I was thinking about is another part of the definition of
 dir_server_mode:
 > > > {{{
 > > > int
 > > > dir_server_mode(const or_options_t *options)
 > > > {
 > > >   if (!options->DirCache)
 > > > return 0;
 > > >   return (server_mode(options) || options->DirPort_set) &&
 > > >   router_should_be_directory_server(options, 0);
 > > > }
 > > > }}}
 > > >
 > > > This means that if `router_should_be_directory_server()` returns
 false, we'll stop serving directory information, even if DirCache was set
 to 1 and/or we advertised a dir_port.
 > > >
 > > > And the `router_should_be_directory_server()` function looks not
 only at the configuration, but also at the current accounting state state,
 which is the part that makes me a little concerned.
 > >
 > > There's an existing Tor feature that disables the DirPort if a relay
 operator has bandwidth accounting limits enabled. This is intended to save
 upload bandwidth for (symmetrical) circuit traffic, rather than (upload-
 heavy) directory responses.
 >
 > Does this feature turn off the DIrPort entirely, or only prevent us from
 advertising it?

 It leaves it on, but prevents us from advertising it.

 And it only happens if:
 * AccountingMax is turned on, and
 * we predict that we will hibernate before the end of this interval.

 >
 > > Are you suggesting we remove this feature, and, if so, for relays
 using the new all-cache feature, or all directories?
 >
 > I was under the assumption that it made us stop advertising our DirPort,
 but that it left the DirPort enabled.  If it turns the DirPort off
 entirely, then it's probably okay to leave the feature as-is in this
 patch, and I am just being a forgetful old hacker.

 No, you're correct, I've never had to look into it that closely. (I think
 that makes me a outspoken young hacker.)

 To match the DirPort behaviour, all relays should be directory caches by
 default.
 If they think they'll run out of AccoountingMax bandwidth, they shouldn't
 advertise that they are a directory cache. (That is, they should drop the
 line from their descriptor that makes authorities give them the V2Dir flag
 in the consensus.)

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-10 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by sysrqb):

 Replying to [comment:77 nickm]:
 > Replying to [comment:76 teor]:
 > > Are you suggesting we remove this feature, and, if so, for relays
 using the new all-cache feature, or all directories?
 >
 > I was under the assumption that it made us stop advertising our DirPort,
 but that it left the DirPort enabled.  If it turns the DirPort off
 entirely, then it's probably okay to leave the feature as-is in this
 patch, and I am just being a forgetful old hacker.

 Your less-youngness is not affecting your memory in this case. This is
 something that I changed, although unintentionally, in the original
 branch.

 {{{
 @@ -1153,7 +1153,7 @@ directory_caches_dir_info(const or_options_t
 *options)
  int
  directory_permits_begindir_requests(const or_options_t *options)
  {
 -  return options->BridgeRelay != 0 || options->DirPort_set;
 +  return options->BridgeRelay != 0 || dir_server_mode(options);
  }
 }}}
 0061807334d54a56ba10d2ae956961291e8183d6 in feature12538_rebased_7.

 And the accounting thresholds were only used when publishing a new
 descriptor. It doesn't seem like there's a good reason for changing this
 behavior, so changing directory_permits_begindir_requests() so it doesn't
 depend on router_should_be_directory_server() seems like a good idea.

 I'm now wondering if we don't want to use dir_server_mode() other places,
 as well. In particular, currently the behavior is now different for
 caching directory info, too. Relays won't cache them if they're near their
 bandwidth usage limit. Maybe this is better than the old behavior? I'm
 thinking we should stick with what we currently do unless there's a better
 reason for doing something different.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-06 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by nickm):

 My issue is that  dir_server_mode() can tell us "true" when we build a
 descriptor, and tell us "false" later on when we decide whether to serve
 directory information.

 >BTW, do we have plans for deprecating the DirPort completely? So changing
 the client logic to use BEGIN_DIR for everything, and eventually ripping
 off the DirPort code from tor?

 Plausible, but I don't think we've made any such plan yet.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-06 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by asn):

 Replying to [comment:68 nickm]:
 > `feature12538_rebased_7` in my public repository is rebased on master,
 with the NotDir/BelieveNotDir stuff removed, and the bugs mentioned above
 fixed.
 >
 > My only remaining issue is:
 > > * I worry about the definition of dir_server_mode(). Possibly, if we
 have advertised that we're a dirserver, we should actually be a dirserver?
 >

 What are we worrying about here? What do you mean "actually be a
 dirserver"?
 `dir_server_mode()` is:
 {{{
 int
 dir_server_mode(const or_options_t *options)
 {
   if (!options->DirCache)
 return 0;
   return (server_mode(options) || options->DirPort_set) &&
   router_should_be_directory_server(options, 0);
 }
 }}}

 An awkward thing I noticed is that in `router_build_fresh_descriptor()` we
 do:
 {{{
   ri->supports_tunnelled_dir_requests = dir_server_mode(options);
 }}}
 which could be false if our router had a `DirPort` but no support for
 tunneled dir conns. However, looking at the code, I think there is no way
 for this to happen, since all relays with `DirCache` enabled also support
 tunneled dir conns. So I think the code is OK here.

 ---

 BTW, do we have plans for deprecating the DirPort completely? So changing
 the client logic to use `BEGIN_DIR` for everything, and eventually ripping
 off the DirPort code from tor?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-06 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by arma):

 Replying to [comment:70 asn]:
 > BTW, do we have plans for deprecating the DirPort completely? So
 changing the client logic to use `BEGIN_DIR` for everything, and
 eventually ripping off the DirPort code from tor?

 I would want to explore the load (cpu and bandwidth) from relay descriptor
 uploads on the dir auths before taking that step. Making all the relays do
 a full v3-or-whatever handshake just to send us their little blob of text
 is not really great.

 That said, maybe we should turn that around and argue for breaking out dir
 auth functionality as a whole.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-05 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by teor):

 Replying to [comment:68 nickm]:
 > Also we should test this on chutney to verify that everything works
 correctly for servers without DirPort support.

 We can do this in chutney by commenting out the line:
 {{{
 DirPort $dirport
 }}}
 in chutney/torrc_templates/relay-non-exit.tmpl

 It's important that these relays work in mixed dirport / no dirport
 networks, which probably means creating a new torrc template and a new
 network, then testing that network as part of make test-network-all in
 tor.

 The torrc_templates include structure is currently:
 * common.i
   * relay-non-exit.tmpl
 * relay.tmpl (also includes exit-v4.i and exit-v6.i)
 * relay-exit-v4-only.tmpl (also includes exit-v4.i)
 * relay-exit-v6-only.tmpl (also includes exit-v6.i)

 It could be changed to:
 * common.i
   * relay-non-dirport.tmpl (contains the previous content of relay-non-
 exit.tmpl without DirPort)
 * relay-non-exit.tmpl (also includes dirport.i, which contains
 `DirPort $dirport`)
   * relay.tmpl (also includes exit-v4.i and exit-v6.i)
   * relay-exit-v4-only.tmpl (also includes exit-v4.i)
   * relay-exit-v6-only.tmpl (also includes exit-v6.i)

 But then we would also need to make templates for exit relays without a
 dirport:
 * common.i
   * relay-non-dirport.tmpl (contains the previous content of relay-non-
 exit.tmpl without DirPort)
 * relay-non-dirport-exit-v4-v6.tmpl (also includes exit-v4.i and
 exit-v6.i)
 * relay-non-dirport-exit-v4-only.tmpl (also includes exit-v4.i)
 * relay-non-dirport-exit-v6-only.tmpl (also includes exit-v6.i)

 (We need to do a better job of turning features like this on and off in
 chutney 2.0.)

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-05 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by nickm):

 `feature12538_rebased_7` in my public repository is rebased on master,
 with the NotDir/BelieveNotDir stuff removed, and the bugs mentioned above
 fixed.

 My only remaining issue is:
 > * I worry about the definition of dir_server_mode(). Possibly, if we
 have advertised that we're a dirserver, we should actually be a dirserver?

 Also we should test this on chutney to verify that everything works
 correctly for servers without DirPort support.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-04 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by asn):

 Replying to [comment:64 nickm]:
 > Reviewing feature_12538_rebased_6.  The '''CHECK''' notes below are for
 me. :)

 > `be7d522274d21db2bb6bbc8d422fa35b59a4da12  Add NotDir status flag and
 dir-cache server entry`
 >* '''CHECK''': re-read the thread above; why are we doing this? Not
 sure it's an improvement.
 >
 > `763d03da5a87727fc44a1369650694ec91197619  Add the BelieveNotDir
 consensus parameter`
 >* '''CHECK''': re-read the thread above; why are we doing this? Not
 sure it's an improvement.

 I think the rationale for the NotDir flag was mentioned here:
 https://lists.torproject.org/pipermail/tor-dev/2015-May/008883.html
 however I still don't understand the rationale completely.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-04 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by nickm):

 {{{
 18:17 < nickm> sysrqb: So, I'd be more comfortable just taking it without
 the
NotDir/BelieveNotDir stuff, since it doesn't do any harm to
 keep
a flag around (thanks to compression)
 18:17 < nickm> I think I'll patch those out unless you're really set on
 them,
since it's extra complexity?
 18:17 < sysrqb> nickm: nope, i've no objection to you deleting those. my
 main
 concern was the continued use of V2Dir
 18:18 < sysrqb> (which is becoming increasingly outdated)
 }}}

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-03 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by nickm):

 I see a `feature_12538_rebased_6` in sysrqb's repository.  I guess that's
 the one to look at now.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-03 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by nickm):

 Reviewing feature_12538_rebased_6.  The '''CHECK''' notes below are for
 me. :)


 `fa54b983901c396911d8e0732a7cf1ba8135443a  Authorities must set a router's
 V2Dir flag if it supports tunnelled reqs`
* Looks okay.

 `05f95c8ec50b81ff6e7a7b3cc09f51971fd4f14d  A relay now advertises
 "tunnelled-dir-server" in its descriptor`
* The new warning in `directory_initiate_command_rend()` should be
 LD_BUG.
* '''CHECK''': There should be no more instances of DirPort_set!  Grep,
 just in case.
* I worry about the definition of dir_server_mode().  Possibly, if we
 have advertised that we're a dirserver, we should actually be a dirserver?
* The check for dir_server_mode(options) in router_dump_to_string() is
 wrong: we should be looking at `router->supports_tunneled_dir_requests`,
 not at our configuration.  We should set that field based on our actual
 settings in `router_build_fresh_descriptor()`.
* Are we making sure to download information and be a directory cache
 whenever dir_server_mode() is true?

 `d4c08da145564a03ffca9ef234808342613eb2d8  Client should check if dir
 server has open dir port or handles tunnelled requests`
* Looks okay.
 `91d1600328f4f6d9a0c3dcb5ab3558e23af891b4  Add unit test for
 router_pick_directory_server_impl`
* Looks okay.


 `90f2cfb81a383481cdf6e31d623c564840de7133  Add new DirCache configuration
 option`
* Looks okay.

 `be7d522274d21db2bb6bbc8d422fa35b59a4da12  Add NotDir status flag and dir-
 cache server entry`
* '''CHECK''': re-read the thread above; why are we doing this? Not
 sure it's an improvement.

 `763d03da5a87727fc44a1369650694ec91197619  Add the BelieveNotDir consensus
 parameter`
* '''CHECK''': re-read the thread above; why are we doing this? Not
 sure it's an improvement.

 `8a9ac52a9e41ba2db3d7045124f7c055ced85721  Fix wide line in or.h`
 `b1efeb2c693042c7a7a01520e8b713c1cbae0960  Correct widelines in tests`
* trivially correct

 `02ae35e59c12920e0ba6a8d9c1712d30ca1a7ffa  Rebuild descriptor when
 DirCache is {dis,en}abled`
 `ae1647fd1565e0ed5718f6d82244b8ea2d80d4ee  {dis,en}abling DirCache is a
 semantic change`
* Yup.

 `a832b7e12cb553dd49b69817ac7d534a6dc8aa07  A router must be a dir cache
 before it may be HSDir`
* Yup.
 `5f294acfcfe5915dc1d040e3f431446e9c862d90  Let make_consensus_method_list
 be used in tests`
* looks ok.
 `239be79713ac388861728bc1a09f815bf348eddd  Automatically generate md-con
 method vers in test`
* Memory leak here?
 `8cd810633a8cf8a911bc652c6d405608c04bfe58  Assert rs are added in con and
 con_md tests`
* Looks ok.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-11-03 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-

Comment (by nickm):

 `feature12538_rebased_6` in my own public repository has a few commits to
 fix some of the (marked) issues from my review above.  Only a few issues
 remain.  Comments invited on my open questions!

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-10-30 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:  cypherpunks  |  Owner:
 Type:  task | Status:
 Priority:  High |  needs_review
Component:  Tor  |  Milestone:  Tor:
 Severity:  Normal   |  0.2.8.x-final
 Keywords:  tor-guard, tor-relay, prop237,   |Version:  Tor:
  026-triaged-1, sebastian-review,   |  unspecified
  027-triaged-1-out, 028-triage, 028-triaged,| Resolution:
  mike-can, pre028-patch |  Actual Points:
Parent ID:   | Points:
  Sponsor:   |  medium/large
-+-
Changes (by isis):

 * cc: isis (added)
 * severity:   => Normal


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-10-01 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.8.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review,
Actual Points:   |  027-triaged-1-out, 028-triage, 028-triaged
   Points:   |  Parent ID:
  medium/large   |Sponsor:
-+-
Changes (by mikeperry):

 * cc: mikeperry (added)


Comment:

 If this stalls out due to needing more changes after review and sysrqb is
 unavailable, I can pick this up. I want to solve #10969, and I think it
 will depend on this.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-10-01 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.8.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review,
Actual Points:   |  027-triaged-1-out, 028-triage, 028-triaged,
   Points:   |  mike-can
  medium/large   |  Parent ID:
 |Sponsor:
-+-
Changes (by mikeperry):

 * keywords:
 tor-guard, tor-relay, prop237, 026-triaged-1, sebastian-review,
 027-triaged-1-out, 028-triage, 028-triaged
 =>
 tor-guard, tor-relay, prop237, 026-triaged-1, sebastian-review,
 027-triaged-1-out, 028-triage, 028-triaged, mike-can


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-10-01 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.8.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review,
Actual Points:   |  027-triaged-1-out, 028-triage, 028-triaged
   Points:   |  Parent ID:
  medium/large   |Sponsor:
-+-
Changes (by nickm):

 * points:   => medium/large


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-09-30 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.8.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review,
Actual Points:   |  027-triaged-1-out, 028-triage
   Points:   |  Parent ID:
 |Sponsor:
-+-
Changes (by teor):

 * status:  needs_revision => needs_review


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-09-25 Thread Tor Bug Tracker & Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_revision
 Type:  task |  Milestone:  Tor: 0.2.8.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review,
Actual Points:   |  027-triaged-1-out, 0.2.8.x-triage
   Points:   |  Parent ID:
-+-
Changes (by mikeperry):

 * keywords:
 tor-guard, tor-relay, prop237, 026-triaged-1, sebastian-review,
 027-triaged-1-out
 =>
 tor-guard, tor-relay, prop237, 026-triaged-1, sebastian-review,
 027-triaged-1-out, 0.2.8.x-triage


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-08-28 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_revision
 Type:  task |  Milestone:  Tor: 0.2.8.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review,
Actual Points:   |  027-triaged-1-out
   Points:   |  Parent ID:
-+-

Comment (by asn):

 Anyone knows what's the current status here?

 Are there unresolved protocol issues (that need proposal changes)? Or is
 it just a simple matter of programming? If the latter, what's wrong with
 sysrqb's latest branches?

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:51
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-08-28 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_revision
 Type:  task |  Milestone:  Tor: 0.2.8.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review,
Actual Points:   |  027-triaged-1-out
   Points:   |  Parent ID:
-+-

Comment (by someone_else):

 Per current consensus:

 Guards: 1533
 Guards with V2Dir flag: 1178  (77%)
 Guard Bandwidth: 26208661
 V2Dir Guard Bandwidth: 21596681  (82%)

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:52
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-03-12 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_revision
 Type:  task |  Milestone:  Tor: 0.2.7.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by nickm):

 Note: This would supersede #11103 .

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:48
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-03-06 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_revision
 Type:  task |  Milestone:  Tor: 0.2.7.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-
Changes (by ln5):

 * cc: ln5 (added)


--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:47
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-03-03 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_revision
 Type:  task |  Milestone:  Tor: 0.2.7.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by cypherpunks):

 This invalidates some parts of proposal 237, we need to update that too it
 seems. -- Sebastian

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:46
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-16 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_revision
 Type:  task |  Milestone:  Tor: 0.2.7.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-
Changes (by sysrqb):

 * milestone:  Tor: 0.2.6.x-final = Tor: 0.2.7.x-final


--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:45
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-15 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_revision
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by sysrqb):

 Replying to [comment:40 Sebastian]:
  should the implies be implying?
 Yes, fixed.

 Replying to [comment:41 Sebastian]:
  Ok, for a bunch of stuff you're using free() instead of tor_free().
 Fixed

 Replying to [comment:42 Sebastian]:
  I'm concerned about the routerlist_free_all() call because what happens
 with the node_t things that we created along with it? Just calling
 nodelist_free_all() would be a workaround, but I think this may have
 exposed a deeper problem with routerlist_free_all(). Hrm.
 I added the workaround. Good catch! After thinking about this some more,
 if it were the case where routerlist_free_all() were called at any other
 time, excluding its call during cleanup prior to exit and in tests, I
 wonder if we should explicitly call any other _free_all(), such as for the
 microdescs. At this point, I don't *think* we need to because I don't see
 any other dangling pointers remaining after calling routerlist_free_all()
 and nodelist_free_all(). The microdesc referenced by the node_t should
 still be ref'd in the  microdesc cache, and the routerstatus should still
 be ref'd in the latest consensus. Is this not the case in some situations?

 Thanks for the review, Sebastian!

 Rebased on master and pushed the changes:
 feature12538_rebased_4
 feature12538_rebased_4_fixup

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:44
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-12 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by Sebastian):

 I'm concerned about the routerlist_free_all() call because what happens
 with the node_t things that we created along with it? Just calling
 nodelist_free_all() would be a workaround, but I think this may have
 exposed a deeper problem with routerlist_free_all(). Hrm.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:42
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-12 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_revision
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-
Changes (by Sebastian):

 * status:  needs_review = needs_revision


Comment:

 That concludes my review. Needs revision.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:43
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-12 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by Sebastian):

 Hey, I'm not finding much here. :)

 In the spec, you should be concrete with the version that introduced it,
 like versions until 0.2.6.2-alpha don't recognize this.

 In the code, I noticed this comment:

 {{{
 +  /** True iff this router included tunnelled-dir-server in its
 descriptor,
 +   * implies it accepts tunnelled directory requests, or it advertised
 +   * dir_port  0. */
 }}}
 should the implies be implying? When I read it first I wonder if there
 are three ways this can be true.

 I haven't yet review the test changes, only the code. Will hopefully get
 to the tests tonight

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:40
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-12 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by Sebastian):

 Ok, for a bunch of stuff you're using free() instead of tor_free(). That
 needs to be fixed (not just in the unit tests, also in the code).

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:41
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-08 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by sysrqb):

 Yes, the idea is the flag will be on by default, but operators may opt-
 out, if they want. I also agree 0.2.7 is almost certainly too soon, but
 the timing of that change can happen when the conditions are correct, no
 rush.

 This implements a new configuration option, named DirCache. Manpage and
 some tests are included. Changes file is slightly amended so it mentions
 this new option. A chutney net seemed to operate without any surprises,
 and bridges should not be affected and do not seem affected based on
 testing. During configuration validation tor explicitly rejects configs
 which both disable DirCache and enable a DirPort or BridgeRelay. During
 validation tor also emits a warning if its detected the system has less
 than 300MB of memory. 300MB is a bit arbitrary. I originally considered
 warning at 400MB, but decided to decrease it.

 Same a last time, two branches, feature12538_rebased_3 was append-only and
 _fixup was squashed/fixed-up. Rebased on master as of ~10 hours ago.
 feature12538_rebased_3
 feature12538_rebased_3_fixup

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:39
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-05 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by Sebastian):

 Replying to [comment:33 karsten]:
  Not sure if this is the right place to ask, but I'm receiving warnings
 from CollecTor about bridge descriptors containing unrecognized
 `tunnelled-dir-server\n` lines.  Is that line going to be included in
 the spec and using that format (no arguments, just the keyword)?  If so,
 I'll modify CollecTor to keep that line.  Right now, these descriptors are
 discarded by CollecTor.  Thanks!  (And if there's a better place to ask
 this, please let me know.)

 It is the right line for now, but the code hasn't been merged. This argues
 strongly for not merging anything until we have the spec updated.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:34
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-05 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by karsten):

 Not sure if this is the right place to ask, but I'm receiving warnings
 from CollecTor about bridge descriptors containing unrecognized
 `tunnelled-dir-server\n` lines.  Is that line going to be included in
 the spec and using that format (no arguments, just the keyword)?  If so,
 I'll modify CollecTor to keep that line.  Right now, these descriptors are
 discarded by CollecTor.  Thanks!  (And if there's a better place to ask
 this, please let me know.)

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:33
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-05 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by Sebastian):

 The idea is rather that the flag is turned on by default but you can turn
 it off. We looked at the numbers yesterday, even if we upgraded right away
 we'd only lose about 15% of all guards (that's way too much to do it, but
 not so much to make this unfeasible imo)

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:38
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-05 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by sysrqb):

 Replying to [comment:33 karsten]:
  Not sure if this is the right place to ask, but I'm receiving warnings
 from CollecTor about bridge descriptors containing unrecognized
 `tunnelled-dir-server\n` lines.  Is that line going to be included in
 the spec and using that format (no arguments, just the keyword)?  If so,
 I'll modify CollecTor to keep that line.  Right now, these descriptors are
 discarded by CollecTor.  Thanks!  (And if there's a better place to ask
 this, please let me know.)

 Ah, Yikes! Sorry Karsten! That was my test bridge :(

 I wasn't sure if the spec should be updated before or after the patch was
 merged, but now I think Sebastian is correct. Spec update on
 prop237_spec_update in https://git.torproject.org/user/sysrqb/torspec.git.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:36
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-05 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by karsten):

 Understood.  I decided to merge the code anyway, because we shouldn't
 discard these bridge descriptors because of this new line.  If the format
 changes in the future, we'll have to add the new format as well.  Either
 let me know when that happens, or expect me to ask whenever CollecTor
 starts shouting at me.  Thanks for the information, and sorry for the
 noise.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:35
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-05 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by nickm):

 Replying to [comment:32 sysrqb]:
  Replying to [comment:29 Sebastian]:
   To restate my concern from above, doing this would mean requiring all
 relays need to have ~200 MB of disk around to cache old documents, without
 need because we mainly want guards to be caches.
 
  Sorry, I see now you mentioned this in [comment:15 comment 15].
 
  Sebastian and I discussed this, and the current design is not-quite-
 right. We can certainly make every relay a dircache, but that doesn't
 avoid unnecessary consequences. As an example, this would have a
 significant impact on memory-constrained systems. As such, more precisely,
 our goal is that, after the network has sufficiently upgraded, whenever a
 client chooses a guard it should always be a dircache. This leaves two
 options, either all guards *become* a dircache (when they get the guard
 flag) or being a dircache is a *requirement* for getting the guard flag.
 The former is tricky, as arma said above, the later requires a spec
 change.
 
  The current plan, given this, is implementing the latter option based on
 my current patch. Step 0, add a torrc option so relay operators can
 control whether or not their relay is a dircache. Step 1, get this merged
 into 0.2.6, as planned. Step 2, write proposal amending Guard flag
 criteria. Step 3, implement proposal and merge into 0.2.7.

 Hm.  If there's a special flag you need to set in order to become a guard,
 I think that would probably be bad for the network.  I wonder if we
 couldn't have high-bandwidth relays (as determined by some criteria)
 automatically turn this on?

 We should also adjust our planned timing for amending the Guard flag
 criteria so that we don't cause a large number of Guards to disappear
 because they were running older versions or hadn't set the flag.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:37
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-04 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by Sebastian):

 To restate my concern from above, doing this would mean requiring all
 relays need to have ~200 MB of disk around to cache old documents, without
 need because we mainly want guards to be caches.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:29
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-04 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by sysrqb):

 Replying to [comment:29 Sebastian]:
  To restate my concern from above, doing this would mean requiring all
 relays need to have ~200 MB of disk around to cache old documents, without
 need because we mainly want guards to be caches.

 Sorry, I see now you mentioned this in [comment:15 comment 15].

 Sebastian and I discussed this, and the current design is not-quite-right.
 We can certainly make every relay a dircache, but that doesn't avoid
 unnecessary consequences. As an example, this would have a significant
 impact on memory-constrained systems. As such, more precisely, our goal is
 that, after the network has sufficiently upgraded, whenever a client
 chooses a guard it should always be a dircache. This leaves two options,
 either all guards *become* a dircache (when they get the guard flag) or
 being a dircache is a *requirement* for getting the guard flag. The former
 is tricky, as arma said above, the later requires a spec change.

 The current plan, given this, is implementing the latter option based on
 my current patch. Step 0, add a torrc option so relay operators can
 control whether or not their relay is a dircache. Step 1, get this merged
 into 0.2.6, as planned. Step 2, write proposal amending Guard flag
 criteria. Step 3, implement proposal and merge into 0.2.7.

 Does any of this sound crazy or wrong?

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:32
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-04 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237,
   Resolution:   |  026-triaged-1, sebastian-review
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by sysrqb):

 Replying to [comment:28 nickm]:
  Re-reviewing based on the `git diff master...` output:
 
   * directory_fetches_from_authorities() has a semantic change that seems
 wrong in the replacement of me-dir_port.  But now I see that
 dir_server_mode() is not quite the same...
 

 yes and yes. The semantic change was wrong, I think I made it correct now,
 though. dir_server_mode did change slightly since the last the you looked
 at this -  now we confirm we think we have enough available bandwidth
 before we advertise we're a dircache.

   * In the router.c changes, are we at any risk of having bridges _not_
 be directory caches?  Bridges all need to be dircaches.
 

 No, I don't think so. I re-reviewed the changes and I don't see anything
 that impacts the bridge logic. As a sanity check I ran a bridges and it
 accepted and responded to tunneled dir connections without a problem.

   * Shouldn't the documentation for supports_tunnelled_dir_requests say
 it's also set if `dir_port  0`?
 

 Yes. Corrected.

  Otherwise this looks ok to me now.

 Great! But now things are changing slightly, but not too much, I hope.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:31
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-02-02 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by nickm):

 Re-reviewing based on the `git diff master...` output:

  * directory_fetches_from_authorities() has a semantic change that seems
 wrong in the replacement of me-dir_port.  But now I see that
 dir_server_mode() is not quite the same...

  * In the router.c changes, are we at any risk of having bridges _not_ be
 directory caches?  Bridges all need to be dircaches.

  * Shouldn't the documentation for supports_tunnelled_dir_requests say
 it's also set if `dir_port  0`?

 Otherwise this looks ok to me now.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:28
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2015-01-28 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-
Changes (by sysrqb):

 * status:  needs_revision = needs_review


Comment:

 thanks for the reviews! These issues should be resolved now.

 I also tested this branch in mixed chutney nets with 0.2.5 - one network
 had five authdirs running this patch and another network had three 0.2.5
 and two authdirs running this patch, both nets had a mix of clients and
 relays running 0.2.5 and this patch. No warning during voting and flags
 were assigned correctly.

 When all five dirauths ran this patch, all relays which declared
 tunnelled-dir-server were assigned v2dir, regardless of dirport
 configuration and patched clients chose them and successfully used them.
 0.2.5 clients only chose the dirauths and relays with advertised dirports.

 In the net with three 0.2.5 dirauths and two patched dirauths, the relays
 were assigned v2dir only if they had an open dirport. Patched relays and
 clients fellback to the current functionality - only choosing dircaches
 with open dirports.

 There are two branches. feature12538_rebased_2 has subsequent
 changes/corrections as new commits. feature12538_rebased_2_fixup squashed
 and fixed up the changes with the original commits. Both are rebased and
 apply cleanly on master.

 https://git.torproject.org/user/sysrqb/tor.git

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:27
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-11-20 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by nickm):

 Reviewing from scratch, with dgoulet:

 Less important, but should get fixed:
  * I think the log_info(LD_BUG) should be a log_warn ?  Otherwise, we'll
 never see it.
  * Isn't there a define for the length of the output of tor_addr_to_str?
 Also, doesn't it always nul-terminate?
  * `#endif //TOR_UNIT_TESTING` should refer to TOR_UNIT_TESTS instead.
  * If we use a switch in networkstatus_set_current_consensus_from_ns() ,
 then we'll get a warning if we forget to add more cases in the future.
  * current_ns_consensus = NULL and current_md_consensus=NULL are both
 redundant.
  * Why return -2 instead of -1 ?

 More important:
  * We need to look at something like decide_to_advertise_dirport() [maybe
 a modified version of it] when deciding whether to set tunneled-dir-
 server.  The bandwidthrate stuff is particularly important.
  * The directory_fetches_from_authorities() function should also return 0
 if we decided not to set dir_port or tunneled-dir-requests.  Otherwise
 low-bandwidth ORs will hit the authorities rather than the caches, which
 is not what we want.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:24
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-11-20 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_revision
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-
Changes (by nickm):

 * status:  needs_review = needs_revision


--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:25
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-11-20 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_revision
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by nickm):

 Oh.  Also, make sure you try compiling with --enable-gcc-warnings , and
 fix all the warnings this finds.  (I think there's one in the unused arg
 of test_nodelist_node_is_dir().)

 In the tests:
   * `+  memset(rs3-status.descriptor_digest, 181818, DIGEST_LEN)` makes
 no sense; the second argument to memset needs to be a byte.
   * The new test code seems to be substantially similar to other tests in
 test_dir.  Can the common code be factored out?  Copy-and-paste is a bad
 practice in programming; that's what we have functions for.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:26
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-11-08 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by sysrqb):

 Replying to [comment:22 nickm]:
  Alternatively I can...
 
  Making them STATIC seems like a fine idea to me, if the goal is to be
 able to call them from the unit tests.  That's what STATIC is for, after
 all.

 Great, done. Pushed bug12538_prop_squash_3 which squashed the changed into
 the original commits and rebases on current master. I should also mention
 I ifdefs a new function networkstatus_set_current_consensus_from_ns in
 networkstatus on TOR_UNIT_TESTS. It's a bit of a hack which allows setting
 the global current_consensus without trying to fetch new descriptors at
 the end. Let me know if there's a better way to do this.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:23
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-11-07 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by nickm):

 Is there a case I'm missing?

 Oh. I guess not.

 Alternatively I can...

 Making them STATIC seems like a fine idea to me, if the goal is to be able
 to call them from the unit tests.  That's what STATIC is for, after all.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:22
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-11-06 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by sysrqb):

 Pushed bug12538_prop_squash_1, adding function rename and unit test.


 Replying to [comment:19 dgoulet]:
  I'm wondering if it would be useful to have is_directory_server()
 function that could take a routerinfo_t and test that object to see if
 it's a directory instead of the options object parsing?
 
  It could then be used with desc_routerinfo object representing our
 router information thus fixing the semantic issue.

 I considered taking a routerinfo_t as a parameter, but I decided against
 it because 1) I wanted to match the signature of server_mode() as closely
 as possible, and 2) this function is only called when a router must decide
 if it serves dir requests, so an or_options_t should be sufficient.

 Until this changes in the future, simply checking the is_v2_dir field of
 another router's routerinfo_t is all that is needed to determine if it is
 a dir server. I think it would be unnecessarily complicated otherwise, so
 I think it's okay that we have different interfaces for answering the
 questions am I a directory server? verses is she a directory server?.

 
  Also, I'm a big fan of namespacing function with the file name so this
 function is in router.c and public thus maybe should be called
 router_is_directory_server() ? (unless there is a coding rules I'm not
 aware of)

 I agree, but I'll follow Nick's suggestions below in this case.


 Replying to [comment:20 nickm]:
  - In set_routerstatus_from_routerinfo, shouldn't it also set is_v2_dir
 to true if ri-dir_port is nonzero? That's what the proposal says, I
 think.

 {{{
 @@ -2090,6 +2090,7 @@ set_routerstatus_from_routerinfo(routerstatus_t *rs,
strlcpy(rs-nickname, ri-nickname, sizeof(rs-nickname));
rs-or_port = ri-or_port;
rs-dir_port = ri-dir_port;
 +  rs-is_v2_dir = ri-supports_tunnelled_dir_requests;
 }}}

 I don't think it's necessary because supports_tunnelled_dir_requests is
 only set when the descriptor is parsed in router_parse_entry_from_string
 and we set it true if either the dirport is set or tunnelled-dir-server
 was in the descriptor. Is there a case I'm missing?

 {{{
 +  /* This router accepts tunnelled directory requests via begindir if it
 has
 +   * an open dirport or it included tunnelled-dir-server. */
 +  if (find_opt_by_keyword(tokens, K_DIR_TUNNELLED) || router-dir_port 
 0) {
 +router-supports_tunnelled_dir_requests = 1;
 +  }
 }}}

  - dir_server_mode() or running_as_dir_server() would be a better name
 for is_directory_server()
 Agreed, let's use the former so it matches server_mode() and
 public_server_mode().

  - Do we have a test for router_pick_directory_server_impl()? If not,
 should we get one somehow?
 No, and yes.

 It's not a very elegant solution (directly including routerlist.c).
 Alternatively I can make router_pick_directory_server_impl and
 routerlist_insert STATIC or create TOR_UNIT_TESTS-specific wrappers around
 them. The existing non-static wrappers added unnecessary complexity
 considering I'm trying to test a single function, but if using a wrapper
 is more mergeable then I can expand the unit test so that will work. Which
 do you prefer?

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:21
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-11-03 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by dgoulet):

 I'm wondering if it would be useful to have is_directory_server()
 function that could take a routerinfo_t and test that object to see if
 it's a directory instead of the options object parsing?

 It could then be used with desc_routerinfo object representing our
 router information thus fixing the semantic issue.

 Also, I'm a big fan of namespacing function with the file name so this
 function is in router.c and public thus maybe should be called
 router_is_directory_server() ? (unless there is a coding rules I'm not
 aware of)

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:19
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-11-03 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by nickm):

 * In `set_routerstatus_from_routerinfo`, shouldn't it also set is_v2_dir
 to true if ri-dir_port is nonzero?  That's what the proposal says, I
 think.

 * dir_server_mode() or running_as_dir_server() would be a better name for
 `is_directory_server()`

 * Do we have a test for `router_pick_directory_server_impl()`?  If not,
 should we get one somehow?

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:20
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-10-29 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  new
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by sysrqb):

 I pushed bug12538_prop_squash to my pub repo. It was tested with Chutney
 in a network containing relays both with and without dirports, and also in
 a network with zero relays with dirports (but authorities had them, as
 required). After the first consensus period clients successfully sent
 tunnelled directory requests in both networks.

 Note, counter to proposal 237, clients prefer sending tunnelled requests
 over direct. I forgot this was the existing functionality, and I decided
 against changing it (soley so we match the proposal).

 Slightly bikesheddy, I named the function which decides if a relay accepts
 directory request as is_directory_server(), I feel like this should be
 changed to am_directory_server(), because it's asking itself, so it's
 almost more grammatically correct. Thoughts/preferences?

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:17
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-10-29 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  needs_review
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-
Changes (by sysrqb):

 * status:  new = needs_review


Comment:

 Forgot to set it.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:18
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-09-11 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  new
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by asn):

 Replying to [comment:15 Sebastian]:
   I haven't been paying attention, but I hope the new diskspace
 requirements shouldn't be more than tens of megabytes, right?
 
  One week of consensuses worth, however much that turns out to be

 microdescriptor consensuses currently take around 1.2MB each. one week
 worth of consensuses will be around 190 to 210 MBs.

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:16
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches (was: A relay is automatically a dir cache)

2014-09-10 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  new
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:12
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-09-10 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  new
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by Sebastian):

 Should this maybe be All guards should be dir caches? We're adding a
 nuch of diskspace requirements for dir caches with the consensus diff
 stuff

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:13
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-09-10 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  new
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by arma):

 See the above comments on why making only guards do this behavior is
 tricky -- how does a relay know whether it's a guard?

 I haven't been paying attention, but I hope the new diskspace requirements
 shouldn't be more than tens of megabytes, right?

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:14
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs


Re: [tor-bugs] #12538 [Tor]: Make all relays automatically be dir caches

2014-09-10 Thread Tor Bug Tracker Wiki
#12538: Make all relays automatically be dir caches
-+-
 Reporter:   |  Owner:
  cypherpunks| Status:  new
 Type:  task |  Milestone:  Tor: 0.2.6.x-final
 Priority:  normal   |Version:  Tor: unspecified
Component:  Tor  |   Keywords:  tor-guard, tor-relay, prop237
   Resolution:   |  026-triaged-1
Actual Points:   |  Parent ID:
   Points:   |
-+-

Comment (by Sebastian):

 Replying to [comment:14 arma]:
  See the above comments on why making only guards do this behavior is
 tricky -- how does a relay know whether it's a guard?

 I meant the other way around - you have to cache dir info to become a
 guard, and being a dir cache is a config option (default on?)

  I haven't been paying attention, but I hope the new diskspace
 requirements shouldn't be more than tens of megabytes, right?

 One week of consensuses worth, however much that turns out to be

--
Ticket URL: https://trac.torproject.org/projects/tor/ticket/12538#comment:15
Tor Bug Tracker  Wiki https://trac.torproject.org/
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs