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

distributions: implement RPC services #5039

Closed
Tracked by #5010
TalDerei opened this issue Feb 1, 2025 · 0 comments
Closed
Tracked by #5010

distributions: implement RPC services #5039

TalDerei opened this issue Feb 1, 2025 · 0 comments
Assignees

Comments

@TalDerei
Copy link
Collaborator

TalDerei commented Feb 1, 2025

implement distributions rpcs:

  1. RPC that lets a client learn about the current pool size
service DistributionsService {
  rpc CurrentLqtPoolSize(CurrentLqtPoolSizeRequest) returns (CurrentLqtPoolSizeResponse);
}

// Request for retrieving the pool size of the current epoch from the chain state. 
message CurrentLqtPoolSizeRequest {}

// Response containing the pool size for the current epoch.
message CurrentLqtPoolSizeResponse {
  // The current epoch index.
  uint64 epoch_index = 1;

  // The total LQT pool size for the current epoch.
  core.num.v1.Amount pool_size = 2;
}
  1. RPC that lets a client learn about a previous tournament pool size
service DistributionsService {
  ...
  rpc LqtPoolSizeByEpoch(LqtPoolSizeByEpochRequest) returns (LqtPoolSizeByEpochResponse);
}

// Request for retrieving the pool size at a specific epoch.
message LqtPoolSizeByEpochRequest {
  // The epoch for which we want to retrieve the pool size.
  uint64 epoch = 1;
}

// Response containing the pool size at a specific epoch.
message LqtPoolSizeByEpochResponse {
  // The epoch for which the pool size is returned.
  uint64 epoch_index = 1;
  
  // The total LQT pool size for the given epoch.
  core.num.v1.Amount pool_size = 2;
}
@TalDerei TalDerei mentioned this issue Feb 1, 2025
28 tasks
@TalDerei TalDerei self-assigned this Feb 1, 2025
@TalDerei TalDerei changed the title distributions: stub out RPC services distributions: implement RPC services Feb 1, 2025
erwanor pushed a commit that referenced this issue Feb 1, 2025
## Describe your changes

- Implements rpc services for the distributions component in
`DistributionService`
- indexes distributions state key by epoch index and writes to NV
storage

@cronokirby had some suggestions (which can be discussed in this PR) for
replacing the historical epoch RPC, so I'm punting on the impl for now.

## Issue ticket number and link

references #5039

## Checklist before requesting a review

- [x] I have added guiding text to explain how a reviewer should test
these changes.

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

  > LQT branch
@TalDerei TalDerei closed this as completed Feb 1, 2025
conorsch pushed a commit that referenced this issue Feb 4, 2025
## Describe your changes

- Implements rpc services for the distributions component in
`DistributionService`
- indexes distributions state key by epoch index and writes to NV
storage

@cronokirby had some suggestions (which can be discussed in this PR) for
replacing the historical epoch RPC, so I'm punting on the impl for now.

## Issue ticket number and link

references #5039

## Checklist before requesting a review

- [x] I have added guiding text to explain how a reviewer should test
these changes.

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

  > LQT branch
conorsch pushed a commit that referenced this issue Feb 5, 2025
## Describe your changes

- Implements rpc services for the distributions component in
`DistributionService`
- indexes distributions state key by epoch index and writes to NV
storage

@cronokirby had some suggestions (which can be discussed in this PR) for
replacing the historical epoch RPC, so I'm punting on the impl for now.

## Issue ticket number and link

references #5039

## Checklist before requesting a review

- [x] I have added guiding text to explain how a reviewer should test
these changes.

- [x] If this code contains consensus-breaking changes, I have added the
"consensus-breaking" label. Otherwise, I declare my belief that there
are not consensus-breaking changes, for the following reason:

  > LQT branch
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

No branches or pull requests

1 participant