-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Clone trait for validator verifier #14847
Conversation
⏱️ 9h 46m total CI duration on this PR
🚨 2 jobs on the last run were significantly faster/slower than expected
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
// Note: The "Clone" trait has been removed intentionally for ValidatorVerifier to ensure that the same | ||
// view of ValidatorVerifier is used across the system. In can case a ValidatorVerifier needs to be cloned, | ||
// please use Arc<ValidatorVerifier> instead. | ||
#[derive(Debug, Derivative, Serialize)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove the Arc inside the struct now since the whole struct can only be shared with Arc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
types/src/validator_verifier.rs
Outdated
@@ -130,7 +129,10 @@ impl TryFrom<ValidatorConsensusInfoMoveStruct> for ValidatorConsensusInfo { | |||
/// Supports validation of signatures for known authors with individual voting powers. This struct | |||
/// can be used for all signature verification operations including block and network signature | |||
/// verification, respectively. | |||
#[derive(Clone, Debug, Derivative, Serialize)] | |||
// Note: The "Clone" trait has been removed intentionally for ValidatorVerifier to ensure that the same | |||
// view of ValidatorVerifier is used across the system. In can case a ValidatorVerifier needs to be cloned, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// view of ValidatorVerifier is used across the system. In can case a ValidatorVerifier needs to be cloned, | |
// view of ValidatorVerifier is used across the system. In case a ValidatorVerifier needs to be cloned, |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ Forge suite
|
✅ Forge suite
|
✅ Forge suite
|
Description
For optimistic signature verification feature, signature verification step adds the list of malicious authors (authors who submitted invalid signatures) to validator verifier. Future signature verification for this author will happen pessimistically. For this to work, we need to make sure the same view of validator verifier is held across the entire system. To ensure this, this PR removes "Clone" trait from ValidatorVerifier. Wherever a validator verifier is to be cloned, we use
Arc<ValidatorVerifier>
instead.How Has This Been Tested?
Key Areas to Review
Type of Change
Which Components or Systems Does This Change Impact?
Checklist