Skip to content

Commit

Permalink
add slot to log
Browse files Browse the repository at this point in the history
  • Loading branch information
nkryuchkov committed Oct 30, 2024
1 parent 6e80096 commit f468409
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions protocol/v2/ssv/validator/non_committee_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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))),

Check failure on line 393 in protocol/v2/ssv/validator/non_committee_validator.go

View workflow job for this annotation

GitHub Actions / lint

G115: integer overflow conversion uint64 -> int (gosec)
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
Expand All @@ -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
Expand Down

0 comments on commit f468409

Please sign in to comment.