Skip to content

Conversation

james-prysm
Copy link
Contributor

@james-prysm james-prysm commented Mar 17, 2025

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

The validator client when running in REST API mode prints a 404 error which is cosmetic when connected to a non prysm beacon node. this is because the code is calling the /prysm/validators/performance endpoint which is prysm specific. this PR moves the endpoint to the prysm specific client internally and does a check whether it's a prysm beacon node so it will no longer print the 404 error

Which issues(s) does this PR fix?

Fixes #

Other notes for review

Acknowledgements

@james-prysm james-prysm added Bug api ux Cosmetic / User Experience related items labels Mar 17, 2025
@james-prysm james-prysm requested a review from a team as a code owner March 17, 2025 21:32

func (c prysmChainClient) ValidatorPerformance(ctx context.Context, in *ethpb.ValidatorPerformanceRequest) (*ethpb.ValidatorPerformanceResponse, error) {
// Check node version for prysm beacon node as it is a custom endpoint for prysm beacon node.
nodeVersion, err := c.nodeClient.Version(ctx, nil)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having this pattern and calling it here really sucks... we should really have this in global state based on what we are initially connected to.

@james-prysm james-prysm added this pull request to the merge queue Mar 18, 2025
Merged via the queue into develop with commit 9d2273c Mar 18, 2025
17 checks passed
@james-prysm james-prysm deleted the move-prysm-performance-api branch March 18, 2025 15:10
rkapka added a commit that referenced this pull request Mar 19, 2025
* adding in check for non prysm node and moving the prysm endpoint to the prysm beacon client

* fixing a bug connecting to a non prysm client and moving the prysm api call to the prysm beacon client

* changelog

* fixing linting

* Update validator/client/metrics.go

Co-authored-by: Radosław Kapka <[email protected]>

---------

Co-authored-by: Radosław Kapka <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api ux Cosmetic / User Experience related items
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants