From a0c54fd932323a3477189e5962695e711dc31127 Mon Sep 17 00:00:00 2001 From: Nikita Kryuchkov Date: Fri, 11 Mar 2022 17:26:04 +0300 Subject: [PATCH 1/3] ibft/instance: remove duplicated `node_id` and `pubKey` log fields --- ibft/instance/instance.go | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/ibft/instance/instance.go b/ibft/instance/instance.go index 2f89fc00eb..0ced23d908 100644 --- a/ibft/instance/instance.go +++ b/ibft/instance/instance.go @@ -3,35 +3,34 @@ package ibft import ( "context" "encoding/hex" - "github.com/bloxapp/ssv/beacon" - "github.com/bloxapp/ssv/ibft" - "github.com/bloxapp/ssv/ibft/instance/eventqueue" - "github.com/bloxapp/ssv/ibft/instance/forks" - "github.com/bloxapp/ssv/ibft/instance/roundtimer" - "github.com/bloxapp/ssv/ibft/valcheck" - "github.com/bloxapp/ssv/utils/format" - "github.com/bloxapp/ssv/utils/threadsafe" - "github.com/bloxapp/ssv/validator/storage" - "github.com/pkg/errors" "sync" "time" - "github.com/bloxapp/ssv/ibft/leader" - + "github.com/pkg/errors" "go.uber.org/zap" + "github.com/bloxapp/ssv/beacon" + "github.com/bloxapp/ssv/ibft" + "github.com/bloxapp/ssv/ibft/instance/eventqueue" + "github.com/bloxapp/ssv/ibft/instance/forks" "github.com/bloxapp/ssv/ibft/instance/msgcont" msgcontinmem "github.com/bloxapp/ssv/ibft/instance/msgcont/inmem" + "github.com/bloxapp/ssv/ibft/instance/roundtimer" + "github.com/bloxapp/ssv/ibft/leader" "github.com/bloxapp/ssv/ibft/proto" + "github.com/bloxapp/ssv/ibft/valcheck" "github.com/bloxapp/ssv/network" "github.com/bloxapp/ssv/network/msgqueue" + "github.com/bloxapp/ssv/utils/format" + "github.com/bloxapp/ssv/utils/threadsafe" + "github.com/bloxapp/ssv/validator/storage" ) // InstanceOptions defines option attributes for the Instance type InstanceOptions struct { Logger *zap.Logger ValidatorShare *storage.Share - //Me *proto.Node + // Me *proto.Node Network network.Network Queue *msgqueue.MessageQueue ValueCheck valcheck.ValueCheck @@ -101,9 +100,7 @@ func NewInstanceWithState(state *proto.State) ibft.Instance { func NewInstance(opts *InstanceOptions) ibft.Instance { pk, role := format.IdentifierUnformat(string(opts.Lambda)) metricsIBFTStage.WithLabelValues(role, pk).Set(float64(proto.RoundState_NotStarted)) - logger := opts.Logger.With(zap.Uint64("node_id", opts.ValidatorShare.NodeID), - zap.Uint64("seq_num", opts.SeqNumber), - zap.String("pubKey", opts.ValidatorShare.PublicKey.SerializeToHexStr())) + logger := opts.Logger.With(zap.Uint64("seq_num", opts.SeqNumber)) ret := &Instance{ ValidatorShare: opts.ValidatorShare, state: &proto.State{ From a8ca1ab4f64f58ebe5f3302929453c30231e8d41 Mon Sep 17 00:00:00 2001 From: Nikita Kryuchkov Date: Mon, 14 Mar 2022 10:54:42 +0300 Subject: [PATCH 2/3] Change branch in .gitlab-ci.yml --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3daf9745b..c833fd16c5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,7 @@ Build stage Docker image: - docker tag $IMAGE_NAME:$CI_BUILD_REF $DOCKER_REPO_INFRA_STAGE:$CI_BUILD_REF - $DOCKER_LOGIN_TO_INFRA_STAGE_REPO && docker push $DOCKER_REPO_INFRA_STAGE:$CI_BUILD_REF only: - - stage + - fix/remove-duplicated-nodeid-and-pubkey-logs Deploy ssv exporter to blox-infra-stage cluster: stage: deploy @@ -68,7 +68,7 @@ Deploy ssv nodes to blox-infra-stage cluster: - .k8/scripts/deploy-ssv-nodes-yamls-on-stage-k8s.sh $DOCKER_REPO_INFRA_STAGE $CI_BUILD_REF ssv $APP_REPLICAS_INFRA_STAGE blox-infra-stage kubernetes-admin@blox-infra stage.ssv.network $K8S_API_VERSION $STAGE_HEALTH_CHECK_IMAGE $SSV_NODES_CPU_LIMIT $SSV_NODES_MEM_LIMIT - .k8/scripts/deploy-ssv-node-v1-yamls-on-stage-k8s.sh $DOCKER_REPO_INFRA_STAGE $CI_BUILD_REF ssv $APP_REPLICAS_INFRA_STAGE blox-infra-stage kubernetes-admin@blox-infra stage.ssv.network $K8S_API_VERSION $STAGE_HEALTH_CHECK_IMAGE $SSV_NODES_CPU_LIMIT_V1 $SSV_NODES_MEM_LIMIT_V1 only: - - stage + - fix/remove-duplicated-nodeid-and-pubkey-logs #blox-infra-prod From c94187e52e19850e009354c44d9d2b8cf9e38ce1 Mon Sep 17 00:00:00 2001 From: Nikita Kryuchkov Date: Mon, 14 Mar 2022 11:11:44 +0300 Subject: [PATCH 3/3] Revert "Change branch in .gitlab-ci.yml" This reverts commit a8ca1ab4f64f58ebe5f3302929453c30231e8d41. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c833fd16c5..f3daf9745b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,7 +33,7 @@ Build stage Docker image: - docker tag $IMAGE_NAME:$CI_BUILD_REF $DOCKER_REPO_INFRA_STAGE:$CI_BUILD_REF - $DOCKER_LOGIN_TO_INFRA_STAGE_REPO && docker push $DOCKER_REPO_INFRA_STAGE:$CI_BUILD_REF only: - - fix/remove-duplicated-nodeid-and-pubkey-logs + - stage Deploy ssv exporter to blox-infra-stage cluster: stage: deploy @@ -68,7 +68,7 @@ Deploy ssv nodes to blox-infra-stage cluster: - .k8/scripts/deploy-ssv-nodes-yamls-on-stage-k8s.sh $DOCKER_REPO_INFRA_STAGE $CI_BUILD_REF ssv $APP_REPLICAS_INFRA_STAGE blox-infra-stage kubernetes-admin@blox-infra stage.ssv.network $K8S_API_VERSION $STAGE_HEALTH_CHECK_IMAGE $SSV_NODES_CPU_LIMIT $SSV_NODES_MEM_LIMIT - .k8/scripts/deploy-ssv-node-v1-yamls-on-stage-k8s.sh $DOCKER_REPO_INFRA_STAGE $CI_BUILD_REF ssv $APP_REPLICAS_INFRA_STAGE blox-infra-stage kubernetes-admin@blox-infra stage.ssv.network $K8S_API_VERSION $STAGE_HEALTH_CHECK_IMAGE $SSV_NODES_CPU_LIMIT_V1 $SSV_NODES_MEM_LIMIT_V1 only: - - fix/remove-duplicated-nodeid-and-pubkey-logs + - stage #blox-infra-prod