Sponsor 31

Project Title - Modularization work

Project Period: December 1, 2018 - November 30, 2019

Project Goals/Activities

The key deliverables of the modularization project are:

  • Refactored architecture for how Tor modules should communicate, designed to reduce module complexity and maintenance burden.
  • Architectural documentation for how Tor modules work with one another, covering both the actuality and the refactored architecture.
  • New architecture for several key Tor modules.
  • Improved testing for those modules.
  • Improved documentation for those modules.


  1. Determine how to best refactor modules to make them more resilient,segregated, and automatically testable. (288 hours) -- March 2019

1.1. Identify pieces that we have to refactor. (96 hours)

1.2. Draft initial design for each piece. (192 hours)

  1. Identify which parts of the codebase are most important to refactor first. (256 hours) -- April and August 2019

2.1. Discuss which parts to refactor first. (16 hours)

2.2. Research and discuss automated tooling. (48 hours)

2.3. Design tooling as needed. (48 hours)

2.4. Repeat the same tasks 2.1, 2.2 and 2.3 after milestone 4 is completed. (144 hours)

  1. Revise the system of interactions between modules to improve usability and maintainability. (88 hours) -- May 2019

3.1. Review publisher/subscriber design that Tor uses. (16 hours)

3.2. Implement refactoring. (72 hours)

  1. Create and deploy plan to incorporate refactored modules. (184 hours) -- August 2019

4.1. For each module and each architectural change, form a plan to apply that change to that module. This plan should include increased testing, if the module's test coverage is not already high. (160 hours)

4.2. For each plan formed in 4.1, deploy that plan. (24 hours)

  1. Create documentation for how Tor modules work with one another with both old and new architecture. (432 hours) -- December 2018

5.1. Update module documentation and incorporate into Tor. (96 hours)

5.2. Document existing refactoring. (144 hours)

5.3. Document new elements. (144 hours)

5.4. For modules we are not refactoring, document important interactions. (48 hours)

Teams Involved: Network

Project Tracking

Refactoring cross-module communications

#28226 Backend for an async publish-subcribe messaging system for cross-module communications (Tor 0.4.1)

Coding best practices

#29221 Tooling to track code-style/best-practices violations #29219 Write guidelines for Tor coding best practices #29220 Update review guidelines for practices #29223 List canonical abbreviations to use in Tor functions and identifiers

Refactoring modules

#29201 Tor bootstrap hangs when offline - Split up control.c #29209 Reduce visibility of more data type internals #29218 Revise "handles" to be opaque, safe. Document standard usage #29224 Abstractions and best practices for disabled modules #29217 Script to add new tor files and modules in rust and/or C #29227 Audit Tor roles (relay, bridge, etc) and remove needless dependencies where possible


#29216 Document how to make new files/modules in Tor


Ticket Summary Status Owner Keywords Priority
No tickets found

Ticket Summary Status Owner Keywords Priority
No tickets found

Project Completion 

Last modified 10 months ago Last modified on Dec 17, 2019, 6:52:04 PM