Skip to content

feat: deterministic archive pruning with paginated PruneCursor#729

Merged
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
Kami-no-san:feat/event-archive-pruning-cursor
Jun 27, 2026
Merged

feat: deterministic archive pruning with paginated PruneCursor#729
greatest0fallt1me merged 1 commit into
Predictify-org:masterfrom
Kami-no-san:feat/event-archive-pruning-cursor

Conversation

@Kami-no-san

Copy link
Copy Markdown
Contributor

closes #614

Add PruneCursor struct with sorted-by-timestamp index for deterministic
archive pruning. The prune_archive entrypoint now accepts an optional
cursor for pagination and returns (count_pruned, new_cursor).

- Add ARCHIVED_INDEX_KEY storage and insert_into_sorted_index helper
- Maintain sorted (timestamp, market_id) index on archive_event
- Rewrite prune_archive to iterate index ascending and support cursor
- Update contract signature in lib.rs
- Update test callers in event_management_tests and require_auth_coverage_tests

Closes Predictify-org#614
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Kami-no-san Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@greatest0fallt1me

Copy link
Copy Markdown
Contributor

Merged via direct push to master (admin)

@greatest0fallt1me greatest0fallt1me merged commit 38eaff9 into Predictify-org:master Jun 27, 2026
1 check failed
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.

Add archival pruning entrypoint with sorted-by-resolution cursor to EventArchive

2 participants