filecoin-project / lotus

Reference implementation of the Filecoin protocol, written in Go
https://lotus.filecoin.io/
Other
2.83k stars 1.26k forks source link

Need sanity check on local sector files #4068

Open hyunmoon opened 4 years ago

hyunmoon commented 4 years ago

Describe the bug https://filecoinproject.slack.com/archives/C0179RNEMU4/p1601273979184400

lotus/extern/sector-storage/stores/filetype.go:102
- input does not match format

lotus-miner/worker assumes any files in their sealing directory are valid sector files. "We shouldn't fail to start if that happens" (comment on Slack by Magik6k)

To Reproduce

  1. Accidentally put a random file in one of the sealing directories (worker3.log)
  2. Get the following error.

sector_sanity

Expected behavior Ideally, any irrelevant files should be ignored. Maybe move it to somewhere else with a warning.

Version (run lotus version): v0.8.0

Additional context Reported by https://filecoinproject.slack.com/team/U019G352QDC on slack.

KIM-IMHONG commented 4 years ago

nohup lotus-worker --worker-repo=/worker3 run --listen=0.0.0.0:3503 > worker3.log 2>&1 &

When the command is executed, the folder in progress is It happened in /worker3/cache>.