-
Notifications
You must be signed in to change notification settings - Fork 215
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
post warning "found unrecognized file" #4789
Comments
@countvonzero, this log message is produced by post that is not expecting any extra files in the POS data directory (containing postdata_N.bin and postdata_metadata.json files). IMHO, it's wrong that we store state files and keys in the same directory and a proper solution is to move these files elsewhere. What do you think? |
i recall storing key in post dir was a deliberate decision so that it ties all things identity in one directory. |
👍 SGTM |
I think this is only a symptomatic fix for a problem that needs a better solution. |
can you state the problem? |
I think we should consider moving eveything that is not The Some of the other files should in my opinion also be moved out of the directory -
|
do you agree tho the life cycle of key.bin and post data should be the same? one should not be able to exist without the other? i will be onboard with separating node's own state files from the post data and key.bin. |
I'm not sure. PoST doesn't care about an identity. It only needs a commitment which can be anything. Correct me if I'm wrong but a node can have an identity without smeshing (and therefore having PoST data) I think. A node can receive and send transactions but doesn't participate in the consensus (i.e. a light node)? |
As a quick fix I would suggest changing the logging level from "WARN" to "DEBUG" or even removing the logs about unrecognised files completely. Since they are just misleading to someone not familiar with the internals of PoST and do not indicate any actual problem. |
we need to separate node identity and smesher identity. currently the code doesn't do a good job of that. ideally those are separate public keys. in the future, a node could be running the consensus protocol for multiple identities even, as that's the most demanding part of a full node.
are you saying that if the public key in postdata_metadata.json doesn't match key.bin, a miner can still use this post data to create atxs and ballots? |
The code is quite convoluted at the moment: The node has to read This design issue will be addressed by: spacemeshos/post#116 |
@fasmat and i had an offline conversation. we agreed that short term pushing the data to a subdir or just changing to dbg log are fine. long term: |
If you move key.bin outside of POS directory there will be more mistakes made by people moving POS files between nodes. Currently it's easy to move just one folder and to point the node to that folder. |
@Stizerg please be aware: you cannot re-use the same identity ( EDIT: In case I misunderstood you and you only initialize on one node and use the data on another: that's not an issue 🙂 |
@fasmat Yes I know, that's why I said ".. moving POS files .." |
from an user's log on windows. note the ".jso" files
|
Here are my thoughts: Some of those filesystems (specifically FAT32) do not support file-extensions with more than 3 letters natively (files are stored as 8.3 and metadata keeps track of their "real" filename). This would explain where the
I don't know what |
spacemeshos/post#215 reduced the logging level from |
The log from the windows user also makes me believe the right way to go is to just ignore any file PoST doesn't know instead of logging them. There might always be files in the POS folder that are put there by the OS (or OS tools) that we shouldn't complain about:
I believe the right way to "deal" with those is to just ignore anything that is not |
Description
when node restart, post module warn about the following files unexpected but they are. cc @poszu
The text was updated successfully, but these errors were encountered: