diff --git a/beacon-chain/blockchain/receive_attestation.go b/beacon-chain/blockchain/receive_attestation.go index b6b2bc898..606549b60 100644 --- a/beacon-chain/blockchain/receive_attestation.go +++ b/beacon-chain/blockchain/receive_attestation.go @@ -86,6 +86,11 @@ func (s *Service) spawnProcessAttestationsRoutine() { } log.Warn("Genesis time received, now available to process attestations") } + // Wait for node to be synced before running the routine. + if err := s.waitForSync(); err != nil { + log.WithError(err).Error("Could not wait to sync") + return + } st := slots.NewSlotTicker(s.genesisTime, params.BeaconConfig().SecondsPerSlot) pat := slots.NewSlotTickerWithOffset(s.genesisTime, -reorgLateBlockCountAttestations, params.BeaconConfig().SecondsPerSlot) diff --git a/beacon-chain/sync/rpc_beacon_blocks_by_range.go b/beacon-chain/sync/rpc_beacon_blocks_by_range.go index 281c6d773..e5a8f07d3 100644 --- a/beacon-chain/sync/rpc_beacon_blocks_by_range.go +++ b/beacon-chain/sync/rpc_beacon_blocks_by_range.go @@ -75,7 +75,7 @@ func (s *Service) beaconBlocksByRangeRPCHandler(ctx context.Context, msg interfa rpcBlocksByRangeResponseLatency.Observe(float64(time.Since(batchStart).Milliseconds())) } if err := batch.error(); err != nil { - log.WithError(err).Info("error in BlocksByRange batch") + log.WithError(err).Debug("error in BlocksByRange batch") s.writeErrorResponseToStream(responseCodeServerError, p2ptypes.ErrGeneric.Error(), stream) tracing.AnnotateError(span, err) return err