Skip to content

Multi BLS added to new bls package#34

Open
tarakby wants to merge 4 commits intofeature/packages-refactorfrom
tarak/multi-bls
Open

Multi BLS added to new bls package#34
tarakby wants to merge 4 commits intofeature/packages-refactorfrom
tarak/multi-bls

Conversation

@tarakby
Copy link
Collaborator

@tarakby tarakby commented Jul 18, 2025

Multi BLS added to new bls package

Summary

This PR continues the crypto package refactoring by integrating multi-signature BLS functionality into the new bls package structure. The changes include:

  • Multi-signature BLS integration: Moved multi-signature BLS operations into the new bls package
  • Common package removal: Eliminated the common package and restructured dependencies
  • Import cycle resolution: Fixed import issues that arose during the refactoring
  • C code formatting: Applied formatting fixes to maintain code standards

The PR builds on the foundational work from PR #33, specifically focusing on multi-signature capabilities within the modular package structure. All CI checks are passing, but the complexity of multi-signature cryptographic operations requires thorough manual verification.

Review & Testing Checklist for Human

  • End-to-end multi-signature BLS testing - Verify multi-signature creation, aggregation, and verification work correctly with various key counts and thresholds
  • Import cycle detection - Ensure no circular dependencies exist after common package removal and import restructuring
  • Backward compatibility verification - Test that existing multi-signature BLS operations continue to work identically for downstream consumers
  • Edge case testing - Test multi-signature scenarios with edge cases (single signer, maximum signers, invalid signatures, etc.)
  • Common package removal impact - Verify that removing the common package didn't break existing functionality or introduce missing dependencies

Recommended Test Plan:

  1. Run multi-signature BLS tests with various signer counts (1, 2, 10, 100+ signers)
  2. Test signature aggregation and verification with real cryptographic inputs
  3. Verify import statements compile correctly across all affected packages
  4. Test integration with any downstream projects using multi-signature BLS
  5. Compare multi-signature outputs before/after refactoring to ensure no logic changes

Diagram

%%{ init : { "theme" : "default" }}%%
graph TB
    subgraph "BLS Package Structure"
        BLSPkg["sign/bls/<br/>bls.go"]:::major-edit
        MultiBLS["sign/bls/<br/>multi_bls.go"]:::major-edit
        BLSTests["sign/bls/<br/>bls_test.go"]:::minor-edit
    end
    
    subgraph "Dependencies"
        BLS12381["bls12381/<br/>curve operations"]:::context
        SignPkg["sign/<br/>interfaces"]:::context
        CommonPkg["common/<br/>(removed)"]:::major-edit
    end
    
    subgraph "Import Fixes"
        ImportFixes["Various files<br/>import statements"]:::minor-edit
    end
    
    BLS12381 --> BLSPkg
    BLS12381 --> MultiBLS
    BLSPkg --> SignPkg
    MultiBLS --> SignPkg
    CommonPkg -.->|removed| BLSPkg
    CommonPkg -.->|removed| MultiBLS
    ImportFixes --> BLSPkg
    ImportFixes --> MultiBLS
    
    subgraph Legend
        L1["Major Edit"]:::major-edit
        L2["Minor Edit"]:::minor-edit
        L3["Context/No Edit"]:::context
    end
    
    classDef major-edit fill:#90EE90
    classDef minor-edit fill:#87CEEB
    classDef context fill:#FFFFFF
Loading

Notes

@tarakby tarakby changed the base branch from main to feature/packages-refactor July 18, 2025 17:29
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.

1 participant