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

refactor: add burnable params to governance (backport #15151) #15218

Merged
merged 8 commits into from
Mar 1, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 28, 2023

This is an automatic backport of pull request #15151 done by Mergify.
Cherry-pick of 44495e7 has failed:

On branch mergify/bp/release/v0.47.x/pr-15151
Your branch is up to date with 'origin/release/v0.47.x'.

You are currently cherry-picking commit 44495e7a7.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   x/gov/keeper/tally.go

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   CHANGELOG.md
	both modified:   api/cosmos/gov/v1/gov.pulsar.go
	both modified:   api/cosmos/tx/v1beta1/service.pulsar.go
	both modified:   proto/cosmos/gov/v1/gov.proto
	both modified:   tests/e2e/gov/query.go
	both modified:   types/tx/service.pb.go
	both modified:   x/gov/README.md
	both modified:   x/gov/abci.go
	both modified:   x/gov/migrations/v4/json.go
	both modified:   x/gov/migrations/v4/json_test.go
	both modified:   x/gov/migrations/v4/store.go
	deleted by us:   x/gov/migrations/v5/store.go
	both modified:   x/gov/simulation/genesis.go
	both modified:   x/gov/types/v1/gov.pb.go
	both modified:   x/gov/types/v1/params.go

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

(cherry picked from commit 44495e7)

# Conflicts:
#	CHANGELOG.md
#	api/cosmos/gov/v1/gov.pulsar.go
#	api/cosmos/tx/v1beta1/service.pulsar.go
#	proto/cosmos/gov/v1/gov.proto
#	tests/e2e/gov/query.go
#	types/tx/service.pb.go
#	x/gov/README.md
#	x/gov/abci.go
#	x/gov/migrations/v4/json.go
#	x/gov/migrations/v4/json_test.go
#	x/gov/migrations/v4/store.go
#	x/gov/migrations/v5/store.go
#	x/gov/simulation/genesis.go
#	x/gov/types/v1/gov.pb.go
#	x/gov/types/v1/params.go
keeper.RefundAndDeleteDeposits(ctx, proposal.Id) // refund deposit if proposal got removed without getting 100% of the proposal

if !keeper.GetParams(ctx).BurnProposalDepositPrevote {
keeper.RefundAndDeleteDeposits(ctx, proposal.Id) // refund deposit if proposal got removed without getting 100% of the proposal

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
if !keeper.GetParams(ctx).BurnProposalDepositPrevote {
keeper.RefundAndDeleteDeposits(ctx, proposal.Id) // refund deposit if proposal got removed without getting 100% of the proposal
} else {
keeper.DeleteAndBurnDeposits(ctx, proposal.Id) // burn the deposit if proposal got removed without getting 100% of the proposal

Check warning

Code scanning / CodeQL

Panic in BeginBock or EndBlock consensus methods

Possible panics in BeginBock- or EndBlock-related consensus methods could cause a chain halt
x/gov/abci.go Fixed Show fixed Hide fixed
x/gov/abci.go Fixed Show fixed Hide fixed
x/gov/migrations/v4/store.go Fixed Show fixed Hide fixed
x/gov/types/v1/gov.pb.go Fixed Show fixed Hide fixed
x/gov/types/v1/gov.pb.go Fixed Show fixed Hide fixed
x/gov/types/v1/gov.pb.go Fixed Show fixed Hide fixed
@julienrbrt julienrbrt self-assigned this Feb 28, 2023
@julienrbrt julienrbrt mentioned this pull request Feb 28, 2023
19 tasks
@julienrbrt julienrbrt removed their assignment Feb 28, 2023
@julienrbrt julienrbrt enabled auto-merge (squash) March 1, 2023 11:10
@julienrbrt julienrbrt merged commit ffedca8 into release/v0.47.x Mar 1, 2023
@julienrbrt julienrbrt deleted the mergify/bp/release/v0.47.x/pr-15151 branch March 1, 2023 11:41
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.

2 participants