Skip to content

Commit

Permalink
Merge branch 'stage' into override-spec-beacon-config
Browse files Browse the repository at this point in the history
# Conflicts:
#	protocol/v2/ssv/validator/non_committee_validator.go
  • Loading branch information
nkryuchkov committed Jan 23, 2025
2 parents 01e255a + 791919d commit a9d701e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion operator/validator/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ func (c *controller) handleWorkerMessages(msg network.DecodedSSVMessage) error {
DomainCache: c.domainCache,
}
ncv = &committeeObserver{
CommitteeObserver: validator.NewCommitteeObserver(committeeObserverOptions),
CommitteeObserver: validator.NewCommitteeObserver(ssvMsg.GetID(), committeeObserverOptions),
}
ttlSlots := nonCommitteeValidatorTTLs[ssvMsg.MsgID.GetRoleType()]
c.committeesObservers.Set(
Expand Down
7 changes: 4 additions & 3 deletions protocol/v2/ssv/validator/non_committee_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import (
)

type CommitteeObserver struct {
msgID spectypes.MessageID
logger *zap.Logger
Storage *storage.ParticipantStores
beaconConfig networkconfig.Beacon
qbftController *qbftcontroller.Controller
ValidatorStore registrystorage.ValidatorStore
newDecidedHandler qbftcontroller.NewDecidedHandler
attesterRoots *ttlcache.Cache[phase0.Root, struct{}]
Expand All @@ -54,10 +54,11 @@ type CommitteeObserverOptions struct {
DomainCache *DomainCache
}

func NewCommitteeObserver(opts CommitteeObserverOptions) *CommitteeObserver {
func NewCommitteeObserver(msgID spectypes.MessageID, opts CommitteeObserverOptions) *CommitteeObserver {
// TODO: does the specific operator matters?

return &CommitteeObserver{
msgID: msgID,
logger: opts.Logger,
Storage: opts.Storage,
beaconConfig: opts.NetworkConfig.Beacon,
Expand Down Expand Up @@ -124,7 +125,7 @@ func (ncv *CommitteeObserver) ProcessMessage(msg *queue.SSVMessage) error {
fields.Validator(validator.ValidatorPubKey[:]),
zap.String("signers", strings.Join(operatorIDs, ", ")),
fields.BlockRoot(key.Root),
zap.String("qbft_ctrl_identifier", hex.EncodeToString(ncv.qbftController.Identifier)),
zap.String("qbft_ctrl_identifier", hex.EncodeToString(ncv.msgID[:])),
)
}

Expand Down

0 comments on commit a9d701e

Please sign in to comment.