Skip to content
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

ibft/instance: remove duplicated node_id and pubKey log fields #547

Merged
merged 3 commits into from
Mar 14, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 13 additions & 16 deletions ibft/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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{
Expand Down