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 #296

Merged
merged 28 commits into from
Jul 27, 2022

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented Jul 26, 2022

Closes: #XXX

What is the purpose of the change

This change introduces a minimum initial deposit requirement for submitting proposals.

It introduces a new deposit parameter and validates the initial deposit attached to the message against the parameter.

Brief Changelog

  • created validateInitialDeposit defined on the gov keeper
  • unit test
  • call validateInitialDeposit from SubmitProposal in the gov message server
  • unit test

Testing and Verifying

This change added tests and can be verified as follows:

  • TestValidateInitialDeposit
  • TestSubmitProposal_InitialDeposit

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? yes
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? no
  • How is the feature or change documented? not applicable

Copy link
Member

@czarcas7ic czarcas7ic left a comment

Choose a reason for hiding this comment

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

The only thing I don't feel entirely comfortable with is the migration logic (not because it looks wrong, just because I am not that familiar with it). Everything else looks good to me though! 👍

x/feegrant/client/testutil/suite.go Outdated Show resolved Hide resolved
x/gov/client/rest/grpc_query_test.go Outdated Show resolved Hide resolved
x/gov/keeper/deposit_test.go Outdated Show resolved Hide resolved
@p0mvn
Copy link
Member Author

p0mvn commented Jul 27, 2022

The only thing I don't feel entirely comfortable with is the migration logic (not because it looks wrong, just because I am not that familiar with it). Everything else looks good to me though! 👍

Thanks for the quick review. Migration logic sets the new gov parameter since it was non-existent before. Once we upgrade our SDK in Osmosis, the upgrade e2e tests should cover this. As long as e2e upgrade passes, this should be fine

@p0mvn p0mvn marked this pull request as ready for review July 27, 2022 01:26
@p0mvn p0mvn requested a review from a team July 27, 2022 01:26
x/gov/types/params.go Outdated Show resolved Hide resolved
@p0mvn
Copy link
Member Author

p0mvn commented Jul 27, 2022

All comments are now addressed

@p0mvn
Copy link
Member Author

p0mvn commented Jul 27, 2022

Planning on merging this once CI passes to unblock backport + manual testing

@p0mvn p0mvn merged commit 8417fe8 into osmosis-main Jul 27, 2022
@p0mvn p0mvn deleted the roman/proposals-initial-deposit branch July 27, 2022 18:08
mergify bot pushed a commit that referenced this pull request Jul 27, 2022
* feat!: initial deposit for proposals

* fix TestValidateInitialDeposit

* fix migration tests

* integrate new param into simulator

* increase consensus version and migration tests

* fix app state determinism tests

* fix gov cli

* fix grpc query tests

* more fixes

* restore build tags

* fix genesis and proposal handler tests

* Adam's comment

* revert some test changes

* fix TestSimulateMsgSubmitProposal

* more fixes

* err check

* uncomment test

* fixTestProposalHandler

* convert uint32 to dec

* revert NewDepositParams API, use decorator instead

* fix proto comment

* fix more tests

* go mod

* remove copied proto field

* typo

* fix tests

* fix x/gov/client/testutil tests

* add json tags

(cherry picked from commit 8417fe8)
p0mvn added a commit that referenced this pull request Jul 27, 2022
* feat!: initial deposit requirement for proposals (backport #296)

* Update x/gov/legacy/v3/store_test.go

Co-authored-by: Adam Tucker <adam@osmosis.team>

* Update x/gov/simulation/genesis.go

Co-authored-by: Adam Tucker <adam@osmosis.team>

Co-authored-by: Adam Tucker <adam@osmosis.team>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants