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(cli): cancel gov proposal by proposer before voting period ends #13010

Merged
merged 203 commits into from
Jan 20, 2023
Merged
Show file tree
Hide file tree
Changes from 192 commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
d67504b
WIP : add the cancel gov proposal proto
gsk967 Aug 24, 2022
9c2deb8
WIP: add cancel-proposal tx to cli
gsk967 Aug 24, 2022
25b2f2c
feat: add minDeposits of proposal to community pool
gsk967 Aug 25, 2022
2f86e1b
Merge branch 'main' into sai/impl_11554
gsk967 Aug 25, 2022
8263f9d
Merge branch 'main' into sai/impl_11554
gsk967 Aug 25, 2022
146e4cf
chore: sort the proposal ids
Aug 25, 2022
f11cbe9
Merge branch 'main' into sai/impl_11554
gsk967 Aug 26, 2022
2b9c916
test: fix the test cases in gov submit proposal
gsk967 Aug 26, 2022
6b60745
test: fix++
gsk967 Aug 26, 2022
ce52eca
Merge branch 'main' into sai/impl_11554
gsk967 Aug 29, 2022
6cff9f1
Merge branch 'main' into sai/impl_11554
gsk967 Aug 29, 2022
c8cbda5
Merge branch 'main' into sai/impl_11554
gsk967 Sep 1, 2022
7b587ee
test: add test for cli tx cancel proposal
gsk967 Sep 1, 2022
4a9e6b4
Merge branch 'main' into sai/impl_11554
gsk967 Sep 1, 2022
4b1c0a8
Merge branch 'main' into sai/impl_11554
gsk967 Sep 1, 2022
3f18856
chore: update the changelog
gsk967 Sep 1, 2022
d5974bb
chore: fix the small issues
gsk967 Sep 1, 2022
02586b9
test: fix the tests and legacy build issue
gsk967 Sep 1, 2022
b1f0712
fix: fix++
gsk967 Sep 1, 2022
b829a1f
fix: fix the tests
gsk967 Sep 1, 2022
188026f
Merge branch 'main' into sai/impl_11554
anilcse Sep 1, 2022
09f70ed
Merge branch 'main' into sai/impl_11554
gsk967 Sep 2, 2022
77f84e1
Merge branch 'main' into sai/impl_11554
gsk967 Sep 2, 2022
0e7552d
chore: address the pr comments
gsk967 Sep 2, 2022
7abc4cd
Merge branch 'main' into sai/impl_11554
gsk967 Sep 2, 2022
122da82
Merge branch 'main' into sai/impl_11554
gsk967 Sep 2, 2022
da49b39
Merge branch 'main' into sai/impl_11554
gsk967 Sep 2, 2022
77a3534
chore: address the comment and done proto pretty
gsk967 Sep 2, 2022
d6f66b4
Merge branch 'main' into sai/impl_11554
gsk967 Sep 2, 2022
8513623
Merge branch 'main' into sai/impl_11554
gsk967 Sep 3, 2022
18943e9
Merge branch 'main' into sai/impl_11554
anilcse Sep 5, 2022
2e5d79d
Merge branch 'main' into sai/impl_11554
gsk967 Sep 5, 2022
16a49a0
Merge branch 'main' into sai/impl_11554
gsk967 Sep 5, 2022
cfaf946
chore: address the pr comments
gsk967 Sep 5, 2022
e7ce012
chore: small fix for test
gsk967 Sep 5, 2022
4e11b75
Merge branch 'main' into sai/impl_11554
gsk967 Sep 6, 2022
24573a8
Merge branch 'main' into sai/impl_11554
gsk967 Sep 6, 2022
b16103e
Merge branch 'main' into sai/impl_11554
gsk967 Sep 7, 2022
479e71c
Merge branch 'main' into sai/impl_11554
gsk967 Sep 7, 2022
4bd0c35
Merge branch 'main' into sai/impl_11554
gsk967 Sep 8, 2022
dfcc6ae
Merge branch 'main' into sai/impl_11554
gsk967 Sep 22, 2022
8ee3a5b
fix: fix the build issue
gsk967 Sep 22, 2022
8675495
Merge branch 'main' into sai/impl_11554
gsk967 Sep 23, 2022
f6fff38
Merge branch 'main' into sai/impl_11554
gsk967 Sep 26, 2022
9053320
Merge branch 'main' into sai/impl_11554
gsk967 Sep 26, 2022
b29dd21
Merge branch 'main' into sai/impl_11554
gsk967 Sep 29, 2022
3e98a31
Merge remote-tracking branch 'mine/sai/impl_11554' into sai/impl_11554
gsk967 Sep 29, 2022
c1ea79c
Merge branch 'main' into sai/impl_11554
gsk967 Sep 30, 2022
007fb50
Merge branch 'main' into sai/impl_11554
gsk967 Sep 30, 2022
4b3f56c
Merge branch 'main' into sai/impl_11554
gsk967 Oct 1, 2022
fb7ccdd
refactor: add `burn rate` of deposits for cancel proposal
gsk967 Oct 1, 2022
b321bb1
Merge branch 'main' into sai/impl_11554
gsk967 Oct 3, 2022
845bc11
test: fix the test on cancel gov proposal
gsk967 Oct 3, 2022
fa84c25
Merge remote-tracking branch 'mine/sai/impl_11554' into sai/impl_11554
gsk967 Oct 3, 2022
b94adcf
Merge branch 'main' into sai/impl_11554
gsk967 Oct 3, 2022
2f26729
Merge branch 'main' into sai/impl_11554
gsk967 Oct 4, 2022
a18e6da
Merge branch 'main' into sai/impl_11554
gsk967 Oct 6, 2022
85d8162
Merge remote-tracking branch 'mine/sai/impl_11554' into sai/impl_11554
gsk967 Oct 6, 2022
49b5283
Merge branch 'main' into sai/impl_11554
gsk967 Oct 7, 2022
ec1f7f0
Merge branch 'main' into sai/impl_11554
gsk967 Oct 8, 2022
75f9529
Merge branch 'main' into sai/impl_11554
gsk967 Oct 10, 2022
e439cd0
Merge branch 'main' into sai/impl_11554
gsk967 Oct 11, 2022
7441760
Merge branch 'main' into sai/impl_11554
gsk967 Oct 16, 2022
c0b215f
fix: fix the burn the deposits of proposal
gsk967 Oct 16, 2022
81f3c4c
fix: fix the bank tests
gsk967 Oct 16, 2022
94e312e
Merge branch 'main' into sai/impl_11554
gsk967 Oct 17, 2022
f466b0d
Merge branch 'main' into sai/impl_11554
gsk967 Oct 17, 2022
544c903
Merge branch 'main' into sai/impl_11554
gsk967 Oct 17, 2022
e4af3bb
Merge branch 'main' into sai/impl_11554
gsk967 Oct 17, 2022
ee0785b
docs: update the UPGRADING.md
gsk967 Oct 17, 2022
166596a
chore: address the pr comments
gsk967 Oct 18, 2022
0d9bfff
Merge branch 'main' into sai/impl_11554
gsk967 Oct 18, 2022
0bb9f6d
Merge branch 'main' into sai/impl_11554
gsk967 Oct 19, 2022
9ce6bcd
chore: address the pr comments
gsk967 Oct 19, 2022
2f58974
Merge branch 'main' into sai/impl_11554
gsk967 Oct 19, 2022
657779d
chore: address the pr comments
gsk967 Oct 20, 2022
c094141
Update UPGRADING.md
alexanderbez Oct 20, 2022
341ed7b
Update UPGRADING.md
alexanderbez Oct 20, 2022
aa097fa
Update proto/cosmos/gov/v1/gov.proto
alexanderbez Oct 20, 2022
e5a97ee
Update proto/cosmos/gov/v1/gov.proto
alexanderbez Oct 20, 2022
b21c2ce
Update proto/cosmos/gov/v1/gov.proto
alexanderbez Oct 20, 2022
51d50db
Merge branch 'main' into sai/impl_11554
gsk967 Oct 21, 2022
26be9f7
chore : address the pr comments and add delete votes for cancel-proposal
gsk967 Oct 21, 2022
adce771
Merge branch 'main' into sai/impl_11554
gsk967 Oct 21, 2022
3f27c14
Merge branch 'main' into sai/impl_11554
gsk967 Oct 22, 2022
def73ab
chore: address the pr comments
gsk967 Oct 22, 2022
6c23579
Merge branch 'main' into sai/impl_11554
gsk967 Oct 23, 2022
1ee4a16
Merge branch 'main' into sai/impl_11554
gsk967 Oct 23, 2022
dda44f4
Merge branch 'main' into sai/impl_11554
gsk967 Oct 24, 2022
23f1b96
remove the cancelProposalQueue for cancel proposal
gsk967 Oct 24, 2022
8058f67
chore: typo fix
gsk967 Oct 24, 2022
4ae93e7
Merge branch 'main' into sai/impl_11554
gsk967 Oct 25, 2022
dcb23ed
Merge branch 'main' into sai/impl_11554
gsk967 Oct 25, 2022
a6bb51c
Merge branch 'main' into sai/impl_11554
gsk967 Oct 25, 2022
8a95079
Merge branch 'main' into sai/impl_11554
gsk967 Oct 26, 2022
3d50206
chore: allow only action proposals for migration
gsk967 Oct 26, 2022
d9eb597
test: fix the keeper test of cancel proposal
gsk967 Oct 26, 2022
0a7a798
chore: address the pr comments
gsk967 Oct 26, 2022
108c14c
Merge branch 'main' into sai/impl_11554
gsk967 Oct 27, 2022
4b80a61
Merge branch 'main' into sai/impl_11554
gsk967 Oct 27, 2022
562c8c6
Merge branch 'main' into sai/impl_11554
gsk967 Oct 28, 2022
5ab7c2c
Merge branch 'main' into sai/impl_11554
gsk967 Oct 31, 2022
98fdfac
Merge branch 'main' into sai/impl_11554
gsk967 Nov 18, 2022
3e0b0c8
chore: update the proto files
gsk967 Nov 18, 2022
5c8640d
add 'proposal_cancel_dest' param
gsk967 Nov 18, 2022
cc93b40
chore: address the pr comments
gsk967 Nov 18, 2022
7dfbeb4
Merge branch 'main' into sai/impl_11554
gsk967 Nov 18, 2022
c58a0d3
chore: renamed 'proposal_cancel_burn_rate' to 'proposal_cancel_rate'
gsk967 Nov 18, 2022
7de7448
Merge remote-tracking branch 'mine/sai/impl_11554' into sai/impl_11554
gsk967 Nov 18, 2022
2e54e5d
Merge branch 'main' into sai/impl_11554
gsk967 Nov 18, 2022
0c77258
chore: small fix
gsk967 Nov 18, 2022
6ce31e8
Merge branch 'main' into sai/impl_11554
gsk967 Nov 18, 2022
753d1b1
chore: fix the lint
gsk967 Nov 18, 2022
9bfdca8
Merge remote-tracking branch 'mine/sai/impl_11554' into sai/impl_11554
gsk967 Nov 18, 2022
b82f898
Merge branch 'main' into sai/impl_11554
gsk967 Nov 19, 2022
9eebbcf
chore: fix the test cases
gsk967 Nov 19, 2022
d1043c2
Merge branch 'main' into sai/impl_11554
gsk967 Nov 21, 2022
f1134ba
Merge branch 'main' into sai/impl_11554
gsk967 Nov 21, 2022
983e518
chore: address the pr comments
gsk967 Nov 21, 2022
911438b
Merge branch 'main' into sai/impl_11554
gsk967 Nov 21, 2022
1df9399
Update proto/cosmos/gov/v1/gov.proto
robert-zaremba Nov 21, 2022
095e83b
chore: address the pr comments
gsk967 Nov 21, 2022
08ff0e0
Merge branch 'main' into sai/impl_11554
gsk967 Nov 21, 2022
b6099f1
Merge branch 'main' into sai/impl_11554
gsk967 Nov 21, 2022
cd87a02
chore: address the pr comments
gsk967 Nov 28, 2022
ce844f1
Merge main
gsk967 Nov 28, 2022
c868a05
chore: fix build issue and add test for balance check on cancel proposal
gsk967 Nov 28, 2022
7e6149c
Merge branch 'main' into sai/impl_11554
gsk967 Nov 28, 2022
ef389c4
Merge branch 'main' into sai/impl_11554
gsk967 Nov 29, 2022
d2ccc17
Merge branch 'main' into sai/impl_11554
gsk967 Nov 29, 2022
b8c49b1
Merge branch 'main' into sai/impl_11554
gsk967 Nov 29, 2022
af97dd6
Merge branch 'main' into sai/impl_11554
gsk967 Nov 29, 2022
ee06adb
chore: address pr comments
gsk967 Nov 29, 2022
71af716
Merge branch 'main' into sai/impl_11554
gsk967 Nov 29, 2022
c261149
Merge branch 'main' into sai/impl_11554
gsk967 Nov 30, 2022
b387f0b
Merge branch 'main' into sai/impl_11554
gsk967 Dec 1, 2022
861098e
Merge branch 'main' into sai/impl_11554
gsk967 Dec 1, 2022
91c049f
Merge branch 'main' into sai/impl_11554
gsk967 Dec 5, 2022
ec01f78
Merge branch 'main' into sai/impl_11554
gsk967 Dec 5, 2022
22b7cb5
Merge branch 'main' into sai/impl_11554
gsk967 Dec 6, 2022
77b6023
chore: address the pr comments
gsk967 Dec 12, 2022
e719121
Merge main
gsk967 Dec 12, 2022
c729d4a
fix: fix the test cases
gsk967 Dec 12, 2022
c3f3d28
chore: address the pr comments
gsk967 Dec 12, 2022
7a6bd8c
Merge branch 'main' into sai/impl_11554
gsk967 Dec 13, 2022
4fb2626
Merge branch 'main' into sai/impl_11554
gsk967 Dec 13, 2022
5e42633
Merge branch 'main' into sai/impl_11554
gsk967 Dec 16, 2022
ca981b9
Merge remote-tracking branch 'mine/sai/impl_11554' into sai/impl_11554
gsk967 Dec 16, 2022
f8fdd0e
test: add more tests for cancel proposal
gsk967 Dec 16, 2022
1a9a4d7
chore: removed extra test of cancelProposal on msg_server
gsk967 Dec 16, 2022
fb1bfd7
fix: fix the failing tests
gsk967 Dec 16, 2022
7cb39b3
Merge branch 'main' into sai/impl_11554
gsk967 Dec 28, 2022
cc03ded
chore: fix the test and proto-gen for gov
gsk967 Dec 28, 2022
c77ca59
fix: fix the lint
gsk967 Dec 28, 2022
7101f1e
Merge branch 'main' into sai/impl_11554
gsk967 Dec 28, 2022
594cb12
fix: fix the test
gsk967 Dec 28, 2022
a5a2b57
fix: fix the charging fees and remaining deposit calculations
gsk967 Dec 28, 2022
5c32186
chore: move the proposer address migration to v5
gsk967 Dec 28, 2022
bdbf3ae
fix: fix the rand genesis state test
gsk967 Dec 28, 2022
60582e8
Merge branch 'main' into sai/impl_11554
gsk967 Dec 29, 2022
51b15f2
Merge branch 'main' into sai/impl_11554
gsk967 Dec 29, 2022
0ffeb41
Merge branch 'main' into sai/impl_11554
gsk967 Dec 29, 2022
af9a31e
Merge branch 'main' into sai/impl_11554
gsk967 Dec 30, 2022
5e38073
Merge branch 'main' into sai/impl_11554
gsk967 Dec 30, 2022
94d391b
Merge branch 'main' into sai/impl_11554
gsk967 Dec 30, 2022
58ff8d4
chore: address the pr comments
gsk967 Dec 30, 2022
125360e
Merge branch 'main' into sai/impl_11554
gsk967 Dec 31, 2022
1d8f8a2
Merge branch 'main' into sai/impl_11554
gsk967 Jan 2, 2023
b8f1418
Merge branch 'main' into sai/impl_11554
gsk967 Jan 2, 2023
f35692f
Merge branch 'main' into sai/impl_11554
gsk967 Jan 3, 2023
d2cd3c1
fix: fix the failing simulations
gsk967 Jan 3, 2023
45facd6
fix: fix the lint
gsk967 Jan 3, 2023
62b55fe
Merge branch 'main' into sai/impl_11554
gsk967 Jan 4, 2023
1f65ca4
Merge branch 'main' into sai/impl_11554
gsk967 Jan 4, 2023
3f29399
Merge branch 'main' into sai/impl_11554
gsk967 Jan 5, 2023
72f234e
fix: fix the proto-gen
gsk967 Jan 5, 2023
be3376f
Merge branch 'main' into sai/impl_11554
gsk967 Jan 5, 2023
388e97f
test: add test for `ChargeDeposit`
gsk967 Jan 6, 2023
df188e1
Merge branch 'main' into sai/impl_11554
gsk967 Jan 6, 2023
da4951b
Merge branch 'main' into sai/impl_11554
gsk967 Jan 6, 2023
2c7763e
Merge branch 'main' into sai/impl_11554
gsk967 Jan 9, 2023
ded1144
fix: fix the tests
gsk967 Jan 9, 2023
348ef12
fix: fix the integration test of gov
gsk967 Jan 9, 2023
fd0ca71
Merge branch 'main' into sai/impl_11554
gsk967 Jan 9, 2023
9b07b78
Merge branch 'main' into sai/impl_11554
gsk967 Jan 9, 2023
e5cb7a1
Merge branch 'main' into sai/impl_11554
gsk967 Jan 10, 2023
bbc3e55
Merge branch 'main' into sai/impl_11554
tac0turtle Jan 10, 2023
3a93d23
Merge branch 'main' into sai/impl_11554
gsk967 Jan 10, 2023
6450f4f
Merge branch 'main' into sai/impl_11554
gsk967 Jan 10, 2023
256a8bb
Merge branch 'main' into sai/impl_11554
gsk967 Jan 11, 2023
682eba4
Merge branch 'main' into sai/impl_11554
gsk967 Jan 11, 2023
05a6073
Merge branch 'main' into sai/impl_11554
gsk967 Jan 12, 2023
3bce1e0
Merge branch 'main' into sai/impl_11554
gsk967 Jan 13, 2023
1550ef4
Merge branch 'main' into sai/impl_11554
gsk967 Jan 13, 2023
8afb906
Merge branch 'main' into sai/impl_11554
gsk967 Jan 14, 2023
6d50340
Merge branch 'main' into sai/impl_11554
gsk967 Jan 16, 2023
8b97d60
Merge branch 'main' into sai/impl_11554
gsk967 Jan 16, 2023
e93687a
Merge branch 'main' into sai/impl_11554
gsk967 Jan 16, 2023
b838c86
Merge branch 'main' into sai/impl_11554
gsk967 Jan 17, 2023
ccfbec2
Merge branch 'main' into sai/impl_11554
gsk967 Jan 18, 2023
45a1e95
Merge branch 'main' into sai/impl_11554
gsk967 Jan 20, 2023
90508cb
Merge branch 'main' into sai/impl_11554
tac0turtle Jan 20, 2023
127caff
Merge branch 'main' into sai/impl_11554
gsk967 Jan 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (x/bank) [#11981](https://github.com/cosmos/cosmos-sdk/pull/11981) Create the `SetSendEnabled` endpoint for managing the bank's SendEnabled settings.
* (x/auth) [#13210](https://github.com/cosmos/cosmos-sdk/pull/13210) Add `Query/AccountInfo` endpoint for simplified access to basic account info.
* (x/consensus) [#12905](https://github.com/cosmos/cosmos-sdk/pull/12905) Create a new `x/consensus` module that is now responsible for maintaining Tendermint consensus parameters instead of `x/param`. Legacy types remain in order to facilitate parameter migration from the deprecated `x/params`. App developers should ensure that they execute `baseapp.MigrateParams` during their chain upgrade. These legacy types will be removed in a future release.
* (x/gov) [#13010](https://github.com/cosmos/cosmos-sdk/pull/13010) Add `cancel-proposal` feature to proposals. Now proposers can cancel the proposal prior to the proposal's voting period end time.
* (client/tx) [#13670](https://github.com/cosmos/cosmos-sdk/pull/13670) Add validation in `BuildUnsignedTx` to prevent simple inclusion of valid mnemonics
* [#13473](https://github.com/cosmos/cosmos-sdk/pull/13473) ADR-038: Go plugin system proposal
* [#14356](https://github.com/cosmos/cosmos-sdk/pull/14356) Add `events.GetAttributes` and `event.GetAttribute` methods to simplify the retrieval of an attribute from event(s).
Expand Down Expand Up @@ -204,9 +205,9 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (x/gov) [#13160](https://github.com/cosmos/cosmos-sdk/pull/13160) Remove custom marshaling of proposl and voteoption.
* (types) [#13430](https://github.com/cosmos/cosmos-sdk/pull/13430) Remove unused code `ResponseCheckTx` and `ResponseDeliverTx`
* (store) [#13529](https://github.com/cosmos/cosmos-sdk/pull/13529) Add method `LatestVersion` to `MultiStore` interface, add method `SetQueryMultiStore` to baesapp to support alternative `MultiStore` implementation for query service.
* (pruning) [#13609](https://github.com/cosmos/cosmos-sdk/pull/13609) Move pruning package to be under store package
* [#13794](https://github.com/cosmos/cosmos-sdk/pull/13794) Most methods on `types/module.AppModule` have been moved to
extension interfaces. `module.Manager.Modules` is now of type `map[string]interface{}` to support in parallel the new
* (pruning) [#13609](https://github.com/cosmos/cosmos-sdk/pull/13609) Move pruning package to be under store package.
gsk967 marked this conversation as resolved.
Show resolved Hide resolved
* [#13794](https://github.com/cosmos/cosmos-sdk/pull/13794) Most methods on `types/module.AppModule` have been moved to
extension interfaces. `module.Manager.Modules` is now of type `map[string]interface{}` to support in parallel the new
`cosmossdk.io/core/appmodule.AppModule` API.
* (signing) [#13701](https://github.com/cosmos/cosmos-sdk/pull/) Add `context.Context` as an argument `x/auth/signing.VerifySignature`.
* (x/group) [#13876](https://github.com/cosmos/cosmos-sdk/pull/13876) Add `GetMinExecutionPeriod` method on DecisionPolicy interface.
Expand Down
39 changes: 39 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,45 @@ By default, the new `MinInitialDepositRatio` parameter is set to zero during mig
feature is disabled. If chains wish to utilize the minimum proposal deposits at time of submission, the migration logic needs to be
modified to set the new parameter to the desired value.

##### New Proposal.Proposer field
Copy link
Member

Choose a reason for hiding this comment

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

@tac0turtle, given we backported the addition of the proposer field, we may want to partly backport this migration too, wdyt?

Copy link
Member

Choose a reason for hiding this comment

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

yea we can do that once this is merged.


The `Proposal` proto has been updated with proposer field. For proposal state migraton developers can call `v4.AddProposerAddressToProposal` in their upgrade handler to update all existing proposal and make them compatible and this migration is optional.

> This migration is optional, if chain wants to cancel previous proposals which are active (deposit or voting period) they can do this proposals state migration.

```go
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
v4 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v4"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
)

func (app SimApp) RegisterUpgradeHandlers() {
app.UpgradeKeeper.SetUpgradeHandler(UpgradeName,
func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
// this migration is optional
// add proposal ids with proposers which are active (deposit or voting period)
proposals := make(map[uint64]string)
proposals[1] = "cosmos1luyncewxk4lm24k6gqy8y5dxkj0klr4tu0lmnj" ...
v4.AddProposerAddressToProposal(ctx, sdk.NewKVStoreKey(v4.ModuleName), app.appCodec, proposals)
return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM)
})
}

```

##### New Feature: Cancelling Proposals

The `gov` module has been updated to support the ability to cancel governance proposals. When a proposal is canceled, all the deposits of the proposal are either burnt or sent to `ProposalCancelDest` address. The deposits burn rate will be determined by a new parameter called `ProposalCancelRatio` parameter.

```
1. deposits * proposal_cancel_ratio will be burned or sent to `ProposalCancelDest` address , if `ProposalCancelDest` is empty then deposits will be burned.
2. deposits * (1 - proposal_cancel_ratio) will be sent to depositors.
```

By default, the new `ProposalCancelRatio` parameter is set to 0.5 during migration and `ProposalCancelDest` is set to empty string (i.e. burnt).

#### `x/consensus`

Introducing a new `x/consensus` module to handle managing Tendermint consensus
Expand Down
164 changes: 162 additions & 2 deletions api/cosmos/gov/v1/gov.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading