fix(render): ignore clearnet_initial_sync while the egress firewall is on; run the clearnet scenario with it off (#2649) - #2679
Conversation
…s on (#2649) With clearnet_initial_sync on and network.tor_egress_firewall at its default, monerod dropped its Tor proxy while the firewall dropped every clearnet dial. The node had no peers, so after #2472 made the sync gate wait for monerod's own synchronized flag it never counted as synced and never switched back to Tor. That is what turned the matrix's local-pruned-main-clearnet-sync rows red in bench job 987. render_env now passes the flags to the daemons only while the firewall is off; with it on both nodes stay on Tor and the #941 warning says the flag is ignored. The marker re-arm reads the configured flag, so a completed clearnet sync stays spent across a firewall toggle. privacy.md no longer promises a Tor fallback that monerod never had. The clearnet matrix scenario runs with the firewall off (operator ruling on #2649) and turns it back on before it ends, proving the rules come back, the flags are ignored and the completed syncs stay spent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on in --check (#2649) The review found assert_running_state compared .env's clearnet flags to the raw config flags, so a --check against a clearnet config with the firewall on would wait for a marker that never comes. It now expects what render_env writes. Stale docs and comments that described the flag without the firewall condition are corrected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2e-matrix-local-pruned-main-clear # Conflicts: # CHANGELOG.md # docs/configuration.md # tests/integration/selftest/selftest-run-modules.sh # tests/stack/run.sh
…merged file budget (#2649) The develop merge landed both branches' additions to tests/integration/lib/run-state.sh, pushing it 2 lines over its unchanged 403-line ceiling. Extracted clearnet_flag_effective() into run-matrix.sh (well under its own budget) so assert_running_state and restore_firewall_after_clearnet share the same firewall-gated flag logic instead of duplicating it inline. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Ready for reviewFinding: the PR cannot be merged; it conflicts with its base branch. What changed on the branch since the RETURN:
Checks re-run on the merged head:
Why this is ready to merge: the base-branch conflict was the only finding, and it is resolved with no code drift from what the bench already tested at |
|
adversarial-review: RETURN at 534eead, round 2, by the pithead-reviewer reviewer (a fresh session that did not produce this head; claude-opus-5-5). The product fix is right and its tier-1 tests are proven: 3 of the 8 new rows fail with the render hunk reverted, and 2 fail with only the marker re-arm hunk reverted. But no tier4-e2e job exists on head 534eead. Job 1095 tested 6c3ea13, and since then the branch merged 24 develop commits touching build/, compose, lib/, os/ and the dashboard, and rewrote the tier-4 steady-state battery's clearnet expectation. Separately, two red rows in job 1095 (the ZMQ publisher rows) carry no open owning issue. Evidence
Findings
|
…2649) The helper's comment claimed a second caller it does not have; it has one, assert_running_state, and exists to keep run-state.sh under its file-budget ceiling. A selftest row now calls it twice (flag true with the firewall off, and with the firewall absent) and goes red when the firewall branch is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes #2649
Product fix: a clearnet initial sync no longer strands monerod behind the egress firewall
Root cause (not bench timing). In job 987@edd31617554a96f735b22d035abf58a2b0c2d1e4,
local-pruned-main-clearnet-syncran with the clearnet flags on andnetwork.tor_egress_firewallat its default (on).proxy=line, and the firewall drops every clearnet dial, so monerod had no peers.initial block download (clearnet sync)asblocked_by_firewall: true, no sync progress in monerod's log for the whole scenario, and a silent ZMQ publisher.target_height: 0counted as synced. The marker was written at once and the node flipped back to Tor; job 939 passed that way.chain_synced()waits for monerod's ownsynchronizedflag, which a peerless node never sets. So the node stayed on clearnet with no peers and never reverted.clearnet_initial_sync: trueand kept the default firewall got the same deadlock. docs/privacy.md promised a Tor fallback that monerod never had.Changes, per the operator's ruling on #2649:
lib/pithead/33-render-env.sh:MONERO_CLEARNET_SYNC/TARI_CLEARNET_SYNCreach.env(and so the daemons) only whilenetwork.tor_egress_firewallisfalse. With the firewall on, both nodes stay on Tor. "No faster, no less private" is now what the code does.lib/pithead/28-parse-and-validate-config.sh: the clearnet_initial_sync is silently defeated by the default-on Tor egress firewall #941 apply/doctor warning now says the flag is ignored while the firewall is on.lib/pithead/34-inject-service-configs.sh: the marker re-arm reads the configured flag, not the now-zeroed.envone. A clearnet sync that already completed stays spent when the firewall is turned back on, so turning it off again later does not put a synced node back on clearnet.privacy.md"It needs the egress firewall turned off" rewritten.configuration.md,architecture.md,getting-started.md,appliance.md, CHANGELOG and two dashboard comments corrected. Atesting-strategy.mdrow added.Harness
tests/integration/scenarios.sh:local-pruned-main-clearnet-syncnow setsnetwork.tor_egress_firewall=false, so the bench runs a real clearnet sync and the Auto-transition clearnet initial sync back to Tor once synced (follow-up to #183) #234 transition fires on genuinesynchronized. The operator accepted the few minutes of P2P exposure. Every other scenario keeps the firewall on.tests/integration/lib/run-matrix.shrestore_firewall_after_clearnet: before that scenario ends, it re-applies the same config with the firewall on. It then asserts that doctor sees the firewall installed, that both.envflags readfalse, and that each completed sync's marker survived the apply.tests/integration/lib/run-state.sh: the steady-state battery (and--check) expects the flags thatrender_envwrites (flag AND firewall off). This was a review finding.Tests (tier 1)
tests/stack/test-clearnet-firewall.sh:falsein.envand apply shows no exposure preview;.env;tests/stack/test-tor-network.sh: the flag-propagation rows now run with the firewall off, and the clearnet_initial_sync is silently defeated by the default-on Tor egress firewall #941 warning needle is updated.tests/stack/test-confirm-approval.shandcontrol/test-control-editable-allowlist.sh: the dashboard confirm gate classifies the rendered.envdiff, so the clearnet CONFIRM rows now run on a host whose firewall is off. The allowlist file adds rows proving that the flags are ignored once the firewall is back on.tests/integration/selftest/selftest-clearnet-firewall.sh(15 rows): the scenario override, and the restore step against stubs (clean pass, marker removed, missing marker, failed apply, configs left alone).Commands run on the worker host:
selftest-clearnet-firewall.sh,selftest.shandselftest-run-modules.sh: all pass.make lint-file-budget,make lint-pithead-build,scripts/lint/lint-docs-voice.sh,scripts/lint/lint-operator-strings.sh,make lint-path-references: all pass.--severity=warningon the generatedpitheadand every changed shell file: clean. shfmt 3.13.1-i 4 -don every changed shell file: clean.ruff checkandruff format --checkon the two dashboard files: clean.tests/stack/run.shon this head, limited to the changed domains inrun.shorder (lib +test-config,test-tor-network,test-clearnet-firewall,test-control-core,test-confirm-approval,test-control-add-only-ssrf,test-control-perimeter-tier3,test-control-editable-allowlist): 834 passed, 0 failed. This host exceeds the tool's time limit on the full suite. An earlier full run on this branch had only two reds outside this diff:Go module raise watch self-test(nogoon the host) andrecovery page gates: prerequisites present. GitHub'sshell.ymlruns the whole suite.npx, which this host lacks; CI'slint-mdcovers it.Bench evidence (tier 4)
tier4-e2e,{"mode":"matrix","no_rig":true}, the same options as job 987. Conclusionerrorbefore checkout: the bench's chain-sync wait ran out after 2933s (curl: (7)on its readiness probe). The branch was never deployed, so this job says nothing about the change. This is bench-ci#678, which is open for every tier4-e2e job 1041-1073. bench-ci#678 has since closed.tier4-e2e,{"mode":"matrix","no_rig":true}. Conclusionfailure(harness exit 1), baseline verified.local-pruned-main-clearnet-syncand its new firewall-restore step are fully green: the marker rows pass,egress firewall back on after the clearnet sync (#2649),firewall on: monero/tari clearnet flag ignored (#2649), andfirewall on: the completed monero/tari clearnet sync stays spent (#234/#2649)all pass.local-pruned-nano-insecure/local-pruned-main-rpclan:monero ZMQ endpoint actually publishes— recurs after test(integration): make ZMQ publisher sampling deterministic #2574 merged; owner tier4-e2e: 'monero ZMQ endpoint actually publishes' still reads a healthy publisher as silent after #2574 #2705 (open).remote-main-secure-tari:apply succeeded— a leakedmonero.view_keyfrom an earlier scenario, tracked at integration matrix remote Monero scenario retains forbidden payout view key #2502 (open). Byte-identical to job 987 (this issue's own bench evidence, pre-fix): same scenario, same error.tari-off-main-secure:topology exposes the canonical node set— owner tier4-e2e: tari-off topology assertion still requires the omitted Tari node #2510 (open); also red in job 987 at the same scenario.fault-injection:node-down failover armed before fault— tracked at tier4-e2e shared battery after #2357: node-down failover arming and the wallet spool preview stay red on every matrix run #2362 (open) / fix(integration): match the failover-arm and wallet-preview rows to the real contract #2371 (open PR, "match the failover-arm and wallet-preview rows to the real contract").hardening:sensitive (wallet) spool preview staged host-side (#33)— same tier4-e2e shared battery after #2357: node-down failover arming and the wallet spool preview stay red on every matrix run #2362/fix(integration): match the failover-arm and wallet-preview rows to the real contract #2371.subnet:safety rollback restored the exact healthy baseline— tracked at Tier4 matrix regression: p2pool restart cascade and safety rollback mismatch #2575 (open, "Tier4 matrix regression: p2pool restart cascade and safety rollback mismatch").apply succeededand the tari-off topology row are the identical failures job 987 (this issue's own trigger) already showed on the identical scenarios, before this PR's diff existed — so they predate and are independent of this change. The other four are pre-existing, already open elsewhere.Review
run-state.shexpectation, and the stale docs and comments..envchange, so it commits without a typed APPLY. Nothing is exposed by that commit. When the host later turns the firewall off, itsapplypreview shows the CONFIRM exposure row and asks. I left the gate as it is and noted this in Setup wizards offer a faster clearnet first sync that the default egress firewall makes inert #2678.ponytail-reviewskill is not installed on this host, so I did it myself): nothing cut. Every hunk is either a ruled behaviour, its test, or a doc correction; the wizard follow-up was moved to Setup wizards offer a faster clearnet first sync that the default egress firewall makes inert #2678 rather than folded in.🤖 Generated with Claude Code
Update: merged
origin/develop(base conflict from the reviewer's RETURN, resolved at 14f9e08/534eead7), then pinnedclearnet_flag_effectivewith a selftest row at ab8f296. Job 1095 predates that merge (24 develop commits and a battery change), so it is superseded as the evidence for this head by:tier4-e2e,{"mode":"matrix","no_rig":true}. Queued; its rows go here when it completes.