Skip to content

fix(reward-engine): prune resolved verifications from pending list - #12

Merged
cybermax4200 merged 1 commit into
ecotask-network:mainfrom
ogaziedaniel80-droid:fix/prune-verification-list
Jul 13, 2026
Merged

fix(reward-engine): prune resolved verifications from pending list#12
cybermax4200 merged 1 commit into
ecotask-network:mainfrom
ogaziedaniel80-droid:fix/prune-verification-list

Conversation

@ogaziedaniel80-droid

Copy link
Copy Markdown
Contributor

Changes:

  1. storage.rs:123-134 — Added remove_verification_key that filters a resolved entry out of the list
  2. verification.rs:171 — approve_proof now removes the key after resolving
  3. verification.rs:220 — reject_proof now removes the key after resolving
  4. verification.rs:244 — dispute_proof now removes the key after resolving
  5. verification.rs:660-689 — New test_resolved_not_in_pending_list test

Closes #2

Add remove_verification_key to storage.rs and call it from
approve_proof, reject_proof, and dispute_proof. This bounds the
VerificationList in instance storage to only currently-pending
entries, preventing unbounded growth and keeping
get_pending_verifications efficient.
@ogaziedaniel80-droid
ogaziedaniel80-droid force-pushed the fix/prune-verification-list branch from 369890a to 48ea9c7 Compare July 13, 2026 11:37
@cybermax4200
cybermax4200 merged commit c8b8815 into ecotask-network:main Jul 13, 2026
1 check passed
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.

reward-engine: VerificationList in instance storage will grow unboundedly

2 participants