Skip to content

Commit

Permalink
operator id
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimalmadhur committed Oct 22, 2024
1 parent 1de508e commit 87e08d8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,18 @@ func NewNode(reg *prometheus.Registry, config *Config, pubIPProvider pubip.Provi

config.ID = keyPair.GetPubKeyG1().GetOperatorID()
} else {
pkBytes, err := hex.DecodeString(config.BLSPublicKeyHex)
if err != nil {
return nil, fmt.Errorf("failed to decode BLS public key: %w", err)
}
pubkey := new(core.G1Point)
publicKey, err := pubkey.Deserialize(pkBytes)
if err != nil {
return nil, err
}

config.ID = publicKey.GetOperatorID()

nodeLogger.Info("creating signer client", "url", config.BLSRemoteSignerUrl)
creds := insecure.NewCredentials()
if config.BLSSignerTLSCertFilePath != "" {
Expand All @@ -187,6 +199,7 @@ func NewNode(reg *prometheus.Registry, config *Config, pubIPProvider pubip.Provi
return nil, fmt.Errorf("failed to create new BLS remote signer client: %w", err)
}
blsClient = blssignerV1.NewSignerClient(conn)

}

return &Node{
Expand Down

0 comments on commit 87e08d8

Please sign in to comment.