SAGE Configuration
SAGE reads one YAML file, in the same format as PATH. This page covers what a config needs and the blocks most operators set.
The complete reference — every key, its type and what it does — is generated from SAGE’s source on each release: docs/configuration.md. It also lists the PATH keys SAGE parses but does not act on.
Two Rules
Unknown keys are reported, not rejected. SAGE must load a PATH config unmodified, so a key it does not recognise is collected and warned about at startup rather than failing the load. If you set a key and nothing changes, read the startup log first.
Zero is the safe default. There are no optional fields: an unset value and a zero value are the same, and each zero is chosen so the unconfigured state is the safe one. metrics_config.pprof_addr: "" means pprof is off, not listening everywhere.
Minimal Config
full_node_config:
rpc_url: https://sauron-rpc.infra.pocket.network
grpc_config:
host_port: sauron-grpc.infra.pocket.network:443
gateway_config:
gateway_mode: centralized
gateway_address: "pokt1your_gateway_address"
gateway_private_key_hex: "${SAGE_GATEWAY_KEY}"
owned_apps_addresses:
- "pokt1your_application_address"
services:
- id: eth
type: evm
rpc_types: [json_rpc, websocket]| Key | Required | Notes |
|---|---|---|
full_node_config.rpc_url | Yes | CometBFT RPC of a Shannon full node |
full_node_config.grpc_config.host_port | Yes | gRPC of the same node, used for sessions, apps and suppliers |
gateway_config.gateway_mode | Yes | Must be present; SAGE relays for its own applications whatever the value |
gateway_config.gateway_address | Yes | The staked gateway’s pokt1… address |
gateway_config.gateway_private_key_hex | Yes | The key every relay is signed with |
gateway_config.owned_apps_addresses | One of the two | Applications delegated to the gateway |
gateway_config.owned_apps_private_keys_hex | One of the two | PATH’s spelling; SAGE derives the addresses and warns |
gateway_config.services[] | Yes | One entry per service the gateway serves |
Secrets from the Environment
Any value may be ${VAR}, expanded from the environment before the YAML is parsed. A variable that is unset or empty fails startup and names the variable, so a gateway never starts with an empty signing key. Use it to keep the file in version control and the keys out of it:
gateway_private_key_hex: "${SAGE_GATEWAY_KEY}"Services
Each entry under gateway_config.services describes one service ID:
services:
- id: eth
type: evm # evm | cosmos | solana | tron; anything else is passthrough
rpc_types: [json_rpc, websocket]
sync_allowance: 5 # blocks behind the head an endpoint may be and still be picked
chain_id: "0x1" # optional: health checks assert the endpoint serves this chain
- id: osmosis
type: cosmos
rpc_types: [rest, comet_bft, json_rpc]
rpc_type_fallbacks:
comet_bft: json_rpc # relay through json_rpc when no supplier staked comet_bftrpc_typesis the list of protocols the service accepts. A request of another type is refused with a 400 before any relay is sent.sync_allowance: 0means the plugin’s own default, which differs by chain.blocked_supplierslists supplier addresses never to route to for that service.- Per-service
retry_configandtimeout_configoverride the gateway-wide ones field by field.
Blocks Most Operators Set
| Block | What it controls |
|---|---|
gateway_config.retry_config | max_retries (rotates to another endpoint each time), hedge_delay (race a second endpoint after this long; 0 turns hedging off), max_latency (total budget across attempts) |
gateway_config.active_health_checks | Probe cadence and the checks themselves. With several replicas, only the elected leader sends probes |
redis_config | Optional. Shares flags, drains and circuit breakers across replicas, and gives a starting replica the leader’s reputation; see Operating |
router_config | Relay port (default 3069), body size limits, server timeouts, and trusted_proxies: the proxy ranges whose X-Forwarded-For SAGE believes |
admin_config | Admin API address (default localhost:9091) and auth_token |
metrics_config | Prometheus address (default :9090); pprof_addr (off unless set) |
logger_config | Log level (default info) |
feature_flags | Overrides for feature flags; anything unset keeps its default |
Feature Flags
Much of SAGE’s behaviour sits behind feature flags, global and per service. Config carries only the overrides you set:
feature_flags:
hedge: false # no hedging on any service unless a per-service override says otherwiseFlags can also be toggled at runtime through the admin API, globally or for one service, without a restart:
curl -X PUT localhost:9091/admin/flags/<flag>/<serviceID> -d '{"enabled":false}'GET /admin/flags shows every flag and its state in force. The defaults are in featureflag/defaults.go.
Reloading
A changed config file applies without a restart through SIGHUP or POST /admin/reload. The response names what took effect and what needs a restart.
Reading the Startup Report
SAGE prints what it did with your config at startup, at a level the configured log level cannot hide:
| Line | Meaning |
|---|---|
config key ignored | No such setting in SAGE. It parsed and does nothing |
config key is not implemented, and here is what decides this instead | A PATH key SAGE handles differently; the line says how |
config key has no effect | The key parses into a field nothing reads |
config setting is probably not what was meant | The value is read, and the line says what the gateway will actually do with it |
None of these stop the process. Each means the gateway you are running differs from the one the file describes.