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

R4R: Add slashing to governance for non-voting validators #1859

Merged
merged 2 commits into from
Jul 30, 2018

Conversation

sunnya97
Copy link
Member

@sunnya97 sunnya97 commented Jul 28, 2018

closes #1854

  • Linked to github-issue with discussion and accepted design
  • Updated all relevant documentation (docs/)
  • Updated all relevant code comments
  • Wrote tests
  • Added entries in PENDING.md that include links to the relevant issue or PR that most accurately describes the change.
  • Updated cmd/gaia and examples/

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@sunnya97 sunnya97 changed the title WIP: Add slashing to governance for non-voting validators R4R: Add slashing to governance for non-voting validators Jul 28, 2018
@codecov
Copy link

codecov bot commented Jul 28, 2018

Codecov Report

Merging #1859 into develop will increase coverage by 0.31%.
The diff coverage is 90.9%.

@@             Coverage Diff             @@
##           develop    #1859      +/-   ##
===========================================
+ Coverage     63.5%   63.81%   +0.31%     
===========================================
  Files          118      118              
  Lines         7006     7014       +8     
===========================================
+ Hits          4449     4476      +27     
+ Misses        2301     2284      -17     
+ Partials       256      254       -2

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

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

utACK (double-check comment though)

x/gov/handler.go Outdated
@@ -137,11 +138,16 @@ func EndBlocker(ctx sdk.Context, keeper Keeper) (resTags sdk.Tags, nonVotingVals
}
keeper.SetProposal(ctx, activeProposal)

for _, valAddr := range nonVotingVals {
val := keeper.ds.GetValidatorSet().Validator(ctx, valAddr)
keeper.ds.GetValidatorSet().Slash(ctx, val.GetPubKey(), ctx.BlockHeight(), val.GetPower().RoundInt64(), keeper.GetTallyingProcedure(ctx).GovernancePenalty)
Copy link
Contributor

Choose a reason for hiding this comment

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

This will slash delegators too - intentional presumably?

@rigelrozanski rigelrozanski merged commit 7fc2ed6 into develop Jul 30, 2018
@rigelrozanski rigelrozanski deleted the sunny/gov_slashing branch July 30, 2018 05:11
@rigelrozanski
Copy link
Contributor

Thanks, - tests looked good

chillyvee pushed a commit to chillyvee/cosmos-sdk that referenced this pull request Mar 1, 2024
* chore: update changelog

* chore: update links
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.

Connect Governance to Slashing
3 participants