-
Notifications
You must be signed in to change notification settings - Fork 122
feat: add cursor pagination to sc events #2351
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
base: next
Are you sure you want to change the base?
Conversation
|
Vercel deployment URL: https://stacks-blockchain-57uq2bbf2-hirosystems.vercel.app 🚀 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@ASuciuX thanks for giving a shot at this pr. With this cursor based approach, will it be possible to got from event 1 (the first one that happened) to the last one? My use case would be to index all the events from the start to a specific block. |
|
Yes, with the cursor you can iterate forward from the very first event to the latest, page by page. It’s designed so you can start at genesis and stop at any specific block height. |
|
Amazing, looking forward to be able to use this approach 🙏 |
|
@ASuciuX lmk if I can help to get the pr merged faster |
The task got pushed to the backlog due to some internal priorities, but I’ll take care of it as soon as those wrap up. |
Co-authored-by: ASuciuX <asuciu@hiro.so> Co-authored-by: rmottley-hiro <rmottley@hiro.so>
891d308 to
a89332e
Compare
[wip] to add prev_cursor
Fixes #2349 by adding cursor-based pagination for events. This provides stable iteration through results, unlike offset-based pagination where responses can shift as new events are added.