Mendora
Documentation · Validator setup

Validator setup

A Mendora validator evaluates frozen programs on private cases, publishes evidence, signs promotion attestations and sets weights. This repository implements the evaluation, evidence, attestation and weight-planning parts. It does not sign or send chain transactions.

What runs where

ProcessHoldsNever holds
API and worker (this repository)database, private cases, traceswallet keys, coldkeys, GitHub credentials
Isolation hosts (Firecracker)one microVM per case-trialsecrets of any kind, network access
Weight-setting process (separate, not in this repository)the validator hotkeycase data

Evaluate

  1. Provision private templates outside the repository and point MENDORA_PRIVATE_TEMPLATES at the directory (a templates.py exposing TEMPLATES). Without it, rounds use the public templates and are demo rounds.
  2. Provide Firecracker: /dev/kvm access, the firecracker binary, a guest kernel (MENDORA_FIRECRACKER_KERNEL), a guest base image directory (MENDORA_FIRECRACKER_BASE_DIR, from deploy/firecracker/build-base.sh) and the rootfs builder (MENDORA_FIRECRACKER_ROOTFS_BUILDER=deploy/firecracker/build-rootfs.sh). See deploy/firecracker/README.md. Until all five exist, untrusted packages are refused.
  3. Run make api and at least one make worker. Rounds are opened, frozen and published from the operator console or mendora round open|freeze|publish.

Reproduce and dispute

Every published round discloses 25% of its scenario clusters with evidence bundles (case, world, reference, every program's trace, recorded outcomes). Recompute any of them:

backend/.venv/bin/mendora recompute mendora-round1-c-309c04ab92.json   # exit code 0 only if everything matches

Recomputation shows the published numbers follow from the published evidence. It does not prove the evaluation behind the traces was honest; disputes and independent re-runs cover that.

Attest

Post signed attestations to POST /api/validator/attestations:

{"round_id": 4, "candidate_sha256": "<64 hex>", "verdict": "pass", "snapshot_block": 1003,
 "nonce": "<unique>", "validator_hotkey": "<ss58>", "signature": "0x<sr25519 signature>"}

The signed message is mendora-attestation/1|round:<r>|candidate:<sha>|verdict:<v>|snapshot:<block>|nonce:<n> (backend/src/mendora/intake/validate.py). Replayed nonces are rejected; conflicting verdicts for the same candidate and round are kept as evidence of equivocation and that validator counts as silent. The quorum rule (Section 8) measures turnout and approval against eligible stake at the snapshot block and needs two independent operators besides the operating company.

Weights

mendora chain dry-run --mode local --netuid 1 --champion-hotkey <ss58> --champion-state active builds the vector every scoring validator would commit: 100% of the miner weight to the Active champion's current UID (resolved at planning time), otherwise to the owner UID, which the chain burns by default. Committing it (commit-reveal) belongs in a separately authorized process with its own hotkey; see chain.