Skip to content

Commit 5491be2

Browse files
authored
feat(group): Prune expired proposals and votes (#11315)
## Description Closes: #11245 ### 1. Pruning proposal. Proposals are pruned: - after a successful MsgExec (or try_exec) - on voting_period_end + max_execution_period whichever happens first. ### 2. Pruning votes. Votes are pruned: - on MsgExec (or try_exec) if tally is final - on voting_period_end whichever happens first. ### 3. Various group fixes See #11404 for details TODO: - [x] Add vote pruning after Tally, once #11310 is merged - [x] Add tests --- ### 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/master/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/master/docs/building-modules) - [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/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)
1 parent 73c9f42 commit 5491be2

17 files changed

+958
-695
lines changed

api/cosmos/group/v1/events.pulsar.go

+119-53
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/cosmos/group/v1/events.proto

+4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ syntax = "proto3";
33
package cosmos.group.v1;
44

55
import "cosmos_proto/cosmos.proto";
6+
import "cosmos/group/v1/types.proto";
67

78
option go_package = "github.com/cosmos/cosmos-sdk/x/group";
89

@@ -60,6 +61,9 @@ message EventExec {
6061

6162
// proposal_id is the unique ID of the proposal.
6263
uint64 proposal_id = 1;
64+
65+
// result is the proposal execution result.
66+
ProposalExecutorResult result = 2;
6367
}
6468

6569
// EventLeaveGroup is an event emitted when group member leaves the group.

x/group/events.pb.go

+57-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)