diff --git a/beacon-chain/sync/pending_attestations_queue.go b/beacon-chain/sync/pending_attestations_queue.go index ccc4c495da4d..8123ac72cbf3 100644 --- a/beacon-chain/sync/pending_attestations_queue.go +++ b/beacon-chain/sync/pending_attestations_queue.go @@ -79,13 +79,6 @@ func (s *Service) processPendingAtts(ctx context.Context) error { seen := s.seenPendingBlocks[bRoot] s.pendingQueueLock.RUnlock() if !seen { - // Pending attestation's missing block has not arrived yet. - log.WithFields(logrus.Fields{ - "currentSlot": s.cfg.clock.CurrentSlot(), - "attSlot": attestations[0].Message.Aggregate.Data.Slot, - "attCount": len(attestations), - "blockRoot": hex.EncodeToString(bytesutil.Trunc(bRoot[:])), - }).Debug("Requesting block for pending attestation") pendingRoots = append(pendingRoots, bRoot) } } diff --git a/beacon-chain/sync/pending_attestations_queue_test.go b/beacon-chain/sync/pending_attestations_queue_test.go index 31fdabacecc9..b7d47c373186 100644 --- a/beacon-chain/sync/pending_attestations_queue_test.go +++ b/beacon-chain/sync/pending_attestations_queue_test.go @@ -53,7 +53,7 @@ func TestProcessPendingAtts_NoBlockRequestBlock(t *testing.T) { a := ðpb.AggregateAttestationAndProof{Aggregate: ðpb.Attestation{Data: ðpb.AttestationData{Target: ðpb.Checkpoint{Root: make([]byte, 32)}}}} r.blkRootToPendingAtts[[32]byte{'A'}] = []*ethpb.SignedAggregateAttestationAndProof{{Message: a}} require.NoError(t, r.processPendingAtts(context.Background())) - require.LogsContain(t, hook, "Requesting block for pending attestation") + require.LogsContain(t, hook, "Requesting block by root") } func TestProcessPendingAtts_HasBlockSaveUnAggregatedAtt(t *testing.T) { diff --git a/beacon-chain/sync/pending_blocks_queue.go b/beacon-chain/sync/pending_blocks_queue.go index 428adf09a1e8..ae4af537b1cc 100644 --- a/beacon-chain/sync/pending_blocks_queue.go +++ b/beacon-chain/sync/pending_blocks_queue.go @@ -126,7 +126,6 @@ func (s *Service) processPendingBlocks(ctx context.Context) error { // Request parent block if not in the pending queue and not in the database. isParentBlockInDB := s.cfg.beaconDB.HasBlock(ctx, parentRoot) if !inPendingQueue && !isParentBlockInDB && s.hasPeer() { - log.WithFields(logrus.Fields{"currentSlot": b.Block().Slot(), "parentRoot": hex.EncodeToString(parentRoot[:])}).Debug("Requesting parent block") parentRoots = append(parentRoots, parentRoot) continue } @@ -283,6 +282,8 @@ func (s *Service) sendBatchRootRequest(ctx context.Context, roots [][32]byte, ra r := roots[i] if s.seenPendingBlocks[r] || s.cfg.chain.BlockBeingSynced(r) { roots = append(roots[:i], roots[i+1:]...) + } else { + log.WithField("blockRoot", fmt.Sprintf("%#x", r)).Debug("Requesting block by root") } } s.pendingQueueLock.RUnlock()