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

view: extend the ViewService with a method to query latest activity #320

Open
Tracked by #319
erwanor opened this issue Jan 26, 2025 · 0 comments
Open
Tracked by #319

view: extend the ViewService with a method to query latest activity #320

erwanor opened this issue Jan 26, 2025 · 0 comments
Assignees

Comments

@erwanor
Copy link
Member

erwanor commented Jan 26, 2025

This issue takes place in https://github.com/penumbra-zone/penumbra

Docs: https://buf.build/penumbra-zone/penumbra/docs/main:penumbra.view.v1

Suggested API:

service ViewService {
  // …
  rpc LatestSwaps(LatestSwapsRequest) returns (stream LatestSwapsResponse);
}

message LatestSwapsRequest {
  // If present, filter balances to only include the account specified by the `AddressIndex`.
  core.keys.v1.AddressIndex account_filter = 1;
  // If present, filter balances to only include trading activity on the specified pair.
  core.dex.v1.DirectedTradingPair pair = 2;
  // If present, limit the responses to activity that occured after this block height.
  uint64 after_height = 3;
  // Limit the response to the last entries within `response_limit`.
  uint64 response_limit = 4;
}

message LatestSwapsResponse {
  core.dex.v1.DirectedTradingPair pair = 1;
  core.asset.v1.Value input = 2;
  core.asset.v1.Value output = 3;
  uint64 block_height = 4;
  core.txhash.v1.TransactionId id = 5;
}
@github-project-automation github-project-automation bot moved this to 🗄️ Backlog in Penumbra web Jan 26, 2025
@erwanor erwanor assigned vacekj and unassigned vacekj Jan 26, 2025
@erwanor erwanor moved this from 🗄️ Backlog to 📝 Todo in Penumbra web Jan 26, 2025
@TalDerei TalDerei self-assigned this Jan 28, 2025
@TalDerei TalDerei moved this from 📝 Todo to 🏗 In progress in Penumbra web Jan 28, 2025
erwanor pushed a commit to penumbra-zone/penumbra that referenced this issue Jan 28, 2025
## Describe your changes

This PR extends the view service with  a new `LatestSwaps` method, enabling
clients to query recent swap activity.

Precursor to penumbra-zone/web#2005

## Issue ticket number and link

references penumbra-zone/dex-explorer#320

## 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:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

No branches or pull requests

3 participants