Commit Graph

4554 Commits

Author SHA1 Message Date
Egon Elbre
0e3be60b79 satellite/satellitedb: simplify migrate step
Change-Id: Ie4574144fb6ddd057d5fca740702c59fbdb2c5e4
2020-05-12 18:27:07 +03:00
Michal Niewrzal
0e263f0099 satellite/admin: add API endpoint for adding projects
Change-Id: I7970aa8bec810ee36727446d632a950c836f0597
2020-05-12 14:55:41 +00:00
Ivan Fraixedes
c58dccb7a8
cmd/segment-reaper: Remove segments of skipped objects
Reorganize some operations in the observer.processSegment method:

* to minimal reduce the memory usage removing the segments of the
  objects marked as skipped. Skipped objects aren't discarded of the
  analysis stage so the segments aren't needed.
* returns earlier when an object is skipped because isn't needed a
  further processing.

Change-Id: I210a26c394477ee411ff7f640507dcc07733a47f
2020-05-12 16:12:44 +02:00
Ivan Fraixedes
9314092841
cmd/segment-reaper: Rename Bitmask to BitArray
Rename a test name and an error class because the bitmask was renamed to
bitArray in a previous commit, however, they weren't updated.

Change-Id: I92afcf747dec9e0a15d4c59b896e07b942f3518b
2020-05-12 15:22:30 +02:00
Ivan Fraixedes
50e8314279 cmd/segment-reaper: Fix bitArray.IsSequence method
The bitArray.IsSequence method had a bug that caused that sometimes the
test "Bitmask/IsSequence/sequence starts at other index than 0" to fail
due to it uses random values.

The test mostly found a corner case, I've added new tests to catch the
bug and then apply the fix.

Change-Id: If01dc07006d261ba40bbd99d36ef776e09ed3efc
2020-05-12 13:02:52 +00:00
Stefan Benten
e23bd806b4
satellite/accounting: separate usage and bandwidth limit (#3878) 2020-05-12 15:01:15 +02:00
Michal Niewrzal
0619f97e20 satellite/console: remove unused arguments
Change-Id: I3ef2b244137391daafee209e20cec383c6772e2e
2020-05-12 11:20:13 +00:00
Stefan Benten
65f3e26f80
satellite: Change Default Project Limits and minimum STORJ Payment (#3877) 2020-05-12 14:18:58 +03:00
Kaloyan Raev
073f9ed499 satellite/payments: deduct stripe discount first
We have 3 types of discounts:
1) Promotional credits/coupons
2) Bonus from depositing STORJ tokens
3) Stripe discounts (e.g. 100% off for Storjlings, 30% off for Early
Adopters, etc.)

So far the discounts were applied in the above order. But because the
Stripe discount is applied on all of the project usage fees, this could
sometimes lead to negative total in the invoice. Especially, if the
Stripe discount is 100% or all of the project fees are covered by
coupons and bonus.

To resolve this issue, before applying promotional coupons and deposit
bonuses, the Stripe discount will be applied first to the project fees.

Change-Id: I5dcbec04ec3a04e7f76b11e0a228ccb3195f2db0
2020-05-12 09:26:27 +00:00
Egon Elbre
93f1fe49e3 mod: update to latest common
Change-Id: Ie938b40c82ce22d017a0566f03fd32dbef7d6829
2020-05-11 17:26:12 +00:00
Kaloyan Raev
b397dfc82d satellite/payments: better labels for discounts in invoices
Before:
- Discount from coupon: Promotional credits (limited time -
2 billing periods)
- Discount from credits

After:
- Promotional credits (limited time - 2 billing periods)
- Credits from STORJ deposit bonus

This way we don't mix the terms coupon and credit. And it is clearer
when the credit comes from a deposit bonus.

Change-Id: I4bba76a5501147f9de399eac41c4f157d6bda032
2020-05-11 16:12:04 +00:00
Kaloyan Raev
e0cf9ae888 storagenode/orders: set devDefault sender interval to 30s
Change-Id: Ic2877da12b5985b73d1565e8ccd65bc817a76448
2020-05-11 18:55:56 +03:00
Michal Niewrzal
22fbe804e3 satellite/accounting: test if project bandwidth limits reset with
billing cycle

https://storjlabs.atlassian.net/browse/USR-287

Change-Id: I4dc5f6342417b6af3384da32d3d2ed8592904406
2020-05-11 15:11:53 +00:00
Egon Elbre
ec589a8289 all: fix comments about grpc
Change-Id: Id830fbe2d44f083c88765561b6c07c5689afe5bd
2020-05-11 13:05:34 +03:00
Egon Elbre
7d29f2e0d3 all: remove drpc wrappers
Change-Id: I45016f7d2a771dc00776196c1f531f3343e93b40
2020-05-11 08:20:34 +03:00
Egon Elbre
e6d5ce6b77 all: remove grpc
It seems everyone has migrated to drpc.

Change-Id: Ica6b2d0bdef68c6603083f2963458843eca71e9e
2020-05-10 06:36:09 +00:00
Bill Thorp
4b612a7906 cmd/segment-reaper: add support for >65 segments
Change the bitmask used by segment reaper to use []byte rather than uint64

This passes tests but I have literally no clue how to integration test this.

Change-Id: I393f4598b27cae6e427da2190dd3109bca721c34
2020-05-09 10:45:26 +00:00
Egon Elbre
bcd93ee375 private/testplanet: add StopNodeAndUpdate
This was commonly used and code with it can be simplified.

Change-Id: I2f2b91f7de54269aee6ef027f97f9e8a7d222e39
2020-05-08 13:02:19 +00:00
Kaloyan Raev
12fa505692 satellite/payments: fix invoice amount in billing history
The billing history currently shows the Total amount from the Stripe
invoice. In fact, this value is just the amount deducted from the Stripe
balance. It does not reflect any deduction from promotional coupon or
bonus credits.

This patch adds the deducted amount form the promotional coupons and
bonus credits to the displayed amount in billing history. This way
customers have better understading of the total amount deducted from
their account balance on the satellite.

Change-Id: Ibd7f611a6cea0143a3059f39dd1d9ef21c264d8c
2020-05-08 11:43:41 +00:00
Matt Robinson
94503db5a6
cmd/satellite: Enable admin service like other services, also sort environment variables (#3874)
Change-Id: I67592b7bf34a0e2ce9a445b58b7fa34396aa8c5d

Co-authored-by: Stefan Benten <mail@stefan-benten.de>
2020-05-08 07:38:21 -04:00
Egon Elbre
a549d523dc bump drpc and common
Change-Id: I231d72793cc07cefc59d013fce02c03d5638eabc
2020-05-08 10:50:57 +03:00
Egon Elbre
678b859172 satellite/overlay: remove MinimumRequiredNodes
In non-test code we were only using RequestedCount, not need to have
MinimumRequiredNodes.

Change-Id: I40736f4b028b41e94abfdeb221bce5aa86a5cb82
2020-05-07 15:41:23 +00:00
Kaloyan Raev
2af7138928 web/satellite: change invoice link title to 'Invoice PDF'
Change-Id: I820bb33f4ba88bb732d1c66ba3369ac4eac72f5c
2020-05-07 18:14:40 +03:00
VitaliiShpital
9837230f1e web/satellite: project dropdown reworked
Change-Id: I6267347693724ec34996af7625a917451aef631d
2020-05-07 12:51:34 +00:00
Egon Elbre
ce6a500b0c satellite/overlay: support DistinctIP=false in selection cache
Most of our tests and storj-sim are using DistinctIP.

Also fix bug with newNodeCount calculation.

Change-Id: I1a6d0efe7074908896a3322d19f487b929f0f0fc
2020-05-07 11:04:32 +00:00
Yaroslav Vorobiov
d8bdc60e19 storagenode/console: remove last ping id and address
Change-Id: I001e7d31d50aee7b9a07608158f8bd5c407c9c45
2020-05-07 13:34:29 +03:00
Egon Elbre
90d859fbb8 private/testplanet: use drpc piecestore mock for testing
Change-Id: Ia3f93f3c8b6584fb92f5d29025b7f0691120430e
2020-05-07 10:54:49 +03:00
Egon Elbre
c5452a87ec private/testplanet: use drpc referral manager server
Change-Id: I9e9e9a724c78c98859dd3e29416d766d8ffdca63
2020-05-07 07:03:11 +00:00
Egon Elbre
2955c50bc1 satellite/overlay: fix data-race in node selection cache
GetNodes returned references to nodes in the immutable state, however
some parts of code expect them to be modified.

Change-Id: I5be1866f95e0dbe062a6b6be60e29f2365c35faa
2020-05-06 20:03:06 +03:00
crawter
693f224ffd storagenode/web: Segment.io integration
Change-Id: I5b8054f39453bbfdebdbaaea1ffda4d5e706dab3
2020-05-06 15:02:53 +00:00
Jess G
73b2cd3fd5
docs/blueprints: blueprint nodes cache (#3838)
* init design for selecting nodes for uploads

Change-Id: I40920a88fc8c0c8591eaf3f4e711578ca02dad73

* spelling erro

Change-Id: I843945f356dbdfd5c8b7cefee91ab4172c41f3fb

* updates per comments

Change-Id: I2d6f0f9b4f22c4c7ae8ed80c4f533d2d9392badf

* add details

Change-Id: Id31ecfbe9f7ff068b127f04ba061a3fb9ad254cc

* mv redis to rationale section

Change-Id: I98d8565bb228555d92682d3b08c99c6056b0a84b

* add details about ReliabilityCache

Change-Id: I9f0ecf0a96a217c5e55c6a855b8e06e0a76ab574

* add option details

Change-Id: Icd229cbbdc263466d16856fdd82a021509a1c76a

* add opt for queue

Change-Id: I9d36e5e6f923440b6c22066a2aaf981aecc584d6

* final updates

Change-Id: Iee74985f3a45b3ef58ff23ef3ae26f609fb7f0d5
2020-05-06 07:44:21 -07:00
Egon Elbre
4e94da3fda satellite/overlay: add feature flag for node selection cache
Also distinguish the purpose for selecting nodes to avoid potential
confusion, what should allow caching and what shouldn't.

Change-Id: Iee2451c1f10d0f1c81feb1641507400d89918d61
2020-05-06 16:13:47 +03:00
Fadila Khadar
e4da7d65f0 pkg/macaroons: fix action types comments
Fix comments in ActionType definition

Change-Id: I29a300a0699697a10ebf5613ba36a2702aa67175
2020-05-06 11:58:56 +02:00
Jeff Wendling
efee3563a8 storagenode/storagenodedb: fix joined_at migration
Change-Id: I9091741bbec6e7a2fc6addc23249a40176ec040a
2020-05-05 15:01:07 -06:00
Qweder93
b754806b23 storagenode/reputation: unknown_audit_reputation_alpha and beta added to db, and reputation endpoint
Change-Id: I5d92268851bb9a202cc5d6b4d403467e6f692726
2020-05-05 15:48:04 +00:00
Qweder93
8a443bc9f5 storagenode/console: api notifications tests added
Change-Id: I472abc22746ea95841dcb0ae72dacee06fd98a2e
2020-05-05 17:53:19 +03:00
Kaloyan Raev
b5433322b4 cmd/storj-sim: enable open user registration
Change-Id: I695664279f42209245a82cc5bf103d037b844c32
2020-05-05 13:03:02 +00:00
Qweder93
16cd9b06ec storagenode/heldamount: added api for heldamount history separated by periods
Change-Id: I170010364269822848bc6cd051e0e0fb3df95d91
2020-05-05 12:29:44 +00:00
VitaliiShpital
0ae0cea93b web/satellite: billing history UX improved
added sorting header title
currency numbers are displayed with two digits now

Change-Id: I9531f112ff70ffb89b8a2dfe05ab02eb767dd107
2020-05-05 12:07:33 +00:00
Jennifer Johnson
18078bf7ee satellite/audit: increases audit worker concurrency to 2
Change-Id: Ibe3e3801b79accffbcfe9e2e02c96fc963894a7f
2020-05-05 11:31:55 +00:00
NickolaiYurchenko
c5871b83b0 web/storagenode: no data state added to payout table
Change-Id: I3f141debe2f7c04a20999c0d2e2a7cee1434f7d1
2020-05-05 11:10:10 +00:00
Egon Elbre
b7495d414d mod: update sqlite to v3.31.1
Change-Id: Ia2885f5385ffa227b8576c1d9e1c8bbba0c5d13d
2020-05-05 10:52:36 +00:00
Egon Elbre
d98b8f6e23 satellite/metainfo,storage: use different limit for metainfo loop
Change-Id: I5ef7233930679b977b33f7b3e1dda45c907dcfad
2020-05-05 10:37:20 +00:00
Jeff Wendling
13baacc479 lib/uplink: better diagnostics with invalid encryption access
Fixes #3841

Change-Id: I965b8fbb8fd221c740c2fc1421d66721c046f038
2020-05-05 09:45:57 +00:00
Brandon Iglesias
324fd410a0
updating Aha link on our readme 2020-05-04 14:21:58 -04:00
Moby von Briesen
8f60cfc4fb satellite/overlay: Add flag for enabling/disabling disqualification from suspension mode
Add a flag that allows us to easily switch disqualification from
suspension mode on or off. A node will only be disqualified from
suspension mode if it has been suspended for longer than the grace
period AND the SuspensionDQEnabled flag is true.

Change-Id: I9e67caa727183cd52ab2042b0a370a1bcaebe792
2020-05-04 17:25:09 +00:00
Jeff Wendling
f93d764998 cmd/uplink: properly path escape shares
Fixes #3829

Change-Id: I0f900a392239fcc064cea968fc7a5bc373ee26a1
2020-05-04 17:00:25 +00:00
Egon Elbre
31b322f07e pkg/server: log apikey head
Change-Id: Ib86987405ea73fe8a1b5cec93cf3b219e36074d1
2020-05-04 16:36:02 +00:00
Ethan
acf53bea4d satellite/orders;accounting: Add monthly project download bandwidth rollup
See https://storjlabs.atlassian.net/browse/SM-776

Change-Id: Ifd5cccea43c556fd59822d17344f399cfe9a7164
2020-05-04 15:49:57 +00:00
Michal Niewrzal
22691bd47f satellite/accounting: test project limits reset after file delete
https://storjlabs.atlassian.net/browse/USR-288

Change-Id: Ia63e58ef3b0f79b5edfb9a63f8edcdc17486b650
2020-05-04 15:19:19 +00:00