storj/private
Jeff Wendling 91698207cf storagenode: live tracking of order window usage
This change accomplishes multiple things:

1. Instead of having a max in flight time, which means
   we effectively have a minimum bandwidth for uploads
   and downloads, we keep track of what windows have
   active requests happening in them.

2. We don't double check when we save the order to see if it
   is too old: by then, it's too late. A malicious uplink
   could just submit orders outside of the grace window and
   receive all the data, but the node would just not commit
   it, so the uplink gets free traffic. Because the endpoints
   also check for the order being too old, this would be a
   very tight race that depends on knowledge of the node system
   clock, but best to not have the race exist. Instead, we piggy
   back off of the in flight tracking and do the check when
   we start to handle the order, and commit at the end.

3. Change the functions that send orders and list unsent
   orders to accept a time at which that operation is
   happening. This way, in tests, we can pretend we're
   listing or sending far into the future after the windows
   are available to send, rather than exposing test functions
   to modify internal state about the grace period to get
   the desired effect. This brings tests closer to actual
   usage in production.

4. Change the calculation for if an order is allowed to be
   enqueued due to the grace period to just look at the
   order creation time, rather than some computation involving
   the window it will be in. In this way, you can easily
   answer the question of "will this order be accepted?" by
   asking "is it older than X?" where X is the grace period.

5. Increases the frequency we check to send up orders to once
   every 5 minutes instead of once every hour because we already
   have hour-long buffering due to the windows. This decreases
   the maximum latency that an order will be reported back to
   the satellite by 55 minutes.

Change-Id: Ie08b90d139d45ee89b82347e191a2f8db1b88036
2020-08-19 19:42:33 +00:00
..
cui all: fix dots 2020-07-16 14:58:28 +00:00
currency private/currency: add strictcsv support to microunit 2020-03-31 14:57:04 -06:00
date all: fix dots 2020-07-16 14:58:28 +00:00
dbutil all: add missing dots 2020-08-11 17:50:01 +03:00
debugging all: fix dots 2020-07-16 14:58:28 +00:00
lifecycle all: use monkit v3 2020-02-05 23:53:17 +00:00
migrate all: add missing dots 2020-08-11 17:50:01 +03:00
post all: fix dots 2020-07-16 14:58:28 +00:00
prompt private/prompt: remove dependency to go-prompt 2020-02-25 13:09:41 +02:00
tagsql all: use jackc/pgx in place of lib/pq 2020-07-13 15:54:41 +00:00
testblobs private/testblobs, storage, storage/filestore: add storage dir verification to filestore 2020-08-19 17:18:14 +00:00
testplanet storagenode: live tracking of order window usage 2020-08-19 19:42:33 +00:00
testrevocation storage/redis/redisserver: simplify redisserver creation 2020-02-11 19:11:57 +00:00
teststorj all: fix dots 2020-07-16 14:58:28 +00:00
testuplink private/testuplink: move tests to uplink 2020-06-01 12:29:21 +02:00
version storagenode/version: notification flow now based on cursor, chore_test added, versioncontrol added to reconfigure. 2020-07-23 14:13:24 +00:00
web satellite/console: Increase default webUI rate limit to 5 2020-05-12 16:12:17 +00:00