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

core/tracker: skip participation reporting #1236

Merged
merged 2 commits into from
Oct 7, 2022
Merged

Conversation

dB2510
Copy link
Contributor

@dB2510 dB2510 commented Oct 7, 2022

Skip participation reporting if no peers participated and duty is not failed (like DutyAggregator)

category: misc
ticket: #1213

@dB2510 dB2510 linked an issue Oct 7, 2022 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Oct 7, 2022

Codecov Report

Base: 53.60% // Head: 53.58% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (2c67051) compared to base (fdbb43f).
Patch coverage: 28.57% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1236      +/-   ##
==========================================
- Coverage   53.60%   53.58%   -0.03%     
==========================================
  Files         139      139              
  Lines       16143    16147       +4     
==========================================
- Hits         8654     8652       -2     
- Misses       6243     6249       +6     
  Partials     1246     1246              
Impacted Files Coverage Δ
core/tracker/tracker.go 70.14% <28.57%> (-1.83%) ⬇️
core/qbft/qbft.go 81.54% <0.00%> (-0.43%) ⬇️
app/vmock.go 71.89% <0.00%> (ø)
core/scheduler/scheduler.go 73.67% <0.00%> (+0.53%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@corverroos
Copy link
Contributor

Didn't we discuss including failed in the participation reporter?

diff --git a/core/tracker/tracker.go b/core/tracker/tracker.go
index 4064899..b5714e7 100644
--- a/core/tracker/tracker.go
+++ b/core/tracker/tracker.go
@@ -410,7 +410,7 @@ func newParticipationReporter(peers []p2p.Peer) func(context.Context, core.Duty,
        // prevAbsent is the set of peers who didn't participate in the last duty per type.
        prevAbsent := make(map[core.DutyType][]string)

-       return func(ctx context.Context, duty core.Duty, participatedShares map[int]bool, unexpectedShares map[int]bool) {
+       return func(ctx context.Context, duty core.Duty, failed bool, participatedShares map[int]bool, unexpectedShares map[int]bool) {
                var absentPeers []string
                for _, peer := range peers {
                        if participatedShares[peer.ShareIdx()] {
@@ -419,7 +419,7 @@ func newParticipationReporter(peers []p2p.Peer) func(context.Context, core.Duty,
                        } else if unexpectedShares[peer.ShareIdx()] {
                                log.Warn(ctx, "Unexpected event found", nil, z.Str("peer", peer.Name), z.Str("duty", duty.String()))
                                unexpectedEventsCounter.WithLabelValues(peer.Name).Inc()
-                       } else {
+                       } else if failed {
                                absentPeers = append(absentPeers, peer.Name)
                                participationGauge.WithLabelValues(duty.Type.String(), peer.Name).Set(0)
                        }

@dB2510 dB2510 changed the title core/tracker: skip negative participation reporting core/tracker: skip participation reporting Oct 7, 2022
@dB2510 dB2510 added the merge when ready Indicates bulldozer bot may merge when all checks pass label Oct 7, 2022
@obol-bulldozer obol-bulldozer bot merged commit 36b7750 into main Oct 7, 2022
@obol-bulldozer obol-bulldozer bot deleted the dhruv/skiptrack branch October 7, 2022 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle DutyAggregator participation in tracker
2 participants