diff --git a/node/grpc/server_test.go b/node/grpc/server_test.go index f98baef80..d6482d281 100644 --- a/node/grpc/server_test.go +++ b/node/grpc/server_test.go @@ -164,7 +164,7 @@ func newTestServerWithConfig(t *testing.T, mockValidator bool, config *node.Conf Config: config, Logger: logger, KeyPair: keyPair, - BlsSigner: signer, + BLSSigner: signer, Metrics: metrics, Store: store, ChainState: chainState, diff --git a/node/grpc/server_v2.go b/node/grpc/server_v2.go index fd877073a..e5a66abbb 100644 --- a/node/grpc/server_v2.go +++ b/node/grpc/server_v2.go @@ -115,7 +115,7 @@ func (s *ServerV2) StoreChunks(ctx context.Context, in *pb.StoreChunksRequest) ( return nil, api.NewErrorInternal("v2 store not initialized") } - if s.node.BlsSigner == nil { + if s.node.BLSSigner == nil { return nil, api.NewErrorInternal("missing bls signer") } @@ -179,7 +179,7 @@ func (s *ServerV2) StoreChunks(ctx context.Context, in *pb.StoreChunksRequest) ( return nil, api.NewErrorInternal(fmt.Sprintf("failed to store batch: %v", res.err)) } - sig, err := s.node.BlsSigner.Sign(ctx, batchHeaderHash[:]) + sig, err := s.node.BLSSigner.Sign(ctx, batchHeaderHash[:]) if err != nil { return nil, api.NewErrorInternal(fmt.Sprintf("failed to sign batch: %v", err)) } diff --git a/node/grpc/server_v2_test.go b/node/grpc/server_v2_test.go index 48aa77b3b..7e13d9703 100644 --- a/node/grpc/server_v2_test.go +++ b/node/grpc/server_v2_test.go @@ -85,7 +85,7 @@ func newTestComponents(t *testing.T, config *node.Config) *testComponents { Config: config, Logger: logger, KeyPair: keyPair, - BlsSigner: signer, + BLSSigner: signer, Metrics: metrics, StoreV2: s, ChainState: chainState, diff --git a/node/node.go b/node/node.go index 82af6c7fc..f00b956af 100644 --- a/node/node.go +++ b/node/node.go @@ -73,9 +73,8 @@ type Node struct { PubIPProvider pubip.Provider OperatorSocketsFilterer indexer.OperatorSocketsFilterer ChainID *big.Int - BLSPublicKeyHex string - BlsSigner blssigner.Signer + BLSSigner blssigner.Signer RelayClient atomic.Value @@ -129,7 +128,6 @@ func NewNode( if err != nil { return nil, fmt.Errorf("failed to create BLS signer: %w", err) } - blsPublicKeyHex := blsSigner.GetPublicKeyG1() operatorID, err := blsSigner.GetOperatorId() if err != nil { return nil, fmt.Errorf("failed to get operator ID: %w", err) @@ -204,8 +202,7 @@ func NewNode( PubIPProvider: pubIPProvider, OperatorSocketsFilterer: socketsFilterer, ChainID: chainID, - BlsSigner: blsSigner, - BLSPublicKeyHex: blsPublicKeyHex, + BLSSigner: blsSigner, } if !config.EnableV2 { @@ -305,7 +302,7 @@ func (n *Node) Start(ctx context.Context) error { Timeout: 10 * time.Second, PrivKey: privateKey, KeyPair: n.KeyPair, - Signer: n.BlsSigner, + Signer: n.BLSSigner, OperatorId: n.Config.ID, QuorumIDs: n.Config.QuorumIDList, RegisterNodeAtStart: n.Config.RegisterNodeAtStart, @@ -556,14 +553,14 @@ func (n *Node) ProcessBatch(ctx context.Context, header *core.BatchHeader, blobs } n.Metrics.RecordStoreChunksStage("signed", batchSize, time.Since(stageTimer)) - log.Debug("Sign batch succeeded", "pubkey", n.BLSPublicKeyHex, "duration", time.Since(stageTimer)) + log.Debug("Sign batch succeeded", "pubkey", n.BLSSigner.GetPublicKeyG1(), "duration", time.Since(stageTimer)) log.Debug("Exiting process batch", "duration", time.Since(start)) return signature, nil } func (n *Node) SignMessage(ctx context.Context, data [32]byte) (*core.Signature, error) { - signature, err := n.BlsSigner.Sign(ctx, data[:]) + signature, err := n.BLSSigner.Sign(ctx, data[:]) if err != nil { return nil, fmt.Errorf("failed to sign message: %w", err) } diff --git a/test/integration_test.go b/test/integration_test.go index 6a6cc0357..fa4d35cb5 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -410,7 +410,7 @@ func mustMakeOperators(t *testing.T, cst *coremock.ChainDataMock, logger logging Config: config, Logger: logger, KeyPair: op.KeyPair, - BlsSigner: op.Signer, + BLSSigner: op.Signer, Metrics: metrics, Store: store, ChainState: cst,