Skip to content

fix(reward-engine): prevent disputing Approved/Disputed verifications - #18

Merged
cybermax4200 merged 1 commit into
ecotask-network:mainfrom
legend-esc:fix/dispute-proof-status-guard
Jul 13, 2026
Merged

fix(reward-engine): prevent disputing Approved/Disputed verifications#18
cybermax4200 merged 1 commit into
ecotask-network:mainfrom
legend-esc:fix/dispute-proof-status-guard

Conversation

@legend-esc

Copy link
Copy Markdown
Contributor

Closes #7

dispute_proof previously accepted any existing verification regardless of status, allowing an admin to re-open an Approved verification as Disputed — enabling retroactive minting via resolve_dispute.

Changes:

  • Add status guard: only Pending or Rejected verifications can be disputed
  • Panic with "engine: verification is not disputable" for Approved/Disputed statuses

Tests added:

  • test_dispute_approved_fails — disputing Approved panics
  • test_dispute_already_disputed_fails — disputing Disputed panics
  • test_dispute_rejected_succeeds — disputing Rejected succeeds

Add status guard to dispute_proof so only Pending or Rejected
verifications can be disputed. Prevents retroactive minting by
re-opening already Approved verifications.

Closes ecotask-network#7
@cybermax4200
cybermax4200 merged commit db557eb 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: dispute_proof allows escalating any non-pending verification

2 participants