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

fix(group): Allow group total weight to be 0 #11682

Merged
merged 2 commits into from
Apr 19, 2022
Merged

Conversation

amaury1093
Copy link
Contributor

@amaury1093 amaury1093 commented Apr 19, 2022

Description

Closes: #11651

I did an audit of all places where we use the group's TotalWeight, and made sure it can be 0.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@codecov
Copy link

codecov bot commented Apr 19, 2022

Codecov Report

Merging #11682 (931835e) into master (c53157d) will decrease coverage by 0.02%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11682      +/-   ##
==========================================
- Coverage   65.84%   65.81%   -0.03%     
==========================================
  Files         667      667              
  Lines       70374    70374              
==========================================
- Hits        46335    46319      -16     
- Misses      21349    21365      +16     
  Partials     2690     2690              
Impacted Files Coverage Δ
x/group/keeper/msg_server.go 68.35% <66.66%> (ø)
x/group/keeper/invariants.go 53.62% <100.00%> (ø)
x/distribution/simulation/operations.go 80.54% <0.00%> (-9.73%) ⬇️
x/group/keeper/keeper.go 53.78% <0.00%> (+0.42%) ⬆️
crypto/keys/internal/ecdsa/privkey.go 84.21% <0.00%> (+1.75%) ⬆️

@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Apr 19, 2022
@mergify mergify bot merged commit c634dbf into master Apr 19, 2022
@mergify mergify bot deleted the am/11651-fix-groups-sims branch April 19, 2022 10:33
@alexanderbez
Copy link
Contributor

woaa, thanks so much for fixing this @AmauryM 🙌

@alexanderbez
Copy link
Contributor

@Mergifyio backport release/v0.46.x

mergify bot pushed a commit that referenced this pull request Apr 19, 2022
## Description

Closes: #11651

I did an audit of all places where we use the group's `TotalWeight`, and made sure it can be 0.

---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

(cherry picked from commit c634dbf)
@mergify
Copy link
Contributor

mergify bot commented Apr 19, 2022

backport release/v0.46.x

✅ Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:x/group
Projects
None yet
Development

Successfully merging this pull request may close these issues.

x/group: invalid simulation parameter generated
4 participants