DIM · Dagon Inference Marketplace

Prober operations

Long-running mode

PROBER_BUYER_SETTINGS="$HOME/.config/im-prober/buyer.json" \
  bun services/prober/src/cli.ts watch "$HOME/.config/im-prober/probe.json"

watch needs stateFile and holds an exclusive lease on it. Each route is due at most once per intervalMs, and passes never overlap. Keep the state file, the SDK wallet journal and the buyer identity on private local storage under the same service user (umask 077). Never delete, clone or reset either journal.

Logs

Line Meaning
probe waiting for journal handoff Waiting for the state-file lease (another process holds it).
probe operator <key> Running, under this operator key.
JSON per route: {seller, route, status, refused, failed, reason, budget_remaining_micros} Result of one route this pass.
probe reloaded; operator <key> A SIGHUP reload took effect.
probe reload rejected: ... The new config was invalid; the previous one stays active.
probe cycle: ... A pass failed; the next one runs on schedule.

Route status values: published, publish_failed, listing_failed (with a reason such as non_independent_operator), payment_unavailable, budget_exhausted, cap_too_low, schedule_inactive. budget_remaining_micros is the remaining conservative allowance, not actual redeemed charges. Diagnostics name a stage and a reason, never key material, paths or response bodies.

Reloading keys and pins

Atomically rename the new config or seed file into place on the same filesystem, then:

kill -HUP <prober-pid>

probe reloaded confirms that new windows use the new snapshot; a window already admitted finishes under the old keys and pins. A reload cannot change stateFile, the payment mode or the payment module path; those need a rollout.

Rolling out a new release

  1. Start the replacement in watch with the same state file, wallet journal and buyer identity. It logs probe waiting for journal handoff.
  2. Send SIGTERM to the old process. It stops admitting windows, finishes the current bounded window, flushes vouchers and releases the lease.
  3. Wait for the replacement's probe operator line before declaring it ready.

Give the old process a shutdown allowance longer than a full window (up to 900 s) plus the wallet drain; never force-kill a normal drain. Signing-key and pin rotations do not change the buyer identity or recreate channels.

Rotating the operator key

  1. Generate the new seed (see run a prober) and publish its public key.
  2. Ask every indexer to allowlist both keys and clients to pin both.
  3. Switch operatorKeyFile and reload with SIGHUP.
  4. Ask indexers and clients to drop the old key once its last windows have aged out (900 s).

For a suspected compromise, ask indexer administrators to remove the old key immediately, then add a new one the same way. Evidence under an unpinned key is not served.

Rotating an indexer pin

Configure "discoveryKeys": ["OLD_PUBKEY", "NEW_PUBKEY"] instead of discoveryKey, reload, let the indexer switch, then reduce to the new key. The prober verifies every acknowledgment under these pins before marking an observation as published.

Budget hygiene

  • Each window reserves its full worst-case cost before it starts and never refunds an ambiguous reservation. Watch budget_remaining_micros and budget_exhausted.
  • When a channel is exhausted or no longer eligible, rotate to a new funded channel with your normal settlement procedure rather than deleting the wallet journal.
  • Record channel addresses and deadlines separately so you can reconcile and close them.