Skip to content

Conversation

RonTuretzky
Copy link
Contributor

Motivation:

Non-signer pubkeys were not properly ordered in the last iteration of this feature

Modifications:

Added OZ libraries as packed utilities for sorting, added sorting of the non-signers before returning them

Result:
Now all parameters returned are sorted in ascending order, which allows for strong assurances regarding non-duplicates in the array

@RonTuretzky RonTuretzky changed the title Fix/bls sig operator state retriever sort Fixing bls sig operator state retriever sorting May 16, 2025
@ypatil12 ypatil12 self-requested a review May 16, 2025 19:47
Copy link
Collaborator

@ypatil12 ypatil12 left a comment

Choose a reason for hiding this comment

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

Minor comment, will approve after

import {StorageSlot} from "@openzeppelin/contracts/utils/StorageSlot.sol";
import {Math} from "@openzeppelin/contracts/utils/math/Math.sol";

/**
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: can we add a comment why we're copy-pasting these (due to not being on v5.1 OZ). Another option is to add another submodule

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed with 85ed41d

@RonTuretzky
Copy link
Contributor Author

image
All tests are passing locally (including testnet)

Copy link
Collaborator

@ypatil12 ypatil12 left a comment

Choose a reason for hiding this comment

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

LGTM. Will fix CI separately. Tests pass locally. This is an issue with fork PRs

@ypatil12 ypatil12 changed the title Fixing bls sig operator state retriever sorting fix: bls sig operator state retriever sorting May 16, 2025
@ypatil12 ypatil12 merged commit 3fb5b61 into Layr-Labs:dev May 16, 2025
1 of 4 checks passed
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.

3 participants