feat(proof): sign the manifest and require a single-use submit_nonce
Greptile P1s on #259. The base-proof-submit-v1 payload now ends with
manifest_canonical || 0xff || submit_nonce_hex, where manifest_canonical
is count || (0xff || entry)* per list (train_content_hashes, then
train_dataset_ids), entries sorted bytewise, lists joined by 0xff. A
captured signature cannot be reused with another contamination manifest.
submit_nonce is a client-chosen 32-byte value as 64 lowercase hex. The
host verifies the signature, then reserves (hotkey, nonce) atomically in
the submission store before any budget check, rent, or row; a replay is
401 submit_nonce reused and never evaluates twice. Missing/invalid nonce
is 401. hotkey_signature is now exactly 128 lowercase hex, no 0x (P2).
ctx proof submit / sign draw a fresh nonce per run, print it, and sign
the manifest they post; --submit-nonce pins one (required with
--signature). Operator sign script and probes pass the manifest through;
the e2e probe replays a scored body and expects 401.
Co-authored-by: Mathis <[email protected]>
Loading branch information
Uh oh!
There was an error while loading. Please reload this page.
3. **Bounty — pair + report:** `ctx bounty pair --hotkey <ss58> --account-id <id> --accept-terms`, then `POST /v1/pair` (terms + signature) and `POST /v1/reports`. Operator bearer `POST /v1/admin/adjudicate` (`valid` / `already_fixed_not_prod` / `invalid_malicious` / `duplicate`). Scoring **reads** CortexLM/backend public JSON (`BOUNTY_BACKEND_PUBLIC_URL`); do not serve `/v1/public/*` from this repo.
4. **Bounty — fail-closed scorer:** the CortexLM/backend public feed is the only scorer. With no readable `BOUNTY_BACKEND_PUBLIC_URL`, `POST /v1/reports` must answer **503** and the emitter must pay **nobody** — it still covers `E` with `NoScore(ChallengeInternal)`, because a paid challenge with no leaves 409s the seal for every challenge. `BOUNTY_FORCE_SIM` is retired — do not reintroduce an offline bounty scorer. See [`docs/BOUNTY.md`](docs/BOUNTY.md).
5. **Proof — submit:** `POST /v1/submissions` with a `topic_id` and miner `hotkey_signature` (sr25519 over `base-proof-submit-v1`; `X-Lium-Api-Key` is not identity). Missing/unknown/not-open → **400** (no row); missing/invalid signature → **401** (no row); a custom topic without `artifact_uri` → **400** (no row); an `artifact_digest` that is the sha256 of nothing (zero bytes / an empty tar) → **400** (no row) — the KVM host likewise refuses a content-less or compressed `artifact_tar` before any sister, so an empty-artefact fetch stub can never score. Empty `eval_image_digest`, missing/closed/misconfigured RLM judge `InferenceOffer`, missing judge API key, spoofed topic origin, missing/closed/non-`1x` `EvalExecutorOffer` (Lium path), zero open topics, or an unsealed baseline → **503**. Miners submit claim + code + FLOPs + artifact; they do not bind the judge offer or the executor offer. Contamination / empty manifest persist **rejected** without rent; on custom topics the runner's measured `flops_used` over the budget or over the miner's `declared_flops` persists **rejected** after the run, and a report without a measurement is **503** (no row). `GET /v1/proof/topics` must never leak holdout records.
5. **Proof — submit:** `POST /v1/submissions` with a `topic_id`, miner `hotkey_signature` (sr25519 over `base-proof-submit-v1`: hotkey, topic, artefact, FLOPs, claim, canonical manifest, nonce; `X-Lium-Api-Key` is not identity), and a single-use 64-hex `submit_nonce` (the `(hotkey, nonce)` pair is reserved in the store before any row or rent; a replay is **401** `submit_nonce reused`). Missing/unknown/not-open → **400** (no row); missing/invalid signature or nonce → **401** (no row); a custom topic without `artifact_uri` → **400** (no row); an `artifact_digest` that is the sha256 of nothing (zero bytes / an empty tar) → **400** (no row) — the KVM host likewise refuses a content-less or compressed `artifact_tar` before any sister, so an empty-artefact fetch stub can never score. Empty `eval_image_digest`, missing/closed/misconfigured RLM judge `InferenceOffer`, missing judge API key, spoofed topic origin, missing/closed/non-`1x` `EvalExecutorOffer` (Lium path), zero open topics, or an unsealed baseline → **503**. Miners submit claim + code + FLOPs + artifact; they do not bind the judge offer or the executor offer. Contamination / empty manifest persist **rejected** without rent; on custom topics the runner's measured `flops_used` over the budget or over the miner's `declared_flops` persists **rejected** after the run, and a report without a measurement is **503** (no row). `GET /v1/proof/topics` must never leak holdout records.
6. **Proof — executor:** `GET /v1/proof/executor` is always 200 (`ready` + `reason`); `POST /v1/admin/proof/executor` (operator bearer) rotates or closes the live `1x` offer and 400s anything the pin refuses. Harvest rents the offer's `lium_template_id` at exactly `1x` (any other `rent_gpu_count` aborts before the rent) under `max_proof_deadline_s`; a run cut at the deadline is **503 + `stdout_tail`**. `PROOF_HARVEST_*` env only hot-swaps under the pin ceilings. Never a live Lium rent in CI.
7. **Proof — topic VMs (custom family):** the RLM runs in one Firecracker microVM per `topic_id` on a host with a working `/dev/kvm` (`proof-vm-orchestrator`, HTTPS + bearer **file**) — production: a dedicated DO droplet (`g-8vcpu-32gb`, nyc1, nested `/dev/kvm`) on the VPC, never colocated on the CP; staging: colocating the agent on the CP droplet with nested `/dev/kvm` is an allowed exception, proven on `cortex-staging` (nested stays fragile — if the boot fails, provision the dedicated droplet); the agent's TLS certificate carries a SAN for every host the CP's URL names (`PROOF_VM_AGENT_TLS_SANS`, checked at boot; `deploy/scripts/proof-vm-agent-tls.sh`); never on Lium, never emulated; every paid run is a **sister** Firecracker guest with **no network**, and the host stamps `sandboxed` / guest-measured `flops_used` on the report. `PROOF_VM_ORCHESTRATOR_URL` unset → `UnwiredVmOrchestrator` (503); URL set but token file missing/empty, `PROOF_RLM_VM_IMAGE_DIGEST` unpinned, agent down, or a `firecracker_required` run without the sister attestation → **503, no row, no host fallback**. `PROOF_VM_RUNNER_CUSTOM_IDS` is the only thing that registers a runner. The custom family is wired from that env alone — live orchestrator selected + ≥1 id → `FamilyMux::custom_only` when no Lium harvest is wired (custom topics score; `nll` / `throughput` → **503**, no row); never stage a placeholder Lium key to open custom topics, and the unwired stub never carries a mux. `/v1/status` keeps the families apart: `live_harvest_wired` is the **Lium harvest only** (never true because a custom mux exists); the custom family is `custom_family_wired` / `registered_custom` / `custom_ready`. Hard `topic_id ↔ VM` bind on both sides (agent 409 `topic_mismatch`). **Artefact identity is the served file, verbatim:** `artifact_digest` = sha256 of the exact bytes at `artifact_uri` (an uncompressed tar with content); the RLM guest verifies what it fetched (`proof_vm_proto::tar::verify_artifact`) and forwards those bytes unchanged — never a re-tar, never a substitute tree; a fetch that fails or does not verify is `RlmToHost::Failed` (503, no row); the host runs the same check before any sister jail and refuses gzip / non-tar / content-less / mis-hashed bytes by name. Do not invent an RLM / sister image digest. **Zero live Firecracker in CI** — every test uses the fake hypervisor. Probe the wire with `GET /v1/admin/proof/vm-orchestrator` (operator bearer, loopback) or `deploy/scripts/proof-vm-wire-check.sh` (`all`, `boot-probe`, `matrix` + `submit-probe --expect 503 --reason …`). Runbook: [`docs/runbooks/proof-vm-orchestrator.md`](docs/runbooks/proof-vm-orchestrator.md) § DigitalOcean staging. **Experiment VMs (in-guest runner topics):** a topic whose signed `constraints.params` select an in-guest runner (`baseline_runner` / synonym `in_guest_benchmark_runner` + `experiment_pack_digest`, naming an operator-baked adaptor id) gets **one dedicated Firecracker VM per paid job** (created for the `Baseline` / `Evaluate` job, destroyed after it; parallel experiments are parallel VMs, never containers sharing one), sized under **configurable caps — Architecte lock: 16 vCPU / 32 GiB RAM (the default a silent topic gets, the ceiling a topic may ask up to, and a hard maximum: a CP or host ceiling set above 16 / 32768 does not boot, a smaller host may only lower it), writable disk ≥ 16 GiB (32 GiB by default, not locked)** (`PROOF_EXPERIMENT_VM_*` on the CP, `PROOF_VM_AGENT_EXPERIMENT_MAX_*` + `PROOF_VM_AGENT_MAX_EXPERIMENT_VMS` on the host; over a ceiling = **503**, never a clamp). The result is returned **only when the orchestrator confirms the VM destroyed** — a failed or unconfirmed destroy after a successful run is `TeardownUnconfirmed` (503, no row, no baseline), never a scored result while the VM may still hold capacity. The host re-hashes the pinned pack from `PROOF_VM_AGENT_EXPERIMENT_PACK_DIR` before any jail and stages it over vsock; the guest agent (`bins/proof-vm-guest-agent`, generic) fetches the artefact streamed under a hard 64 MiB cap, refuses two signed params that collide as one `PROOF_PARAM_*` name, drains adaptor output into a bounded rolling tail while it runs, execs the operator adaptor for that runner id, and never reports a value it did not get from `report.json` — no runner / adaptor / pack / report → `Failed` (503, no row); the host attests the run `experiment_vm` for that VM and job. **Generalist rule:** runner ids, pack digests, model pins, sizes, and every adaptor input are signed-topic params; no benchmark, dataset, task list, harness, adaptor, or pack name is compiled in or committed — `deploy/guest/runners/` holds the adaptor contract and a fail-closed skeleton only (the guest image, its harness tooling via the bake's generic `--extra-pkgs` / `--overlay` / `--chroot-hook`, and its adaptors are operator artefacts baked with `deploy/guest/bake-rootfs.sh` — rootless podman on run-as-owned scratch paths, not Docker-in-VM, no nested KVM). Runbook: [`docs/runbooks/proof-experiment-vms.md`](docs/runbooks/proof-experiment-vms.md).
8. Leaf emission → `POST /v1/weights/raw` → seal → `GET /v1/weights/latest` with **`sealed: true`** (burn fallback alone is not a real seal).
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.