Opened 9 months ago

Closed 4 months ago

#19925 closed enhancement (implemented)

SR: Control event to get the shared random values

Reported by: dgoulet Owned by: dgoulet
Priority: Medium Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-sr, controller, tor-spec
Cc: Actual Points:
Parent ID: Points: 3
Reviewer: Sponsor: SponsorR-must

Description

Once all dirauth move to 029, the consensus will have a shared random value regurlarly. Having a way to get that value through the control port would be useful for many purposes including people wanting to use that value outside of tor.

I recommend we implement that only in 030 so we'll have a full stable version to debug and make sure it actually works properly before we expose it to a wider audience.

This ticket is the main one for both the spec and implementation.

Child Tickets

Change History (6)

comment:1 Changed 5 months ago by arma

Same ticket as #17436?

comment:2 Changed 5 months ago by dgoulet

  • Keywords tor-sr controller tor-spec added; sr dirauth control spec removed
  • Owner set to dgoulet
  • Status changed from new to accepted
  • Summary changed from sr: Control event to get the shared random values to SR: Control event to get the shared random values

comment:3 Changed 5 months ago by dgoulet

  • Status changed from accepted to needs_review

Took a stab at this. I went dead simple here, the main purpose is to expose the value straight away thus I didn't put some key/values for the number of participants or algorithm or version.

Spec: ticket19925_01
Code: ticket19925_030_01

On the control port:

GETINFO sr/current
250-sr/current=uvk8oUuHKnynlJ1CnkzLxHcICy6wxtsTnOPh5uGoqgY=
250 OK
GETINFO sr/previous
250-sr/previous=rU+4HJZGBi07ei4TvaXbExvZvxmnoTz00Xa2i9CcFt4=
250 OK

comment:4 follow-up: Changed 5 months ago by asn

Hello, thanks for the code.

The basic idea looks reasonable. Why not also expose the number of participants and protocol version? If these are important things to put in the consensus, we should also expose them to users of control port.

Also, I suggest we move this to 0.3.1. I don't think we should put extra code/design/review work for 0.3.0.

comment:5 in reply to: ↑ 4 Changed 5 months ago by dgoulet

Replying to asn:

Hello, thanks for the code.

The basic idea looks reasonable. Why not also expose the number of participants and protocol version? If these are important things to put in the consensus, we should also expose them to users of control port.

We can and we should at some point. Your point below is why I want dead simple at first. The main use case for this will be for third part app. to use the SR and get it easily instead of grep parsing the consensus.

I can see something like this as future addition. Actually, it would be _trivial_ to add this:

GETINFO sr/current/num-reveals
250-sr/current/num-reveals=8
250 OK

Also, I suggest we move this to 0.3.1. I don't think we should put extra code/design/review work for 0.3.0.

My counter argument here is that SR went in 029 and 030 is the version you can get access to it through the control port. Putting that in 031 means another 8 months... This isn't a big change to the spec and code, I think we can pull it off? Feature freeze for 030 is in 21 days so we still have time in theory. :)

comment:6 Changed 4 months ago by nickm

  • Resolution set to implemented
  • Status changed from needs_review to closed

Merged, with a changes file. I'm okay letting this into 030 since it's not going to break anything else.

Note: See TracTickets for help on using tickets.