gobitfly/eth2-beaconchain-explorer

Issue with Missing Validators in Paginated API Endpoint /api/v1/validator/withdrawalCredentials/{withdrawalCredentialsOrEth1address}

nicosampler opened this issue · 2 comments

Description:
I have encountered an issue with the paginated API endpoint at https://gnosischa.in/api/v1/validator/withdrawalCredentials/{withdrawalCredentialsOrEth1address. The issue revolves around missing validators when using pagination.

Problem Description:
I have been testing this endpoint by setting the limit to 200 and increasing the offset in increments of 200 (e.g., 0, 200, 400, etc.) with the goal of reaching a response with fewer than 200 results. The problem I've found is that when the pagination reaches a request with less than 200 validators, the sum of all validators returned is not coincident with the number of validators the address controls.

Possible cause
I suspect the issue may be related to the sorting of the query in this function. It appears that the query is not sorted by any specific field, which could potentially lead to inconsistencies in the results.

I kindly request a review and investigation into this issue. The objective is to ensure that the pagination strategy works consistently, returning the correct number of validators.

D13ce commented

@nicosampler , many thanks for your report! We have created an internal ticket for your request. 🙇

D13ce commented

@nicosampler , just so you know, the PR tackling your issue has just been merged and will be part of our next release.