Commit a76a41b5 authored by Jim Newsome's avatar Jim Newsome
Browse files

chutney test network: add 4 suitable middle/guard/vg relays

With the chutney bump in the previous commit alone, we hit #2463
consistently.

According to the spec, a hidden service using vanguards-lite needs 2
guards and 4 vanguards
<https://spec.torproject.org/vanguards-spec/index.html>.

All 6 of those relays need to be Fast and Stable.

At least the 2 guards also need to be Measured. (Probably the 4
vanguards too, but I haven't verified).

authority relays are never considered Measured. Prior to the chutney
bump, none of the relays were, but since chutney!142, we create a
bandwidth file to ensure the non-authorities *are* Measured, and will
get the Fast flag. (IIUC, tor doesn't apply the bandwidth measurements
to authorities). Maybe the presence of *some* measured relays gets us
out of some fallback path that was getting used before to allow
unmeasured relays?

Adding the additional relays seems to fix the issue.
parent 4d20f6f0
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -34,10 +34,16 @@ def make_network(config: config_module.Config) -> chutney.TorNet.Network:
    configs += NodeConfig(
        tag="a", authority=True, relay=True, launch_phase=LAUNCH_PHASE_DIR_AUTHS
    ).getN(4)
    # Exits. We don't need many since authorities also function as exits,
    # but let's have at least 1 non-authority exit relay.
    # We need at least 6 non-Authority relays.
    # A hidden service needs using vanguards-lite needs 2 guards, and 4 vanguards.
    # Authorities are generally disqualified because they are Unmeasured.
    configs += NodeConfig(tag="rm", relay=True, launch_phase=LAUNCH_PHASE_RELAYS).getN(
        6
    )
    # Let's also have some exits that are not authorities (so can be considered
    # Measured), and that can be non-overlapping with a full guard+vanguard set.
    configs += NodeConfig(
        tag="r", relay=True, exit=True, launch_phase=LAUNCH_PHASE_RELAYS
        tag="re", relay=True, exit=True, launch_phase=LAUNCH_PHASE_RELAYS
    ).getN(2)
    # Simple tor client. Useful as a baseline check for "chutney verify",
    # and used in arti-bench for comparison.