Skip to content

fix: the relay check reads the watchdog's probe; 0.4.9.12:5 → 0.4.9.12:6 - #35

Merged
MattDHill merged 1 commit into
masterfrom
fix/relay-check-shares-probe
Sep 21, 2026
Merged

MattDHill merged 1 commit into
masterfrom
fix/relay-check-shares-probe

Conversation

@stupleb

@stupleb stupleb commented Sep 21, 2026

Copy link
Copy Markdown
Member

Tor logs a notice for every control connection it accepts. The Relay Reachability check from #33 opened its own every 30 seconds beside the watchdog's. A relay's log went from 120 to 248 New control connection opened lines an hour. On the relay where I measured it, those lines are 88% of a 10,000-line log. That log now covers under two days, down from about three and a half.

Change

  • probe() carries the relay check's three GETINFO keys in the round trip it already makes.
  • relayStatus() returns that reading. It returns null when the latest probe went unanswered or is older than 90 seconds.
  • The relay check still runs every 30 seconds, so it still fails at once when the Public address is turned off.
  • README: names the SocksPort warning Tor logs on every start.

Verified. I ran the real control.ts, before and after this change, against Tor 0.4.9.12 over a unix control socket, offline:

  • five watchdog ticks plus five relay reads: 10 control connections before, 5 after, with identical readings;
  • a 551 Address unknown reply mid-batch leaves the later replies intact;
  • null before any probe, null after a probe Tor didn't answer, null past 90 seconds;
  • tsc, prettier and the x86 build pass.

Verified on a StartOS box (x86_64):

  • identical 240-second windows with the relay on gave 16 control connections on 0.4.9.12:4 and 8 with this change;
  • the check reports success while reachable, fails at once when the Public address is turned off, and succeeds again when it is turned back on.

That ran before rebasing onto #34, which does not touch control.ts or relay.ts.

Considered and rejected: Log [control]warn [~control]notice stdout would remove the remaining 120 lines an hour. It also hides Tor's Bootstrapped N% lines, which are logged in the same domain.

@helix-a helix-a left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shared probe preserves the relay health-check semantics while eliminating its duplicate Tor control connection. The stale-reading guard also handles missed watchdog probes cleanly. Verified locally with npm ci, npm run check, Prettier, npm run build, and make x86; all passed.

Tor logs a notice for every control connection it accepts. The Relay
Reachability check added in 0.4.9.12:4 opened its own every 30 seconds beside
the watchdog's, doubling "New control connection opened" in a relay's log from
120 to 240 lines an hour.

probe() now carries the relay check's three GETINFO keys in the round trip it
already makes, and relayStatus() returns that reading, or null when the latest
probe went unanswered or is older than 90 seconds.

README: names the SocksPort warning Tor logs on every start.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Helix-Harness: pi
Helix-Model: openai-codex/gpt-5.6-sol
@helix-a
helix-a force-pushed the fix/relay-check-shares-probe branch from 0e52305 to 78547ff Compare September 21, 2026 14:29

@helix-a helix-a left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub’s required-signature rule blocked the merge despite the passing checks and approval. I re-signed the existing commit without changing its tree (tree e32c5fc1fdc8e79eb0e03d479fd7e6ee2394faac), preserving Stuart as author, then re-ran this approval against the signed head. The code remains exactly what I reviewed.

@MattDHill
MattDHill merged commit 8010705 into master Sep 21, 2026
4 checks passed
@MattDHill
MattDHill deleted the fix/relay-check-shares-probe branch September 21, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants