Bug
The documented #270 opt-out (network.tor_egress_firewall=false, per the comment in pithead and docs/privacy.md) has never worked — the firewall is always installed regardless of the config value.
Root cause
parse_and_validate_config() read the toggle as:
jq -r '.network.tor_egress_firewall // true'
jq's // (alternative) operator treats false as empty, not just null. So false // true evaluates to true:
$ echo '{"network":{"tor_egress_firewall":false}}' | jq -r '.network.tor_egress_firewall // true'
true
The rendered .env therefore always got TOR_EGRESS_FIREWALL=true, and apply_tor_egress_firewall always installed the rules.
The same latent bug existed on .xvb.tor // true (line ~1883): xvb.tor=false (route XvB donation over clearnet) was silently coerced back to Tor.
Impact
Fix
Null-check explicitly so a configured false is honoured (absent still defaults on / fail-closed):
jq -r 'if .network.tor_egress_firewall == null then true else .network.tor_egress_firewall end'
Fixed in commit d4b5df3 on feat/256-benchmark-harness (reaches develop via the #256 benchmark PR). Filing for tracking + so it's not lost if that PR is slow to merge. Surfaced while validating the #256 benchmark's clearnet arm (firewall stayed up → p2pool got 0 sidechain peers).
Follow-up
Bug
The documented #270 opt-out (
network.tor_egress_firewall=false, per the comment inpitheadanddocs/privacy.md) has never worked — the firewall is always installed regardless of the config value.Root cause
parse_and_validate_config()read the toggle as:jq -r '.network.tor_egress_firewall // true'jq's
//(alternative) operator treatsfalseas empty, not justnull. Sofalse // trueevaluates totrue:The rendered
.envtherefore always gotTOR_EGRESS_FIREWALL=true, andapply_tor_egress_firewallalways installed the rules.The same latent bug existed on
.xvb.tor // true(line ~1883):xvb.tor=false(route XvB donation over clearnet) was silently coerced back to Tor.Impact
xvb.tor=falsecan't take effect (privacy-safe direction — stays on Tor — but still broken).Fix
Null-check explicitly so a configured
falseis honoured (absent still defaults on / fail-closed):jq -r 'if .network.tor_egress_firewall == null then true else .network.tor_egress_firewall end'Fixed in commit d4b5df3 on
feat/256-benchmark-harness(reachesdevelopvia the #256 benchmark PR). Filing for tracking + so it's not lost if that PR is slow to merge. Surfaced while validating the #256 benchmark's clearnet arm (firewall stayed up → p2pool got 0 sidechain peers).Follow-up
tor_egress_firewall=false→TOR_EGRESS_FIREWALL=falsein the rendered.env(and=truewhen absent/true).<falsifiable-bool> // truejq reads.