Status: done # 05 — A1/A5: Persist strike, ban, and reputation state ## What to build Registry strike/ban/reputation state today lives in RAM-only `_LocalContractState` — tracker restart wipes penalties. Persist to SQLite (same pattern as `BillingLedger` and `AccountStore`) so reputation carries forward per ADR-0016 §4. **Code refs:** - `packages/contracts/meshnet_contracts/__init__.py` — `RegistryContract`, `RegistryWallet`, in-memory `_state.registry` (~103–206) - `packages/tracker/meshnet_tracker/billing.py` — SQLite persistence pattern (~60, event log) - `packages/tracker/meshnet_tracker/accounts.py` — SQLite + event replication (~40–56) Include fields for: `strike_count`, `banned`, `completed_job_count`, graduated **reputation score** (float, default 1.0), `last_audit_ts`, probation tracking. **Scope split:** this issue owns **schema + persistence + load/reload** only. Reputation **scoring deltas** (audit pass/fail adjustments, decay rules) belong in issue 08. ## Test-first 1. Red: record strike, restart tracker process, strike count is 0 — must fail. 2. Green: persist + reload; gossip replicates strike events if multi-tracker. 3. Red: banned wallet registers node — must reject (wire to routing). ## Acceptance criteria - [ ] Strike/ban/reputation survive tracker restart (SQLite or equivalent) - [ ] `RegistryContract.list_wallets` reflects persisted state - [ ] Banned wallet rejected at registration and excluded from routes - [ ] Reputation score field present for routing/audit issues (08–09) - [ ] Event-sourced mutations compatible with future Raft (ADR-0019) ## ADR links - [ADR-0016](../../docs/adr/0016-alpha-scope-and-known-limitations.md) §4 - [ADR-0018](../../docs/adr/0018-fraud-detection-verification-and-reputation.md) §6 ## Blocked by - `02-a2-unified-auth-boundary.md`