Trust Mesh is a decentralized P2P network for sharing trust signals across AgentProof nodes. It provides resilience, censorship resistance, and real-time trust propagation.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Node A │◄───►│ Node B │◄───►│ Node C │
│ (Company X) │ │ (Company Y) │ │ (Company Z) │
└─────────────┘ └─────────────┘ └─────────────┘
│ │ │
└───────────────────┴───────────────────┘
│
┌─────────────┐
│ Consensus │
│ Layer │
└─────────────┘
| Type | Description | Requirements |
|---|---|---|
| Full Node | Stores complete trust history | 100GB+, always online |
| Light Node | Caches recent data, queries full nodes | 1GB, intermittent |
| Bridge Node | Connects to external systems | API access |
{
"type": "TRUST_UPDATE",
"version": "1.0",
"id": "msg-uuid",
"timestamp": "2025-12-24T12:00:00Z",
"payload": {
"agentId": "cursor-agent",
"principalId": "user-123",
"trustScore": 750,
"event": "VERIFICATION_SUCCESS",
"signature": "base64-signature"
}
}{
"type": "REVOCATION",
"version": "1.0",
"id": "msg-uuid",
"timestamp": "2025-12-24T12:00:00Z",
"payload": {
"agentId": "cursor-agent",
"principalId": "user-123",
"reason": "compromised",
"signature": "base64-signature"
},
"priority": "CRITICAL"
}{
"type": "PEER_ANNOUNCE",
"version": "1.0",
"nodeId": "node-uuid",
"endpoints": ["wss://node.example.com:8080"],
"capabilities": ["FULL_NODE", "DNS_RESOLVER"]
}For trust score updates:
- Node receives verification event
- Broadcasts to connected peers
- Peers validate signature
- If >50% of peers accept, update is committed
For critical events:
- Revocations
- Key rotations
- Security alerts
These propagate immediately without waiting for consensus.
Hard-coded list of known reliable nodes:
wss://mesh-1.agentproof.io:8080
wss://mesh-2.agentproof.io:8080
wss://mesh-3.agentproof.io:8080
Use Kademlia DHT for finding peers:
- Node ID: SHA-256 of public key
- XOR distance for routing
- 20 nodes per bucket
All messages signed with node's Ed25519 key.
- Rate limiting: 100 messages/minute per peer
- Proof-of-stake: nodes stake reputation
- Blacklist propagation
- Bootstrap from trusted nodes only
- Reputation-weighted voting
- Challenge-response for new nodes
wss://node.example.com:8080/mesh
{
"type": "HANDSHAKE",
"nodeId": "my-node-id",
"version": "1.0",
"capabilities": ["FULL_NODE"],
"publicKey": "base64-public-key"
}{
"type": "PING",
"timestamp": "2025-12-24T12:00:00Z"
}interface MeshTrustRecord {
agentId: string;
principalId: string;
trustScore: number;
lastUpdated: string;
updateHistory: Array<{
timestamp: string;
event: string;
fromNode: string;
}>;
signatures: Array<{
nodeId: string;
signature: string;
}>;
}New nodes sync from multiple peers:
- Request latest block height
- Download missing blocks in parallel
- Verify all signatures
- Apply to local state
- Subscribe to real-time updates
- Periodic full sync every 24 hours