storj/satellite
paul cannon 360ab17869 satellite/audit: use LastIPAndPort preferentially
This preserves the last_ip_and_port field from node lookups through
CreateAuditOrderLimits() and CreateAuditOrderLimit(), so that later
calls to (*Verifier).GetShare() can try to use that IP and port. If a
connection to the given IP and port cannot be made, or the connection
cannot be verified and secured with the target node identity, an
attempt is made to connect to the original node address instead.

A similar change is not necessary to the other Create*OrderLimits
functions, because they already replace node addresses with the cached
IP and port as appropriate. We might want to consider making a similar
change to CreateGetRepairOrderLimits(), though.

The audit situation is unique because the ramifications are especially
powerful when we get the address wrong. Failing a single audit can have
a heavy cost to a storage node. We need to make extra effort in order
to avoid imposing that cost unfairly.

Situation 1: If an audit fails because the repair worker failed to make
a DNS query (which might well be the fault on the satellite side), and
we have last_ip_and_port information available for the target node, it
would be unfair not to try connecting to that last_ip_and_port address.

Situation 2: If a node has changed addresses recently and the operator
correctly changed its DNS entry, but we don't bother querying DNS, it
would be unfair to penalize the node for our failure to connect to it.

So the audit worker must try both last_ip_and_port _and_ the node
address as supplied by the SNO.

We elect here to try last_ip_and_port first, on the grounds that (a) it
is expected to work in the large majority of cases, and (b) there
should not be any security concerns with connecting to an out-or-date
address, and (c) avoiding DNS queries on the satellite side helps
alleviate satellite operational load.

Change-Id: I9bf6c6c79866d879adecac6144a6c346f4f61200
2020-10-21 13:34:40 +00:00
..
accounting satellite/satellitedb: make limits per default NULL 2020-10-14 20:28:16 +00:00
admin satellite/admin: add apikey endpoints 2020-10-20 11:26:56 +00:00
attribution all: fix dots 2020-07-16 14:58:28 +00:00
audit satellite/audit: use LastIPAndPort preferentially 2020-10-21 13:34:40 +00:00
compensation all: add missing dots 2020-08-11 17:50:01 +03:00
console satellite/console/consoleweb: Fix typo in method name 2020-10-21 11:58:37 +02:00
contact all: fix dots 2020-07-16 14:58:28 +00:00
dbcleanup satellite/dbcleanup: run cleanup more frequently 2020-06-10 18:32:15 +00:00
downtime all: fix comments 2020-07-16 19:13:14 +03:00
gc satellite/metainfo: replace ScopedPath with metabase.SegmentLocation 2020-09-04 10:06:52 +00:00
gracefulexit all: use keyed special comment 2020-10-13 15:13:41 +03:00
inspector satellite/metainfo: use metabase.SegmentKey with metainfo.Service 2020-09-03 15:11:32 +00:00
mailservice all: fix linter complaints 2020-10-13 15:59:01 +03:00
marketingweb all: fix linter complaints 2020-10-13 15:59:01 +03:00
metainfo all: fix linter complaints 2020-10-13 15:59:01 +03:00
metrics satellite/metainfo: replace ScopedPath with metabase.SegmentLocation 2020-09-04 10:06:52 +00:00
nodeapiversion satellite/nodeapiversion: new table for tracking node api usage 2020-07-09 15:02:25 +00:00
nodeselection all: add missing dots 2020-08-11 17:50:01 +03:00
nodestats storagenode/reputation: offline_under_review_at added 2020-09-02 18:48:28 +03:00
orders satellite/audit: use LastIPAndPort preferentially 2020-10-21 13:34:40 +00:00
overlay satellite/overlay: uncomment dq for offline and disable with feature flag 2020-10-16 12:55:16 +00:00
payments satellite/satellitedb: make limits per default NULL 2020-10-14 20:28:16 +00:00
referrals all: fix dots 2020-07-16 14:58:28 +00:00
repair all: fix linter complaints 2020-10-13 15:59:01 +03:00
revocation all: fix dots 2020-07-16 14:58:28 +00:00
rewards satellite/rewards: add partner videocoin (#3946) 2020-09-29 14:30:46 +02:00
satellitedb satellite/overlay: uncomment dq for offline and disable with feature flag 2020-10-16 12:55:16 +00:00
snopayout storagenode: heldamount renamed to payouts, renamed some methods and structs to more meaningful names. grouped estimated payout with pathouts 2020-09-16 14:57:35 +00:00
admin.go cmd/storj-sim: run gateway without --access flag 2020-10-13 14:45:04 +00:00
api.go cmd/storj-sim: run gateway without --access flag 2020-10-13 14:45:04 +00:00
configlock_test.go all: fix linter complaints 2020-10-13 15:59:01 +03:00
core.go cmd/storj-sim: run gateway without --access flag 2020-10-13 14:45:04 +00:00
gc.go all: fix dots 2020-07-16 14:58:28 +00:00
peer.go satellite/accounting: add cache for getting project storage and bw limits 2020-09-25 16:28:49 +00:00
repairer.go satellite/orders: add bucket id to order limit 2020-09-03 10:50:11 +03:00