This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
Work around serialization error while fetching votes for a checkpoint #170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
While testing the use of a single IPC agent to orchestrate several validators, I ended up in a weird state where my validators kept failing when trying to determine if they have voted for a specific checkpoint. In the current implementation, errors in the checkpointing process leads to the future being returned instead of moving on to the next iteration. This serialization error with voting and the fact that the error returns the process leads to the checkpointing getting stuck. This is the serialization error we get from Lotus.
Additionally, when submitting a checkpoint with several validators and restarting the process, we don't want to kill the future if, for instance, a validator has already voted and is turn to the next one to vote.
Implementation.
This PR disables momentarily the voting check for validators until we fix the serialization problem in the actors, and introduces a check to move on to the next iteration instead of killing the checkpoint process if there's an error while submitting a checkpoint (like for instance because the validator had already voted or is out of funds).