-
Notifications
You must be signed in to change notification settings - Fork 24
fix(validator_store): filter inactive validators #589
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
fix(validator_store): filter inactive validators #589
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses issue #558 by filtering out liquidated clusters from validator processing to prevent liquidated clusters from being processed in validator operations.
- Adds check for liquidated clusters in validator-cluster lookup operations
- Introduces new error type
ClusterLiquidated
for handling liquidated cluster scenarios - Updates voting pubkeys method to filter out validators from liquidated clusters
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
.clusters() | ||
.get_by(public_key) |
Copilot
AI
Sep 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The get_by(public_key)
call is incorrect. The clusters collection should be accessed using the cluster_id from the validator metadata, not the public key directly. This will likely fail to find clusters since public keys are not cluster identifiers.
.clusters() | |
.get_by(public_key) | |
.metadata() | |
.get_by(public_key) | |
.and_then(|metadata| metadata.cluster_id) | |
.and_then(|cluster_id| state.clusters().get_by(&cluster_id)) |
Copilot uses AI. Check for mistakes.
Issue Addressed
#558
Makes sure if a cluster is liquidated that it doesn't get processed.
Closes #576