storj/satellite/accounting
Jessica Grebenschikov b261110352 satellite/orders: get bucketID from encrypted metadata in order instead of serial_numbers table
We want to stop using the serial_numbers table in satelliteDB. One of the last places using the serial_numbers table is when storagenodes settle orders, we look up the bucket name and project ID from the serial number from the serial_numbers table.

Now that we have support to add encrypted metadata into the OrderLimit, this PR makes use of that and now attempts to read the project ID and bucket name from the encrypted orderLimit metadata instead of from the serial_numbers table. For backwards compatibility and to ensure no errors, we will still fallback to the old way of getting that info from the serial_numbers table, but this will be removed in the next release as long as there are no errors.

All processes that create orderLimits must have an orders.encryption-keys set. The services that create orderLimits (and thus need to encrypt the order metadata) are the satellite apiProcess, the repair process, audit service (core process), and graceful exit (core process). Only the satellite api process decrypts the order metadata when storagenodes settle orders. This means that the same encryption key needs to be provided in the config for the satellite api process, repair process, and the core process like so:
orders.include-encrypted-metadata=true
orders.encryption-keys="<"encryptionKeyID>=<encryptionKey>"

Change-Id: Ie2c037971713d6fbf69d697bfad7f8b672eedd66
2020-12-01 15:29:32 +00:00
..
live satellite/accounting: Fix and enhance code doc comments 2020-11-04 09:50:48 +00:00
projectbwcleanup satellite/accounting: fix build - time rounding 2020-08-31 09:37:13 -04:00
reportedrollup satellite/orders: add storagenode_bw_phase2 table and dont delete tallies for longer 2020-11-13 17:15:24 +00:00
rollup satellite: try to stream rollups to aggregation function to use less memory 2020-11-29 10:26:32 -07:00
tally satellite: try to stream rollups to aggregation function to use less memory 2020-11-29 10:26:32 -07:00
billing_test.go satellite/orders: get bucketID from encrypted metadata in order instead of serial_numbers table 2020-12-01 15:29:32 +00:00
bucketstats.go satellite/metainfo: use metabase in loop 2020-09-01 10:06:16 +00:00
bucketusage.go all: fix dots 2020-07-16 14:58:28 +00:00
common.go all: add missing dots 2020-08-11 17:50:01 +03:00
db_test.go satellite/accounting: account for old orders that can be submitted in satellite rollup 2020-11-18 14:46:00 -05:00
db.go satellite: try to stream rollups to aggregation function to use less memory 2020-11-29 10:26:32 -07:00
projectlimitcache_test.go satellite/satellitedb: make limits per default NULL 2020-10-14 20:28:16 +00:00
projectlimitcache.go satellite/accounting: add cache for getting project storage and bw limits 2020-09-25 16:28:49 +00:00
projectusage_test.go satellite/console: get all bucket names endpoint and service method 2020-11-16 17:51:40 +02:00
projectusage.go satellite/accounting: add cache for getting project storage and bw limits 2020-09-25 16:28:49 +00:00