Opened 2 years ago

Closed 2 years ago

#23331 closed defect (fixed)

prop224: Don't build HS desc if we don't have a live consensus

Reported by: asn Owned by:
Priority: Medium Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: prop224
Cc: Actual Points:
Parent ID: Points: 0.1
Reviewer: Sponsor: SponsorR-can

Description

We currently block descriptor uploading until we have a live consensus, but we actually happily build the descriptor before that.

That can cause various synch issues. One example is that if we build the descriptor without a live consensus, we will calculate a false timing period length because of get_voting_interval().

We should restrict any descriptor-related operations until we have a live consensus. After all, without a live consensus we can't upload the descriptor anyway, so no point in building before that.

Child Tickets

Change History (5)

comment:1 Changed 2 years ago by dgoulet

Status: newneeds_review

See branch: bug23331_032_01

comment:2 Changed 2 years ago by asn

Status: needs_reviewmerge_ready

LGTM.

comment:3 Changed 2 years ago by nickm

Status: merge_readyneeds_revision

I agree with adding the check in hs_service_callback(), but I'm not sure it makes sense to remove the one in should_service_upload_descriptor(). It's a cheap thing to check, and it protects us in case we start calling should_service_upload_descriptor() from anywhere else in the codebase.

comment:4 in reply to:  3 Changed 2 years ago by asn

Status: needs_revisionmerge_ready

Replying to nickm:

I agree with adding the check in hs_service_callback(), but I'm not sure it makes sense to remove the one in should_service_upload_descriptor(). It's a cheap thing to check, and it protects us in case we start calling should_service_upload_descriptor() from anywhere else in the codebase.

Sounds good to me. Fixup pushed in my bug23331_032_01.
Back in merge_ready.

comment:5 Changed 2 years ago by nickm

Resolution: fixed
Status: merge_readyclosed

Merging; thanks!

Note: See TracTickets for help on using tickets.