Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Quickstart

This walks you from an empty machine to a live, end-to-end OGONG mesh running locally: providers committing work, validators auditing it, and quorum-gated settlement on a local anvil chain (the OGONG contracts are Solidity on Robinhood Chain, an EVM L2). Everything is CLI, no GUI.

If you just want to serve a model with zero network and zero signup, skip to Local mode.

0. Prerequisites

  • Rust (stable) and cargo.
  • Foundry (forge + anvil, for the Solidity contracts and the local chain). Install from https://getfoundry.sh.
  • Node + npm (some provisioning helpers are TypeScript).
  • A model file for whichever modality you’re serving (e.g. a .gguf for text, or the ACE-Step audio model used by the live mesh demo).

1. Build the binaries

From the repository root:

# Validator + verifier (the EVM settlement backend is the default build)
cargo build --release \
  -p validator-service --bin ogong-validatord --bin ogong-verifierd

# Router marketplace + consumer gateway
cargo build --release -p ogong-router-service --bin ogong-routerd --bin ogong-gatewayd

# Provider daemon
cargo build --release -p ogong-provider

The resulting binaries land in target/release/. Add it to your PATH or call them by full path.

2. Bring up the local chain

Stand up a local anvil chain with the OGONG contracts deployed and wired, in one command:

scripts/evm-localnet.sh

This starts anvil (if one is not already running), forge-deploys the whole contract set (token, staking, escrow, emission, registry), hands the mint authority to the emission contract at genesis, and writes scripts/.evm-localnet.env with the OGONG_EVM_* addresses the daemons read. Load it into each daemon shell:

set -a; source scripts/.evm-localnet.env; set +a

The whole EVM settle path (a metered release, a validator quorum co-signing an EIP-712 digest, the on-chain ecrecover settle, the provider paid) is proven end to end by the acceptance tests, which spin up their own anvil and deploy the same contracts:

forge test --root contracts                       # 31 Solidity tests
cargo test -p validator-service --test evm_mesh   # the validator EvmSink settles + pays a provider
cargo test -p ogong-provider  --test evm_commands # stake, unbond, transfer on chain

See The local mesh for the daemon-by-daemon tour.

3. Or wire the pieces by hand

To understand the moving parts, run them individually:

# A validator that audits every reply and dispatches to a verifier
ogong-validatord \
  --bind 0.0.0.0:4533 \
  --alpha 1 \
  --verifier-endpoint 127.0.0.1:4544 \
  --verifier-cert /path/to/verifier.der

# The verifier, pointed at an independent engine instance
ogong-verifierd \
  --bind 0.0.0.0:4544 \
  --provider-url http://127.0.0.1:11436

# The marketplace match engine (writes its cert so a gateway can pin it)
ogong-routerd --bind 0.0.0.0:4544 --cert-out router.der

# The OpenAI-compatible consumer front door
ogong-gatewayd --bind 0.0.0.0:4546 --router 127.0.0.1:4544 --router-cert router.der

# A provider serving an embedded text model and joining the network
ogong-provider configure \
  --embedded-text /path/to/model.gguf \
  --join-network \
  --validator-endpoint 127.0.0.1:4533
ogong-provider start

4. Call it

Once a gateway is up, talk to the network through any OpenAI-compatible client:

curl http://127.0.0.1:4546/v1/chat/completions \
  -H 'content-type: application/json' \
  -d '{
    "model": "ogong/verified/<maker>/<model>",
    "messages": [{"role":"user","content":"Hello from OGONG"}]
  }'

See the Consumer API for the model-id format and supported endpoints.

Next