Skip to main content

Module peer

Module peer 

Source
Expand description

§Peer records — identity, reputation, and PoW credentials for gossip

Three types make up a peer’s on-the-wire reputation:

  • Peer — the self-signed identity record gossiped through the Kademlia DHT. Carries the peer’s Ed25519 public key, post-quantum commitment, network address, and three PoW tokens (see PeerPow): the initial “birth certificate”, the best PoW observed during the current rolling day, and during the current rolling month. Rolling PoW means a peer that has continued to do work recently is weighted higher than one that submitted a good initial PoW and went quiet, without every peer having to redo heavy work on every gossip cycle.
  • PeerPow — a PoW token bound to a specific content_hash and timestamp. Because the content_hash is part of the proof, these tokens can’t be replayed to sign a different message.
  • ClientPow — bundles a peer’s public key + PQ commitment with its hardest-ever PoW, used to gate trust-sensitive operations (healing, feedback amplification).

Every field uses compact #[serde(rename)] wire keys so gossiped peer blobs stay small even at DHT scale.

Structs§

ClientPow
A client-side best-ever proof-of-work token, used as a reputation credential in the trust-sensitive parts of the protocol.
Peer
A single node’s self-signed identity record, gossiped through the Kademlia DHT.
PeerPow
A proof-of-work token sponsored by a specific peer and bound to a specific request body.