openapi
openapi copied to clipboard
Allow querying one upcoming epoch in /epochs/{number}/stakes and /epochs/{number}/stakes/{pool_id}
Currently, there is no way to query active stake distribution for upcoming epoch.
The data should be already available, as active stake is taken from snapshot of live stakes from 2 epochs before. E.g. in the current epoch 276, we already know active stake distribution for epoch 277 as the snapshot from epoch 275 has already been taken.
Querying these endpoints will now result in 404 as the resource doesn't exist yet (the epoch has not begun). This is a policy blockfrost.io makes for all resources (be it unused addresses or upcoming blocks/epochs).
However, these two endpoints could be worth making an exception or considering introduction a mechanism which would allow to query n+1 epoch with n being the current one (just for active stake related endpoints).
At the moment, it seems to be impeded by https://github.com/input-output-hk/cardano-db-sync/issues/688.
Finally fixed in https://github.com/IntersectMBO/cardano-db-sync/blob/13.2.0.1/cardano-db-sync/CHANGELOG.md?plain=1#L6