-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduce MaxStagingDealsBytes - reject new deals if our staging deals area is full #7276
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7276 +/- ##
==========================================
+ Coverage 39.09% 39.12% +0.03%
==========================================
Files 614 614
Lines 64895 64938 +43
==========================================
+ Hits 25369 25408 +39
- Misses 35127 35136 +9
+ Partials 4399 4394 -5
Continue to review full report at Codecov.
|
I'm not sure this fix will be really effective on making sure the market node does not crash. My .lotusmarket folder is currently able to handle 18TiB of data, and I would have no issue with it being filled if it was needed as a buffer. Issue here is the market node that stops working probably when it has x number of transfers all stuck at 0B transferred. Also this is a pretty easy way to do a DoS on our miner. Estuary sends a miner 100 deals like a railgun and transfers 0B or very few and stream reset. Our folder filles up and we are now rejecting all deals from all clients until we purge the market node. |
Off cause, solving the issue of a single machine miner getting the disk full that also houses .lotus and .lotusminer, then it makes perfectly sense. |
@benjaminh83 this config is about preventing the miner from getting out of disk space. If you run a sealing node and a markets node on the same host, at the moment it is very easy for the markets node to fill the disk space by accepting too many deals. This PR is not attempting to address all the issues you are describing. The sealing subsystem uses the scratch space and does accounting with respect to available disk space. There is no such functionality on the markets service, so this PR is basically adding a config to say "do not use more than X GiB for staging deals". I hope that makes sense. |
Would be really nice to get this in v1.11.3 as a stop gap, but okay to postpone to a later release |
@@ -533,6 +537,16 @@ func BasicDealFilter(user dtypes.StorageDealFilter) func(onlineOk dtypes.Conside | |||
return false, "miner error", err | |||
} | |||
|
|||
diskUsageBytes, err := r.DiskUsage(r.Path() + "/deal-staging") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be filepath.Join
, also ideally we'd not hardcode 'deal-staging'
This PR is introducing a
MaxStagingDealsBytes
config - if the markets repositorydeal-staging
directory gets too large, the markets node can now be configured to reject new incoming deals.A stopgap for #7241
MaxStagingDealsBytes
should be added under the[Dealmaking]
section of the markets' repoconfig.toml
TODO:
itests
suite (this PR has already been tested on a devnet)