Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

fix approval-checking GRANDPA voting rule #3133

Merged
merged 2 commits into from
May 31, 2021
Merged

Conversation

rphmeier
Copy link
Contributor

a None return value implies to vote on the best, not to vote on the base.

this explicitly changes the logic to vote on the base

NOTE: DO NOT RELEASE UNTIL THOROUGHLY TESTED ON ROCOCO

a `None` return value implies to vote on the best, not to vote on the base.

this explicitly changes the logic to vote on the base
@rphmeier rphmeier added the C3-medium PR touches the given topic and has a medium impact on builders. label May 28, 2021
@github-actions github-actions bot added the A0-please_review Pull request needs code review. label May 28, 2021
@rphmeier rphmeier added B1-releasenotes D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels May 28, 2021
Copy link
Member

@ordian ordian left a comment

Choose a reason for hiding this comment

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

Seems to do what the comment says now, but it would be good to extract this logic into a function and add a test for future-proofing. Also seems a bit weird that we now always return Some.

@rphmeier
Copy link
Contributor Author

Also seems a bit weird that we now always return Some.

I agree, but that is IMO a GRANDPA API issue - the approval-checking voting rule is really opinionated, so we have to be explicit in informing the caller of what we want to vote on.

@rphmeier rphmeier merged commit b2bbffb into master May 31, 2021
@rphmeier rphmeier deleted the rh-correct-grandpa-voting branch May 31, 2021 15:45
@andresilva
Copy link
Contributor

We could return None when ParachainVotingRuleTarget::Current so that the voting rule doesn't filter anything. Looks good to me as is though.

@rphmeier rphmeier mentioned this pull request Jun 3, 2021
11 tasks
@stze stze added D1-audited 👍 PR contains changes to critical logic that has been properly reviewed and externally audited. and removed D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels Sep 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. C3-medium PR touches the given topic and has a medium impact on builders. D1-audited 👍 PR contains changes to critical logic that has been properly reviewed and externally audited.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants