Skip to content
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

add bls signer abstraction from eigensdk #985

Merged
merged 13 commits into from
Jan 15, 2025

Conversation

shrimalmadhur
Copy link
Contributor

@shrimalmadhur shrimalmadhur commented Dec 11, 2024

Why are these changes needed?

  • Ignore the logger changes as eigensdk removed the logger so I have defined a logging util in testutils
  • Updated the go mod version 1.21.13 since some dependency needs it. Since it's a patch version upgrades, this should be good.
  • Add eigensdk bls signer interfaces

TESTING

  • I have tested normal signing running with my own node
  • I have tested opt-in using the same node

Checks

  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • I've checked the new test coverage and the coverage percentage didn't drop.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@shrimalmadhur shrimalmadhur force-pushed the madhur/eigensdk-bls-abstraction-update branch 2 times, most recently from abb4631 to 1c92ed0 Compare December 19, 2024 22:07
@shrimalmadhur shrimalmadhur force-pushed the madhur/eigensdk-bls-abstraction-update branch 3 times, most recently from 2abf113 to 7c7c900 Compare January 11, 2025 01:50
@shrimalmadhur shrimalmadhur marked this pull request as ready for review January 14, 2025 00:40
Copy link
Contributor

@dmanc dmanc left a comment

Choose a reason for hiding this comment

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

Looks good from initial review, will take another look tomorrow. Did we test on a deployed node already?

retriever/eth/chain_client_test.go Outdated Show resolved Hide resolved
node/operator_test.go Outdated Show resolved Hide resolved
core/eth/reader.go Outdated Show resolved Hide resolved
node/churner_client.go Outdated Show resolved Hide resolved
@shrimalmadhur
Copy link
Contributor Author

Looks good from initial review, will take another look tomorrow. Did we test on a deployed node already?

I have tested it with one of my preprod node using the remote signer

Copy link
Contributor

@ian-shim ian-shim left a comment

Choose a reason for hiding this comment

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

lgtm! few comments

@@ -96,7 +96,7 @@ func setup(t *testing.T) {
if err != nil {
t.Fatal(err)
}
logger := logging.NewNoopLogger()
Copy link
Contributor

Choose a reason for hiding this comment

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

is NewNoopLogger gone from eigensdk?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is. it's gone. poof. that's why I had to replace with test logger I defined in test_utils

core/chainio.go Outdated
@@ -6,6 +6,7 @@ import (
"math/big"

"github.com/Layr-Labs/eigenda/api/grpc/churner"
sdkSigner "github.com/Layr-Labs/eigensdk-go/signer/bls"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: blsSigner?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea that's better - will update

Copy link
Contributor

Choose a reason for hiding this comment

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

actually blssigner (i think package names are all lowercase)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -62,14 +64,15 @@ func NewWriter(
func (t *Writer) RegisterOperator(
ctx context.Context,
keypair *core.KeyPair,
Copy link
Contributor

Choose a reason for hiding this comment

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

can we remove keypair now?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -102,6 +105,7 @@ func (t *Writer) RegisterOperator(
func (t *Writer) RegisterOperatorWithChurn(
ctx context.Context,
keypair *core.KeyPair,
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

node/node.go Outdated
@@ -76,7 +73,9 @@ type Node struct {
PubIPProvider pubip.Provider
OperatorSocketsFilterer indexer.OperatorSocketsFilterer
ChainID *big.Int
BLSSigner blssignerV1.SignerClient
BLSPublicKeyHex string
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need this as a separate field? could we infer this from BlsSigner?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point. No. will remove

Copy link
Contributor Author

Choose a reason for hiding this comment

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

node/node.go Outdated
BLSSigner blssignerV1.SignerClient
BLSPublicKeyHex string

BlsSigner sdkSigner.Signer
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: BLSSigner

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shrimalmadhur shrimalmadhur force-pushed the madhur/eigensdk-bls-abstraction-update branch from b3075cc to 41a573a Compare January 15, 2025 00:47
@@ -14,7 +14,7 @@ import (
"github.com/Layr-Labs/eigenda/encoding/kzg"
"github.com/Layr-Labs/eigenda/node/flags"

"github.com/Layr-Labs/eigensdk-go/crypto/bls"
blssignerTypes "github.com/Layr-Labs/eigensdk-go/signer/bls/types"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: all lowercase

@shrimalmadhur shrimalmadhur merged commit 61cd7f9 into master Jan 15, 2025
9 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