Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ resolved by name via entry points or a built-in default.
| 3 | Identity | `Identity` | `did_key` (deterministic public-key signatures for simulation; not Ed25519) |
| 4 | Registry | `Registry` | `in_memory` (dict lookup, no persistence) |
| 5 | Auth | `Auth` | `jwt` (HMAC-SHA256 token; not RFC JWT) |
| 6 | Trust | `Trust` | `score_average` (running mean reputation; no Sybil resistance) |
| 6 | Trust | `Trust` | `score_average` (running mean reputation; no Sybil resistance). Also bundled: `eigentrust` (transitive, Sybil-resistant). |
| 7 | Payments | `Payments` | `prepaid_credits` (in-memory ledger) |
| 8 | Coordination | `Coordination` | `contract_net` (FIPA: propose · bid · resolve · commit) |
| 9 | Negotiation | `Negotiation` | `alternating_offers` (Rubinstein, with patience discount) |
Expand Down
18 changes: 12 additions & 6 deletions docs/layers/trust.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,26 @@ class Trust(Protocol):

Full definition: [`nest_core/layers/trust.py`](../../packages/nest-core/nest_core/layers/trust.py).

## Default plugin
## Built-in plugins

`score_average` — running mean of feedback scores. No Sybil resistance,
no decay, no stake economics.
| name | summary | Sybil-resistant? |
|---|---|---|
| `score_average` (default) | Running mean of feedback scores. | No |
| `eigentrust` | Transitive reputation via the EigenTrust eigenvector (Kamvar et al., WWW '03). Weighs each report by the reporter's current trust, with a teleport to a configurable pre-trusted seed set. | Yes |

Source: [`nest_plugins_reference/trust/score_average.py`](../../packages/nest-plugins-reference/nest_plugins_reference/trust/score_average.py).
Sources:
- [`nest_plugins_reference/trust/score_average.py`](../../packages/nest-plugins-reference/nest_plugins_reference/trust/score_average.py)
- [`nest_plugins_reference/trust/eigentrust.py`](../../packages/nest-plugins-reference/nest_plugins_reference/trust/eigentrust.py)

The `reputation` scenario exercises this layer — 16 honest + 4
malicious + 1 observer that samples cheat reports probabilistically.
Swap `trust: score_average` for `trust: eigentrust` in the scenario
YAML to compare adversarial behaviour under the two ranking rules.

## Writing your own

See [`writing-a-plugin.md`](../writing-a-plugin.md). Register under
entry point group `nest.plugins.trust`.

Good fits to test here: EigenTrust-style transitive reputation,
proof-of-stake reputation, decaying scores, attestation graphs.
Good fits to test here: proof-of-stake reputation, decaying / time-
weighted scores, attestation graphs, learned reputation models.
1 change: 1 addition & 0 deletions packages/nest-core/nest_core/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
("registry", "in_memory"): f"{_REF}.registry.in_memory:InMemoryRegistry",
("auth", "jwt"): f"{_REF}.auth.jwt_auth:JwtAuth",
("trust", "score_average"): f"{_REF}.trust.score_average:ScoreAverageTrust",
("trust", "eigentrust"): f"{_REF}.trust.eigentrust:EigenTrust",
("payments", "prepaid_credits"): f"{_REF}.payments.prepaid_credits:PrepaidCredits",
("coordination", "contract_net"): f"{_REF}.coordination.contract_net:ContractNet",
("negotiation", "alternating_offers"): (
Expand Down
Loading
Loading