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

[Feature]: Add --reverse option into QueryTxsByEvents function #21062

Closed
faust403 opened this issue Jul 24, 2024 · 2 comments
Closed

[Feature]: Add --reverse option into QueryTxsByEvents function #21062

faust403 opened this issue Jul 24, 2024 · 2 comments

Comments

@faust403
Copy link

Summary

The problem is that people usually use it either to get the entire transaction history with arbitrary events or to get the recent actions that happened

Problem Definition

  • Why do we need this feature?
    For example, it helps not to query each page, get the key for the next and query the same size page to reach the end (as a consequence we query all history but need only the tail)
  • What problems may be addressed by introducing this feature?
    Node overloaded by high amount of queries performed only for 1 page at the end
  • What benefits does the SDK stand to gain by including this feature?
    One would be safe to assume that SDK itself doesn't get any benefits in general
  • Are there any disadvantages of including this feature?
    It's a minor issue so don't think It'll somehow expand the codebase or give any disadvantages. More benefits than efforts

Proposed Feature

It would be nice if cosmos-sdk would include reverse (boolean) option in QueryTxsByEvents function to facilitate the effort in reaching the latest transactions performed with certain events

@sontrinh16
Copy link
Member

digging through the code i see that QueryTxsByEvents already accept orderBy string in the argument which supports ascending and descending. Dont know if this is provides the same feature you are requesting ?

@faust403
Copy link
Author

Yeah, didn't notice, think we can close this feat request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🥳 Done
Development

No branches or pull requests

2 participants