Skip to content

Conversation

@nsannn
Copy link
Collaborator

@nsannn nsannn commented Jan 18, 2026

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

JuliusMieliauskas and others added 26 commits December 19, 2025 00:46
Signature Aggregation Preparation (devnet 2)
…void. Changed AttestationSignatures to use MultisigAggregatedSignature.
use typenum::{Prod, Sum, U100, U1024, U12, U31};

// Type-level number for 1 MiB (1048576 = 1024 * 1024)
pub type U1048576 = Prod<U1024, U1024>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@ArtiomTr ArtiomTr closed this Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants