docs: consolidate all docs under docs/ — single source of truth

Move issues (01–29) and PRD from .scratch/distributed-inference-network/
into docs/issues/ and docs/. Update ralph_progress.py DEFAULT_PRD path
and rewrite docs/agents/issue-tracker.md to reflect the new layout.

The distributed_inference_network.egg-info/docs/ mirror is a build
artifact already covered by *.egg-info/ in .gitignore — not committed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Dobromir Popov
2026-07-01 14:18:26 +03:00
parent 78834e5045
commit d1e75ddded
34 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,28 @@
Status: ready-for-agent
# 07 — Fraud detection: validator + on-chain slash
## What to build
Implement the optimistic fraud detection loop. After each inference request completes, the validator process independently decides whether to re-run the request on a reference node (~5% sample rate). If the reference output diverges from the node's output beyond a configurable floating-point tolerance, the validator submits a slash transaction on-chain.
The validator is a separate process (not the gateway or tracker). It subscribes to completed inference events, selects a random sample, re-runs those requests against a trusted reference node, compares outputs, and submits slash proofs when fraud is detected.
On slash: the offending node's stake balance decreases by the configured slash amount; its strike count increments. The gateway reads strike state from the registry contract on each route selection and excludes nodes that exceed the strike threshold.
Node operators receive a push notification (logged to stdout and, if configured, a webhook) when their node is slashed.
## Acceptance criteria
- [ ] The validator process samples ~5% of completed inference requests (configurable)
- [ ] A node returning a deliberately wrong output is detected and slashed within one validation cycle
- [ ] The on-chain stake balance of the slashed node decreases by the correct slash amount
- [ ] The strike count for the slashed node increments on-chain
- [ ] A node that reaches the strike threshold is excluded from route selection on the next gateway request
- [ ] A slashed node logs a clear warning to stdout
- [ ] An integration test: run a deliberately-bad node, send 20 requests, assert at least one slash transaction is submitted and the node is eventually excluded from routes
## Blocked by
- `05-openai-compatible-gateway.md`
- `06-solana-stake-and-settlement.md`