Upstream issue : algorand#1629
Problem
There is no way to quickly fetch all online accounts[^1].
Solution
- Add is-online boolean filter to account search endpoint
- Add is-reward-eligible boolean filter to account search endpoint
- Add expires-in-hours filter that returns only accounts that will expire no later than
expires-in-hours
- Add appropriate optional partial index (for is-online only)
Response model should include:
- total online stake
- total eligible online stake
- avg block time for the last 100 rounds in milliseconds
Notes:
- is-reward-eligible assumes is-online
- expires-in-hours should calculate avg block time over last 100 blocks using a query to block_header
- return only accounts with non-expired keys (as online flag persists past key expiry)
- expires-in-hours might need a better name like
expires-in-hours-or-less but shorter ;)
Upstream issue : algorand#1629
Problem
There is no way to quickly fetch all online accounts[^1].
Solution
expires-in-hoursResponse model should include:
Notes:
expires-in-hours-or-lessbut shorter ;)