Skip to content

tor,lan-guard: fix #4263, #4598 — pending-circuit budget review and boot-timer only on real exposure - #4675

Draft
pithead-developer[bot] wants to merge 4 commits into
developfrom
agent/4263-review-maxclientcircuitspending-64-and-p
Draft

pithead-developer[bot] wants to merge 4 commits into
developfrom
agent/4263-review-maxclientcircuitspending-64-and-p

Conversation

@pithead-developer

@pithead-developer pithead-developer Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What's the problem

Two open v2.0.6 issues meet at the Tor/LAN boundary of the appliance:

How I fixed it

Here is the proof

Part of #4263
Part of #4598

Left out: #4338 (realupgrade fidelity gaps, a separate battery-phase scope).

🤖 Generated with Claude Code

pithead-developer[bot] and others added 3 commits December 2, 2026 23:35
… boot check

lan_guard_watched_ports watched a fixed port whenever the engine read for
a node container failed or came back empty, which is exactly what every
stopped container answers after a reboot. The appliance therefore
installed pithead-lan.timer at boot and the same function took it down
minutes later once Compose converged: churn, a false "checked every 2
minutes" promise, and no protection because the read-back was empty
either way.

The read-back now wins when it says something, and a successful empty
read-back publishes nothing. A failed read-back asks the engine whether
the container is running: stopped means not watched, running or
unreadable stays watched, and an unreadable container list still watches
all fixed ports. The two-minute check is installed only when the render
installs it, and a configured LAN bind is watched with every node
stopped, so #3290 crash recovery and the switch-off teardown keep their
behavior.

Co-Authored-By: Claude Code <noreply@anthropic.com>
…l exposure

The configuration prose said the check "also runs on the appliance after
pithead up" and that a port published "by a node container" keeps the
timer. Neither was what the appliance now does: the boot render decides
with the same read-back rules the check uses, so a loopback-only box
installs nothing and never mentions the two-minute check, and a stopped
container that publishes nothing no longer keeps the timer on a Docker
install either.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Upstream Tor developers advise against raising MaxClientCircuitsPending:
a client in trouble pushes twice as many circuit builds into a network
that is already stressed. Review the whole dial budget against that
advice and record the decision: keep 64. Raising it amplifies exactly
the failure the wedges showed, the 32 default does not fit the current
budget (monerod's default 24 plus the Tari and P2Pool dials dial about
44 at boot), and an adaptive cap would rise when the network is least
able to take it. Capping Tari's simultaneous outbound dials waits for
the diagnostics measurement of what fills the pending queue during a
wedge; the operations doc now carries that reasoning and the out_peers
row points at it.

Enforce the version half. The tor image build now refuses a pin below
the 0.4.9.17 floor before apk runs, the daily bump tool reads the floor
from the Dockerfile and refuses a pin below it (and refuses every pin
when the floor line is malformed), and the support bundle's
tor/control.txt asks GETINFO version, so the floor an appliance runs is
auditable from a bundle instead of inferred from the pin.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@pithead-developer pithead-developer Bot added this to the v2.0.6 milestone Dec 4, 2026
…d bind, not dropped

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@pithead-developer

Copy link
Copy Markdown
Contributor Author

Blocked on #4674: the tor image does not build on develop (Alpine retired the pinned tor 0.4.9.17-r0), so no tier-4 e2e can deploy this head. Tiers 1 to 3 are otherwise green except that same image build. Finished: #4598 fix and tests, #4263 floor, diagnostics version and cap decision. Unblocks when the tor pin bump (#4668) merges to develop; then bring develop in and run tier4-e2e targeted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stage/blocked its issue waits on another issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants