[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #25610 [Core Tor/Tor]: module: Modularized directory authority subsystem



#25610: module: Modularized directory authority subsystem
-------------------------------------------------+-------------------------
 Reporter:  dgoulet                              |          Owner:  ahf
     Type:  enhancement                          |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.4.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  modularization, 034-roadmap-         |  Actual Points:
  subtask, tor-dirauth, 034-triage-20180328,     |
  034-included-20180328                          |
Parent ID:  #25494                               |         Points:
 Reviewer:                                       |        Sponsor:
                                                 |  Sponsor8
-------------------------------------------------+-------------------------
Changes (by dgoulet):

 * status:  assigned => needs_review


Comment:

 I've discussed with ahf an action plan. Nickm took a quick look as well
 and doesn't seem anything "bad" for now, I'm sure we'll find things as we
 go. But for now, to start somewhere, this is the plan:

 Isolate the module into a sub-directory. This will require an important
 refactoring on many parts of the code...

  `src/or/dirauth/`

 Put in a _disable_ dirauth code build option within the build system.

  `$ ./configure --disable-dirauth-support`

 Which will introduce something like `TOR_DIRAUTH_ENABLED = [0|1]`

 Compile the subdir conditionally according to `TOR_DIRAUTH_ENABLED` which
 is checked in the include.am file of `src/or/`

 Everything that is an entry point function into the subsystem called from
 other part in Tor will be #ifdef/#else in public header file in
 ./src/or/dirauth.

 One of the main goal of all this is to:

 1. Isolate Tor modules at the code level for better semantic and easier
 build system integration.

 2. Improve namespacing so every single part of a module can be identified
 across the code base. For instance, we do have functions that are in
 dirserv_* namespace but only used by tor clients.

 3. Avoid at all cost a pile of #ifdef in C files. Entry point functions
 will be static inline or NOP if module is disabled.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25610#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs