storj/satellite/reputation
paul cannon b6bcb32ecf satellite/reputation: more accurate "reputation changes" list
`overlay.(*Service).UpdateReputation()` takes a "reputationChanges"
parameter, a slice of node events indicating whether we think the node's
disqualification or suspension status is changing. This is necessary so
that the overlay service can notify the nodeevents DB about these
changes.

In several cases, however, this list of events is not constructed
correctly, because of missing information about the previous state.
In most cases, this is because the node was offline, and the order limit
creation functions (which usually obtain and return the prior reputation
status) ignored that node.

This change makes it so that all callers to
`overlay.(*Service).UpdateReputation()` can be expected to provide a
correct list of change events (as correct as feasible, given that we
can't lock the node's information in the database during the entire
operation).

It ended up that there was only one caller we needed to worry about, and
that was reputation.(*Service).ApplyAudit(). So the bulk of this change
is teaching that function how to recognize when the prior reputation
status was not filled in, and fill it in.

Refs: https://github.com/storj/storj/issues/5464
Change-Id: I52ce385fc9c0ce3b283b998d517998e7f4ec8792
2023-01-31 18:39:40 +00:00
..
audithistory_test.go satellite/reputation: new ApplyUpdates() method 2022-06-07 15:22:25 +00:00
audithistory.go satellite/reputation: new ApplyUpdates() method 2022-06-07 15:22:25 +00:00
benchmark_test.go satellite/reputation: move Config fields into a Config struct 2022-05-24 20:57:51 +00:00
calculations.go all: reformat comments as required by gofmt 1.19 2022-08-10 18:24:55 +00:00
config.go satellite/reputation: reconfigure lambda and alpha 2022-08-17 18:52:53 +00:00
db_test.go satellite/reputation: reconfigure lambda and alpha 2022-08-17 18:52:53 +00:00
service_test.go satellite/reputation: reconfigure lambda and alpha 2022-08-17 18:52:53 +00:00
service.go satellite/reputation: more accurate "reputation changes" list 2023-01-31 18:39:40 +00:00
suspension_test.go satellite/audit: split out auditor process 2022-12-16 12:44:32 -06:00
writecache_service_test.go satellite/reputation: reconfigure lambda and alpha 2022-08-17 18:52:53 +00:00
writecache_unit_test.go satellite/reputation: offset write times by random, not by satelliteID 2022-08-03 21:14:06 +00:00
writecache.go satellite/reputation: reconfigure lambda and alpha 2022-08-17 18:52:53 +00:00