-
Notifications
You must be signed in to change notification settings - Fork 206
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
Changes from 1 commit
e2dd27b
a37f7e5
08599e7
02b29cf
c68967e
47a5f1f
226d346
9f4facf
f1eb0ad
cab9487
41a573a
f5ae9d8
c102858
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ import ( | |
regcoordinator "github.com/Layr-Labs/eigenda/contracts/bindings/RegistryCoordinator" | ||
"github.com/Layr-Labs/eigenda/core" | ||
"github.com/Layr-Labs/eigensdk-go/logging" | ||
sdkSigner "github.com/Layr-Labs/eigensdk-go/signer/bls" | ||
blssigner "github.com/Layr-Labs/eigensdk-go/signer/bls" | ||
"github.com/ethereum/go-ethereum/accounts/abi/bind" | ||
gethcommon "github.com/ethereum/go-ethereum/common" | ||
"github.com/ethereum/go-ethereum/core/types" | ||
|
@@ -64,7 +64,7 @@ func NewWriter( | |
func (t *Writer) RegisterOperator( | ||
ctx context.Context, | ||
keypair *core.KeyPair, | ||
signer sdkSigner.Signer, | ||
signer blssigner.Signer, | ||
socket string, | ||
quorumIds []core.QuorumID, | ||
operatorEcdsaPrivateKey *ecdsa.PrivateKey, | ||
|
@@ -105,7 +105,7 @@ func (t *Writer) RegisterOperator( | |
func (t *Writer) RegisterOperatorWithChurn( | ||
ctx context.Context, | ||
keypair *core.KeyPair, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
signer sdkSigner.Signer, | ||
signer blssigner.Signer, | ||
socket string, | ||
quorumIds []core.QuorumID, | ||
operatorEcdsaPrivateKey *ecdsa.PrivateKey, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ import ( | |
"github.com/Layr-Labs/eigenda/encoding/kzg" | ||
"github.com/Layr-Labs/eigenda/node/flags" | ||
|
||
sdkSignerTypes "github.com/Layr-Labs/eigensdk-go/signer/bls/types" | ||
blssignerTypes "github.com/Layr-Labs/eigensdk-go/signer/bls/types" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: all lowercase |
||
|
||
"github.com/ethereum/go-ethereum/accounts/keystore" | ||
"github.com/ethereum/go-ethereum/crypto" | ||
|
@@ -77,7 +77,7 @@ type Config struct { | |
ReachabilityPollIntervalSec uint64 | ||
DisableNodeInfoResources bool | ||
|
||
BlsSignerConfig sdkSignerTypes.SignerConfig | ||
BlsSignerConfig blssignerTypes.SignerConfig | ||
|
||
EthClientConfig geth.EthClientConfig | ||
LoggerConfig common.LoggerConfig | ||
|
@@ -166,11 +166,11 @@ func NewConfig(ctx *cli.Context) (*Config, error) { | |
ethClientConfig = geth.ReadEthClientConfig(ctx) | ||
} | ||
|
||
var blsSignerConfig sdkSignerTypes.SignerConfig | ||
var blsSignerConfig blssignerTypes.SignerConfig | ||
if !testMode { | ||
blsSignerCertFilePath := ctx.GlobalString(flags.BLSSignerCertFileFlag.Name) | ||
enableTLS := len(blsSignerCertFilePath) > 0 | ||
signerType := sdkSignerTypes.Local | ||
signerType := blssignerTypes.Local | ||
|
||
// check if BLS remote signer configuration is provided | ||
blsRemoteSignerEnabled := ctx.GlobalBool(flags.BLSRemoteSignerEnabledFlag.Name) | ||
|
@@ -187,10 +187,10 @@ func NewConfig(ctx *cli.Context) (*Config, error) { | |
} | ||
|
||
if blsRemoteSignerEnabled { | ||
signerType = sdkSignerTypes.Cerberus | ||
signerType = blssignerTypes.Cerberus | ||
} | ||
|
||
blsSignerConfig = sdkSignerTypes.SignerConfig{ | ||
blsSignerConfig = blssignerTypes.SignerConfig{ | ||
SignerType: signerType, | ||
Path: blsKeyFilePath, | ||
Password: blsKeyPassword, | ||
|
@@ -202,8 +202,8 @@ func NewConfig(ctx *cli.Context) (*Config, error) { | |
} | ||
} else { | ||
privateBls := ctx.GlobalString(flags.TestPrivateBlsFlag.Name) | ||
blsSignerConfig = sdkSignerTypes.SignerConfig{ | ||
SignerType: sdkSignerTypes.PrivateKey, | ||
blsSignerConfig = blssignerTypes.SignerConfig{ | ||
SignerType: blssignerTypes.PrivateKey, | ||
PrivateKey: privateBls, | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ import ( | |
"github.com/Layr-Labs/eigensdk-go/logging" | ||
"github.com/Layr-Labs/eigensdk-go/metrics" | ||
"github.com/Layr-Labs/eigensdk-go/nodeapi" | ||
sdkSigner "github.com/Layr-Labs/eigensdk-go/signer/bls" | ||
blssigner "github.com/Layr-Labs/eigensdk-go/signer/bls" | ||
|
||
"github.com/gammazero/workerpool" | ||
) | ||
|
@@ -75,7 +75,7 @@ type Node struct { | |
ChainID *big.Int | ||
BLSPublicKeyHex string | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good point. No. will remove There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
BlsSigner sdkSigner.Signer | ||
BlsSigner blssigner.Signer | ||
|
||
RelayClient atomic.Value | ||
|
||
|
@@ -125,7 +125,7 @@ func NewNode( | |
// Create ChainState Client | ||
cst := eth.NewChainState(tx, client) | ||
|
||
blsSigner, err := sdkSigner.NewSigner(config.BlsSignerConfig) | ||
blsSigner, err := blssigner.NewSigner(config.BlsSignerConfig) | ||
if err != nil { | ||
return nil, fmt.Errorf("failed to create BLS signer: %w", err) | ||
} | ||
|
There was a problem hiding this comment.
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?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
41a573a