SNARK-friendly STM: New Key Registration#2880
Conversation
Test Results 5 files ± 0 172 suites ±0 31m 59s ⏱️ + 1m 3s Results for commit 609870e. ± Comparison against base commit 3fdf7b5. This pull request removes 3 and adds 8 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
d731e0c to
8c98a17
Compare
|
@jpraynaud tests related to hex encodings for
|
There was a problem hiding this comment.
Pull request overview
This PR implements a significant refactoring of the key registration system in mithril-stm to support SNARK-friendly STM. The changes introduce a new RegistrationEntry type that encapsulates verification keys and stakes, reorganizes the proof system architecture by separating concatenation-specific logic, and updates the API throughout the codebase.
Changes:
- Introduces new
RegistrationEntrytype and refactorsKeyRegistration/ClosedKeyRegistrationto use ordered sets - Restructures proof system by extracting concatenation-specific components (
ConcatenationClerk,ConcatenationProofSigner,ConcatenationProofKey) - Converts
AggregateVerificationKeyfrom struct to enum to support multiple proof systems - Updates all dependent code (tests, examples, benchmarks, mithril-common, mithril-signer, demos) to use new APIs
Reviewed changes
Copilot reviewed 44 out of 44 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| mithril-stm/src/protocol/key_registration/registration_entry.rs | New file defining RegistrationEntry with validation and serialization |
| mithril-stm/src/protocol/key_registration/register.rs | Refactored registration using BTreeSet for ordered entries |
| mithril-stm/src/protocol/participant/signer.rs | Simplified signer to delegate to proof system-specific signers |
| mithril-stm/src/protocol/participant/initializer.rs | Updated to create signers with new registration system |
| mithril-stm/src/proof_system/concatenation/signer.rs | New concatenation proof signer extracted from main Signer |
| mithril-stm/src/proof_system/concatenation/clerk.rs | New concatenation clerk extracted from main Clerk |
| mithril-stm/src/proof_system/concatenation/proof_key.rs | New concatenation proof key type |
| mithril-stm/src/protocol/aggregate_signature/aggregate_key.rs | Converted to enum to support multiple proof systems |
| mithril-stm/src/protocol/aggregate_signature/clerk.rs | Refactored to delegate to proof-system specific clerks |
| mithril-stm/src/protocol/error.rs | Added new error variants for registration |
| mithril-stm/src/lib.rs | Updated type aliases and exports |
| mithril-stm/tests/* | Updated tests to use new registration API |
| mithril-stm/examples/* | Updated examples with new API |
| mithril-stm/benches/* | Updated benchmarks with new API |
| mithril-common/src/crypto_helper/* | Updated wrappers and type aliases |
| mithril-signer/src/services/single_signer.rs | Updated to use new Clerk API |
| demo/protocol-demo/src/* | Updated demo code with new APIs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cfb65dc to
425e4f4
Compare
37813c2 to
2fc6bb9
Compare
2fc6bb9 to
4d85b69
Compare
4d85b69 to
99f5896
Compare
hjeljeli32
left a comment
There was a problem hiding this comment.
LGTM. I just left a couple of comments.
damrobi
left a comment
There was a problem hiding this comment.
Left a few comments on small changes/questions but overall it looks good to me.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 51 out of 51 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
damrobi
left a comment
There was a problem hiding this comment.
LGTM, my comments were correctly resolved!
1bd88b8 to
e3bab96
Compare
e3bab96 to
037d8b7
Compare
037d8b7 to
b097651
Compare
Content
This PR includes new key registration functionality.
New key registration supports registering different types of keys specific to proof system.
Changing the key registration results in some important modifications in the other (sub-)modules in STM library.
Pre-submit checklist
Comments
This branch provides the STM library to be fully convenient for integrating SNARK proofs.
Issue(s)
Closes #2791