From 56ed27ad9cf8e97853955cff371f33552e534a67 Mon Sep 17 00:00:00 2001 From: Sunny Aggarwal Date: Fri, 22 Jan 2021 10:37:21 -0500 Subject: [PATCH] use @aaronc's suggested proto upgrade method --- docs/core/proto-docs.md | 49 +++++++- proto/cosmos/gov/v1beta1/gov.proto | 10 +- proto/cosmos/gov/v1beta1/tx.proto | 8 +- x/gov/types/gov.pb.go | 192 ++++++++++++++--------------- x/gov/types/tx.pb.go | 10 +- 5 files changed, 155 insertions(+), 114 deletions(-) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index d49cf8634bce..8c8dfc9c8233 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -249,6 +249,7 @@ - [TextProposal](#cosmos.gov.v1beta1.TextProposal) - [Vote](#cosmos.gov.v1beta1.Vote) - [VotingParams](#cosmos.gov.v1beta1.VotingParams) + - [WeightedVoteOption](#cosmos.gov.v1beta1.WeightedVoteOption) - [ProposalStatus](#cosmos.gov.v1beta1.ProposalStatus) - [VoteOption](#cosmos.gov.v1beta1.VoteOption) @@ -283,6 +284,8 @@ - [MsgSubmitProposalResponse](#cosmos.gov.v1beta1.MsgSubmitProposalResponse) - [MsgVote](#cosmos.gov.v1beta1.MsgVote) - [MsgVoteResponse](#cosmos.gov.v1beta1.MsgVoteResponse) + - [MsgWeightedVote](#cosmos.gov.v1beta1.MsgWeightedVote) + - [MsgWeightedVoteResponse](#cosmos.gov.v1beta1.MsgWeightedVoteResponse) - [Msg](#cosmos.gov.v1beta1.Msg) @@ -3904,7 +3907,7 @@ A Vote consists of a proposal ID, the voter, and the vote option. | ----- | ---- | ----- | ----------- | | `proposal_id` | [uint64](#uint64) | | | | `voter` | [string](#string) | | | -| `option` | [VoteOption](#cosmos.gov.v1beta1.VoteOption) | | | +| `options` | [WeightedVoteOption](#cosmos.gov.v1beta1.WeightedVoteOption) | repeated | | @@ -3925,6 +3928,22 @@ VotingParams defines the params for voting on governance proposals. + + + +### WeightedVoteOption +WeightedVoteOption defines a unit of vote for vote split. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `option` | [VoteOption](#cosmos.gov.v1beta1.VoteOption) | | | +| `weight` | [string](#string) | | | + + + + + @@ -4382,6 +4401,33 @@ MsgVoteResponse defines the Msg/Vote response type. + + + +### MsgWeightedVote +MsgVote defines a message to cast a vote. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `proposal_id` | [uint64](#uint64) | | | +| `voter` | [string](#string) | | | +| `options` | [WeightedVoteOption](#cosmos.gov.v1beta1.WeightedVoteOption) | repeated | | + + + + + + + + +### MsgWeightedVoteResponse +MsgWeightedVoteResponse defines the MsgWeightedVote response type. + + + + + @@ -4398,6 +4444,7 @@ Msg defines the bank Msg service. | ----------- | ------------ | ------------- | ------------| ------- | -------- | | `SubmitProposal` | [MsgSubmitProposal](#cosmos.gov.v1beta1.MsgSubmitProposal) | [MsgSubmitProposalResponse](#cosmos.gov.v1beta1.MsgSubmitProposalResponse) | SubmitProposal defines a method to create new proposal given a content. | | | `Vote` | [MsgVote](#cosmos.gov.v1beta1.MsgVote) | [MsgVoteResponse](#cosmos.gov.v1beta1.MsgVoteResponse) | Vote defines a method to add a vote on a specific proposal. | | +| `WeightedVote` | [MsgWeightedVote](#cosmos.gov.v1beta1.MsgWeightedVote) | [MsgWeightedVoteResponse](#cosmos.gov.v1beta1.MsgWeightedVoteResponse) | WeightedVote defines a method to add a weighted vote on a specific proposal. | | | `Deposit` | [MsgDeposit](#cosmos.gov.v1beta1.MsgDeposit) | [MsgDepositResponse](#cosmos.gov.v1beta1.MsgDepositResponse) | Deposit defines a method to add deposit on a specific proposal. | | diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index 25dd9a68cdb6..392534c535a1 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -32,7 +32,7 @@ enum VoteOption { // WeightedVoteOption defines a unit of vote for vote split. message WeightedVoteOption { VoteOption option = 1; - string weight = 2 [ + string weight = 2 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"weight\"" @@ -129,9 +129,11 @@ message Vote { option (gogoproto.goproto_stringer) = false; option (gogoproto.equal) = false; - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false]; + uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + reserved 3; + reserved "option"; + repeated WeightedVoteOption options = 4 [(gogoproto.nullable) = false]; } // DepositParams defines the params for deposits on governance proposals. diff --git a/proto/cosmos/gov/v1beta1/tx.proto b/proto/cosmos/gov/v1beta1/tx.proto index f5e1b5f1bf72..8635bf92c42a 100644 --- a/proto/cosmos/gov/v1beta1/tx.proto +++ b/proto/cosmos/gov/v1beta1/tx.proto @@ -60,14 +60,14 @@ message MsgVote { // MsgVote defines a message to cast a vote. message MsgWeightedVote { - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; option (gogoproto.goproto_stringer) = false; option (gogoproto.stringer) = false; option (gogoproto.goproto_getters) = false; - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false]; + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; + string voter = 2; + repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false]; } // MsgVoteResponse defines the Msg/Vote response type. diff --git a/x/gov/types/gov.pb.go b/x/gov/types/gov.pb.go index d6548f70ce82..caa52a67a818 100644 --- a/x/gov/types/gov.pb.go +++ b/x/gov/types/gov.pb.go @@ -328,7 +328,7 @@ var xxx_messageInfo_TallyResult proto.InternalMessageInfo type Vote struct { ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty" yaml:"proposal_id"` Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` - Options []WeightedVoteOption `protobuf:"bytes,3,rep,name=options,proto3" json:"options"` + Options []WeightedVoteOption `protobuf:"bytes,4,rep,name=options,proto3" json:"options"` } func (m *Vote) Reset() { *m = Vote{} } @@ -503,97 +503,98 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1beta1/gov.proto", fileDescriptor_6e82113c1a9a4b7c) } var fileDescriptor_6e82113c1a9a4b7c = []byte{ - // 1438 bytes of a gzipped FileDescriptorProto + // 1450 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x51, 0x68, 0xdb, 0x56, - 0x17, 0xb6, 0x1c, 0xc7, 0x89, 0xaf, 0x9d, 0x44, 0xbd, 0x49, 0x13, 0xc7, 0x7f, 0x7f, 0xc9, 0xd3, - 0x46, 0x09, 0xa5, 0x75, 0xda, 0x6c, 0x6c, 0x2c, 0x85, 0x6d, 0x56, 0xac, 0xac, 0x1e, 0xc5, 0x36, - 0xb2, 0xea, 0xd0, 0xee, 0x41, 0x28, 0xf6, 0xad, 0xa3, 0xcd, 0xd2, 0xf5, 0xac, 0xeb, 0x34, 0x66, - 0x2f, 0x7b, 0x2c, 0x1e, 0x8c, 0x3e, 0x16, 0x86, 0xa1, 0x30, 0xc6, 0x60, 0xcf, 0x7b, 0xde, 0x73, - 0x18, 0x83, 0x95, 0x3d, 0x95, 0x0d, 0xdc, 0x35, 0x85, 0x51, 0xf2, 0x98, 0x87, 0x3d, 0x0f, 0xe9, - 0x5e, 0xc5, 0xb2, 0x1d, 0x96, 0x79, 0x4f, 0xd1, 0x3d, 0xf7, 0x7c, 0xdf, 0x77, 0xce, 0xf1, 0x39, - 0x47, 0x0a, 0xb8, 0x54, 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 0x24, 0x67, 0xce, 0x6b, 0xc4, 0x5b, 0x4c, 0x67, 0x89, 0xea, 0x0c, - 0xa1, 0xa5, 0x89, 0x1a, 0x34, 0xe1, 0x61, 0xfd, 0x11, 0x6b, 0x80, 0x0b, 0xfb, 0x98, 0x98, 0x76, - 0xdd, 0xfd, 0x79, 0x5b, 0xac, 0xb0, 0xb3, 0xe7, 0xa6, 0xfd, 0x06, 0x0b, 0x27, 0x49, 0xc3, 0x19, - 0xa3, 0xa0, 0x79, 0x2f, 0x50, 0x7b, 0xd9, 0x35, 0x7b, 0x89, 0xdf, 0x07, 0xcc, 0x34, 0x28, 0x71, - 0xec, 0x5c, 0x2d, 0x89, 0x69, 0x2d, 0x0f, 0x69, 0x0d, 0x57, 0x78, 0x8e, 0x5a, 0x59, 0x81, 0x37, - 0x23, 0xee, 0x56, 0x91, 0x0e, 0xc3, 0x20, 0x1e, 0x6c, 0x9f, 0x0f, 0xc0, 0x54, 0x07, 0x39, 0x74, - 0x43, 0xc9, 0x99, 0x09, 0x36, 0x61, 0xde, 0x26, 0xaa, 0x0b, 0x85, 0xb7, 0xc0, 0x8c, 0xb1, 0xeb, - 0x10, 0xc3, 0x64, 0xbb, 0x6c, 0x62, 0x16, 0x1f, 0x0e, 0xdf, 0x03, 0x61, 0x1b, 0x7b, 0x03, 0x39, - 0x39, 0x49, 0xd8, 0xc6, 0xb0, 0x0e, 0x12, 0x36, 0xd6, 0x1f, 0x98, 0x64, 0x4f, 0xdf, 0x47, 0x04, - 0x7b, 0x63, 0x17, 0x93, 0x95, 0xc9, 0x98, 0x4e, 0xfa, 0xe2, 0x22, 0x2d, 0x6a, 0x90, 0x4b, 0x52, - 0x81, 0x8d, 0x77, 0x4c, 0xb2, 0x57, 0x41, 0x04, 0xb3, 0x52, 0x7e, 0xc7, 0x81, 0x88, 0xfb, 0x7a, - 0xf9, 0xef, 0x2b, 0x79, 0x09, 0x4c, 0xef, 0x63, 0x82, 0xfc, 0x75, 0x4c, 0x0f, 0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 0xf7, 0xff, 0x7e, 0x21, + 0xee, 0x7b, 0xff, 0xd0, 0x79, 0xfd, 0xbc, 0x13, 0xf3, 0x76, 0xc8, 0x9b, 0x7f, 0x05, 0x00, 0x00, + 0xff, 0xff, 0x51, 0x93, 0x54, 0x90, 0xeb, 0x0d, 0x00, 0x00, } func (this *TextProposal) Equal(that interface{}) bool { @@ -1028,7 +1029,7 @@ func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGov(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } } if len(m.Voter) > 0 { @@ -1450,10 +1451,7 @@ func (m *WeightedVoteOption) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthGov - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGov } if (iNdEx + skippy) > l { @@ -2306,7 +2304,7 @@ func (m *Vote) Unmarshal(dAtA []byte) error { } m.Voter = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) } diff --git a/x/gov/types/tx.pb.go b/x/gov/types/tx.pb.go index 93c4b63d7ace..24aac32f58c2 100644 --- a/x/gov/types/tx.pb.go +++ b/x/gov/types/tx.pb.go @@ -1493,10 +1493,7 @@ func (m *MsgWeightedVote) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } if (iNdEx + skippy) > l { @@ -1596,10 +1593,7 @@ func (m *MsgWeightedVoteResponse) Unmarshal(dAtA []byte) error { if err != nil { return err } - if skippy < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthTx } if (iNdEx + skippy) > l {