Files
neuron-tai/.scratch/alpha-hardening/issues/08-fraud-reputation-model-persistence_completed.md
2026-07-13 14:14:37 +02:00

1.8 KiB
Raw Blame History

Status: done

08 — FRAUD: Reputation model + persistence

What to build

Implement graduated reputation per ADR-0018 §6: score derives only from tracker audit outcomes + uptime/latency. Slow build, instant loss, inactivity decay. ×0.8 routing multiplier per strike (not whole penalty — forfeiture stays full pending).

Scope split: issue 05 owns schema + SQLite persistence; this issue owns scoring rules (deltas, decay, strike→multiplier wiring) on top of persisted fields.

Code refs:

  • packages/contracts/meshnet_contracts/__init__.py — extend RegistryWallet / persistence from issue 05
  • packages/validator/meshnet_validator/__init__.py_slash_route forfeiture path (~125133)
  • packages/tracker/meshnet_tracker/billing.pyforfeit_pending (~280292)
  • Research: .scratch/alpha-hardening/research-verifiable-inference.md §6

Test-first

  1. Red: persisted reputation/strike fields from issue 05 are ignored by scoring/routing today.
  2. Green: clean audit +0.05 (tunable); failed audit 0.3 and strike; three strikes → ban persisted via issue-05 fields.
  3. Inactivity decay after N days without completed jobs.

Acceptance criteria

  • Uses reputation_score and strike/ban fields persisted by issue 05; does not introduce a second schema path
  • Audit pass/fail updates score with documented deltas
  • Strike applies ×0.8 multiplier to routing weight (separate from forfeiture amount)
  • Ban at 3 strikes; probation job count still enforced
  • No peer-to-peer reputation inputs

Blocked by

  • 05-a1-a5-persist-strike-ban-reputation_completed.md
  • 07-fraud-commitment-bisection-blame_completed.md (audit outcomes feed reputation)