diff --git a/node/node.go b/node/node.go index 999c5e448..6b212d2e8 100644 --- a/node/node.go +++ b/node/node.go @@ -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 != "" { @@ -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{