-
Notifications
You must be signed in to change notification settings - Fork 21
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
Don't delete redundant postdata files #239
Conversation
I lost a terabyte of data, and it took a graphics card many days to generate it. I put read-only attributes on the data, and it was still deleted, how much do the developers hate the data? |
With that change we should also update the Otherwise larger PoSTs than expected aren't handled correctly, i.e. the node thinks that it has |
|
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.
see my other comments
@fasmat could you please explain this part?
|
Imagine the following situation:
Before such a setup would have silently deleted PoST data, now it will result in an infinite loop. Preventing the node from deleting data solves one issue but introduces others. Right now the change in this PR also makes it impossible for a user to willingly reduce their PoST size, a use case that is currently covered from end to end:
|
Ensure that numunits matches config Allow less files than actually found on disk (in test)
Thanks, that helps.
Why isn't the node passing the numunits into
Why would a proof of a greater number of units fail a check for a lesser numunits? Can't we say that a proof of numunits >= n is always valid for numunits=n?
In this case the user is responsible for manually deleting the extra files. We should print a warning if we find them, but otherwise everything should work fine. |
It is, proof generation reads the value from
That's why if they don't match we delete files 🙂, the authoritative source is the node config or the parameters passed to
We could, I can't think of a reason why this shouldn't be allowed - I would need to think on that. However such a proof isn't considered valid at the moment, so additional changes are necessary.
Then this should be made explicit and documented in the |
Regarding allowing proofs for bigger PoST sizes: if we allow that we essentially have to finish implementing this epic: spacemeshos/pm#209 If we don't it would be unfair that users only receive rewards for |
Codecov Report
@@ Coverage Diff @@
## develop #239 +/- ##
=========================================
+ Coverage 68.6% 69.0% +0.3%
=========================================
Files 28 28
Lines 1862 1840 -22
=========================================
- Hits 1279 1270 -9
+ Misses 435 426 -9
+ Partials 148 144 -4
|
if more than the expected number of units is found
@fasmat I made the requested changes and updated the tests, please take another look.
I think it's fine if a proof of |
The user only gets credit for
Could you add a test that initialises with x SUs, then initialises again with |
With #270 users now have to confirm if the provide flags to |
Closes #236
Don't remove "redundant" files. It's too easy to accidentally remove already-initialized postdata files, and I don't see any value in doing so.
Remove the debug output for unrecognized files too (spacemeshos/go-spacemesh#4789).