Skip to content

feat: add support for legacy cluster definitions#23

Merged
varex83 merged 42 commits into
mainfrom
bohdan/legacy-definitions
Nov 28, 2025
Merged

feat: add support for legacy cluster definitions#23
varex83 merged 42 commits into
mainfrom
bohdan/legacy-definitions

Conversation

@varex83

@varex83 varex83 commented Nov 5, 2025

Copy link
Copy Markdown
Collaborator

This PR is part of the #16.

It adds support for old legacy versions of cluster definition. It was achieved by creating intermediate structs and custom serialization/deserialization logic for main Definition struct, so it matches the version first, and:

  • Serialization: converts struct to versioned one
  • Deserialization: deserializes to versioned struct and converts it back to the main Definition struct

This PR should be merged after #22

varex83 added 30 commits October 8, 2025 15:45
- Added `thiserror` dependency for improved error handling.
- Introduced `blsful` module for TBLS implementation.
- Refactored `tbls` module to utilize new types and error handling.
- Created `tblsconv` module for type conversions between byte slices and cryptographic types.
- Removed the old `herumi` implementation and replaced it with the new `blsful` based implementation.
- Added utility functions for key and signature conversions.
- Updated types and error definitions for better clarity and consistency.
- Reformatted comments for better readability.
- Adjusted spacing and alignment in error messages for consistency.
- Ensured clarity in documentation regarding expected byte lengths for key and signature conversions.
…ignatures

- Updated dependencies in Cargo.toml and Cargo.lock to use the blst library.
- Removed blsful module and its associated code, including type conversions and utility functions.
- Introduced a new blst_impl module for the BLST implementation of threshold BLS signatures.
- Refactored tbls module to utilize the new blst implementation.
- Cleaned up error handling and types to align with the new library.
- Added workspace lints and improved documentation throughout the codebase.
@github-actions

github-actions Bot commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

Coverage (base → head): 85.39% → 82.49% ⬇️ 2.9 pp
Only posts when PR coverage is lower than the base branch's latest push (or freshly computed base).

@varex83 varex83 changed the base branch from main to bohdan/cluster-lock-v1_10_0 November 6, 2025 12:19
/// DefinitionV1x0or1 is a cluster definition for version 1.0.0 or 1.1.0
#[serde_as]
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct DefinitionV1x0or1 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we can remove the comments on each field, same for other similar types.

Base automatically changed from bohdan/cluster-lock-v1_10_0 to main November 28, 2025 13:57
@varex83 varex83 merged commit 45efaef into main Nov 28, 2025
7 checks passed
@varex83 varex83 deleted the bohdan/legacy-definitions branch November 28, 2025 14:17
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.

2 participants