Skip to main content

Pagination "next" url changing original requets query param, "from"

Hi guys, i think there is some broken functionality under pagination requests in at least in /v0/eth/validators/effectiveness

I know the max size is 1000, but i am preparing a script in order to get more than 1000, so in those cases i will need to multiple request and then gather all response data in the script.

In order to test it i am doing the following request.

/v0/eth/validators/effectiveness?size=10&to=2023-08-10&from=2023-10-16&filterType=datetime&groupBy=validator&pubkeys=key1&&pubkeys=key2&&pubkeys=key3.....&pubkeys=key190

As it should it correctly only returns 10 elements under data array property.

And it also returns a "next" key value with the following:

/v0/eth/validators/effectiveness?size=10&to=2023-08-10&from=2023-08-09&filterType=datetime&groupBy=validator&pubkeys=key1&&pubkeys=key2&&pubkeys=key3.....&pubkeys=key190

As you can see the given url at "next" changed the original from value.

- Initial from value: 2023-10-16

- Next from value: 2023-08-09

this is a problem as per api reference "to must be <= from"

Also i dont understand the pagination in this case, as in the next page query it will still contain the same 190 initial pubkeys.

Could you please look into this?

Thanks!

Status: Completed1 comment

Log in to comment and vote

Comments1

  • Sanjana Mehta

    •

    Oct 31, 2023

    Hi trikunai - could you possibly explain what is your end need here? The aggregations endpoint is intended for validator and timewindow aggregations using size + from/to instead of both from and to.

    Once you share your usecase, we'll be able to help you with the right implementation!