diff --git a/beacon-chain/sync/metrics.go b/beacon-chain/sync/metrics.go index 999339481..07502117a 100644 --- a/beacon-chain/sync/metrics.go +++ b/beacon-chain/sync/metrics.go @@ -150,6 +150,10 @@ var ( Help: "Time to verify gossiped blob sidecars", }, ) + pendingAttCount = promauto.NewCounter(prometheus.CounterOpts{ + Name: "gossip_pending_attestations_total", + Help: "increased when receiving a new pending attestation", + }) // Sync committee verification performance. syncMessagesForUnknownBlocks = promauto.NewCounter( diff --git a/beacon-chain/sync/pending_attestations_queue.go b/beacon-chain/sync/pending_attestations_queue.go index 66d705db6..cb936a933 100644 --- a/beacon-chain/sync/pending_attestations_queue.go +++ b/beacon-chain/sync/pending_attestations_queue.go @@ -177,6 +177,7 @@ func (s *Service) savePendingAtt(att *ethpb.SignedAggregateAttestationAndProof) _, ok := s.blkRootToPendingAtts[root] if !ok { + pendingAttCount.Inc() s.blkRootToPendingAtts[root] = []*ethpb.SignedAggregateAttestationAndProof{att} return } @@ -187,6 +188,7 @@ func (s *Service) savePendingAtt(att *ethpb.SignedAggregateAttestationAndProof) return } } + pendingAttCount.Inc() s.blkRootToPendingAtts[root] = append(s.blkRootToPendingAtts[root], att) }