Partial signature message semantic validation#183
Merged
jking-aus merged 3 commits intosigp:unstablefrom Mar 25, 2025
Merged
Conversation
9a60db1 to
dd9a49c
Compare
dd9a49c to
c499a5a
Compare
b700db1 to
2524bd0
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the partial signature message validation logic by moving its implementation into a new module and updates the tests with additional helper functions to enhance test coverage and clarity.
- Moved the partial signature message validation function into a new module.
- Removed the inlined implementation of validate_partial_signature_message.
- Added test helpers for creating message IDs and asserting validation errors.
Comments suppressed due to low confidence (3)
anchor/message_validator/src/lib.rs:7
- Ensure that the new validate_partial_signature_message implementation in the partial_signature module is adequately covered by tests, particularly for edge-case partial signature validations.
use crate::partial_signature::validate_partial_signature_message;
anchor/message_validator/src/lib.rs:272
- [nitpick] Ensure that create_message_id_for_test is actively used in tests for partial signature validation, so its behavior and output are verified in various scenarios.
pub fn create_message_id_for_test(role: Role) -> MessageId {
anchor/message_validator/src/lib.rs:282
- [nitpick] Consider renaming the parameter 'expected_error' to 'error_predicate' in the assert_validation_error helper to better reflect that it represents a predicate function for evaluating errors.
pub fn assert_validation_error<T, F>(...
a18451f to
1ccc241
Compare
1ccc241 to
b796586
Compare
jking-aus
approved these changes
Mar 25, 2025
Member
jking-aus
left a comment
There was a problem hiding this comment.
apologies on the delay -- lgtm great work diego
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.
Issue Addressed
#161
Proposed Changes
Add in a new module the partial signature message semantic validation logic and tests with additional helper functions to enhance test coverage and clarity.