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

Queries for getting which accounts have scheduled releases or cooldowns. #67

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

td202
Copy link
Contributor

@td202 td202 commented Nov 22, 2024

Purpose

Add gRPC endpoints for getting the lists of accounts with scheduled releases or cooldowns.

Changes

  • GetScheduledReleaseAccounts endpoint
  • GetCooldownAccounts endpoint
  • GetPreCooldownAccounts endpoint
  • GetPrePreCooldownAccounts endpoint

Checklist

  • My code follows the style of this project.
  • The code compiles without warnings.
  • I have performed a self-review of the changes.
  • I have documented my code, in particular the intent of the
    hard-to-understand areas.
  • (If necessary) I have updated the CHANGELOG.

@td202 td202 requested review from DOBEN and drsk0 November 22, 2024 13:34
- Add `GetScheduledReleaseAccounts` endpoint for querying the list of accounts that
have scheduled releases.
- Add `GetCooldownAccounts`, `GetPreCooldownAccounts` and `GetPrePreCooldownAccounts`
endpoints for querying the lists of account that have pending cooldowns in protocol
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
endpoints for querying the lists of account that have pending cooldowns in protocol
endpoints for querying the lists of accounts that have pending cooldowns in protocol

@@ -174,6 +174,25 @@ service Queries {
// Get next available sequence numbers for updating chain parameters after a given block.
rpc GetNextUpdateSequenceNumbers (BlockHashInput) returns (NextUpdateSequenceNumbers);

// Get all accounts that have scheduled releases, with the timestamp of the first pending
// scheduled release for that account. (Note, this only identifies accounts by index, and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// scheduled release for that account. (Note, this only identifies accounts by index, and
// scheduled release for that account. (Note, this only identifies accounts by index, and

// Prior to protocol version 7, the resulting stream will always be empty.
rpc GetCooldownAccounts (BlockHashInput) returns (stream AccountPending);

// Get all accounts (by account index) that have stake in pre-cooldown.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent, minor nitpicking:

Suggested change
// Get all accounts (by account index) that have stake in pre-cooldown.
// Get all accounts that have stake in pre-cooldown. (Note, this only identifies accounts by index).

// Prior to protocol version 7, the resulting stream will always be empty.
rpc GetPreCooldownAccounts (BlockHashInput) returns (stream AccountIndex);

// Get all accounts (by account index) that have stake in pre-pre-cooldown.
Copy link
Member

@DOBEN DOBEN Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Get all accounts (by account index) that have stake in pre-pre-cooldown.
// Get all accounts that have stake in pre-pre-cooldown. (Note, this only identifies accounts by index).

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

Successfully merging this pull request may close these issues.

2 participants