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: remove burning of deposits in gov #11011

Merged
merged 5 commits into from
Jan 26, 2022
Merged

feat: remove burning of deposits in gov #11011

merged 5 commits into from
Jan 26, 2022

Conversation

tac0turtle
Copy link
Member

Description

Closes: #11010

only burn deposits on veto'd proposals/


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)

Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

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

This makes sense to me but maybe we'll want to pass this by one or two others. I think we'll need to update the specification as well to make the new behaviour clear.

x/gov/abci.go Outdated
@@ -20,7 +20,7 @@ func EndBlocker(ctx sdk.Context, keeper keeper.Keeper) {
// delete dead proposals from store and burn theirs deposits. A proposal is dead when it's inactive and didn't get enough deposit on time to get into voting phase.
Copy link
Contributor

Choose a reason for hiding this comment

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

need to update the comment here as well

Copy link
Contributor

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

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

LGTM, this has imo been a bug for awhile.

@tac0turtle
Copy link
Member Author

gonna mark this as draft for a little as its not clear if this approach wants to be taken.

@tac0turtle tac0turtle marked this pull request as draft January 25, 2022 09:13
@@ -20,7 +20,7 @@ func EndBlocker(ctx sdk.Context, keeper keeper.Keeper) {
// delete dead proposals from store and burn theirs deposits. A proposal is dead when it's inactive and didn't get enough deposit on time to get into voting phase.
keeper.IterateInactiveProposalsQueue(ctx, ctx.BlockHeader().Time, func(proposal v1beta2.Proposal) bool {
keeper.DeleteProposal(ctx, proposal.ProposalId)
keeper.DeleteAndBurnDeposits(ctx, proposal.ProposalId)
keeper.RefundAndDeleteDeposits(ctx, proposal.ProposalId) // refund deposit if proposal got removed without getting 100% of the proposal
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a state-machine breaking changelog

Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

LGTM, pending changelog

@amaury1093
Copy link
Contributor

amaury1093 commented Jan 26, 2022

Also, there's an out-of-gas error in sims, we might need to bump tx fees somewhere.

@tac0turtle
Copy link
Member Author

do we need a gov proposal to revert this since we had one to make the change https://hubble.figment.io/cosmos/chains/cosmoshub-2/governance/proposals/6

@tac0turtle
Copy link
Member Author

Also, there's an out-of-gas error in sims, we might need to bump tx fees somewhere.

this bug was non-determinism in the non-determinism test. I can't reproduce locally and cli seems to not be able to reproduce.

@tac0turtle tac0turtle marked this pull request as ready for review January 26, 2022 18:04
@tac0turtle tac0turtle added the A:automerge Automatically merge PR once all prerequisites pass. label Jan 26, 2022
@mergify mergify bot merged commit 9606c16 into master Jan 26, 2022
@mergify mergify bot deleted the burn_no_more branch January 26, 2022 18:36
@robert-zaremba
Copy link
Collaborator

I think this shouldn't be merged - there was no consensus in the issue.

hxrts added a commit to cosmos/gaia that referenced this pull request May 6, 2022
deposit burn behaviour was changed in cosmos/cosmos-sdk#11011
okwme pushed a commit to cosmos/gaia that referenced this pull request May 13, 2022
* burn deposit documentation update

deposit burn behaviour was changed in cosmos/cosmos-sdk#11011

* Update docs/governance/process.md
tokamak-git pushed a commit to cosmos/gaia that referenced this pull request Jun 21, 2022
* burn deposit documentation update

deposit burn behaviour was changed in cosmos/cosmos-sdk#11011

* Update docs/governance/process.md
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/gov
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gov: Only burn on vetoed proposals
6 participants