From 907df4d3899e97b9088d41f9827e9cba06036ca4 Mon Sep 17 00:00:00 2001 From: Alex Peters Date: Fri, 28 Feb 2020 13:32:47 +0100 Subject: [PATCH] Redesigned election workflow for immutable votes and timeout --- incubator/group/integration_test.go | 31 +- incubator/group/keeper.go | 196 ++++++------- incubator/group/testdata/keeper.go | 5 +- incubator/group/types.pb.go | 425 +++++++++++----------------- incubator/group/types.proto | 35 +-- 5 files changed, 283 insertions(+), 409 deletions(-) diff --git a/incubator/group/integration_test.go b/incubator/group/integration_test.go index 2bff2d8..66d1767 100644 --- a/incubator/group/integration_test.go +++ b/incubator/group/integration_test.go @@ -108,8 +108,8 @@ func TestFullProposalWorkflow(t *testing.T) { DecisionPolicy: group.StdDecisionPolicy{ Sum: &group.StdDecisionPolicy_Threshold{ Threshold: &group.ThresholdDecisionPolicy{ - Threshold: sdk.ZeroDec(), - MaxVotingWindow: *proto.DurationProto(time.Nanosecond), + Threshold: sdk.ZeroDec(), + Timout: *proto.DurationProto(time.Second), }, }, }, @@ -154,16 +154,13 @@ func TestFullProposalWorkflow(t *testing.T) { // execute can not be in the same block so start new one app.BeginBlock(abci.RequestBeginBlock{Header: abci.Header{Height: app.LastBlockHeight() + 1, Time: time.Now()}}) - // execute + + // execute first proposal msgs = []sdk.Msg{ group.MsgExec{ Proposal: 1, Signer: myAddr, }, - group.MsgExec{ - Proposal: 2, - Signer: myAddr, - }, } myAccount = app.AccountKeeper.GetAccount(ctx, myAddr) privs, accNums, seqs = []crypto.PrivKey{myKey}, myAccount.GetAccountNumber(), myAccount.GetSequence() @@ -180,11 +177,25 @@ func TestFullProposalWorkflow(t *testing.T) { expTally := group.Tally{YesCount: sdk.OneDec(), NoCount: sdk.ZeroDec(), AbstainCount: sdk.ZeroDec(), VetoCount: sdk.ZeroDec()} assert.Equal(t, expTally, proposal.GetBase().VoteState) - // verify other proposal + // execute second proposal + msgs = []sdk.Msg{ + group.MsgExec{ + Proposal: 2, + Signer: myAddr, + }, + } + myAccount = app.AccountKeeper.GetAccount(ctx, myAddr) + privs, accNums, seqs = []crypto.PrivKey{myKey}, myAccount.GetAccountNumber(), myAccount.GetSequence() + tx = types.NewTestTx(ctx, msgs, privs, []uint64{accNums}, []uint64{seqs}, fee) + + resp = app.DeliverTx(abci.RequestDeliverTx{Tx: app.Codec().MustMarshalBinaryLengthPrefixed(tx)}) + require.Equal(t, uint32(0), resp.Code, resp.Log) + + // verify second proposal proposal, err = app.GroupKeeper.GetProposal(ctx, 2) require.NoError(t, err) - assert.Equal(t, group.ProposalBase_Rejected, proposal.GetBase().Result, proposal.GetBase().Result.String()) - assert.Equal(t, group.ProposalBase_Closed, proposal.GetBase().Status, proposal.GetBase().Status.String()) + assert.Equal(t, group.ProposalBase_Undefined, proposal.GetBase().Result, proposal.GetBase().Result.String()) + assert.Equal(t, group.ProposalBase_Submitted, proposal.GetBase().Status, proposal.GetBase().Status.String()) expTally = group.Tally{YesCount: sdk.ZeroDec(), NoCount: sdk.ZeroDec(), AbstainCount: sdk.ZeroDec(), VetoCount: sdk.OneDec()} assert.Equal(t, expTally, proposal.GetBase().VoteState) } diff --git a/incubator/group/keeper.go b/incubator/group/keeper.go index b2eec3e..5039e84 100644 --- a/incubator/group/keeper.go +++ b/incubator/group/keeper.go @@ -309,78 +309,93 @@ func (k Keeper) Vote(ctx sdk.Context, id ProposalID, voters []sdk.AccAddress, ch if base.Status != ProposalBase_Submitted { return errors.Wrap(ErrInvalid, "proposal not open") } - votingPeriodEnd, err := types.TimestampFromProto(&base.VotingEndTime) + votingPeriodEnd, err := types.TimestampFromProto(&base.Timeout) if err != nil { return err } - end := votingPeriodEnd.UTC() - if end.Before(ctx.BlockTime()) || end.Equal(ctx.BlockTime()) { + if votingPeriodEnd.Before(ctx.BlockTime()) || votingPeriodEnd.Equal(ctx.BlockTime()) { return errors.Wrap(ErrExpired, "voting period has ended already") } - electorate, err := k.GetGroupByGroupAccount(ctx, base.GroupAccount) + var accountMetadata StdGroupAccountMetadata + if err := k.groupAccountTable.GetOne(ctx, base.GroupAccount.Bytes(), &accountMetadata); err != nil { + return errors.Wrap(err, "load group account") + } + if base.GroupAccountVersion != accountMetadata.Base.Version { + // todo: this is not the voters fault so we return an error to rollback the TX + return errors.Wrap(ErrModified, "group account was modified") + } + + electorate, err := k.GetGroup(ctx, accountMetadata.Base.Group) if err != nil { return err } if electorate.Version != base.GroupVersion { - // todo: this is not the voters fault. + // todo: this is not the voters fault so we return an error to rollback the TX return errors.Wrap(ErrModified, "group was modified") } - for _, v := range voters { + + // count and store votes + for _, voterAddr := range voters { + voter := GroupMember{Group: electorate.Group, Member: voterAddr} + if err := k.groupMemberTable.GetOne(ctx, voter.NaturalKey(), &voter); err != nil { + return errors.Wrapf(err, "address: %s", voterAddr) + } newVote := Vote{ Proposal: id, - Voter: v, + Voter: voterAddr, Choice: choice, Comment: comment, SubmittedAt: *blockTime, } - member := GroupMember{ - Group: electorate.Group, - Member: v, + if err := base.VoteState.Add(newVote, voter.Weight); err != nil { + return errors.Wrap(err, "add new vote") } - if err := k.groupMemberTable.GetOne(ctx, member.NaturalKey(), &member); err != nil { - return errors.Wrapf(err, "get member by group and address") + if err := k.voteTable.Create(ctx, &newVote); err != nil { + return errors.Wrap(err, "store vote") } + } - var oldVote Vote - err = k.voteTable.GetOne(ctx, newVote.NaturalKey(), &oldVote) - switch { - case orm.ErrNotFound.Is(err): // it is a new vote - case err != nil: - return errors.Wrap(err, "load old vote") - default: // it is an update - if err := base.VoteState.Sub(oldVote, member.Weight); err != nil { - return errors.Wrap(err, "previous vote") - } - } - if err := base.VoteState.Add(newVote, member.Weight); err != nil { - return errors.Wrap(err, "new vote") - } + // run tally with new votes to close early - // todo: here a put would be nicer again - if oldVote.Proposal == 0 { // not persistent - if err := k.voteTable.Create(ctx, &newVote); err != nil { - return errors.Wrap(err, "create vote") - } - } else { - if err := k.voteTable.Save(ctx, &newVote); err != nil { - return errors.Wrap(err, "update vote") - } - } + policy := accountMetadata.DecisionPolicy.GetThreshold() + submittedAt, err := types.TimestampFromProto(&base.SubmittedAt) + if err != nil { + return err } + switch accepted, err := policy.Allow(base.VoteState, electorate.TotalWeight, ctx.BlockTime().Sub(submittedAt)); { + case err != nil: + return errors.Wrap(err, "policy execution") + case accepted: + // with enough votes we can close the proposal early as votes can not be changed + base.Result = ProposalBase_Accepted + base.Status = ProposalBase_Closed + } + proposal.SetBase(base) return k.proposalTable.Save(ctx, id.Uint64(), proposal) } +// ExecProposal can be executed n times before the timeout. It will update the proposal status and executes the msg payload. +// There are no separate transactions for the payload messages so that it is a full atomic operation that +// would either succeed or fail. func (k Keeper) ExecProposal(ctx sdk.Context, id ProposalID) error { proposal, err := k.GetProposal(ctx, id) if err != nil { return err } + // check constraints base := proposal.GetBase() - if base.Status != ProposalBase_Submitted { - return errors.Wrap(ErrInvalid, "proposal not open") + if base.Status != ProposalBase_Submitted && base.Status != ProposalBase_Closed { + return errors.Wrapf(ErrInvalid, "not possible with proposal status %s", base.Status.String()) + } + votingPeriodEnd, err := types.TimestampFromProto(&base.Timeout) + if err != nil { + return err + } + if ctx.BlockTime().After(votingPeriodEnd) { + return errors.Wrap(ErrExpired, "proposal has timed out already") } var accountMetadata StdGroupAccountMetadata @@ -388,44 +403,53 @@ func (k Keeper) ExecProposal(ctx sdk.Context, id ProposalID) error { return errors.Wrap(err, "load group account") } - electorate, err := k.GetGroupByGroupAccount(ctx, base.GroupAccount) - if err != nil { - return err + storeUpdates := func() error { + proposal.SetBase(base) + return k.proposalTable.Save(ctx, id.Uint64(), proposal) } - if electorate.Version != base.GroupVersion { + if base.GroupAccountVersion != accountMetadata.Base.Version { + base.Result = ProposalBase_Undefined base.Status = ProposalBase_Aborted - return nil - // todo: or error? - //return errors.Wrap(ErrModified, "group was modified") + return storeUpdates() } - // todo: validate - votingPeriodEnd, err := types.TimestampFromProto(&base.VotingEndTime) + electorate, err := k.GetGroup(ctx, accountMetadata.Base.Group) if err != nil { - return err + return errors.Wrap(err, "load group") } - if ctx.BlockTime().Before(votingPeriodEnd.UTC()) { - return errors.Wrap(ErrExpired, "voting period not ended yet") + + if electorate.Version != base.GroupVersion { + base.Result = ProposalBase_Undefined + base.Status = ProposalBase_Aborted + return storeUpdates() } - base.Status = ProposalBase_Closed + if base.Status == ProposalBase_Submitted { + // proposal was not closed early so run decision policy + policy := accountMetadata.DecisionPolicy.GetThreshold() + if policy == nil { + return errors.Wrap(ErrInvalid, "unknown decision policy") + } - // run decision policy - policy := accountMetadata.DecisionPolicy.GetThreshold() - if policy == nil { - return errors.Wrap(ErrInvalid, "unknown decision policy") + submittedAt, err := types.TimestampFromProto(&base.SubmittedAt) + if err != nil { + return errors.Wrap(err, "from proto time") + } + switch accepted, err := policy.Allow(base.VoteState, electorate.TotalWeight, ctx.BlockTime().Sub(submittedAt)); { + case err != nil: + return errors.Wrap(err, "policy execution") + case accepted: + base.Result = ProposalBase_Accepted + base.Status = ProposalBase_Closed + default: + // there might be votes coming so we can not close it + // todo: let decision policy decide on impossible cases to close early with ProposalBase_Rejected + } } - submittedAt, err := types.TimestampFromProto(&base.SubmittedAt) - if err != nil { - return errors.Wrap(err, "from proto time") - } - switch accepted, err := policy.Allow(base.VoteState, electorate.TotalWeight, ctx.BlockTime().Sub(submittedAt)); { - case err != nil: - return errors.Wrap(err, "policy execution") - case accepted: - base.Result = ProposalBase_Accepted + if base.Status == ProposalBase_Closed && base.Result == ProposalBase_Accepted { + logger := ctx.Logger().With("module", fmt.Sprintf("x/%s", ModuleName)) proposalType := reflect.TypeOf(proposal).String() @@ -451,25 +475,8 @@ func (k Keeper) ExecProposal(ctx sdk.Context, id ProposalID) error { results[i] = *r } _ = results // todo: merge results - //if exec, ok := k.ExecRouter[proposalType]; !ok { - // logger.Error("no executor for proposal", "type", proposalType, "proposalID", id) - // base.ExecutorResult = ProposalBase_Failure - //} else { - // // execute proposal in a nested TX and only flush on non error - // cacheCtx, writeCache := ctx.CacheContext() - // if err := exec(cacheCtx, proposal); err != nil { - // base.ExecutorResult = ProposalBase_Failure - // logger.Error("executor failed for proposal", "cause", err, "proposalID", id) - // } else { - // writeCache() - // base.ExecutorResult = ProposalBase_Success - // } - //} - default: - base.Result = ProposalBase_Rejected } - proposal.SetBase(base) - return k.proposalTable.Save(ctx, id.Uint64(), proposal) + return storeUpdates() } func (k Keeper) GetProposal(ctx sdk.Context, id ProposalID) (ProposalI, error) { @@ -488,31 +495,6 @@ func (k Keeper) CreateProposal(ctx sdk.Context, p ProposalI) (ProposalID, error) return ProposalID(id), nil } -// -//func (k Keeper) UpdateGroupAccountAdmin(ctx orm.HasKVStore, groupAcc sdk.AccAddress, newAdmin sdk.AccAddress) error { -// panic("implement me") -//} -// -//func (k Keeper) UpdateGroupAccountDecisionPolicy(ctx orm.HasKVStore, groupAcc sdk.AccAddress, newPolicy DecisionPolicy) error { -// panic("implement me") -//} -// -//func (k Keeper) UpdateGroupAccountComment(ctx orm.HasKVStore, groupAcc sdk.AccAddress, newComment string) error { -// panic("implement me") -//} -// -//func (k Keeper) Propose(ctx orm.HasKVStore, groupAcc sdk.AccAddress, approvers []sdk.AccAddress, msgs []sdk.Msg, comment string, execNow bool) (id ProposalID, execResult sdk.Result) { -// panic("implement me") -//} -// -//func (k Keeper) Vote(ctx orm.HasKVStore, id ProposalID, voters []sdk.AccAddress, choice Choice) error { -// panic("implement me") -//} -// -//func (k Keeper) Exec(ctx orm.HasKVStore, id ProposalID) sdk.Result { -// panic("implement me") -//} - type KeeperDELME interface { // obsolete when Keeper implements all functions // Groups CreateGroup(ctx orm.HasKVStore, admin sdk.AccAddress, members []Member, comment string) (GroupID, error) diff --git a/incubator/group/testdata/keeper.go b/incubator/group/testdata/keeper.go index 4c4301c..1173cb6 100644 --- a/incubator/group/testdata/keeper.go +++ b/incubator/group/testdata/keeper.go @@ -40,7 +40,7 @@ func CreateProposal(k Keeper, ctx sdk.Context, accountAddress sdk.AccAddress, co return 0, errors.Wrap(err, "block time conversion") } policy := account.GetDecisionPolicy() - window, err := types.DurationFromProto(&policy.GetThreshold().MaxVotingWindow) + window, err := types.DurationFromProto(&policy.GetThreshold().Timout) if err != nil { return 0, errors.Wrap(err, "maxVotingWindow time conversion") } @@ -60,8 +60,7 @@ func CreateProposal(k Keeper, ctx sdk.Context, accountAddress sdk.AccAddress, co GroupAccountVersion: account.Base.Version, Result: group.ProposalBase_Undefined, Status: group.ProposalBase_Submitted, - ExecutorResult: group.ProposalBase_NotRun, - VotingEndTime: *endTime, + Timeout: *endTime, }, Msgs:msgs, } diff --git a/incubator/group/types.pb.go b/incubator/group/types.pb.go index 6ae4424..2242e63 100644 --- a/incubator/group/types.pb.go +++ b/incubator/group/types.pb.go @@ -9,6 +9,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" types "github.com/gogo/protobuf/types" + _ "github.com/regen-network/cosmos-proto" io "io" math "math" math_bits "math/bits" @@ -129,41 +130,6 @@ func (ProposalBase_Result) EnumDescriptor() ([]byte, []int) { return fileDescriptor_d938547f84707355, []int{21, 1} } -type ProposalBase_ExecutorResult int32 - -const ( - // An empty value is not allowed - ProposalBase_PROPOSAL_EXECUTOR_RESULT_INVALID ProposalBase_ExecutorResult = 0 - // We have not yet run the executor - ProposalBase_NotRun ProposalBase_ExecutorResult = 1 - // The executor was successful and proposed action updated state - ProposalBase_Success ProposalBase_ExecutorResult = 2 - // The executor returned an error and proposed action didn't update state - ProposalBase_Failure ProposalBase_ExecutorResult = 3 -) - -var ProposalBase_ExecutorResult_name = map[int32]string{ - 0: "PROPOSAL_EXECUTOR_RESULT_INVALID", - 1: "PROPOSAL_EXECUTOR_RESULT_NOT_RUN", - 2: "PROPOSAL_EXECUTOR_RESULT_SUCCESS", - 3: "PROPOSAL_EXECUTOR_RESULT_FAILURE", -} - -var ProposalBase_ExecutorResult_value = map[string]int32{ - "PROPOSAL_EXECUTOR_RESULT_INVALID": 0, - "PROPOSAL_EXECUTOR_RESULT_NOT_RUN": 1, - "PROPOSAL_EXECUTOR_RESULT_SUCCESS": 2, - "PROPOSAL_EXECUTOR_RESULT_FAILURE": 3, -} - -func (x ProposalBase_ExecutorResult) String() string { - return proto.EnumName(ProposalBase_ExecutorResult_name, int32(x)) -} - -func (ProposalBase_ExecutorResult) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d938547f84707355, []int{21, 2} -} - type Msg struct { // Types that are valid to be assigned to Sum: // *Msg_CreateGroup @@ -1070,11 +1036,9 @@ func (*StdDecisionPolicy) XXX_OneofWrappers() []interface{} { type ThresholdDecisionPolicy struct { // threshold is a fix weight value that must be exceeded for a proposal to succeed. Threshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=threshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"threshold"` - // TODO: why do we need min/max? when people can change their vote there is no way we can - // close a proposal early. Even if everybody has voted already. I would propose a single value instead so that - // we can calculate the end of the voting period. - MinVotingWindow types.Duration `protobuf:"bytes,2,opt,name=min_voting_window,json=minVotingWindow,proto3" json:"min_voting_window"` - MaxVotingWindow types.Duration `protobuf:"bytes,3,opt,name=max_voting_window,json=maxVotingWindow,proto3" json:"max_voting_window"` + // timout is the duration from submission of a proposal to the end of voting period + // Within this times votes and exec messages can be submitted. + Timout types.Duration `protobuf:"bytes,2,opt,name=timout,proto3" json:"timout"` } func (m *ThresholdDecisionPolicy) Reset() { *m = ThresholdDecisionPolicy{} } @@ -1110,16 +1074,9 @@ func (m *ThresholdDecisionPolicy) XXX_DiscardUnknown() { var xxx_messageInfo_ThresholdDecisionPolicy proto.InternalMessageInfo -func (m *ThresholdDecisionPolicy) GetMinVotingWindow() types.Duration { +func (m *ThresholdDecisionPolicy) GetTimout() types.Duration { if m != nil { - return m.MinVotingWindow - } - return types.Duration{} -} - -func (m *ThresholdDecisionPolicy) GetMaxVotingWindow() types.Duration { - if m != nil { - return m.MaxVotingWindow + return m.Timout } return types.Duration{} } @@ -1625,12 +1582,12 @@ type ProposalBase struct { // Result is the final result based on the votes and election rule. Initial value is Undefined. // The result is persisted so that clients can always rely on this state and not have to replicate the logic. Result ProposalBase_Result `protobuf:"varint,8,opt,name=result,proto3,enum=cosmos_modules.incubator.group.v1_alpha.ProposalBase_Result" json:"result,omitempty"` - // Result is the final result based on the votes and election rule. Initial value is NotRun. - ExecutorResult ProposalBase_ExecutorResult `protobuf:"varint,9,opt,name=executor_result,json=executorResult,proto3,enum=cosmos_modules.incubator.group.v1_alpha.ProposalBase_ExecutorResult" json:"executor_result,omitempty"` - VoteState Tally `protobuf:"bytes,10,opt,name=vote_state,json=voteState,proto3" json:"vote_state"` - // Timestamp of the block where the voting period ends. Header times of the votes must be before this end time - // to be included in the election. - VotingEndTime types.Timestamp `protobuf:"bytes,11,opt,name=voting_end_time,json=votingEndTime,proto3" json:"voting_end_time"` + // Tally contains the sums of all weighted votes for this proposal. + VoteState Tally `protobuf:"bytes,9,opt,name=vote_state,json=voteState,proto3" json:"vote_state"` + // Timestamp of the block where the proposal execution times out. Header times of the votes and execution messages + // must be before this end time to be included in the election. After the timeout timestamp the proposal can not be + // executed anymore and should be considered pending delete. + Timeout types.Timestamp `protobuf:"bytes,10,opt,name=timeout,proto3" json:"timeout"` } func (m *ProposalBase) Reset() { *m = ProposalBase{} } @@ -1722,13 +1679,6 @@ func (m *ProposalBase) GetResult() ProposalBase_Result { return ProposalBase_PROPOSAL_RESULT_INVALID } -func (m *ProposalBase) GetExecutorResult() ProposalBase_ExecutorResult { - if m != nil { - return m.ExecutorResult - } - return ProposalBase_PROPOSAL_EXECUTOR_RESULT_INVALID -} - func (m *ProposalBase) GetVoteState() Tally { if m != nil { return m.VoteState @@ -1736,9 +1686,9 @@ func (m *ProposalBase) GetVoteState() Tally { return Tally{} } -func (m *ProposalBase) GetVotingEndTime() types.Timestamp { +func (m *ProposalBase) GetTimeout() types.Timestamp { if m != nil { - return m.VotingEndTime + return m.Timeout } return types.Timestamp{} } @@ -1907,7 +1857,6 @@ func init() { proto.RegisterEnum("cosmos_modules.incubator.group.v1_alpha.Choice", Choice_name, Choice_value) proto.RegisterEnum("cosmos_modules.incubator.group.v1_alpha.ProposalBase_Status", ProposalBase_Status_name, ProposalBase_Status_value) proto.RegisterEnum("cosmos_modules.incubator.group.v1_alpha.ProposalBase_Result", ProposalBase_Result_name, ProposalBase_Result_value) - proto.RegisterEnum("cosmos_modules.incubator.group.v1_alpha.ProposalBase_ExecutorResult", ProposalBase_ExecutorResult_name, ProposalBase_ExecutorResult_value) proto.RegisterType((*Msg)(nil), "cosmos_modules.incubator.group.v1_alpha.Msg") proto.RegisterType((*MsgCreateGroup)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgCreateGroup") proto.RegisterType((*MsgUpdateGroupMembers)(nil), "cosmos_modules.incubator.group.v1_alpha.MsgUpdateGroupMembers") @@ -1938,124 +1887,117 @@ func init() { func init() { proto.RegisterFile("types.proto", fileDescriptor_d938547f84707355) } var fileDescriptor_d938547f84707355 = []byte{ - // 1864 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcb, 0x6f, 0x23, 0x59, - 0xd5, 0x77, 0xf9, 0xed, 0xe3, 0x24, 0xed, 0xb9, 0xd3, 0xf3, 0xb5, 0x93, 0x6f, 0x88, 0x83, 0x19, - 0x35, 0x4d, 0x8b, 0x71, 0xa6, 0x9b, 0x05, 0x52, 0x0b, 0x10, 0x7e, 0xa5, 0x63, 0x92, 0xd8, 0x51, - 0x95, 0x9d, 0xe6, 0xd1, 0x52, 0x51, 0xae, 0xba, 0xe3, 0x14, 0xb8, 0xea, 0x5a, 0x55, 0xb7, 0xf2, - 0x90, 0x58, 0x00, 0x1b, 0x50, 0x4b, 0x48, 0x88, 0x15, 0x9b, 0x48, 0x33, 0x42, 0xac, 0x58, 0xf3, - 0x17, 0xc0, 0x62, 0x56, 0xa8, 0xd9, 0x01, 0x12, 0x11, 0x74, 0x6f, 0x58, 0x21, 0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, 0x9c, 0x80, 0xa1, 0x76, 0x12, 0xb9, 0x81, 0x76, 0x52, 0x86, 0x15, 0xd7, - 0x6b, 0x5b, 0x26, 0xa5, 0xd8, 0x50, 0xb5, 0xe0, 0x15, 0x72, 0x63, 0xac, 0xa5, 0x36, 0x83, 0xd7, - 0x60, 0x11, 0x9b, 0xf4, 0x95, 0x54, 0x91, 0xa2, 0xcf, 0x05, 0x71, 0x18, 0x26, 0x07, 0x77, 0xea, - 0x48, 0x14, 0x9a, 0x87, 0xf0, 0xd6, 0xf0, 0xdb, 0x56, 0xb0, 0x39, 0xce, 0x36, 0xbf, 0x39, 0x18, - 0x81, 0x40, 0xa6, 0x09, 0x71, 0x97, 0x6a, 0xd4, 0x73, 0xd9, 0xe3, 0xdc, 0xda, 0x1c, 0xaf, 0xb1, - 0x83, 0x79, 0x2a, 0x28, 0x0c, 0x43, 0x16, 0x58, 0x3e, 0xaa, 0x83, 0x5d, 0xaf, 0xcb, 0x9f, 0xd5, - 0x16, 0x46, 0x95, 0x19, 0x86, 0x2c, 0xb0, 0x90, 0x05, 0xb7, 0xfc, 0x76, 0xeb, 0x51, 0xe2, 0xa8, - 0x02, 0x3e, 0xc5, 0xe0, 0x2b, 0x8b, 0xc1, 0x57, 0x05, 0x98, 0x50, 0xb3, 0x86, 0x87, 0x7e, 0x23, - 0x05, 0xc0, 0xef, 0xac, 0xaa, 0xef, 0x13, 0x16, 0xaf, 0x6c, 0x85, 0xd9, 0x27, 0x46, 0xad, 0xdb, - 0x0d, 0x68, 0x9e, 0xf2, 0x71, 0xfc, 0x10, 0x61, 0xb4, 0x0b, 0xb7, 0xc4, 0x84, 0x85, 0x6d, 0x43, - 0xa5, 0xa6, 0x85, 0xb3, 0xe9, 0x19, 0x09, 0xb1, 0xca, 0x05, 0xab, 0xb6, 0xe1, 0xaf, 0xe4, 0x7f, - 0x2d, 0x41, 0x9c, 0x87, 0x1d, 0xfd, 0x3f, 0xdc, 0x39, 0x94, 0x1b, 0x87, 0x0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0x67, 0x2c, 0xed, 0x4c, 0xbc, 0x41, 0xec, 0xb3, - 0x4f, 0x8f, 0x92, 0xbf, 0xfc, 0x20, 0x17, 0xfa, 0xc7, 0x07, 0x39, 0xe9, 0xfe, 0x57, 0x21, 0xce, - 0x3d, 0x42, 0x69, 0x48, 0xb4, 0xea, 0x7b, 0xf5, 0xc6, 0x93, 0x7a, 0x26, 0x84, 0xe2, 0x10, 0xae, - 0x37, 0x32, 0x12, 0x4a, 0x40, 0xe4, 0x5b, 0x55, 0x25, 0x13, 0xf6, 0x57, 0x8b, 0x25, 0xa5, 0x59, - 0xac, 0xd5, 0x33, 0x11, 0x94, 0x84, 0xe8, 0x51, 0xb5, 0xd9, 0xc8, 0x44, 0x4b, 0xe5, 0x8f, 0x5e, - 0x6c, 0x4a, 0xcf, 0x5f, 0x6c, 0x4a, 0x7f, 0x7b, 0xb1, 0x29, 0xfd, 0xfc, 0xe5, 0x66, 0xe8, 0xf9, - 0xcb, 0xcd, 0xd0, 0x9f, 0x5e, 0x6e, 0x86, 0xbe, 0xfd, 0x85, 0xf1, 0xbc, 0x88, 0xd8, 0x6e, 0x5f, - 0xc5, 0x76, 0x9b, 0xc5, 0xb6, 0x1d, 0x67, 0xb1, 0xf8, 0xd2, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, - 0xa3, 0x08, 0x2c, 0xec, 0x3b, 0x1e, 0x00, 0x00, + // 1753 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcb, 0x6f, 0x23, 0x49, + 0x19, 0x77, 0xfb, 0xd1, 0xb6, 0x3f, 0x27, 0xc1, 0xd4, 0xce, 0x32, 0x4e, 0x58, 0xe2, 0xd0, 0xa0, + 0x61, 0x18, 0x18, 0x87, 0x1d, 0x0e, 0x2b, 0x45, 0x80, 0xf0, 0x6b, 0x26, 0x66, 0x12, 0x3b, 0x6a, + 0x3b, 0x59, 0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0x63, 0x28, 0x05, 0xf1, 0x93, 0x6a, 0xab, 0x91, 0x8d, 0x97, 0xca, 0x1f, + 0x3c, 0xdf, 0x96, 0x3e, 0x7c, 0xbe, 0x2d, 0xfd, 0xfd, 0xf9, 0xb6, 0xf4, 0xde, 0x8b, 0xed, 0xc8, + 0x87, 0x2f, 0xb6, 0x23, 0x7f, 0x7e, 0xb1, 0x1d, 0xf9, 0xde, 0x97, 0x27, 0xf3, 0x22, 0x62, 0xbb, + 0x7b, 0x19, 0xdb, 0x5d, 0x16, 0xdb, 0xb6, 0xcc, 0x62, 0xf1, 0xf5, 0xff, 0x05, 0x00, 0x00, 0xff, + 0xff, 0x1b, 0xa3, 0xe9, 0x61, 0xce, 0x1c, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -2082,6 +2024,29 @@ func (this *Params) Equal(that interface{}) bool { } return true } +func (this *StdDecisionPolicy) GetDecisionPolicy() DecisionPolicy { + if x := this.GetThreshold(); x != nil { + return x + } + return nil +} + +func (this *StdDecisionPolicy) SetDecisionPolicy(value DecisionPolicy) error { + if value == nil { + this.Sum = nil + return nil + } + switch vt := value.(type) { + case *ThresholdDecisionPolicy: + this.Sum = &StdDecisionPolicy_Threshold{vt} + return nil + case ThresholdDecisionPolicy: + this.Sum = &StdDecisionPolicy_Threshold{&vt} + return nil + } + return fmt.Errorf("can't encode value of type %T as message StdDecisionPolicy", value) +} + func (m *Msg) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2880,17 +2845,7 @@ func (m *ThresholdDecisionPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) var l int _ = l { - size, err := m.MaxVotingWindow.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.MinVotingWindow.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Timout.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3279,7 +3234,7 @@ func (m *ProposalBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l { - size, err := m.VotingEndTime.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3287,7 +3242,7 @@ func (m *ProposalBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x5a + dAtA[i] = 0x52 { size, err := m.VoteState.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -3297,12 +3252,7 @@ func (m *ProposalBase) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x52 - if m.ExecutorResult != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.ExecutorResult)) - i-- - dAtA[i] = 0x48 - } + dAtA[i] = 0x4a if m.Result != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.Result)) i-- @@ -3890,9 +3840,7 @@ func (m *ThresholdDecisionPolicy) Size() (n int) { _ = l l = m.Threshold.Size() n += 1 + l + sovTypes(uint64(l)) - l = m.MinVotingWindow.Size() - n += 1 + l + sovTypes(uint64(l)) - l = m.MaxVotingWindow.Size() + l = m.Timout.Size() n += 1 + l + sovTypes(uint64(l)) return n } @@ -4085,12 +4033,9 @@ func (m *ProposalBase) Size() (n int) { if m.Result != 0 { n += 1 + sovTypes(uint64(m.Result)) } - if m.ExecutorResult != 0 { - n += 1 + sovTypes(uint64(m.ExecutorResult)) - } l = m.VoteState.Size() n += 1 + l + sovTypes(uint64(l)) - l = m.VotingEndTime.Size() + l = m.Timeout.Size() n += 1 + l + sovTypes(uint64(l)) return n } @@ -6225,40 +6170,7 @@ func (m *ThresholdDecisionPolicy) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinVotingWindow", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.MinVotingWindow.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxVotingWindow", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Timout", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6285,7 +6197,7 @@ func (m *ThresholdDecisionPolicy) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.MaxVotingWindow.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Timout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -7655,25 +7567,6 @@ func (m *ProposalBase) Unmarshal(dAtA []byte) error { } } case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecutorResult", wireType) - } - m.ExecutorResult = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExecutorResult |= ProposalBase_ExecutorResult(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteState", wireType) } @@ -7706,9 +7599,9 @@ func (m *ProposalBase) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 11: + case 10: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingEndTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -7735,7 +7628,7 @@ func (m *ProposalBase) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.VotingEndTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/incubator/group/types.proto b/incubator/group/types.proto index b37d331..290dd6b 100644 --- a/incubator/group/types.proto +++ b/incubator/group/types.proto @@ -7,6 +7,8 @@ option go_package = "github.com/cosmos/modules/incubator/group"; import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; +import "third_party/proto/cosmos-proto/cosmos.proto"; + message Msg { oneof sum { @@ -105,6 +107,7 @@ message MsgUpdateGroupAccountComment { // MyAppDecisionPolicy should include all the existing StdDecisionPolicy types with the same field number and then // add custom DecisionPolicy types afterwards. message StdDecisionPolicy { + option (cosmos_proto.interface_type) = "DecisionPolicy"; oneof sum { ThresholdDecisionPolicy threshold = 1; } @@ -113,12 +116,9 @@ message StdDecisionPolicy { message ThresholdDecisionPolicy { // threshold is a fix weight value that must be exceeded for a proposal to succeed. string threshold = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; - - // TODO: why do we need min/max? when people can change their vote there is no way we can - // close a proposal early. Even if everybody has voted already. I would propose a single value instead so that - // we can calculate the end of the voting period. - google.protobuf.Duration min_voting_window = 2 [(gogoproto.nullable) = false]; - google.protobuf.Duration max_voting_window = 3 [(gogoproto.nullable) = false]; + // timout is the duration from submission of a proposal to the end of voting period + // Within this times votes and exec messages can be submitted. + google.protobuf.Duration timout = 2 [(gogoproto.nullable) = false]; } // @@ -266,24 +266,13 @@ message ProposalBase { // The result is persisted so that clients can always rely on this state and not have to replicate the logic. Result result = 8; - enum ExecutorResult { - // An empty value is not allowed - PROPOSAL_EXECUTOR_RESULT_INVALID = 0; - // We have not yet run the executor - PROPOSAL_EXECUTOR_RESULT_NOT_RUN = 1 [(gogoproto.enumvalue_customname) = "NotRun"]; - // The executor was successful and proposed action updated state - PROPOSAL_EXECUTOR_RESULT_SUCCESS = 2 [(gogoproto.enumvalue_customname) = "Success"]; - // The executor returned an error and proposed action didn't update state - PROPOSAL_EXECUTOR_RESULT_FAILURE = 3 [(gogoproto.enumvalue_customname) = "Failure"]; - } - // Result is the final result based on the votes and election rule. Initial value is NotRun. - ExecutorResult executor_result = 9; - - Tally vote_state = 10 [(gogoproto.nullable) = false]; + // Tally contains the sums of all weighted votes for this proposal. + Tally vote_state = 9 [(gogoproto.nullable) = false]; - // Timestamp of the block where the voting period ends. Header times of the votes must be before this end time - // to be included in the election. - google.protobuf.Timestamp voting_end_time = 11 [(gogoproto.nullable) = false]; + // Timestamp of the block where the proposal execution times out. Header times of the votes and execution messages + // must be before this end time to be included in the election. After the timeout timestamp the proposal can not be + // executed anymore and should be considered pending delete. + google.protobuf.Timestamp timeout = 10 [(gogoproto.nullable) = false]; } message Tally {