Opened 5 months ago

Closed 5 months ago

#25631 closed defect (fixed)

Integration tests set up and publish descriptors for an exit relay

Reported by: dmr Owned by: dmr
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: atagar Sponsor:

Description

Some support for talking with Tor's ORPort has recently made it to stem (see #18856).

Integration tests thus needed to set up a relay with ORPort in the torrc. 3fe2221ae2bad6d826c05fd0ce96e5c09a21fc01 did this, but the defaults for a relay are to publish descriptors and act as an exit. Both of these are undesirable for stem's integration tests.

The corresponding torrc options to disable these are:

  • ExitRelay 0
  • PublishServerDescriptor 0

Child Tickets

Change History (7)

comment:1 Changed 5 months ago by teor

You might want some of the other options from endosome's test relay script:

AssumeReachable 1
ProtocolWarnings 1
SafeLogging 0
LogTimeGranularity 1
SOCKSPort 0

https://github.com/teor2345/endosome/blob/master/relay-local.sh

comment:2 Changed 5 months ago by dmr

Status: assignedneeds_review

atagar:
I've rebased the original patch for this and pushed the commit up to a public repo on github.
git@github.com:dmr-x/stem.git branch 25631-integ-torrc commit 2a91f9e35f6bd7f40d1894128b0a362aa359dae4

web links:
https://github.com/dmr-x/stem/tree/25631-integ-torrc
https://github.com/dmr-x/stem/commit/2a91f9e35f6bd7f40d1894128b0a362aa359dae4

Please review! :)

comment:3 Changed 5 months ago by dmr

Status: needs_reviewassigned

teor: thanks! Looking over those options now. Assigning self again.

comment:4 Changed 5 months ago by dmr

teor:
I don't fully get the AssumeReachable option.
I'm running Tor 0.3.2.10 (git-0edaa32732ec8930) and this is what my man torrc says:

AssumeReachable 0|1
    This option is used when bootstrapping a new Tor network. If set to 1, don’t do self-reachability
    testing; just upload your server descriptor immediately. If AuthoritativeDirectory is also set, this
    option instructs the dirserver to bypass remote reachability testing too and list all connected
    servers as running.

I'm assuming that the part about just upload your server descriptor immediately is moot with PublishServerDescriptor 0, although that's not quite clear from the manual. So I'm assuming the combo means don’t do self-reachability testing, which does sound quite appropriate for a local test relay, although I'm not sure what reachability testing looks like. (Just thought I'd ping you for confirmation and a potential learning opportunity for me.)

ProtocolWarnings 1, SafeLogging 0, and LogTimeGranularity 1 all look good; I'll file that as another trac ticket just because I feel they constitute an enhancement, not a defect. :)

SOCKSPort 0 doesn't make sense - at least not right now. There's only a chief torrc used as the base for integration tests in stem, many of which rely on the SocksPort.

I would agree that it makes sense in the future to split this up into multiple torrc sets for different tests.

Thanks again for the feedback! :)

comment:5 in reply to:  4 Changed 5 months ago by dmr

Replying to dmr:

ProtocolWarnings 1, SafeLogging 0, and LogTimeGranularity 1 all look good; I'll file that as another trac ticket just because I feel they constitute an enhancement, not a defect. :)

Filed; see #25632

comment:6 in reply to:  4 Changed 5 months ago by dmr

Status: assignedneeds_review

Replying to dmr:

teor:
I don't fully get the AssumeReachable option.
I'm running Tor 0.3.2.10 (git-0edaa32732ec8930) and this is what my man torrc says:

AssumeReachable 0|1
    This option is used when bootstrapping a new Tor network. If set to 1, don’t do self-reachability
    testing; just upload your server descriptor immediately. If AuthoritativeDirectory is also set, this
    option instructs the dirserver to bypass remote reachability testing too and list all connected
    servers as running.

I'm assuming that the part about just upload your server descriptor immediately is moot with PublishServerDescriptor 0, although that's not quite clear from the manual. So I'm assuming the combo means don’t do self-reachability testing, which does sound quite appropriate for a local test relay, although I'm not sure what reachability testing looks like. (Just thought I'd ping you for confirmation and a potential learning opportunity for me.)

I think it's a safe assumption for me that this is a good change :).
Without knowing more about reachability testing, I'd imagine it constitutes some sort of outbound communication to check whether our ORPort is reachable from another relay. Since we explicitly don't want to publish info to contact our relay, turning off this sort of behavior just makes sense to me (if it is as I'm guessing it to be).

I've pushed another commit to the github branch:
git@github.com:dmr-x/stem.git branch 25631-integ-torrc commit 37d11c67773361bbebf521691d57468e6ea51d32

web links:
https://github.com/dmr-x/stem/tree/25631-integ-torrc
https://github.com/dmr-x/stem/commit/37d11c67773361bbebf521691d57468e6ea51d32

atagar and/or teor: please review :)

comment:7 Changed 5 months ago by atagar

Resolution: fixed
Status: needs_reviewclosed

Hi dmr, sorry about the delay! Change looks good, pushed.

Note: See TracTickets for help on using tickets.