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

agreement: log current player state for VoteBroadcast and ProposalBroadcast events #6007

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

algorandskiy
Copy link
Contributor

Summary

While debugging some delayed consensus on network startup I noticed VoteBroadcast and ProposalBroadcast do not log player state like other events ({Vote|Proposal}Accepted, VoteAttest, ProposalAccepted etc do).
This PR adds player's Round, Period, Step logging for these events.

Test Plan

Local run

Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.91%. Comparing base (6c91f52) to head (cf7e2ac).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6007      +/-   ##
==========================================
- Coverage   55.94%   55.91%   -0.04%     
==========================================
  Files         482      482              
  Lines       68310    68315       +5     
==========================================
- Hits        38219    38201      -18     
- Misses      27500    27513      +13     
- Partials     2591     2601      +10     

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

@algorandskiy algorandskiy merged commit abf4c8d into algorand:master Jun 7, 2024
19 checks passed
@@ -422,6 +422,9 @@ func (t pseudonodeVotesTask) execute(verifier *AsyncVoteVerifier, quit chan stru
Type: logspec.VoteBroadcast,
Sender: vote.R.Sender.String(),
Hash: vote.R.Proposal.BlockDigest.String(),
Round: uint64(t.round),
Period: uint64(t.period),
Step: uint64(t.step),
Copy link
Contributor

@cce cce Jun 7, 2024

Choose a reason for hiding this comment

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

I think t.round, t.period, and t.step are the same as vote.R.Round, vote.R.Period, and vote.R.Step here. the t is the task of making these votes, and a few lines above task.execute() calls t.node.makeVotes(t.round, t.period, t.step, t.prop, t.participation) to make these votes, leading to the vote.R.Round, etc being assigned..

if you want to get the player's own current step, that does not look to be accessible from inside pseudonodeVotesTask.execute. This task is made whenever you see lines in player making this action pseudonodeAction{T: attest, Round: p.Round, Period: p.Period, Step: cert, Proposal: e.Proposal} but the step for the vote to be made is not always the same as the current value of player.step.

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

Successfully merging this pull request may close these issues.

None yet

4 participants