-
Notifications
You must be signed in to change notification settings - Fork 52
Moving mithril-stm errors into corresponding module #2850
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
Conversation
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.
Pull request overview
This PR refactors the Mithril STM codebase to simplify code organization in preparation for snarkification. The key changes include renaming MultiSignatureError to BlsSignatureError to better reflect its purpose, reorganizing error types into dedicated error.rs files within their respective modules, and standardizing import ordering across the codebase. The PR also completes the transition from the future_proof_system feature flag to future_snark.
- Renamed
MultiSignatureErrortoBlsSignatureErrorand moved it fromprotocol/error.rstosignature_scheme/bls_multi_signature/error.rs - Reorganized errors into module-specific
error.rsfiles (AggregationError,AggregateSignatureError,SignatureError,MerkleTreeError) - Standardized import order to follow pattern: external crates, then
use crate::, thenuse super::
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
mithril-stm/src/signature_scheme/bls_multi_signature/error.rs |
New file containing BlsSignatureError (renamed from MultiSignatureError) and blst_error_to_stm_error helper |
mithril-stm/src/signature_scheme/bls_multi_signature/{verification_key,signing_key,signature,proof_of_possession}.rs |
Updated error references from MultiSignatureError to BlsSignatureError and reorganized imports |
mithril-stm/src/signature_scheme/bls_multi_signature/helper.rs |
Updated import path for BlsSignatureError::SerializationError |
mithril-stm/src/signature_scheme/bls_multi_signature/mod.rs |
Added error module and updated test imports to use BlsSignatureError |
mithril-stm/src/signature_scheme/schnorr_signature/{verification_key,utils,signing_key,signature}.rs |
Reorganized imports following standard pattern and updated test import paths |
mithril-stm/src/protocol/single_signature/error.rs |
New file containing SignatureError moved from protocol/error.rs |
mithril-stm/src/protocol/single_signature/{signature,signature_registered_party,mod}.rs |
Updated to use local SignatureError and reorganized imports |
mithril-stm/src/protocol/aggregate_signature/error.rs |
New file containing AggregationError and AggregateSignatureError moved from protocol/error.rs |
mithril-stm/src/protocol/aggregate_signature/{signature,clerk,basic_verifier,mod}.rs |
Updated to use local error types and changed all future_proof_system feature flags to future_snark |
mithril-stm/src/protocol/error.rs |
Reduced to only contain RegisterError, removing other error types that were moved to their respective modules |
mithril-stm/src/protocol/mod.rs |
Updated exports to reflect new error locations |
mithril-stm/src/protocol/participant/initializer.rs |
Reorganized imports |
mithril-stm/src/membership_commitment/merkle_tree/error.rs |
New file containing MerkleTreeError moved from protocol/error.rs |
mithril-stm/src/membership_commitment/merkle_tree/{tree,path,leaf,commitment,mod}.rs |
Updated to use local MerkleTreeError and reorganized imports |
mithril-stm/src/lib.rs |
Added public export of BlsSignatureError |
mithril-stm/Cargo.toml |
Removed future_proof_system feature and added both future_snark and benchmark-internals as required features for schnorr_sig benchmark |
mithril-common/src/protocol/multi_signer.rs |
Updated test imports and error type references from MultiSignatureError to BlsSignatureError |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1b4e33f to
9e10e0b
Compare
jpraynaud
left a comment
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.
LGTM 👍
mithril-stm/src/signature_scheme/bls_multi_signature/verification_key.rs
Outdated
Show resolved
Hide resolved
2b51530 to
c0cbd4b
Compare
curiecrypt
left a comment
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.
LGTM 👍
Content
This PR includes changes to Mithril STM to simplify the code in the process of snarkifying it.
Pre-submit checklist
Comments
I moved the errors into error.rs files and rename the MultiSignatureError to BlsSignatureError.
Issue(s)
Relates to #2794