Changes based on Python leanSpec commit #238#50
Closed
Conversation
…dded readme on how to select devnet
Signature Aggregation Preparation (devnet 2)
…) method, added check for duplicate data
…ig::devnet() and update lib exports
…void. Changed AttestationSignatures to use MultisigAggregatedSignature.
ArtiomTr
requested changes
Jan 21, 2026
| use typenum::{Prod, Sum, U100, U1024, U12, U31}; | ||
|
|
||
| // Type-level number for 1 MiB (1048576 = 1024 * 1024) | ||
| pub type U1048576 = Prod<U1024, U1024>; |
Collaborator
There was a problem hiding this comment.
probably no need for intermediate type, but definitely this shouldn't be exported
| impl MultisigAggregatedSignature { | ||
| /// Create a new MultisigAggregatedSignature from proof bytes. | ||
| pub fn new(proof: Vec<u8>) -> Self { | ||
| Self(ssz::ByteList::try_from(proof).expect("proof exceeds 1 MiB limit")) |
Collaborator
There was a problem hiding this comment.
don't panic, handle these as errors instead
Comment on lines
135
to
144
| // NOTE: This stub matches Python leanSpec behavior (test_mode=True). | ||
| // Python also uses test_mode=True with TODO: "Remove test_mode once leanVM | ||
| // supports correct signature encoding." | ||
| // Once leanVM/lean-multisig supports proper signature encoding: | ||
| // 1. Extract public keys from validators | ||
| // 2. Convert message bytes to field element format | ||
| // 3. Call lean_multisig::xmss_verify_aggregated_signatures | ||
| let _ = (validators, message, epoch); | ||
|
|
||
| Ok(()) |
Collaborator
There was a problem hiding this comment.
in rust we use todo! macro for such cases. Also, you probably can implement it already: just iterate through list of validators, extract public key from each of them, and call self.verify with extracted keys
Comment on lines
349
to
350
| use ssz::SszHash; | ||
| use std::collections::HashSet; |
Collaborator
There was a problem hiding this comment.
move uses to the top of the file
- added test vectors with new types - added custom serialization with new types - implemented signature verification for single XMSS signatures
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.
Implemented changes based on leanSpec commit leanEthereum/leanSpec@e5b9140
Removed all devnet1 code and feature flags addressing issue
#36
Addressed changes mentioned in the pull request
#37