-
Notifications
You must be signed in to change notification settings - Fork 778
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
Contents of validator defs. file is deleted #2159
Comments
As discussed on Discord, I think this is a bug, as the validator definitions YAML ended up empty I think a race condition like this is possible:
|
Solution that worked for me: Re-import validator keys, something like this depending on your setup:
But note that you will have to edit the outputted validator_definitions.yml to add your password (https://lighthouse-book.sigmaprime.io/validator-management.html). |
I believe I've seen this before as well. I'm going to flag it as a bug. |
This just happened to another user on Discord. I'll spend a few hours on Monday to get it fixed. |
## Issue Addressed Closes #2159 ## Proposed Changes Rather than trying to write the validator definitions to disk directly, use a temporary file called `.validator_defintions.yml.tmp` and then atomically rename it to `validator_definitions.yml`. This avoids truncating the primary file, which can cause permanent damage when the disk is full. The same treatment is also applied to the validator key cache, although the situation is less dire if it becomes corrupted because it can just be deleted without the user having to reimport keys or resupply passwords. ## Additional Info * `File::create` truncates upon opening: https://doc.rust-lang.org/std/fs/struct.File.html#method.create * `fs::rename` uses `rename` on UNIX and `MoveFileEx` on Windows: https://doc.rust-lang.org/std/fs/fn.rename.html * UNIX `rename` call is atomic: https://unix.stackexchange.com/questions/322038/is-mv-atomic-on-my-fs * Windows `MoveFileEx` is _not_ atomic in general, and Windows lacks any clear API for atomic file renames :( https://stackoverflow.com/questions/167414/is-an-atomic-file-rename-with-overwrite-possible-on-windows ## Further Work * Consider whether we want to try a different Windows syscall as part of #2333. The `rust-atomicwrites` crate seems promising, but actually uses the same syscall under the hood presently: untitaker/rust-atomicwrites#27.
Closed by #2338 |
Description
Having run out of space on my Geth ethereum 1 node, I switched over to infura and deleted the chaindata directory and stopped the Geth service. After syncing back up with the beacon, which is now running without errors, the validator client is refusing to validate.
In the logs, all I can see is:
Version
1.0.6
Present Behaviour
Validator exits
Expected Behaviour
Validator starts and validates on the network
The text was updated successfully, but these errors were encountered: