-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
enhancementNew feature or requestNew feature or requestsecuritySecurity-related changesSecurity-related changes
Description
Overview
Implement an enhanced trust score system that integrates with blockchain reputation data, includes trust decay over time, and supports reputation propagation across the network.
Background
The current implementation has basic trust scores (trust_score: f64) in MeshConnection but lacks:
- Blockchain reputation integration
- Trust decay mechanism
- Reputation propagation
Requirements
1. Blockchain Reputation Integration
- Query blockchain for identity reputation data
- Map on-chain reputation to peer trust scores
- Update trust scores when blockchain reputation changes
- Cache blockchain lookups with TTL
2. Trust Decay Mechanism
- Implement time-based trust decay (trust decays if peer inactive)
- Define decay curves (linear, exponential, etc.)
- Reset decay on successful interactions
- Minimum trust floor (never decay below threshold)
3. Reputation Propagation
- Peers can share reputation observations
- Weight reputation based on reporter's own reputation
- Prevent sybil attacks on reputation system
- Implement reputation consensus mechanism
Files to Modify
lib-network/src/mesh/connection.rs- Add reputation tracking fieldslib-network/src/identity/unified_peer.rs- Add reputation methodszhtp/src/server/mesh/identity_verification.rs- Integrate blockchain lookup- NEW:
lib-network/src/reputation/- Reputation module
Acceptance Criteria
- Trust scores update from blockchain reputation
- Trust decays over time for inactive peers
- Peers can propagate reputation observations
- Sybil attack resistance implemented
- Unit tests for reputation system
- Integration tests with blockchain
Priority
MEDIUM - Important for network security but not blocking
Related
- Security audit item Fix 'cargo run' command for linux #11
- CRITICAL-1 fix (bootstrap mode uses initial trust score)
- MEDIUM-3 fix (identity verification before routing)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestsecuritySecurity-related changesSecurity-related changes