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

feat!: initial deposit requirement for proposals #12771

Merged
merged 19 commits into from
Aug 2, 2022

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Jul 28, 2022

Description

Closes: #12450

Original work:

This change adds the ability to require an initial deposit imposed on the proposer at proposal submission.

The deposit is burned if the proposal does not move to the voting period (the deposit is not submitted in full) or if vetoed by more than 1/3.

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)

x/gov/keeper/msg_server.go Fixed Show fixed Hide fixed
@alexanderbez
Copy link
Contributor

My hero ❤️❤️❤️

@github-actions github-actions bot added the C:CLI label Aug 1, 2022
@p0mvn p0mvn mentioned this pull request Aug 1, 2022
4 tasks
@p0mvn p0mvn marked this pull request as ready for review August 2, 2022 00:32
@p0mvn p0mvn requested a review from a team as a code owner August 2, 2022 00:32
@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #12771 (413293e) into main (0f7e56c) will increase coverage by 0.15%.
The diff coverage is 81.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12771      +/-   ##
==========================================
+ Coverage   56.16%   56.31%   +0.15%     
==========================================
  Files         645      649       +4     
  Lines       54660    54955     +295     
==========================================
+ Hits        30699    30948     +249     
- Misses      21485    21520      +35     
- Partials     2476     2487      +11     
Impacted Files Coverage Δ
x/gov/simulation/operations.go 84.18% <68.18%> (-1.18%) ⬇️
x/gov/keeper/deposit.go 89.70% <82.35%> (+1.47%) ⬆️
x/gov/keeper/msg_server.go 85.46% <100.00%> (+1.67%) ⬆️
x/gov/migrations/v4/store.go 89.65% <100.00%> (+0.36%) ⬆️
x/gov/types/v1/params.go 49.39% <100.00%> (+1.24%) ⬆️
errors/stacktrace.go 84.14% <0.00%> (ø)
errors/handle.go 0.00% <0.00%> (ø)
errors/errors.go 83.46% <0.00%> (ø)
errors/abci.go 87.23% <0.00%> (ø)
... and 2 more

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

utACK

Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

left one comment otherwise looks good

proto/cosmos/gov/v1/gov.proto Outdated Show resolved Hide resolved
@github-actions github-actions bot added the C:x/distribution distribution module related label Aug 2, 2022
@p0mvn
Copy link
Member Author

p0mvn commented Aug 2, 2022

Thanks for the reviews. @marbar3778 the gogoproto.jsontag is now removed.

Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

utACK

@@ -66,6 +66,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (x/gov) [#12631](https://github.com/cosmos/cosmos-sdk/pull/12631) Migrate `x/gov` to self-managed parameters and deprecate it's usage of `x/params`.
* (x/staking) [#12409](https://github.com/cosmos/cosmos-sdk/pull/12409) Migrate `x/staking` to self-managed parameters and deprecate it's usage of `x/params`.
* (x/bank) [#11859](https://github.com/cosmos/cosmos-sdk/pull/11859) Move the SendEnabled information out of the Params and into the state store directly.
* (x/gov) [#12771](https://github.com/cosmos/cosmos-sdk/pull/12771) Initial deposit requirement for proposals at submission time.
Copy link
Member

Choose a reason for hiding this comment

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

could you add a short entry to the upgrading.md file. then lets merge.

@p0mvn
Copy link
Member Author

p0mvn commented Aug 2, 2022

Upgrading.md is updated. Should be ready for merge unless there a issues in the upgrading doc

@tac0turtle tac0turtle merged commit 07f7035 into main Aug 2, 2022
@tac0turtle tac0turtle deleted the roman/initial-deposit-backport branch August 2, 2022 18:40
@kocubinski kocubinski mentioned this pull request Aug 8, 2022
19 tasks
@julienrbrt
Copy link
Member

Should this get backported? Otherwise, the upgrading.md addition is at the wrong place.

mergify bot pushed a commit that referenced this pull request Aug 17, 2022
## Description

#12771 (comment)

### 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/main/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/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/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)
@alexanderbez
Copy link
Contributor

alexanderbez commented Aug 17, 2022

@julienrbrt

I do not believe this is being backported, no.

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.

x/gov min proposer deposit
4 participants