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

More verbose output on init-sync #7578

Merged
merged 10 commits into from
Oct 20, 2020
7 changes: 7 additions & 0 deletions beacon-chain/sync/initial-sync/blocks_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,13 @@ func (q *blocksQueue) loop() {
q.cancel()
}

log.WithFields(logrus.Fields{
"highestExpectedSlot": q.highestExpectedSlot,
"noRequiredPeersErrRetries": q.exitConditions.noRequiredPeersErrRetries,
"headSlot": q.headFetcher.HeadSlot(),
"state": q.smm,
}).Debug("tick")
farazdagi marked this conversation as resolved.
Show resolved Hide resolved

select {
case <-ticker.C:
for _, key := range q.smm.keys {
Expand Down
10 changes: 6 additions & 4 deletions beacon-chain/sync/initial-sync/round_robin.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (s *Service) roundRobinSync(genesis time.Time) error {
log.WithFields(logrus.Fields{
"syncedSlot": s.chain.HeadSlot(),
"headSlot": helpers.SlotsSince(genesis),
}).Debug("Synced to finalized epoch - now syncing blocks up to current head")
}).Info("Synced to finalized epoch - now syncing blocks up to current head")
if err := queue.stop(); err != nil {
log.WithError(err).Debug("Error stopping queue")
}
Expand Down Expand Up @@ -97,7 +97,7 @@ func (s *Service) roundRobinSync(genesis time.Time) error {
log.WithFields(logrus.Fields{
"syncedSlot": s.chain.HeadSlot(),
"headSlot": helpers.SlotsSince(genesis),
}).Debug("Synced to head of chain")
}).Info("Synced to head of chain")
if err := queue.stop(); err != nil {
log.WithError(err).Debug("Error stopping queue")
}
Expand All @@ -112,7 +112,7 @@ func (s *Service) processFetchedData(

// Use Batch Block Verify to process and verify batches directly.
if err := s.processBatchedBlocks(ctx, genesis, data.blocks, s.chain.ReceiveBlockBatch); err != nil {
log.WithError(err).Debug("Batch is not processed")
log.WithError(err).Warn("Batch is not processed")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you remove WithError it prints the whole stack trace which can get very noisy. We just want to print the main error

}
}

Expand All @@ -124,7 +124,9 @@ func (s *Service) processFetchedDataRegSync(
blockReceiver := s.chain.ReceiveBlock
for _, blk := range data.blocks {
if err := s.processBlock(ctx, genesis, blk, blockReceiver); err != nil {
log.WithError(err).Debug("Block is not processed")
log.WithError(err).WithFields(logrus.Fields{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here lets remove WithError

"slot": blk.Block.Slot,
}).Warn("Block is not processed")
continue
}
}
Expand Down