SAGE Quickstart
This guide gets SAGE serving a relay in two steps: first on its built-in mock backend, which needs no keys, full node or suppliers, then against Pocket mainnet.
1. Get SAGE
Download a binary for your platform from the latest release, or build from source:
git clone https://github.com/pokt-network/sage.git
cd sage
make sage_build # → bin/sagegwBuilding needs the Go version named in go.mod. Installation covers the container image.
2. Run on the Mock Backend
The mock backend answers relays in-process with canned responses. Nothing is signed and no POKT is spent, so it is the safe way to see the gateway work:
./bin/sagegw -config bench/mock-config.yamlIn another terminal:
curl -s -X POST http://localhost:3069/v1 \
-H "Content-Type: application/json" \
-H "Target-Service-Id: eth" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'A request names its service with the Target-Service-Id header, not in the URL path. Common service IDs: eth, base, arb-one, poly, bsc, solana.
3. Run Against Mainnet
Prerequisites
- A staked Gateway (minimum 5,000 POKT) — see Gateway Staking
- At least one staked Application delegated to that Gateway — see Delegation
- A Shannon full node, or the public one below
Configure
Create config.yaml:
full_node_config:
rpc_url: https://sauron-rpc.infra.pocket.network
grpc_config:
host_port: sauron-grpc.infra.pocket.network:443
insecure: false
gateway_config:
gateway_mode: centralized
gateway_address: "pokt1your_gateway_address"
gateway_private_key_hex: "your_64_char_hex_private_key"
owned_apps_addresses:
- "pokt1your_application_address"
services:
- id: eth
type: evm
rpc_types: [json_rpc, websocket]owned_apps_addresses lists the applications SAGE relays for; each must be delegated on-chain to gateway_address. SAGE signs every relay with the gateway key. A PATH config that names apps by owned_apps_private_keys_hex instead also works; SAGE derives the addresses and warns at startup.
gateway_private_key_hex is a secret. Keep the config file out of version control and readable only by the gateway’s user.
Run
./bin/sagegw -config config.yamlRead the startup log. SAGE never refuses a config for a key it does not know, so the log is where it says which keys it ignored, which it parses but does not act on, and which probably do not do what you meant.
Test
curl -s -X POST http://localhost:3069/v1 \
-H "Content-Type: application/json" \
-H "Target-Service-Id: eth" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'Check Health
curl -s http://localhost:3069/health # liveness: 200 while the process serves
curl -s http://localhost:3069/ready # 503 until sessions and reputation are warm
curl -s http://localhost:3069/ready/eth # 503 until eth holds a session with endpoints/ready can take one probe cycle after a cold start, because SAGE waits until health checks have covered the configured services before it takes traffic.
Next Steps
- Configuration — services, retries, Redis, health checks
- Operating — ports, Kubernetes probes, metrics and the admin API
- Migrating from PATH — if you run PATH today