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

incentives: handle round 0 "top voters" lookups for easier testing #6159

Merged

Conversation

cce
Copy link
Contributor

@cce cce commented Oct 31, 2024

Summary

Addresses feedback for PR #6085 to make E2E and unit tests easier to use when testing incentives & heartbeats — don't wait until the first time the state proof voters tracker starts calculating & caching the "Top N voters" information (at 256-16=240 rounds). This adds special case handling for round 0 when calling GetKnockOfflineCandidates to fetch that data from the genesis accounts.

Test Plan

Will untangle a couple of tests for this change from other, bigger WIP test changes I described in #6085 (comment)

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.28%. Comparing base (28338ff) to head (6dcef01).
Report is 1 commits behind head on feature/heartbeats.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           feature/heartbeats    #6159      +/-   ##
======================================================
- Coverage               56.29%   56.28%   -0.02%     
======================================================
  Files                     494      494              
  Lines                   70032    70038       +6     
======================================================
- Hits                    39424    39420       -4     
- Misses                  27928    27937       +9     
- Partials                 2680     2681       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cce cce marked this pull request as ready for review November 5, 2024 14:29
@cce cce requested a review from jannotti November 5, 2024 14:30
@cce cce merged commit 8de2829 into algorand:feature/heartbeats Nov 5, 2024
17 checks passed
@@ -652,6 +652,18 @@ func (l *Ledger) GetKnockOfflineCandidates(rnd basics.Round, proto config.Consen
if proto.StateProofInterval == 0 {
return nil, nil
}

// special handling for rounds 0-240: return participating genesis accounts
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants