Repository navigation
Validate input bounds in governance, risk pool, and claims contracts - #666
Merged
nonsobethel0-dev merged 1 commit intoSep 29, 2026
Conversation
- GovernanceDAO: validate max proposal title length (256 bytes) (Parashield-Protocol#584) - RiskPool: validate non-zero withdrawal share amount (Parashield-Protocol#581) - ClaimsProcessor: define EmptyDisputeReason error variant and validate dispute reason (Parashield-Protocol#582)
|
@devmocrea 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! 🚀 |
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.
Summary of Changes
This PR addresses input validation issues across governance, risk pool, and claims contracts to enforce strict invariant checks and prevent unexpected behavior.
Fixed Issues
MAX_TITLE_LEN = 256) and returnError::TitleTooLong(48) if exceeded.shares > 0at the contract entry point, returningError::ZeroAmount(5) on non-positive input.EmptyDisputeReason(31) error variant definition referenced during dispute reason validation.coverage_min > 0).Testing
Unit tests were updated and executed for each affected crate:
create_proposal_title_too_long_failsingovernance-daotest_withdraw_zero_shares_panicsinrisk-pooltest_dispute_claim_empty_reason_failsinclaims-processorcreate_product_rejects_zero_or_negative_coverage_mininpolicy-engineCloses #584
Closes #581
Closes #583
Closes #582