fix(validator_store): filter inactive validators#589
Merged
mergify[bot] merged 1 commit intosigp:release-v0.3.0from Sep 8, 2025
Merged
fix(validator_store): filter inactive validators#589mergify[bot] merged 1 commit intosigp:release-v0.3.0from
mergify[bot] merged 1 commit intosigp:release-v0.3.0from
Conversation
Contributor
There was a problem hiding this comment.
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
ClusterLiquidatedfor 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.
Comment on lines
+808
to
+809
| .clusters() | ||
| .get_by(public_key) |
There was a problem hiding this comment.
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.
Suggested change
| .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)) |
petarjuki7
added a commit
to petarjuki7/anchor
that referenced
this pull request
Sep 16, 2025
diegomrsantos
pushed a commit
to diegomrsantos/anchor
that referenced
this pull request
Sep 17, 2025
jking-aus
pushed a commit
to jking-aus/anchor
that referenced
this pull request
Oct 8, 2025
petarjuki7
added a commit
to petarjuki7/anchor
that referenced
this pull request
Oct 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue Addressed
#558
Makes sure if a cluster is liquidated that it doesn't get processed.
Closes #576