openapi icon indicating copy to clipboard operation
openapi copied to clipboard

Allow querying one upcoming epoch in /epochs/{number}/stakes and /epochs/{number}/stakes/{pool_id}

Open 1000101 opened this issue 3 years ago • 1 comments

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).

1000101 avatar Jul 07 '21 17:07 1000101

At the moment, it seems to be impeded by https://github.com/input-output-hk/cardano-db-sync/issues/688.

1000101 avatar Jul 15 '21 17:07 1000101

Finally fixed in https://github.com/IntersectMBO/cardano-db-sync/blob/13.2.0.1/cardano-db-sync/CHANGELOG.md?plain=1#L6

1000101 avatar Apr 26 '24 11:04 1000101