Skip to main content
Version: Next (unstable)

Monitoring

Network operators can use miden-network-monitor and OpenTelemetry tracing to observe network health, RPC freshness, validator status, prover status, and related infrastructure.

See Logging for stderr filtering, filter precedence, user-facing targets, and separate OpenTelemetry filter configuration.

Network Monitor​

miden-network-monitor is an observer and test client. It is not required for block production. Depending on configuration, it can check RPC freshness, validator health, remote prover status, faucet availability, explorer availability, note transport, Agglayer bridge status, USDCx bridge status, and end-to-end network transaction flows. The USDCx bridge check is enabled by MIDEN_MONITOR_XRESERVE_RPC_URL and MIDEN_MONITOR_XRESERVE_ADDRESS; see the monitor operation guide.

End-to-end transaction checks require the validator's signing public key. Set MIDEN_MONITOR_VALIDATOR_SIGNING_PUBLIC_KEY to the key printed by miden-validator pubkey. The monitor uses it to verify the validator's transaction encryption key before it submits private inputs. It obtains the active fee asset from RPC and verifies the returned protocol configuration against each transaction's reference block. Remote transaction-prover probes use the same RPC configuration discovery.

On a chain that charges fees, those checks also need the native asset, because the monitor's accounts pay their own transaction fees. Set MIDEN_MONITOR_FUNDING_SERVICE_URL to the funding service, which is the only source the monitor pays fees from. MIDEN_MONITOR_FAUCET_URL configures the faucet checks and does not fund fees. The monitor's accounts live only in memory, so each restart abandons the wallet's remaining fee balance. MIDEN_MONITOR_WALLET_FUNDING_AMOUNT sets how much each funding request asks for, and so bounds that loss. See the monitor operation guide for how to choose the amount.

On networks with account allowlist enforcement enabled, set MIDEN_MONITOR_REGISTRATION_CODES_FILE to a JSON file of unused invitation codes. The monitor registers fresh accounts from this finite pool and keeps other checks running if registration cannot proceed. See the monitor operation guide for the file format, code budget, restart behavior, and pool replenishment procedure.

Each faucet check requests MIDEN_MONITOR_FAUCET_MINT_AMOUNT base units, which defaults to 1_000. Keep this amount at or below the faucet's maximum claimable amount, otherwise the faucet rejects every request and the faucet card stays unhealthy.

Use the binary help output for the current configuration surface:

miden-network-monitor start --help

RPC Status Freshness​

A full node caches the upstream sequencer status for five seconds to avoid forwarding every status probe. Its own chain tip is read locally on every request. Failed upstream lookups are also cached for five seconds, so changes in upstream availability may only appear after the cached result expires.

The response is not a consistent snapshot of both nodes. The cached block_producer.chain_tip can be lower than the full node's current chain_tip even when both nodes are healthy. The sequencer also refreshes its mempool statistics periodically, so the full node's cache adds to that existing delay.

Telemetry​

Services export OpenTelemetry traces when an OTLP trace endpoint is configured through the standard OpenTelemetry environment variables.

Set one of:

  • OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
  • OTEL_EXPORTER_OTLP_ENDPOINT

Services register a default OpenTelemetry service name and the miden service namespace. To distinguish multiple instances of the same service, set service.instance.id through OTEL_RESOURCE_ATTRIBUTES.

For example:

OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317 \
OTEL_RESOURCE_ATTRIBUTES=service.instance.id=full-node-1 \
miden-node full ...

Other standard OpenTelemetry resource variables, such as OTEL_SERVICE_NAME, can still be used when an operator needs to override the default service identity.