fix(#83): deprecate get_pending_verifications - #87
Open
Jerry-Tekh wants to merge 3 commits into
Open
Conversation
- get_pending_verifications now panics immediately with 'engine: use get_pending_verifications_paged' - Added deprecation doc comment pointing to paged variant - Migrated all test references to get_pending_verifications_paged - Updated CHANGELOG.md and README.md
- Add MAX_PAGE_SIZE constant (50) to task-registry and reward-engine storage - list_tasks rejects limit > 50 with descriptive panic - get_tasks_by_creator_paged rejects limit > 50 with descriptive panic - get_pending_verifications_paged rejects limit > 50 with descriptive panic - get_verifications_by_user rejects limit > 50 with descriptive panic - get_pending_verifications now iterates the pending list directly instead of delegating to collect_pending, so the unbounded getter still returns every pending entry - Update existing tests to use valid limit values - Add should_panic tests confirming the cap is enforced Fixes denial-of-service / budget-exhaustion vector where u32::MAX would iterate every task/verification in one transaction.
- reward-engine: change get_pending_verifications_paged limits from 1000 to 50 - integration test: change get_pending_verifications_paged limit from 1000 to 50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #83. get_pending_verifications now panics immediately with engine: use get_pending_verifications_paged. All internal tests migrated to the paged variant.