Opened 3 years ago

Last modified 2 years ago

#24377 new defect

Warn about networkstatus_compute_consensus() breakage in all the functions it calls

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: doc, automation-needed, tor-dirauth, 033-triage-20180320, 033-removed-20180320
Cc: Actual Points:
Parent ID: Points: 2
Reviewer: Sponsor:


networkstatus_compute_consensus() says:

 * <strong>WATCH OUT</strong>: You need to think before you change the
 * behavior of this function, or of the functions it calls! If some
 * authorities compute the consensus with a different algorithm than
 * others, they will not reach the same result, and they will not all
 * sign the same thing!  If you really need to change the algorithm
 * here, you should allocate a new "consensus_method" for the new
 * behavior, and make the new behavior conditional on a new-enough
 * consensus_method.

But its call graph is somewhat obscure, and it isn't always clear when a function is called by some tree of functions called by networkstatus_compute_consensus().

Let's add a summary comment to each function that affects networkstatus_compute_consensus() output. And let's try to do this in an automated fashion.

Maybe out modularity proposal is the best way to handle this?
(Then a module-level comment would suffice.)
But would consensus-affecting functions be a good candidate for a module?
(Or two modules: authority-only and shared.)

(We already have chutney "mixed" targets that pick up the most obvious breakage. But they can't test everything.)

Child Tickets

Change History (6)

comment:1 Changed 3 years ago by teor

Keywords: tor-dirauth added

comment:2 Changed 2 years ago by nickm

Keywords: 033-triage-20180320 added

Marking all tickets reached by current round of 033 triage.

comment:3 Changed 2 years ago by nickm

Keywords: 033-removed-20180320 added

Mark all not-already-included tickets as pending review for removal from 0.3.3 milestone.

comment:4 Changed 2 years ago by nickm

Milestone: Tor: 0.3.3.x-finalTor: unspecified

These tickets were marked as removed, and nobody has said that they can fix them. Let's remember to look at 033-removed-20180320 as we re-evaluate our triage process, to see whether we're triaging out unnecessarily, and to evaluate whether we're deferring anything unnecessarily. But for now, we can't do these: we need to fix the 033-must stuff now.

comment:5 Changed 2 years ago by teor

Parent ID: #25610

#25610 makes the directory authority code into a module. That module is the appropriate place for consensus method documentation like this.

comment:6 Changed 2 years ago by dgoulet

Parent ID: #25610

Unparenting so we can close the dirauth modularization task ticket.

Note: See TracTickets for help on using tickets.