GOV: add VoteWeighted
Closes: #432
Description
For contributor use:
- [ ] Targeted PR against correct branch (see CONTRIBUTING.md)
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the module structure standards.
- [ ] Wrote unit and integration tests
- [ ] Updated relevant documentation (
docs/) or specification (x/<module>/spec/) - [ ] Added relevant
godoccomments. - [ ] Added a relevant changelog entry to the
Unreleasedsection inCHANGELOG.md - [ ] Re-reviewed
Files changedin the Github PR explorer
For admin use:
- [ ] Added appropriate labels to PR (ex.
WIP,R4R,docs, etc) - [ ] Reviewers assigned
- [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]"
Codecov Report
Merging #500 (b600f97) into master (cb63bff) will decrease coverage by
0.55%. The diff coverage is59.37%.
Additional details and impacted files
@@ Coverage Diff @@
## master #500 +/- ##
==========================================
- Coverage 41.39% 40.83% -0.56%
==========================================
Files 124 127 +3
Lines 11495 11825 +330
==========================================
+ Hits 4758 4829 +71
- Misses 6276 6528 +252
- Partials 461 468 +7
| Impacted Files | Coverage Δ | |
|---|---|---|
| x/gov/handler.go | 42.85% <0.00%> (ø) |
|
| x/gov/keeper/tally.go | 39.39% <0.00%> (-1.45%) |
:arrow_down: |
| x/gov/module.go | 0.00% <0.00%> (ø) |
|
| x/gov/keeper/msg_server.go | 34.83% <100.00%> (+33.57%) |
:arrow_up: |
| x/gov/endblocker.go | 0.00% <0.00%> (ø) |
|
| x/gov/genesis.go | 0.00% <0.00%> (ø) |
|
| x/gov/keeper/proposal.go | 42.28% <0.00%> (+1.14%) |
:arrow_up: |
just a bit curious why there is no checker to make sure the sum of all the weigh is equivalent to 1 in a single WeightedVote. It seems there is no such checker in cosmos sdk either.
Shall we consider WeighedVote cast by certifiers in CertifierVotingPeriod?
To be specific, it looks like the current implementation as in [email protected] doesn't actually take multiple options except the first one.
Shall we consider WeighedVote cast by certifiers in CertifierVotingPeriod? To be specific, it looks like the current implementation as in
[email protected]doesn't actually take multiple options except the first one.
it seems we are assuming each certifier has same share of voting power when it comes to CertifierVotingPeriod. But we could not stop them from casting WeightedVote for proposals that require CertifierVoting.
just a bit curious why there is no checker to make sure the sum of all the weigh is equivalent to 1 in a single WeightedVote. It seems there is no such checker in cosmos sdk either.
The sum is checked in ValidateBasic.
Shall we consider WeighedVote cast by certifiers in CertifierVotingPeriod? To be specific, it looks like the current implementation as in
[email protected]doesn't actually take multiple options except the first one.
I think we should
Shall we consider WeighedVote cast by certifiers in CertifierVotingPeriod? To be specific, it looks like the current implementation as in
[email protected]doesn't actually take multiple options except the first one.I think we should
OK, I will add WeighedVote for certifiers as well.
I think this can be merged in now