Skip to content

feat(tx-killswitch): 5-min cadence, TLS hardening, softer docs - #131

Merged
M0LTE merged 1 commit into
masterfrom
feat/tx-killswitch-tuning
May 6, 2026
Merged

feat(tx-killswitch): 5-min cadence, TLS hardening, softer docs#131
M0LTE merged 1 commit into
masterfrom
feat/tx-killswitch-tuning

Conversation

@M0LTE

@M0LTE M0LTE commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Three changes to the dev-time TX kill-switch landed in #128/#129:

  • Cadence: poll every 5 minutes instead of every minute. Trivial outbound load against the publishing endpoint at fleet scale; still pauses misbehaving nodes within a single beacon cadence. Staleness bumped from 10 to 30 minutes to preserve the "several poll cycles of failure before declaring stale" semantics.
  • TLS hardening: the named `tx-kill-switch` `HttpClient` now pins a fresh `SocketsHttpHandler` with default `SslOptions` so any future tweak to the default handler (someone adding a "trust all certs" callback for testing and forgetting it) cannot silently weaken kill-switch validation. Plus a runtime guard in `PollOnce` that refuses to fetch over plaintext if the URL ever drifts off `https://`. Belt-and-braces over .NET's already-validating default. Implementation detail; not surfaced in operator docs.
  • Softer wording: dropped "or fork" / "the answer is to not run" framing; replaced "gag" with "pause" / "silence" / "stop"; reframed around "asking nodes to pause" rather than "every node, regardless of operator, polls". Substance unchanged: still hardcoded, still not configurable, still removed before 1.0.

Test plan

  • Unit suite: 637/637 (pin test updated for new `PollSeconds=300` / `StaleSeconds=1800` constants)
  • Manual: dev daemon polls the live OARC URL over HTTPS using the pinned named-client handler; `ClientHandler` log lines confirm the dedicated handler is in use.

🤖 Generated with Claude Code

Three changes:

- Polling every 5 minutes instead of every minute. With hundreds of
  nodes the request rate against the publishing endpoint becomes
  trivial, while still pausing a misbehaving fleet within a single
  beacon cadence. Bumped staleness window from 10 to 30 minutes to
  preserve the "several poll cycles before declaring stale"
  semantics.

- Harden TLS verification. The named "tx-kill-switch" HttpClient now
  pins a fresh SocketsHttpHandler with default SslOptions
  (system trust store, full chain / hostname / expiry validation).
  Means any future global tweak to the default handler - someone
  adding a "trust all" callback for testing and forgetting it - does
  not silently weaken the kill-switch fetch. Added a runtime guard
  in PollOnce that refuses to fetch over plaintext if the URL ever
  drifts off https://. .NET's default HttpClient already validates;
  this is belt-and-braces.

- Softer wording in the docs. Drop the "or fork" / "the answer is to
  not run" framing, replace "gag" with "pause" / "silence" / "stop",
  reframe the rationale around "asking nodes to pause" rather than
  "every node, regardless of operator, polls". The substance is
  unchanged: still hardcoded, still not configurable, still removed
  before 1.0. Just less stark.

Pin test updated for the new 300s / 1800s constants.
Tests: 637/637. Manual smoke confirms the poller hits the live OARC
URL over HTTPS using the pinned named-client handler.
@M0LTE
M0LTE merged commit 9326ac2 into master May 6, 2026
6 checks passed
@M0LTE
M0LTE deleted the feat/tx-killswitch-tuning branch May 6, 2026 10:12
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.

1 participant