Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to search for online accounts #4

Open
urtho opened this issue Sep 9, 2024 · 5 comments
Open

Add ability to search for online accounts #4

urtho opened this issue Sep 9, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@urtho
Copy link
Member

urtho commented Sep 9, 2024

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 ;)
@urtho
Copy link
Member Author

urtho commented Sep 19, 2024

Let's wait a bit for a confirmation on how suspended accounts look like (is-online:false + valid keyreg ?) so that we can show paused accounts in the results as well.

@urtho
Copy link
Member Author

urtho commented Sep 19, 2024

Thinking we should publish new , not yet merged functionality under different prefix instead of /v2. This would allow us not to break apps that used bleeding-edge stuff after the feature got renamed during the final merge.

@agodnic
Copy link

agodnic commented Oct 1, 2024

Let's wait a bit for a confirmation on how suspended accounts look like (is-online:false + valid keyreg ?) so that we can show paused accounts in the results as well.

Do we have a confirmation of this?

Sorry if this is a dumb question, I don't know what suspended/paused accounts are. A quick google search yielded this:

[...] the network to suspend delinquent participants/ accounts from the staking set. Where that participant/account has
failed to execute their incumbent responsibilities

@urtho
Copy link
Member Author

urtho commented Oct 9, 2024

still no confirmation.
Lets assume for now that suspended account will have online = false and a valid (last key round greater than current round) key material still on the account.

We will also need a block search endpoint with filters like proposer , booted proposer - but will create a separate issue for that.

@urtho urtho added the enhancement New feature or request label Oct 9, 2024
@agodnic agodnic self-assigned this Oct 10, 2024
@gmalouf
Copy link

gmalouf commented Jan 29, 2025

@urtho think you may have what you need now (have to check on the suspended status as of round X)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants