closedhumanPR #143Trust

hackathon/john-kioko-weighted-trust: WeightedTrust plugin

A new trust plugin that improves on ScoreAverageTrust with:

Author

Mutinda-Kioko avatar

@Mutinda-Kioko

github profile →
Status
Closed without merging
Opened on
Jul 9
Branch
hackathon/john-kioko-weighted-trust

Description

The pitch.

## WeightedTrust — recency-decayed, volume-weighted reputation

A new trust plugin that improves on `ScoreAverageTrust` with:

- **Recency decay** — exponential half-life weighting so recent evidence matters more than stale evidence
- **Evidence severity** — `positive` (1.0), `neutral` (0.5), `negative` (0.0), and `byzantine` (-0.5) are weighted differently instead of the flat binary average
- **Volume confidence** — more data points produce higher confidence, capped at 1.0
- **Reporter credibility tracking** — reporters with a good track record are weighted more than unknown reporters

### Same interface as ScoreAverageTrust
Drop-in replacement — same `score()`, `report()`, `attest()`, and `stake()` methods. Selectable as `trust: weighted` in scenario YAML.

### Files added
- `nest_plugins_reference/trust/weighted.py` — the plugin
- `tests/test_weighted_trust.py` — 10 tests (all passing)
- `scenarios/weighted_trust.yaml` — scenario using the weighted trust layer

### Files modified
- `nest_core/plugins.py` — registered `("trust", "weighted")` in the builtin registry

### Test results
```
10 new tests — ALL PASS
37 existing tests — ALL PASS (no regressions)
```

Author: **John Kioko** (@Mutinda-Kioko)

Try it

Open PR on GitHubView diff

Checkout locally

git fetch origin pull/143/head:pr-143
git checkout pr-143