Skip to content

Feat: generate parameters for checkSignatures by referencing OperatorStateRetriever on-chain #455

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: dev
Choose a base branch
from

Conversation

rubydusa
Copy link

@rubydusa rubydusa commented Apr 6, 2025

Motivation:

Computation of the parameters needed for signature verification is typically done through the Eigen go or rust services. However, the rust services are not reliable at the current moment and some projects might want to have signature verifications without having to rely on these services.

This PR aims to make the computation of the NonSignerStakesAndSignature parameter easier and accessible through implementing it in OperatorStateRetriever contract

Modifications:

  • added getNonSignerStakesAndSignature to OperatorStateRetriever
  • added BN256G2 solidity library dependency

Result:

Computing the data necessary for performing signature verification is more accessible

@MegaRedHand
Copy link

CI's failing due to formatting: https://github.com/Layr-Labs/eigenlayer-middleware/actions/runs/14387747950/job/40347432364?pr=455

@rubydusa
Copy link
Author

There is invalid rpc url error in the CI which I can also see happens on latest commit of dev: https://github.com/Layr-Labs/eigenlayer-middleware/actions/runs/14312178100/job/40109659601#step:5:883

However this PR has 2 failing CI checks and the latest commit in dev only has 1, so I'm not sure if these are just simply different workflows or am I missing something

@MegaRedHand
Copy link

The CI errors in this PR are due to external contributors not having access to repository secrets. I'm not sure about the failure in the latest dev commit, but it seems to be due to something similar. You can run the tests locally with:

HOLESKY_RPC_URL=<some-public-rpc> forge test -vvv
FOUNDRY_PROFILE=forktest forge test --match-contract Integration -vvv

Copy link
Contributor

@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.

First pass, minor comment

@@ -0,0 +1,339 @@
// SPDX-License-Identifier: BUSL-1.1
Copy link
Contributor

Choose a reason for hiding this comment

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

Switch out for audited version

Copy link
Contributor

@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.

Since the OperatorStateRetriever is already in audit, let's inherit from that and create an unaudited version with this code

refactor: import path

refactor: rename

format: forge fmt
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.

10 participants