-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Labels
Description
Rationale
There are claims in the community that after initialization postdata_metadata.json was corrupted or empty.
Some say that it happened because of running out of disk space, but some Users do not have any problems with disk space. So it seems that in case PoS initialization fails for some reason — then it breaks everything.
That means:
- user lost nonce found during initialization
- he needs to find new nonce which is "not that easy" case.
- User cannot start the Node (it crashes)
We need to
- Handle properly failures during PoS initialization: do not leave files in an inconsistent state if possible.
- Since there still might be I/O problems — Node should handle the case correctly.
So ifpostdata_metadata.jsonis corrupted/empty, while there is nopostdata_N.bin— it can just recreate everything.
If there are some post data already generate — then it is a more complicated case and most likely we need the User's attention to decide what to do with it.
For example, let's say we cannot write valid JSON or remove an inconsistent file because User unplugged his external hard drive — then the Node should not crash if no PoS data generated yet. Just recreated everything.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done