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

The local mesh

You can run OGONG’s whole verification spine on your own machine, against a local anvil chain: providers commit work, validators audit it and co-sign settlement over real QUIC, and escrow releases on chain only on a validator quorum. The on-chain layer is the Solidity contract set (contracts/), deployed to Robinhood Chain (an EVM L2) in production and to a local anvil here. It is a local, ephemeral network, the fastest way to watch the whole spine work before pointing the same processes at a live chain.

Components

  • contracts (contracts/, Solidity) - the staking pool, validator registry, escrow, and the quorum-gated settle (a release needs k registered-validator co-signatures, verified on chain via ecrecover over an EIP-712 digest). There is no authority key on the money path.
  • validatord (ogong-validatord, EVM settlement is the default build) - generates its own cert, reads the on-chain registry to discover peers, and (when it holds the settlement sink) settles a release by gathering peer co-signatures over QUIC and submitting one settle call.
  • verifierd (ogong-verifierd) - re-runs a committed trajectory to score an audit.

1. Bring up the chain

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

This starts anvil, deploys and wires the contracts, and writes the OGONG_EVM_* addresses the daemons read (OGONG_EVM_RPC_URL, OGONG_EVM_CHAIN_ID, and the escrow / staking / emission / registry addresses). See Validator node for the full settlement env a node needs (its OGONG_EVM_KEY and cert).

2. What the spine proves

The three properties the mesh demonstrates, and the checks that prove each on the EVM stack:

  • Registry-driven discovery. Each validatord stakes and registers on chain with its real QUIC endpoint and cert, then learns its peers purely from the on-chain registry, with no manual peer wiring. A newly registered, staked validator appears in everyone’s discovery automatically, weighted by stake.
  • Quorum settle over real QUIC. A metered release is pushed to the co-signer peers first (each holds its reply so it will co-sign), then to the handling node, which gathers the peers’ co-signatures over QUIC and submits the on-chain quorum settle. The whole committee settles in one call: the contract ecrecovers the gathered signatures, sums the distinct signers’ bonded stake, and releases once it clears the two-thirds quorum. Proven by cargo test -p validator-service --test evm_mesh: the actual validator EvmSink settles a metered release on a live anvil and the provider is paid on chain.
  • Audit-gated settle. A real generation is audited before its escrow releases, and only an Accept settles. The handling validator audits a reply (--alpha 1) via a verifierd that re-runs sampled steps on an independent engine, adjudicates, and only then gathers the peers’ co-signatures and settles. A reject simply never settles, so the funds stay the consumer’s.

The contract-level guarantees (an uncosigned settle moves nothing, a sub-quorum is rejected, the fee split conserves the gross, a provider stake is never slashable) are covered by forge test --root contracts (31 tests). The full economic lifecycle in one run is the System.t.sol capstone.

3. Run the daemons by hand

With the chain up and the env loaded, run the pieces individually (see Quickstart for the full set):

# A settling validator: needs OGONG_EVM_KEY plus the sourced OGONG_EVM_* env.
OGONG_EVM_KEY=<validator 32-byte hex key> \
  ogong-validatord --bind 0.0.0.0:4533 --alpha 1 \
  --verifier-endpoint 127.0.0.1:4544 --verifier-cert /path/to/verifier.der

# Stake and register a provider (reads the same OGONG_EVM_* env):
ogong-provider stake --amount 10000
ogong-provider register-validator --endpoint 127.0.0.1:4533 --cert validator.der

Notes

  • --alpha 0 = no audit (immediate unaudited release), used to isolate the settlement mesh. --alpha 1 + --verifier-endpoint/--verifier-cert wires the audit path.
  • Co-locating the verify-engine with the provider is a demo convenience; soundness uses a separate engine instance.
  • The settle path is bounded by gas, not transaction size, so a quorum of any size settles in one call. See Validator node for the gas figures.
  • examples/traj_audit_loop is the in-process, CI-friendly equivalent, no chain or live engine required.