SAGE Installation

SAGE ships as one static binary (sagegw, built without CGO) and as a multi-arch container image. Each tagged release publishes both.

Option 1: Release Binary

Each release carries binaries for linux and darwin on amd64 and arm64, with a checksums.txt:

bash
VERSION=v0.1.0
curl -fsSLO "https://github.com/pokt-network/sage/releases/download/${VERSION}/sagegw-linux-amd64"
curl -fsSLO "https://github.com/pokt-network/sage/releases/download/${VERSION}/checksums.txt"
sha256sum --ignore-missing -c checksums.txt
chmod +x sagegw-linux-amd64
./sagegw-linux-amd64 -config config.yaml

Option 2: Container Image

bash
docker run --rm -p 3069:3069 \
  -v "$PWD/config.yaml:/etc/sage/config.yaml:ro" \
  ghcr.io/pokt-network/sage:v0.1.0 -config /etc/sage/config.yaml

The image runs as a non-root user. :latest points to the newest release that is not a pre-release; pin a version tag in production.

Option 3: Build from Source

bash
git clone https://github.com/pokt-network/sage.git
cd sage
make sage_build          # → bin/sagegw, CGO disabled
./bin/sagegw -config config.yaml

The Go version is whatever the go directive in go.mod names. make docker_build builds the image locally.

Supplying the Config

The config comes from one of two places:

SourceUse
-config <path>A file. Preferred: SIGHUP and POST /admin/reload re-read it without a restart.
GATEWAY_CONFIGThe YAML content (not a path), for a config delivered as a secret.

A config value may be ${VAR}, expanded from the environment, which keeps keys out of the file itself.

Verifying the Installation

bash
curl -s http://localhost:3069/health          # 200 while the process serves
curl -s http://localhost:3069/ready           # 200 once sessions and reputation are warm
curl -s http://localhost:9090/metrics | head  # Prometheus, scrape-only

The startup log line SAGE gateway initialized carries the version and commit. Include it in any bug report.

Running Without a Network

bench/mock-config.yaml in the repository runs the full middleware chain against an in-process mock backend: no full node, no Redis, no suppliers, no relays spent. Use it to try SAGE and to load-test the gateway itself.

bash
./bin/sagegw -config bench/mock-config.yaml

Development Commands

CommandWhat it does
make test_unitUnit tests, -short -race (the canonical run)
make go_lintgolangci-lint, then a dead-code check
make docsRegenerates the config, metrics and admin API reference from source
make e2e_testEnd-to-end tests against a running gateway at SAGE_URL