Skip to content

Commit

Permalink
improved validator registration logging
Browse files Browse the repository at this point in the history
  • Loading branch information
aratz-lasa committed Sep 15, 2022
1 parent 0506e52 commit bdc6742
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ func (rs *DefaultRelay) processValidator(ctx context.Context, payload []types.Si
rs.Log().WithError(err).Debug("Error in PutRegistration")
return err
}

logger.WithField("pubkey", pk).Trace("validator registered")
}

logger.With(log.F{
Expand Down
9 changes: 9 additions & 0 deletions pkg/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ package relay

import (
"context"
"errors"
"fmt"
"sync"
"sync/atomic"
"time"

"github.com/flashbots/go-boost-utils/types"
ds "github.com/ipfs/go-datastore"
badger "github.com/ipfs/go-ds-badger2"
"github.com/lthibault/log"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -278,6 +280,12 @@ func (s *DefaultService) updateProposerDuties(ctx context.Context, client Beacon
Slot: e.Slot,
Entry: &reg,
})
} else if errors.Is(err, ds.ErrNotFound) {
l.With(log.F{
"method": "UpdateProposerDuties",
"slot": e.Slot}).
With(e.PubKey).
Debug("validator not registered")
}
}

Expand All @@ -287,6 +295,7 @@ func (s *DefaultService) updateProposerDuties(ctx context.Context, client Beacon
"epochFrom": epoch,
"epochTo": epoch + 1,
"processingTimeMs": time.Since(timeStart).Milliseconds(),
"receivedDuties": len(current.Data),
}).With(state.proposerDutiesResponse).Debug("proposer duties updated")

return nil
Expand Down

0 comments on commit bdc6742

Please sign in to comment.