AuditDQfloat64`help:"the reputation cut-off for disqualifying SNs based on audit history" default:"0.96"`
UnknownAuditLambdafloat64`help:"the forgetting factor used to update storage node reputation due to returning 'unknown' errors during audit'" default:"0.95"`
UnknownAuditDQfloat64`help:"the reputation cut-off for disqualifying SNs based on returning 'unknown' errors during audit" default:"0.6"`
SuspensionGracePeriodtime.Duration`help:"the time period that must pass before suspended nodes will be disqualified" releaseDefault:"168h" devDefault:"1h"`
SuspensionDQEnabledbool`help:"whether nodes will be disqualified if they have been suspended for longer than the suspended grace period" releaseDefault:"false" devDefault:"true"`
AuditCountint64`help:"the number of times a node has been audited to not be considered a New Node" releaseDefault:"100" devDefault:"0"`
FlushIntervaltime.Duration`help:"the maximum amount of time that should elapse before cached reputation writes are flushed to the database (if 0, no reputation cache is used)" releaseDefault:"2h" devDefault:"2m"`
ErrorRetryIntervaltime.Duration`help:"the amount of time that should elapse before the cache retries failed database operations" releaseDefault:"1m" devDefault:"5s"`
// AuditHistoryConfig is a configuration struct defining time periods and thresholds for penalizing nodes for being offline.
// It is used for downtime suspension and disqualification.
typeAuditHistoryConfigstruct{
WindowSizetime.Duration`help:"The length of time spanning a single audit window" releaseDefault:"12h" devDefault:"5m" testDefault:"10m"`
TrackingPeriodtime.Duration`help:"The length of time to track audit windows for node suspension and disqualification" releaseDefault:"720h" devDefault:"1h"`
GracePeriodtime.Duration`help:"The length of time to give suspended SNOs to diagnose and fix issues causing downtime. Afterwards, they will have one tracking period to reach the minimum online score before disqualification" releaseDefault:"168h" devDefault:"1h"`
OfflineThresholdfloat64`help:"The point below which a node is punished for offline audits. Determined by calculating the ratio of online/total audits within each window and finding the average across windows within the tracking period." default:"0.6"`
OfflineDQEnabledbool`help:"whether nodes will be disqualified if they have low online score after a review period" releaseDefault:"false" devDefault:"true"`
OfflineSuspensionEnabledbool`help:"whether nodes will be suspended if they have low online score" releaseDefault:"true" devDefault:"true"`
}
// AuditType is an enum representing the outcome of a particular audit.
typeAuditTypeint
const(
// AuditSuccess represents a successful audit.
AuditSuccessAuditType=iota
// AuditFailure represents a failed audit.
AuditFailure
// AuditUnknown represents an audit that resulted in an unknown error from the node.
AuditUnknown
// AuditOffline represents an audit where a node was offline.