From f468409ff65d41cbc56fbd5db0e4d7e32a44f42d Mon Sep 17 00:00:00 2001 From: Nikita Kryuchkov Date: Wed, 30 Oct 2024 15:54:12 -0300 Subject: [PATCH] add slot to log --- protocol/v2/ssv/validator/non_committee_validator.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/protocol/v2/ssv/validator/non_committee_validator.go b/protocol/v2/ssv/validator/non_committee_validator.go index 3a1b8e95b1..42a14542d3 100644 --- a/protocol/v2/ssv/validator/non_committee_validator.go +++ b/protocol/v2/ssv/validator/non_committee_validator.go @@ -362,7 +362,7 @@ func (ncv *CommitteeObserver) OnProposalMsg(msg *queue.SSVMessage) error { return err } - if err := ncv.saveSyncCommRoots(epoch, beaconVote); err != nil { + if err := ncv.saveSyncCommRoots(epoch, beaconVote, qbftMsg); err != nil { return err } @@ -391,13 +391,14 @@ func (ncv *CommitteeObserver) saveAttesterRoots(epoch phase0.Epoch, beaconVote * zap.String("qbft_ctrl_identifier", hex.EncodeToString(ncv.qbftController.Identifier)), zap.String("attester_root", hex.EncodeToString(attesterRoot[:])), zap.String("committee_index", strconv.Itoa(int(committeeIndex))), + fields.Slot(phase0.Slot(qbftMsg.Height)), ) } return nil } -func (ncv *CommitteeObserver) saveSyncCommRoots(epoch phase0.Epoch, beaconVote *spectypes.BeaconVote) error { +func (ncv *CommitteeObserver) saveSyncCommRoots(epoch phase0.Epoch, beaconVote *spectypes.BeaconVote, qbftMsg *specqbft.Message) error { syncCommDomain, err := ncv.domainCache.Get(epoch, spectypes.DomainSyncCommittee) if err != nil { return err @@ -413,7 +414,8 @@ func (ncv *CommitteeObserver) saveSyncCommRoots(epoch phase0.Epoch, beaconVote * ncv.logger.Debug("✅ On proposal msg: saveSyncCommRoots", zap.String("qbft_ctrl_identifier", hex.EncodeToString(ncv.qbftController.Identifier)), - zap.String("attester_root", hex.EncodeToString(syncCommitteeRoot[:])), + zap.String("sync_comm_root", hex.EncodeToString(syncCommitteeRoot[:])), + fields.Slot(phase0.Slot(qbftMsg.Height)), ) return nil