Skip to content

sgns::neoswarm::reputation

Classes

Name
class sgns::neoswarm::reputation::ReputationCRDT
Last-Write-Wins Register per node (PTDS §4.2).
class sgns::neoswarm::reputation::ReputationScoring
Implements the PTDS §7.2 reputation update formulas.
class sgns::neoswarm::reputation::ReputationStorage
Persists NodeReputation records to RocksDB. Falls back to an in-memory store when RocksDB is not compiled in.
class sgns::neoswarm::reputation::WeightedConsensus
Selects the winning output from a set of node responses.

Functions

Name
double ClampScore(double score)
Clamp a reputation score to [0.0, 1.0].
bool IsHighTrust(const NodeReputation & rep)
Check whether a node has enough history to be considered high-trust.

Functions Documentation

function ClampScore

inline double ClampScore(
    double score
)

Clamp a reputation score to [0.0, 1.0].

Parameters:

  • score Raw score value.

Return: Clamped score.

function IsHighTrust

inline bool IsHighTrust(
    const NodeReputation & rep
)

Check whether a node has enough history to be considered high-trust.

Parameters:

  • rep Node reputation record.

Return: True if the node meets the high-trust threshold.


Updated on 2026-07-25 at 22:56:56 +0000