feat!: upstream expedited proposals (#14720)
This commit is contained in:
parent
b3724f1a0d
commit
4251905d56
@ -39,6 +39,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
### Features
|
||||
|
||||
* (x/gov) [#14720](https://github.com/cosmos/cosmos-sdk/pull/14720) Upstream expedited proposals from Osmosis.
|
||||
* (x/auth) [#14650](https://github.com/cosmos/cosmos-sdk/pull/14650) Add Textual SignModeHandler. It is however **NOT** enabled by default, and should only be used for **TESTING** purposes until `SIGN_MODE_TEXTUAL` is fully released.
|
||||
* (cli) [#14655](https://github.com/cosmos/cosmos-sdk/pull/14655) Add a new command to list supported algos.
|
||||
* (x/crisis) [#14588](https://github.com/cosmos/cosmos-sdk/pull/14588) Use CacheContext() in AssertInvariants()
|
||||
@ -131,7 +132,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
* [#13794](https://github.com/cosmos/cosmos-sdk/pull/13794) `types/module.Manager` now supports the
|
||||
`cosmossdk.io/core/appmodule.AppModule` API via the new `NewManagerFromMap` constructor.
|
||||
* [#14019](https://github.com/cosmos/cosmos-sdk/issues/14019) Remove the interface casting to allow other implementations of a `CommitMultiStore`.
|
||||
* (x/gov) [#14390](https://github.com/cosmos/cosmos-sdk/pull/14390) Add title, proposer and summary to proposal struct
|
||||
* (x/gov) [#14390](https://github.com/cosmos/cosmos-sdk/pull/14390) Add title, proposer and summary to proposal struct.
|
||||
* (baseapp) [#14417](https://github.com/cosmos/cosmos-sdk/pull/14417) `SetStreamingService` accepts appOptions, AppCodec and Storekeys needed to set streamers.
|
||||
* Store pacakge no longer has a dependency on baseapp.
|
||||
* (store) [#14438](https://github.com/cosmos/cosmos-sdk/pull/14438) Pass logger from baseapp to store.
|
||||
@ -170,6 +171,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
### API Breaking Changes
|
||||
|
||||
* (x/gov) [#14720](https://github.com/cosmos/cosmos-sdk/pull/14720) Add an expedited field in the gov v1 proposal and `MsgNewMsgProposal`.
|
||||
* [#14847](https://github.com/cosmos/cosmos-sdk/pull/14847) App and ModuleManager methods `InitGenesis`, `ExportGenesis`, `BeginBlock` and `EndBlock` now also return an error.
|
||||
* (simulation) [#14728](https://github.com/cosmos/cosmos-sdk/pull/14728) Rename the `ParamChanges` field to `LegacyParamChange` and `Contents` to `LegacyProposalContents` in `simulation.SimulationState`. Additionally it adds a `ProposalMsgs` field to `simulation.SimulationState`.
|
||||
* (x/upgrade) [#14764](https://github.com/cosmos/cosmos-sdk/pull/14764) The `x/upgrade` module is extracted to have a separate go.mod file which allows it to be a standalone module.
|
||||
|
||||
@ -57,6 +57,10 @@ This is no longer the case, the assertion has been loosened to only require modu
|
||||
|
||||
#### `x/gov`
|
||||
|
||||
##### Expedited Proposals
|
||||
|
||||
The `gov` v1 module has been updated to support the ability to expedite governance proposals. When a proposal is expedited, the voting period will be shortened to `ExpeditedVotingPeriod` parameter. An expedited proposal must have an higher voting threshold than a classic proposal, that threshold is defined with the `ExpeditedThreshold` parameter.
|
||||
|
||||
##### 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.
|
||||
|
||||
@ -1210,6 +1210,7 @@ var (
|
||||
fd_Proposal_title protoreflect.FieldDescriptor
|
||||
fd_Proposal_summary protoreflect.FieldDescriptor
|
||||
fd_Proposal_proposer protoreflect.FieldDescriptor
|
||||
fd_Proposal_expedited protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -1228,6 +1229,7 @@ func init() {
|
||||
fd_Proposal_title = md_Proposal.Fields().ByName("title")
|
||||
fd_Proposal_summary = md_Proposal.Fields().ByName("summary")
|
||||
fd_Proposal_proposer = md_Proposal.Fields().ByName("proposer")
|
||||
fd_Proposal_expedited = md_Proposal.Fields().ByName("expedited")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_Proposal)(nil)
|
||||
@ -1373,6 +1375,12 @@ func (x *fastReflection_Proposal) Range(f func(protoreflect.FieldDescriptor, pro
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Expedited != false {
|
||||
value := protoreflect.ValueOfBool(x.Expedited)
|
||||
if !f(fd_Proposal_expedited, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Has reports whether a field is populated.
|
||||
@ -1414,6 +1422,8 @@ func (x *fastReflection_Proposal) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
return x.Summary != ""
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
return x.Proposer != ""
|
||||
case "cosmos.gov.v1.Proposal.expedited":
|
||||
return x.Expedited != false
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1456,6 +1466,8 @@ func (x *fastReflection_Proposal) Clear(fd protoreflect.FieldDescriptor) {
|
||||
x.Summary = ""
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
x.Proposer = ""
|
||||
case "cosmos.gov.v1.Proposal.expedited":
|
||||
x.Expedited = false
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1517,6 +1529,9 @@ func (x *fastReflection_Proposal) Get(descriptor protoreflect.FieldDescriptor) p
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
value := x.Proposer
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "cosmos.gov.v1.Proposal.expedited":
|
||||
value := x.Expedited
|
||||
return protoreflect.ValueOfBool(value)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1567,6 +1582,8 @@ func (x *fastReflection_Proposal) Set(fd protoreflect.FieldDescriptor, value pro
|
||||
x.Summary = value.Interface().(string)
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
x.Proposer = value.Interface().(string)
|
||||
case "cosmos.gov.v1.Proposal.expedited":
|
||||
x.Expedited = value.Bool()
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1636,6 +1653,8 @@ func (x *fastReflection_Proposal) Mutable(fd protoreflect.FieldDescriptor) proto
|
||||
panic(fmt.Errorf("field summary of message cosmos.gov.v1.Proposal is not mutable"))
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
panic(fmt.Errorf("field proposer of message cosmos.gov.v1.Proposal is not mutable"))
|
||||
case "cosmos.gov.v1.Proposal.expedited":
|
||||
panic(fmt.Errorf("field expedited of message cosmos.gov.v1.Proposal is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1682,6 +1701,8 @@ func (x *fastReflection_Proposal) NewField(fd protoreflect.FieldDescriptor) prot
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.Proposal.proposer":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.Proposal.expedited":
|
||||
return protoreflect.ValueOfBool(false)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Proposal"))
|
||||
@ -1805,6 +1826,9 @@ func (x *fastReflection_Proposal) ProtoMethods() *protoiface.Methods {
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.Expedited {
|
||||
n += 2
|
||||
}
|
||||
if x.unknownFields != nil {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
@ -1834,6 +1858,16 @@ func (x *fastReflection_Proposal) ProtoMethods() *protoiface.Methods {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if x.Expedited {
|
||||
i--
|
||||
if x.Expedited {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x70
|
||||
}
|
||||
if len(x.Proposer) > 0 {
|
||||
i -= len(x.Proposer)
|
||||
copy(dAtA[i:], x.Proposer)
|
||||
@ -2437,6 +2471,26 @@ func (x *fastReflection_Proposal) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
x.Proposer = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 14:
|
||||
if wireType != 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expedited", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
x.Expedited = bool(v != 0)
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
@ -5361,6 +5415,57 @@ func (x *_Params_1_list) IsValid() bool {
|
||||
return x.list != nil
|
||||
}
|
||||
|
||||
var _ protoreflect.List = (*_Params_12_list)(nil)
|
||||
|
||||
type _Params_12_list struct {
|
||||
list *[]*v1beta1.Coin
|
||||
}
|
||||
|
||||
func (x *_Params_12_list) Len() int {
|
||||
if x.list == nil {
|
||||
return 0
|
||||
}
|
||||
return len(*x.list)
|
||||
}
|
||||
|
||||
func (x *_Params_12_list) Get(i int) protoreflect.Value {
|
||||
return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect())
|
||||
}
|
||||
|
||||
func (x *_Params_12_list) Set(i int, value protoreflect.Value) {
|
||||
valueUnwrapped := value.Message()
|
||||
concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin)
|
||||
(*x.list)[i] = concreteValue
|
||||
}
|
||||
|
||||
func (x *_Params_12_list) Append(value protoreflect.Value) {
|
||||
valueUnwrapped := value.Message()
|
||||
concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin)
|
||||
*x.list = append(*x.list, concreteValue)
|
||||
}
|
||||
|
||||
func (x *_Params_12_list) AppendMutable() protoreflect.Value {
|
||||
v := new(v1beta1.Coin)
|
||||
*x.list = append(*x.list, v)
|
||||
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
||||
}
|
||||
|
||||
func (x *_Params_12_list) Truncate(n int) {
|
||||
for i := n; i < len(*x.list); i++ {
|
||||
(*x.list)[i] = nil
|
||||
}
|
||||
*x.list = (*x.list)[:n]
|
||||
}
|
||||
|
||||
func (x *_Params_12_list) NewElement() protoreflect.Value {
|
||||
v := new(v1beta1.Coin)
|
||||
return protoreflect.ValueOfMessage(v.ProtoReflect())
|
||||
}
|
||||
|
||||
func (x *_Params_12_list) IsValid() bool {
|
||||
return x.list != nil
|
||||
}
|
||||
|
||||
var (
|
||||
md_Params protoreflect.MessageDescriptor
|
||||
fd_Params_min_deposit protoreflect.FieldDescriptor
|
||||
@ -5372,6 +5477,9 @@ var (
|
||||
fd_Params_min_initial_deposit_ratio protoreflect.FieldDescriptor
|
||||
fd_Params_proposal_cancel_ratio protoreflect.FieldDescriptor
|
||||
fd_Params_proposal_cancel_dest protoreflect.FieldDescriptor
|
||||
fd_Params_expedited_voting_period protoreflect.FieldDescriptor
|
||||
fd_Params_expedited_threshold protoreflect.FieldDescriptor
|
||||
fd_Params_expedited_min_deposit protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -5386,6 +5494,9 @@ func init() {
|
||||
fd_Params_min_initial_deposit_ratio = md_Params.Fields().ByName("min_initial_deposit_ratio")
|
||||
fd_Params_proposal_cancel_ratio = md_Params.Fields().ByName("proposal_cancel_ratio")
|
||||
fd_Params_proposal_cancel_dest = md_Params.Fields().ByName("proposal_cancel_dest")
|
||||
fd_Params_expedited_voting_period = md_Params.Fields().ByName("expedited_voting_period")
|
||||
fd_Params_expedited_threshold = md_Params.Fields().ByName("expedited_threshold")
|
||||
fd_Params_expedited_min_deposit = md_Params.Fields().ByName("expedited_min_deposit")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_Params)(nil)
|
||||
@ -5507,6 +5618,24 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.ExpeditedVotingPeriod != nil {
|
||||
value := protoreflect.ValueOfMessage(x.ExpeditedVotingPeriod.ProtoReflect())
|
||||
if !f(fd_Params_expedited_voting_period, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.ExpeditedThreshold != "" {
|
||||
value := protoreflect.ValueOfString(x.ExpeditedThreshold)
|
||||
if !f(fd_Params_expedited_threshold, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if len(x.ExpeditedMinDeposit) != 0 {
|
||||
value := protoreflect.ValueOfList(&_Params_12_list{list: &x.ExpeditedMinDeposit})
|
||||
if !f(fd_Params_expedited_min_deposit, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Has reports whether a field is populated.
|
||||
@ -5540,6 +5669,12 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
return x.ProposalCancelRatio != ""
|
||||
case "cosmos.gov.v1.Params.proposal_cancel_dest":
|
||||
return x.ProposalCancelDest != ""
|
||||
case "cosmos.gov.v1.Params.expedited_voting_period":
|
||||
return x.ExpeditedVotingPeriod != nil
|
||||
case "cosmos.gov.v1.Params.expedited_threshold":
|
||||
return x.ExpeditedThreshold != ""
|
||||
case "cosmos.gov.v1.Params.expedited_min_deposit":
|
||||
return len(x.ExpeditedMinDeposit) != 0
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params"))
|
||||
@ -5574,6 +5709,12 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) {
|
||||
x.ProposalCancelRatio = ""
|
||||
case "cosmos.gov.v1.Params.proposal_cancel_dest":
|
||||
x.ProposalCancelDest = ""
|
||||
case "cosmos.gov.v1.Params.expedited_voting_period":
|
||||
x.ExpeditedVotingPeriod = nil
|
||||
case "cosmos.gov.v1.Params.expedited_threshold":
|
||||
x.ExpeditedThreshold = ""
|
||||
case "cosmos.gov.v1.Params.expedited_min_deposit":
|
||||
x.ExpeditedMinDeposit = nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params"))
|
||||
@ -5620,6 +5761,18 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro
|
||||
case "cosmos.gov.v1.Params.proposal_cancel_dest":
|
||||
value := x.ProposalCancelDest
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "cosmos.gov.v1.Params.expedited_voting_period":
|
||||
value := x.ExpeditedVotingPeriod
|
||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||
case "cosmos.gov.v1.Params.expedited_threshold":
|
||||
value := x.ExpeditedThreshold
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "cosmos.gov.v1.Params.expedited_min_deposit":
|
||||
if len(x.ExpeditedMinDeposit) == 0 {
|
||||
return protoreflect.ValueOfList(&_Params_12_list{})
|
||||
}
|
||||
listValue := &_Params_12_list{list: &x.ExpeditedMinDeposit}
|
||||
return protoreflect.ValueOfList(listValue)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params"))
|
||||
@ -5660,6 +5813,14 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto
|
||||
x.ProposalCancelRatio = value.Interface().(string)
|
||||
case "cosmos.gov.v1.Params.proposal_cancel_dest":
|
||||
x.ProposalCancelDest = value.Interface().(string)
|
||||
case "cosmos.gov.v1.Params.expedited_voting_period":
|
||||
x.ExpeditedVotingPeriod = value.Message().Interface().(*durationpb.Duration)
|
||||
case "cosmos.gov.v1.Params.expedited_threshold":
|
||||
x.ExpeditedThreshold = value.Interface().(string)
|
||||
case "cosmos.gov.v1.Params.expedited_min_deposit":
|
||||
lv := value.List()
|
||||
clv := lv.(*_Params_12_list)
|
||||
x.ExpeditedMinDeposit = *clv.list
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params"))
|
||||
@ -5696,6 +5857,17 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore
|
||||
x.VotingPeriod = new(durationpb.Duration)
|
||||
}
|
||||
return protoreflect.ValueOfMessage(x.VotingPeriod.ProtoReflect())
|
||||
case "cosmos.gov.v1.Params.expedited_voting_period":
|
||||
if x.ExpeditedVotingPeriod == nil {
|
||||
x.ExpeditedVotingPeriod = new(durationpb.Duration)
|
||||
}
|
||||
return protoreflect.ValueOfMessage(x.ExpeditedVotingPeriod.ProtoReflect())
|
||||
case "cosmos.gov.v1.Params.expedited_min_deposit":
|
||||
if x.ExpeditedMinDeposit == nil {
|
||||
x.ExpeditedMinDeposit = []*v1beta1.Coin{}
|
||||
}
|
||||
value := &_Params_12_list{list: &x.ExpeditedMinDeposit}
|
||||
return protoreflect.ValueOfList(value)
|
||||
case "cosmos.gov.v1.Params.quorum":
|
||||
panic(fmt.Errorf("field quorum of message cosmos.gov.v1.Params is not mutable"))
|
||||
case "cosmos.gov.v1.Params.threshold":
|
||||
@ -5708,6 +5880,8 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore
|
||||
panic(fmt.Errorf("field proposal_cancel_ratio of message cosmos.gov.v1.Params is not mutable"))
|
||||
case "cosmos.gov.v1.Params.proposal_cancel_dest":
|
||||
panic(fmt.Errorf("field proposal_cancel_dest of message cosmos.gov.v1.Params is not mutable"))
|
||||
case "cosmos.gov.v1.Params.expedited_threshold":
|
||||
panic(fmt.Errorf("field expedited_threshold of message cosmos.gov.v1.Params is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params"))
|
||||
@ -5742,6 +5916,14 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.Params.proposal_cancel_dest":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.Params.expedited_voting_period":
|
||||
m := new(durationpb.Duration)
|
||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||
case "cosmos.gov.v1.Params.expedited_threshold":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.Params.expedited_min_deposit":
|
||||
list := []*v1beta1.Coin{}
|
||||
return protoreflect.ValueOfList(&_Params_12_list{list: &list})
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params"))
|
||||
@ -5849,6 +6031,20 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods {
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.ExpeditedVotingPeriod != nil {
|
||||
l = options.Size(x.ExpeditedVotingPeriod)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
l = len(x.ExpeditedThreshold)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if len(x.ExpeditedMinDeposit) > 0 {
|
||||
for _, e := range x.ExpeditedMinDeposit {
|
||||
l = options.Size(e)
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
}
|
||||
if x.unknownFields != nil {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
@ -5878,6 +6074,43 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if len(x.ExpeditedMinDeposit) > 0 {
|
||||
for iNdEx := len(x.ExpeditedMinDeposit) - 1; iNdEx >= 0; iNdEx-- {
|
||||
encoded, err := options.Marshal(x.ExpeditedMinDeposit[iNdEx])
|
||||
if err != nil {
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, err
|
||||
}
|
||||
i -= len(encoded)
|
||||
copy(dAtA[i:], encoded)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
||||
i--
|
||||
dAtA[i] = 0x62
|
||||
}
|
||||
}
|
||||
if len(x.ExpeditedThreshold) > 0 {
|
||||
i -= len(x.ExpeditedThreshold)
|
||||
copy(dAtA[i:], x.ExpeditedThreshold)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ExpeditedThreshold)))
|
||||
i--
|
||||
dAtA[i] = 0x5a
|
||||
}
|
||||
if x.ExpeditedVotingPeriod != nil {
|
||||
encoded, err := options.Marshal(x.ExpeditedVotingPeriod)
|
||||
if err != nil {
|
||||
return protoiface.MarshalOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Buf: input.Buf,
|
||||
}, err
|
||||
}
|
||||
i -= len(encoded)
|
||||
copy(dAtA[i:], encoded)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
|
||||
i--
|
||||
dAtA[i] = 0x52
|
||||
}
|
||||
if len(x.ProposalCancelDest) > 0 {
|
||||
i -= len(x.ProposalCancelDest)
|
||||
copy(dAtA[i:], x.ProposalCancelDest)
|
||||
@ -6311,6 +6544,108 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
x.ProposalCancelDest = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 10:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpeditedVotingPeriod", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
if x.ExpeditedVotingPeriod == nil {
|
||||
x.ExpeditedVotingPeriod = &durationpb.Duration{}
|
||||
}
|
||||
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExpeditedVotingPeriod); err != nil {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 11:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpeditedThreshold", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.ExpeditedThreshold = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 12:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpeditedMinDeposit", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.ExpeditedMinDeposit = append(x.ExpeditedMinDeposit, &v1beta1.Coin{})
|
||||
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ExpeditedMinDeposit[len(x.ExpeditedMinDeposit)-1]); err != nil {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
@ -6630,10 +6965,14 @@ type Proposal struct {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
Summary string `protobuf:"bytes,12,opt,name=summary,proto3" json:"summary,omitempty"`
|
||||
// Proposer is the address of the proposal sumbitter
|
||||
// proposer is the address of the proposal sumbitter
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
Proposer string `protobuf:"bytes,13,opt,name=proposer,proto3" json:"proposer,omitempty"`
|
||||
// expedited defines if the proposal is expedited
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
Expedited bool `protobuf:"varint,14,opt,name=expedited,proto3" json:"expedited,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Proposal) Reset() {
|
||||
@ -6747,6 +7086,13 @@ func (x *Proposal) GetProposer() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Proposal) GetExpedited() bool {
|
||||
if x != nil {
|
||||
return x.Expedited
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// TallyResult defines a standard tally for a governance proposal.
|
||||
type TallyResult struct {
|
||||
state protoimpl.MessageState
|
||||
@ -6877,6 +7223,8 @@ func (x *Vote) GetMetadata() string {
|
||||
}
|
||||
|
||||
// DepositParams defines the params for deposits on governance proposals.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
type DepositParams struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -6924,6 +7272,8 @@ func (x *DepositParams) GetMaxDepositPeriod() *durationpb.Duration {
|
||||
}
|
||||
|
||||
// VotingParams defines the params for voting on governance proposals.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
type VotingParams struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -6961,6 +7311,8 @@ func (x *VotingParams) GetVotingPeriod() *durationpb.Duration {
|
||||
}
|
||||
|
||||
// TallyParams defines the params for tallying votes on governance proposals.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
type TallyParams struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -7051,6 +7403,16 @@ type Params struct {
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
ProposalCancelDest string `protobuf:"bytes,9,opt,name=proposal_cancel_dest,json=proposalCancelDest,proto3" json:"proposal_cancel_dest,omitempty"`
|
||||
// Duration of the voting period of an expedited proposal.
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
ExpeditedVotingPeriod *durationpb.Duration `protobuf:"bytes,10,opt,name=expedited_voting_period,json=expeditedVotingPeriod,proto3" json:"expedited_voting_period,omitempty"`
|
||||
// Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
ExpeditedThreshold string `protobuf:"bytes,11,opt,name=expedited_threshold,json=expeditedThreshold,proto3" json:"expedited_threshold,omitempty"`
|
||||
// Minimum expedited deposit for a proposal to enter voting period.
|
||||
ExpeditedMinDeposit []*v1beta1.Coin `protobuf:"bytes,12,rep,name=expedited_min_deposit,json=expeditedMinDeposit,proto3" json:"expedited_min_deposit,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Params) Reset() {
|
||||
@ -7136,6 +7498,27 @@ func (x *Params) GetProposalCancelDest() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Params) GetExpeditedVotingPeriod() *durationpb.Duration {
|
||||
if x != nil {
|
||||
return x.ExpeditedVotingPeriod
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Params) GetExpeditedThreshold() string {
|
||||
if x != nil {
|
||||
return x.ExpeditedThreshold
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *Params) GetExpeditedMinDeposit() []*v1beta1.Coin {
|
||||
if x != nil {
|
||||
return x.ExpeditedMinDeposit
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_cosmos_gov_v1_gov_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
|
||||
@ -7170,7 +7553,7 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
|
||||
0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19,
|
||||
0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62,
|
||||
0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8,
|
||||
0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xc1, 0x05, 0x0a,
|
||||
0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xdf, 0x05, 0x0a,
|
||||
0x08, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73,
|
||||
0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
|
||||
@ -7215,130 +7598,147 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{
|
||||
0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4,
|
||||
0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
|
||||
0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72,
|
||||
0x22, 0xd7, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
|
||||
0x12, 0x2b, 0x0a, 0x09, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x49, 0x6e, 0x74, 0x52, 0x08, 0x79, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a,
|
||||
0x0d, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x12, 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x49, 0x6e, 0x74, 0x52, 0x07, 0x6e, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a,
|
||||
0x12, 0x6e, 0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x6e, 0x6f, 0x57, 0x69, 0x74,
|
||||
0x68, 0x56, 0x65, 0x74, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x04, 0x56,
|
||||
0x6f, 0x74, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73,
|
||||
0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76,
|
||||
0x6f, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
|
||||
0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67,
|
||||
0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f,
|
||||
0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08,
|
||||
0x03, 0x10, 0x04, 0x22, 0xd9, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70,
|
||||
0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, 0x6d,
|
||||
0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65,
|
||||
0x6d, 0x70, 0x74, 0x79, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
|
||||
0x12, 0x6d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f,
|
||||
0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
|
||||
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x24, 0xea, 0xde, 0x1f, 0x1c, 0x6d, 0x61, 0x78,
|
||||
0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c,
|
||||
0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d,
|
||||
0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x22,
|
||||
0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12,
|
||||
0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50,
|
||||
0x65, 0x72, 0x69, 0x6f, 0x64, 0x22, 0x9a, 0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a,
|
||||
0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63,
|
||||
0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76,
|
||||
0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f,
|
||||
0x6c, 0x64, 0x22, 0xcc, 0x04, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a,
|
||||
0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65,
|
||||
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8,
|
||||
0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70,
|
||||
0x6f, 0x73, 0x69, 0x74, 0x12, 0x4d, 0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f,
|
||||
0x01, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72,
|
||||
0x69, 0x6f, 0x64, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65,
|
||||
0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x18, 0x0e, 0x20,
|
||||
0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x22, 0xd7,
|
||||
0x01, 0x0a, 0x0b, 0x54, 0x61, 0x6c, 0x6c, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x2b,
|
||||
0x0a, 0x09, 0x79, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e,
|
||||
0x74, 0x52, 0x08, 0x79, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x0d, 0x61,
|
||||
0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49,
|
||||
0x6e, 0x74, 0x52, 0x0c, 0x61, 0x62, 0x73, 0x74, 0x61, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x12, 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49,
|
||||
0x6e, 0x74, 0x52, 0x07, 0x6e, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x12, 0x6e,
|
||||
0x6f, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0x52, 0x0f, 0x6e, 0x6f, 0x57, 0x69, 0x74, 0x68, 0x56,
|
||||
0x65, 0x74, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb6, 0x01, 0x0a, 0x04, 0x56, 0x6f, 0x74,
|
||||
0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c,
|
||||
0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64,
|
||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74,
|
||||
0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76,
|
||||
0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x65,
|
||||
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08, 0x03, 0x10,
|
||||
0x04, 0x22, 0xdd, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x61, 0x72,
|
||||
0x61, 0x6d, 0x73, 0x12, 0x59, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73,
|
||||
0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43,
|
||||
0x6f, 0x69, 0x6e, 0x42, 0x1d, 0xc8, 0xde, 0x1f, 0x00, 0xea, 0xde, 0x1f, 0x15, 0x6d, 0x69, 0x6e,
|
||||
0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2c, 0x6f, 0x6d, 0x69, 0x74, 0x65, 0x6d, 0x70,
|
||||
0x74, 0x79, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x6d,
|
||||
0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65,
|
||||
0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74,
|
||||
0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f,
|
||||
0x72, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75,
|
||||
0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12,
|
||||
0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c,
|
||||
0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72,
|
||||
0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x49, 0x0a, 0x19, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e,
|
||||
0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, 0x69, 0x6e, 0x49, 0x6e,
|
||||
0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x12, 0x42, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x63, 0x61,
|
||||
0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63,
|
||||
0x52, 0x13, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c,
|
||||
0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x4a, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61,
|
||||
0x6c, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x70,
|
||||
0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x65, 0x73,
|
||||
0x74, 0x2a, 0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
|
||||
0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a,
|
||||
0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53,
|
||||
0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f,
|
||||
0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56,
|
||||
0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12,
|
||||
0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e,
|
||||
0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x2a, 0xce, 0x01,
|
||||
0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41,
|
||||
0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
|
||||
0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54,
|
||||
0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52,
|
||||
0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41,
|
||||
0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f,
|
||||
0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50,
|
||||
0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53,
|
||||
0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c,
|
||||
0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44,
|
||||
0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53,
|
||||
0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, 0x99,
|
||||
0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f,
|
||||
0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
|
||||
0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31,
|
||||
0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42,
|
||||
0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x24, 0xea, 0xde, 0x1f, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x64,
|
||||
0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x2c, 0x6f, 0x6d,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78,
|
||||
0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, 0x02, 0x18,
|
||||
0x01, 0x22, 0x58, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69,
|
||||
0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x9e, 0x01, 0x0a, 0x0b,
|
||||
0x54, 0x61, 0x6c, 0x6c, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x0a, 0x06, 0x71,
|
||||
0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d,
|
||||
0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f,
|
||||
0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c,
|
||||
0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68,
|
||||
0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54,
|
||||
0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xc0, 0x06, 0x0a,
|
||||
0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64,
|
||||
0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
|
||||
0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0,
|
||||
0x2a, 0x01, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x4d,
|
||||
0x0a, 0x12, 0x6d, 0x61, 0x78, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x70, 0x65,
|
||||
0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
|
||||
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x10, 0x6d, 0x61, 0x78,
|
||||
0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x44, 0x0a,
|
||||
0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42,
|
||||
0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72,
|
||||
0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74,
|
||||
0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e,
|
||||
0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09,
|
||||
0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74,
|
||||
0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65,
|
||||
0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64,
|
||||
0x12, 0x49, 0x0a, 0x19, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f,
|
||||
0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x44, 0x65, 0x63, 0x52, 0x16, 0x6d, 0x69, 0x6e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44,
|
||||
0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12, 0x42, 0x0a, 0x15, 0x70,
|
||||
0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x5f, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x70,
|
||||
0x6f, 0x73, 0x61, 0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x61, 0x74, 0x69, 0x6f, 0x12,
|
||||
0x4a, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x63, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x6c, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2,
|
||||
0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||
0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61,
|
||||
0x6c, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x17, 0x65,
|
||||
0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f,
|
||||
0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
|
||||
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x15, 0x65,
|
||||
0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x56, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65,
|
||||
0x72, 0x69, 0x6f, 0x64, 0x12, 0x3f, 0x0a, 0x13, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65,
|
||||
0x64, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65,
|
||||
0x63, 0x52, 0x12, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x54, 0x68, 0x72, 0x65,
|
||||
0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x58, 0x0a, 0x15, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74,
|
||||
0x65, 0x64, 0x5f, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x0c,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61,
|
||||
0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42,
|
||||
0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x13, 0x65, 0x78, 0x70, 0x65,
|
||||
0x64, 0x69, 0x74, 0x65, 0x64, 0x4d, 0x69, 0x6e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x2a,
|
||||
0x89, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b,
|
||||
0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e,
|
||||
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56,
|
||||
0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01,
|
||||
0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
|
||||
0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54,
|
||||
0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x1c, 0x0a,
|
||||
0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f,
|
||||
0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x2a, 0xce, 0x01, 0x0a, 0x0e,
|
||||
0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f,
|
||||
0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55,
|
||||
0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
|
||||
0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54,
|
||||
0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f,
|
||||
0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f,
|
||||
0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45,
|
||||
0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53,
|
||||
0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44,
|
||||
0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53,
|
||||
0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04,
|
||||
0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41,
|
||||
0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, 0x99, 0x01, 0x0a,
|
||||
0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e,
|
||||
0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67,
|
||||
0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
|
||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a,
|
||||
0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -7390,11 +7790,13 @@ var file_cosmos_gov_v1_gov_proto_depIdxs = []int32{
|
||||
11, // 14: cosmos.gov.v1.Params.min_deposit:type_name -> cosmos.base.v1beta1.Coin
|
||||
14, // 15: cosmos.gov.v1.Params.max_deposit_period:type_name -> google.protobuf.Duration
|
||||
14, // 16: cosmos.gov.v1.Params.voting_period:type_name -> google.protobuf.Duration
|
||||
17, // [17:17] is the sub-list for method output_type
|
||||
17, // [17:17] is the sub-list for method input_type
|
||||
17, // [17:17] is the sub-list for extension type_name
|
||||
17, // [17:17] is the sub-list for extension extendee
|
||||
0, // [0:17] is the sub-list for field type_name
|
||||
14, // 17: cosmos.gov.v1.Params.expedited_voting_period:type_name -> google.protobuf.Duration
|
||||
11, // 18: cosmos.gov.v1.Params.expedited_min_deposit:type_name -> cosmos.base.v1beta1.Coin
|
||||
19, // [19:19] is the sub-list for method output_type
|
||||
19, // [19:19] is the sub-list for method input_type
|
||||
19, // [19:19] is the sub-list for extension type_name
|
||||
19, // [19:19] is the sub-list for extension extendee
|
||||
0, // [0:19] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_cosmos_gov_v1_gov_proto_init() }
|
||||
|
||||
@ -129,6 +129,7 @@ var (
|
||||
fd_MsgSubmitProposal_metadata protoreflect.FieldDescriptor
|
||||
fd_MsgSubmitProposal_title protoreflect.FieldDescriptor
|
||||
fd_MsgSubmitProposal_summary protoreflect.FieldDescriptor
|
||||
fd_MsgSubmitProposal_expedited protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -140,6 +141,7 @@ func init() {
|
||||
fd_MsgSubmitProposal_metadata = md_MsgSubmitProposal.Fields().ByName("metadata")
|
||||
fd_MsgSubmitProposal_title = md_MsgSubmitProposal.Fields().ByName("title")
|
||||
fd_MsgSubmitProposal_summary = md_MsgSubmitProposal.Fields().ByName("summary")
|
||||
fd_MsgSubmitProposal_expedited = md_MsgSubmitProposal.Fields().ByName("expedited")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_MsgSubmitProposal)(nil)
|
||||
@ -243,6 +245,12 @@ func (x *fastReflection_MsgSubmitProposal) Range(f func(protoreflect.FieldDescri
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Expedited != false {
|
||||
value := protoreflect.ValueOfBool(x.Expedited)
|
||||
if !f(fd_MsgSubmitProposal_expedited, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Has reports whether a field is populated.
|
||||
@ -270,6 +278,8 @@ func (x *fastReflection_MsgSubmitProposal) Has(fd protoreflect.FieldDescriptor)
|
||||
return x.Title != ""
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
return x.Summary != ""
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.expedited":
|
||||
return x.Expedited != false
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -298,6 +308,8 @@ func (x *fastReflection_MsgSubmitProposal) Clear(fd protoreflect.FieldDescriptor
|
||||
x.Title = ""
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
x.Summary = ""
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.expedited":
|
||||
x.Expedited = false
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -338,6 +350,9 @@ func (x *fastReflection_MsgSubmitProposal) Get(descriptor protoreflect.FieldDesc
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
value := x.Summary
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.expedited":
|
||||
value := x.Expedited
|
||||
return protoreflect.ValueOfBool(value)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -374,6 +389,8 @@ func (x *fastReflection_MsgSubmitProposal) Set(fd protoreflect.FieldDescriptor,
|
||||
x.Title = value.Interface().(string)
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
x.Summary = value.Interface().(string)
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.expedited":
|
||||
x.Expedited = value.Bool()
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -414,6 +431,8 @@ func (x *fastReflection_MsgSubmitProposal) Mutable(fd protoreflect.FieldDescript
|
||||
panic(fmt.Errorf("field title of message cosmos.gov.v1.MsgSubmitProposal is not mutable"))
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
panic(fmt.Errorf("field summary of message cosmos.gov.v1.MsgSubmitProposal is not mutable"))
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.expedited":
|
||||
panic(fmt.Errorf("field expedited of message cosmos.gov.v1.MsgSubmitProposal is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -441,6 +460,8 @@ func (x *fastReflection_MsgSubmitProposal) NewField(fd protoreflect.FieldDescrip
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.summary":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cosmos.gov.v1.MsgSubmitProposal.expedited":
|
||||
return protoreflect.ValueOfBool(false)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.MsgSubmitProposal"))
|
||||
@ -538,6 +559,9 @@ func (x *fastReflection_MsgSubmitProposal) ProtoMethods() *protoiface.Methods {
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.Expedited {
|
||||
n += 2
|
||||
}
|
||||
if x.unknownFields != nil {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
@ -567,6 +591,16 @@ func (x *fastReflection_MsgSubmitProposal) ProtoMethods() *protoiface.Methods {
|
||||
i -= len(x.unknownFields)
|
||||
copy(dAtA[i:], x.unknownFields)
|
||||
}
|
||||
if x.Expedited {
|
||||
i--
|
||||
if x.Expedited {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x38
|
||||
}
|
||||
if len(x.Summary) > 0 {
|
||||
i -= len(x.Summary)
|
||||
copy(dAtA[i:], x.Summary)
|
||||
@ -872,6 +906,26 @@ func (x *fastReflection_MsgSubmitProposal) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
x.Summary = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 7:
|
||||
if wireType != 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Expedited", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
x.Expedited = bool(v != 0)
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
@ -6982,6 +7036,10 @@ type MsgSubmitProposal struct {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
Summary string `protobuf:"bytes,6,opt,name=summary,proto3" json:"summary,omitempty"`
|
||||
// expedided defines if the proposal is expedited or not
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
Expedited bool `protobuf:"varint,7,opt,name=expedited,proto3" json:"expedited,omitempty"`
|
||||
}
|
||||
|
||||
func (x *MsgSubmitProposal) Reset() {
|
||||
@ -7046,6 +7104,13 @@ func (x *MsgSubmitProposal) GetSummary() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *MsgSubmitProposal) GetExpedited() bool {
|
||||
if x != nil {
|
||||
return x.Expedited
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
|
||||
type MsgSubmitProposalResponse struct {
|
||||
state protoimpl.MessageState
|
||||
@ -7622,7 +7687,7 @@ var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69,
|
||||
0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
|
||||
0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc9, 0x02, 0x0a, 0x11, 0x4d, 0x73,
|
||||
0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe7, 0x02, 0x0a, 0x11, 0x4d, 0x73,
|
||||
0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12,
|
||||
0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
@ -7640,160 +7705,162 @@ var file_cosmos_gov_v1_tx_proto_rawDesc = []byte{
|
||||
0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d,
|
||||
0x61, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61,
|
||||
0x72, 0x79, 0x3a, 0x31, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65,
|
||||
0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b,
|
||||
0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f,
|
||||
0x70, 0x6f, 0x73, 0x61, 0x6c, 0x22, 0x3c, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d,
|
||||
0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61,
|
||||
0x6c, 0x49, 0x64, 0x22, 0xbb, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c,
|
||||
0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x07,
|
||||
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
|
||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
||||
0x41, 0x6e, 0x79, 0x42, 0x1e, 0xca, 0xb4, 0x2d, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x65, 0x6e, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09,
|
||||
0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x35, 0x82, 0xe7, 0xb0, 0x2a,
|
||||
0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x22, 0x63,
|
||||
0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65, 0x78, 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64,
|
||||
0x3a, 0x31, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x8a,
|
||||
0xe7, 0xb0, 0x2a, 0x1f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76,
|
||||
0x31, 0x2f, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f,
|
||||
0x73, 0x61, 0x6c, 0x22, 0x3c, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74,
|
||||
0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49,
|
||||
0x64, 0x22, 0xbb, 0x01, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67,
|
||||
0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x4e, 0x0a, 0x07, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f,
|
||||
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e,
|
||||
0x79, 0x42, 0x1e, 0xca, 0xb4, 0x2d, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f,
|
||||
0x76, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75,
|
||||
0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61,
|
||||
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x35, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61,
|
||||
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x22, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67, 0x45, 0x78,
|
||||
0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22,
|
||||
0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79,
|
||||
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0xe5, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x70,
|
||||
0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04,
|
||||
0x42, 0x14, 0xea, 0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69,
|
||||
0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c,
|
||||
0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64,
|
||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76, 0x6f, 0x74,
|
||||
0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x6f,
|
||||
0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x3a, 0x24, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0,
|
||||
0x2a, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f,
|
||||
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xff, 0x01, 0x0a, 0x0f, 0x4d,
|
||||
0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x12, 0x35,
|
||||
0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x04, 0x42, 0x14, 0xea, 0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61,
|
||||
0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f,
|
||||
0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05,
|
||||
0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x56,
|
||||
0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x2c,
|
||||
0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67,
|
||||
0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61,
|
||||
0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0xe5, 0x01, 0x0a, 0x07, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x35, 0x0a,
|
||||
0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x04, 0x42, 0x14, 0xea, 0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c,
|
||||
0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73,
|
||||
0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e,
|
||||
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x76,
|
||||
0x6f, 0x74, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f,
|
||||
0x76, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||
0x06, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0x3a, 0x24, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x8a,
|
||||
0xe7, 0xb0, 0x2a, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76,
|
||||
0x31, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x22, 0x11, 0x0a, 0x0f, 0x4d, 0x73, 0x67,
|
||||
0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xff, 0x01, 0x0a,
|
||||
0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64,
|
||||
0x12, 0x35, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xea, 0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f,
|
||||
0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f,
|
||||
0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d,
|
||||
0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,
|
||||
0x52, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65,
|
||||
0x64, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
|
||||
0x3a, 0x2c, 0x82, 0xe7, 0xb0, 0x2a, 0x05, 0x76, 0x6f, 0x74, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a,
|
||||
0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x4d,
|
||||
0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x22, 0x19,
|
||||
0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65,
|
||||
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe6, 0x01, 0x0a, 0x0a, 0x4d, 0x73,
|
||||
0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x35, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70,
|
||||
0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xea,
|
||||
0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7,
|
||||
0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12,
|
||||
0x36, 0x0a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41,
|
||||
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65,
|
||||
0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f,
|
||||
0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61,
|
||||
0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x2b, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73,
|
||||
0x69, 0x74, 0x22, 0x14, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09,
|
||||
0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72,
|
||||
0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f,
|
||||
0x72, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f,
|
||||
0x76, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f,
|
||||
0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x36,
|
||||
0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7,
|
||||
0xb0, 0x2a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f,
|
||||
0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x8a, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50,
|
||||
0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f,
|
||||
0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0f, 0xea, 0xde,
|
||||
0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x52, 0x0a, 0x70,
|
||||
0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72, 0x6f,
|
||||
0x70, 0x6f, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d,
|
||||
0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53,
|
||||
0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x3a,
|
||||
0x0d, 0x82, 0xe7, 0xb0, 0x2a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x22, 0xc1,
|
||||
0x01, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70,
|
||||
0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0b,
|
||||
0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x04, 0x42, 0x0f, 0xea, 0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f,
|
||||
0x69, 0x64, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x49,
|
||||
0x0a, 0x0d, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
|
||||
0x70, 0x42, 0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x63, 0x61, 0x6e,
|
||||
0x63, 0x65, 0x6c, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x61, 0x6e,
|
||||
0x63, 0x65, 0x6c, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x04, 0x52, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67,
|
||||
0x68, 0x74, 0x32, 0xe8, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, 0x0a, 0x0e, 0x53, 0x75,
|
||||
0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67,
|
||||
0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28,
|
||||
0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
|
||||
0x73, 0x67, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x11, 0x45, 0x78, 0x65, 0x63,
|
||||
0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x2e,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73,
|
||||
0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65,
|
||||
0x6e, 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79,
|
||||
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x3e, 0x0a, 0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73,
|
||||
0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a,
|
||||
0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x56, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x12,
|
||||
0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x1a,
|
||||
0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x22, 0x19, 0x0a, 0x17,
|
||||
0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73,
|
||||
0x69, 0x74, 0x12, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, 0x21, 0x2e,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73,
|
||||
0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x12, 0x56, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||
0x12, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||
0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61,
|
||||
0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x63,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe6, 0x01, 0x0a, 0x0a, 0x4d, 0x73, 0x67, 0x44,
|
||||
0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x35, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73,
|
||||
0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x14, 0xea, 0xde, 0x1f,
|
||||
0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0xa8, 0xe7, 0xb0, 0x2a,
|
||||
0x01, 0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x36, 0x0a,
|
||||
0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64,
|
||||
0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x64, 0x65, 0x70, 0x6f,
|
||||
0x73, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
||||
0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62,
|
||||
0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e,
|
||||
0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x3a, 0x2b, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69,
|
||||
0x74, 0x6f, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x18, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73,
|
||||
0x64, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
|
||||
0x22, 0x14, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xbb, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75,
|
||||
0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2,
|
||||
0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||
0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
|
||||
0x74, 0x79, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8,
|
||||
0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x36, 0x82, 0xe7,
|
||||
0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a,
|
||||
0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x67, 0x6f,
|
||||
0x76, 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61,
|
||||
0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x8a, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f,
|
||||
0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x30, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61,
|
||||
0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42, 0x0f, 0xea, 0xde, 0x1f, 0x0b,
|
||||
0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x52, 0x0a, 0x70, 0x72, 0x6f,
|
||||
0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x34, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f,
|
||||
0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72,
|
||||
0x69, 0x6e, 0x67, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x3a, 0x0d, 0x82,
|
||||
0xe7, 0xb0, 0x2a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x22, 0xc1, 0x01, 0x0a,
|
||||
0x19, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73,
|
||||
0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x70, 0x72,
|
||||
0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x42,
|
||||
0x0f, 0xea, 0xde, 0x1f, 0x0b, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x69, 0x64,
|
||||
0x52, 0x0a, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x49, 0x0a, 0x0d,
|
||||
0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42,
|
||||
0x08, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x63, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x6c, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x61, 0x6e, 0x63, 0x65,
|
||||
0x6c, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04,
|
||||
0x52, 0x0e, 0x63, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74,
|
||||
0x32, 0xe8, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6d,
|
||||
0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x75,
|
||||
0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67,
|
||||
0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x98, 0x01,
|
||||
0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76,
|
||||
0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67,
|
||||
0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
|
||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a,
|
||||
0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x65, 0x0a, 0x11, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65,
|
||||
0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x2e, 0x63, 0x6f,
|
||||
0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45,
|
||||
0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
|
||||
0x1a, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x43, 0x6f,
|
||||
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a,
|
||||
0x04, 0x56, 0x6f, 0x74, 0x65, 0x12, 0x16, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67,
|
||||
0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x1a, 0x1e, 0x2e,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73,
|
||||
0x67, 0x56, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a,
|
||||
0x0c, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x12, 0x1e, 0x2e,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73,
|
||||
0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x1a, 0x26, 0x2e,
|
||||
0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73,
|
||||
0x67, 0x56, 0x6f, 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
|
||||
0x12, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x1a, 0x21, 0x2e, 0x63, 0x6f,
|
||||
0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44,
|
||||
0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56,
|
||||
0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1e,
|
||||
0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
|
||||
0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x26,
|
||||
0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
|
||||
0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x0e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c,
|
||||
0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x12, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61, 0x6e, 0x63,
|
||||
0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73,
|
||||
0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x61,
|
||||
0x6e, 0x63, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x98, 0x01, 0x0a, 0x11,
|
||||
0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76,
|
||||
0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f,
|
||||
0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63,
|
||||
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76,
|
||||
0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47,
|
||||
0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@ -92,10 +92,15 @@ message Proposal {
|
||||
// Since: cosmos-sdk 0.47
|
||||
string summary = 12;
|
||||
|
||||
// Proposer is the address of the proposal sumbitter
|
||||
// proposer is the address of the proposal sumbitter
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
string proposer = 13 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
|
||||
// expedited defines if the proposal is expedited
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
bool expedited = 14;
|
||||
}
|
||||
|
||||
// ProposalStatus enumerates the valid statuses of a proposal.
|
||||
@ -151,6 +156,8 @@ message Vote {
|
||||
|
||||
// DepositParams defines the params for deposits on governance proposals.
|
||||
message DepositParams {
|
||||
option deprecated = true;
|
||||
|
||||
// Minimum deposit for a proposal to enter voting period.
|
||||
repeated cosmos.base.v1beta1.Coin min_deposit = 1
|
||||
[(gogoproto.nullable) = false, (gogoproto.jsontag) = "min_deposit,omitempty"];
|
||||
@ -163,12 +170,16 @@ message DepositParams {
|
||||
|
||||
// VotingParams defines the params for voting on governance proposals.
|
||||
message VotingParams {
|
||||
option deprecated = true;
|
||||
|
||||
// Duration of the voting period.
|
||||
google.protobuf.Duration voting_period = 1 [(gogoproto.stdduration) = true];
|
||||
}
|
||||
|
||||
// TallyParams defines the params for tallying votes on governance proposals.
|
||||
message TallyParams {
|
||||
option deprecated = true;
|
||||
|
||||
// Minimum percentage of total stake needed to vote for a result to be
|
||||
// considered valid.
|
||||
string quorum = 1 [(cosmos_proto.scalar) = "cosmos.Dec"];
|
||||
@ -219,4 +230,17 @@ message Params {
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
string proposal_cancel_dest = 9 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
|
||||
// Duration of the voting period of an expedited proposal.
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
google.protobuf.Duration expedited_voting_period = 10 [(gogoproto.stdduration) = true];
|
||||
|
||||
// Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
string expedited_threshold = 11 [(cosmos_proto.scalar) = "cosmos.Dec"];
|
||||
|
||||
// Minimum expedited deposit for a proposal to enter voting period.
|
||||
repeated cosmos.base.v1beta1.Coin expedited_min_deposit = 12 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
|
||||
}
|
||||
|
||||
@ -72,6 +72,11 @@ message MsgSubmitProposal {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
string summary = 6;
|
||||
|
||||
// expedided defines if the proposal is expedited or not
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
bool expedited = 7;
|
||||
}
|
||||
|
||||
// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
|
||||
|
||||
@ -23,7 +23,7 @@ func (s *E2ETestSuite) TestCmdParams() {
|
||||
{
|
||||
"json output",
|
||||
[]string{fmt.Sprintf("--%s=json", flags.FlagOutput)},
|
||||
`{"voting_params":{"voting_period":"172800s"},"deposit_params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s"},"tally_params":{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"},"params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s","voting_period":"172800s","quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000","min_initial_deposit_ratio":"0.000000000000000000","proposal_cancel_ratio":"0.500000000000000000","proposal_cancel_dest":""}}`,
|
||||
`{"voting_params":{"voting_period":"172800s"},"deposit_params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s"},"tally_params":{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"},"params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800s","voting_period":"172800s","quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000","min_initial_deposit_ratio":"0.000000000000000000","proposal_cancel_ratio":"0.500000000000000000","proposal_cancel_dest":"","expedited_voting_period":"86400s","expedited_threshold":"0.667000000000000000","expedited_min_deposit":[{"denom":"stake","amount":"50000000"}]}}`,
|
||||
},
|
||||
{
|
||||
"text output",
|
||||
@ -35,6 +35,11 @@ deposit_params:
|
||||
- amount: "10000000"
|
||||
denom: stake
|
||||
params:
|
||||
expedited_min_deposit:
|
||||
- amount: "50000000"
|
||||
denom: stake
|
||||
expedited_threshold: "0.667000000000000000"
|
||||
expedited_voting_period: 86400s
|
||||
max_deposit_period: 172800s
|
||||
min_deposit:
|
||||
- amount: "10000000"
|
||||
|
||||
@ -74,11 +74,11 @@ func TestImportExportQueues(t *testing.T) {
|
||||
|
||||
ctx = s1.app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
// Create two proposals, put the second into the voting period
|
||||
proposal1, err := s1.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "", "test", "description", addrs[0])
|
||||
proposal1, err := s1.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID1 := proposal1.Id
|
||||
|
||||
proposal2, err := s1.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "", "test", "description", addrs[0])
|
||||
proposal2, err := s1.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID2 := proposal2.Id
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ func TestGRPCQueryTally(t *testing.T) {
|
||||
"create a proposal and get tally",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "", "test", "description", addrs[0])
|
||||
proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
assert.Assert(t, proposal.String() != "")
|
||||
|
||||
@ -181,7 +181,7 @@ func TestLegacyGRPCQueryTally(t *testing.T) {
|
||||
"create a proposal and get tally",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "", "test", "description", addrs[0])
|
||||
proposal, err = app.GovKeeper.SubmitProposal(ctx, TestProposal, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
assert.Assert(t, proposal.String() != "")
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ func TestTallyNoOneVotes(t *testing.T) {
|
||||
createValidators(t, ctx, app, []int64{5, 5, 5})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -47,7 +47,7 @@ func TestTallyNoQuorum(t *testing.T) {
|
||||
addrs := simtestutil.AddTestAddrsIncremental(app.BankKeeper, app.StakingKeeper, ctx, 1, sdk.NewInt(10000000))
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -72,7 +72,7 @@ func TestTallyOnlyValidatorsAllYes(t *testing.T) {
|
||||
addrs, _ := createValidators(t, ctx, app, []int64{5, 5, 5})
|
||||
tp := TestProposal
|
||||
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -100,7 +100,7 @@ func TestTallyOnlyValidators51No(t *testing.T) {
|
||||
valAccAddrs, _ := createValidators(t, ctx, app, []int64{5, 6, 0})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -126,7 +126,7 @@ func TestTallyOnlyValidators51Yes(t *testing.T) {
|
||||
valAccAddrs, _ := createValidators(t, ctx, app, []int64{5, 6, 0})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -153,7 +153,7 @@ func TestTallyOnlyValidatorsVetoed(t *testing.T) {
|
||||
valAccAddrs, _ := createValidators(t, ctx, app, []int64{6, 6, 7})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -181,7 +181,7 @@ func TestTallyOnlyValidatorsAbstainPasses(t *testing.T) {
|
||||
valAccAddrs, _ := createValidators(t, ctx, app, []int64{6, 6, 7})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -209,7 +209,7 @@ func TestTallyOnlyValidatorsAbstainFails(t *testing.T) {
|
||||
valAccAddrs, _ := createValidators(t, ctx, app, []int64{6, 6, 7})
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -238,7 +238,7 @@ func TestTallyOnlyValidatorsNonVoter(t *testing.T) {
|
||||
valAccAddr1, valAccAddr2 := valAccAddrs[0], valAccAddrs[1]
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", valAccAddrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -274,7 +274,7 @@ func TestTallyDelgatorOverride(t *testing.T) {
|
||||
_ = staking.EndBlocker(ctx, app.StakingKeeper)
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -312,7 +312,7 @@ func TestTallyDelgatorInherit(t *testing.T) {
|
||||
_ = staking.EndBlocker(ctx, app.StakingKeeper)
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -353,7 +353,7 @@ func TestTallyDelgatorMultipleOverride(t *testing.T) {
|
||||
_ = staking.EndBlocker(ctx, app.StakingKeeper)
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -397,7 +397,7 @@ func TestTallyDelgatorMultipleInherit(t *testing.T) {
|
||||
_ = staking.EndBlocker(ctx, app.StakingKeeper)
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -442,7 +442,7 @@ func TestTallyJailedValidator(t *testing.T) {
|
||||
app.StakingKeeper.Jail(ctx, sdk.ConsAddress(consAddr.Bytes()))
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
@ -477,7 +477,7 @@ func TestTallyValidatorMultipleDelegations(t *testing.T) {
|
||||
assert.NilError(t, err)
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0])
|
||||
proposal, err := app.GovKeeper.SubmitProposal(ctx, tp, "", "test", "description", addrs[0], false)
|
||||
assert.NilError(t, err)
|
||||
proposalID := proposal.Id
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
|
||||
@ -365,6 +365,7 @@ func TestMsgSetSendEnabled(t *testing.T) {
|
||||
"set default send enabled to true",
|
||||
"Change send enabled",
|
||||
"Modify send enabled and set to true",
|
||||
false,
|
||||
)
|
||||
require.NoError(t, err, "making goodGovProp")
|
||||
badGovProp, err := govv1.NewMsgSubmitProposal(
|
||||
@ -376,6 +377,7 @@ func TestMsgSetSendEnabled(t *testing.T) {
|
||||
"set default send enabled to true",
|
||||
"Change send enabled",
|
||||
"Modify send enabled and set to true",
|
||||
false,
|
||||
)
|
||||
require.NoError(t, err, "making badGovProp")
|
||||
|
||||
|
||||
100
x/gov/README.md
100
x/gov/README.md
@ -33,34 +33,34 @@ can be adapted to any Proof-Of-Stake blockchain by replacing *ATOM* with the nat
|
||||
staking token of the chain.
|
||||
|
||||
* [Concepts](#concepts)
|
||||
* [Proposal submission](#proposal-submission)
|
||||
* [Deposit](#deposit)
|
||||
* [Vote](#vote)
|
||||
* [Software Upgrade](#software-upgrade)
|
||||
* [Proposal submission](#proposal-submission)
|
||||
* [Deposit](#deposit)
|
||||
* [Vote](#vote)
|
||||
* [Software Upgrade](#software-upgrade)
|
||||
* [State](#state)
|
||||
* [Proposals](#proposals)
|
||||
* [Parameters and base types](#parameters-and-base-types)
|
||||
* [Deposit](#deposit-1)
|
||||
* [ValidatorGovInfo](#validatorgovinfo)
|
||||
* [Stores](#stores)
|
||||
* [Proposal Processing Queue](#proposal-processing-queue)
|
||||
* [Legacy Proposal](#legacy-proposal)
|
||||
* [Proposals](#proposals)
|
||||
* [Parameters and base types](#parameters-and-base-types)
|
||||
* [Deposit](#deposit-1)
|
||||
* [ValidatorGovInfo](#validatorgovinfo)
|
||||
* [Stores](#stores)
|
||||
* [Proposal Processing Queue](#proposal-processing-queue)
|
||||
* [Legacy Proposal](#legacy-proposal)
|
||||
* [Messages](#messages)
|
||||
* [Proposal Submission](#proposal-submission-1)
|
||||
* [Deposit](#deposit-2)
|
||||
* [Vote](#vote-1)
|
||||
* [Proposal Submission](#proposal-submission-1)
|
||||
* [Deposit](#deposit-2)
|
||||
* [Vote](#vote-1)
|
||||
* [Events](#events)
|
||||
* [EndBlocker](#endblocker)
|
||||
* [Handlers](#handlers)
|
||||
* [EndBlocker](#endblocker)
|
||||
* [Handlers](#handlers)
|
||||
* [Parameters](#parameters)
|
||||
* [SubKeys](#subkeys)
|
||||
* [SubKeys](#subkeys)
|
||||
* [Client](#client)
|
||||
* [CLI](#cli)
|
||||
* [gRPC](#grpc)
|
||||
* [REST](#rest)
|
||||
* [CLI](#cli)
|
||||
* [gRPC](#grpc)
|
||||
* [REST](#rest)
|
||||
* [Metadata](#metadata)
|
||||
* [Proposal](#proposal-3)
|
||||
* [Vote](#vote-5)
|
||||
* [Proposal](#proposal-3)
|
||||
* [Vote](#vote-5)
|
||||
* [Future Improvements](#future-improvements)
|
||||
|
||||
## Concepts
|
||||
@ -188,6 +188,10 @@ For a weighted vote to be valid, the `options` field must not contain duplicate
|
||||
Quorum is defined as the minimum percentage of voting power that needs to be
|
||||
cast on a proposal for the result to be valid.
|
||||
|
||||
### Expedited Proposals
|
||||
|
||||
A proposal can be expedited, making the proposal use shorter voting duration and a higher tally threshold by its default. If an expedited proposal fails to meet the threshold within the scope of shorter voting duration, the expedited proposal is then converted to a regular proposal and restarts voting under regular voting conditions.
|
||||
|
||||
#### Threshold
|
||||
|
||||
Threshold is defined as the minimum proportion of `Yes` votes (excluding
|
||||
@ -207,6 +211,8 @@ This means that proposals are accepted iff:
|
||||
* The proportion of `Yes` votes, excluding `Abstain` votes, at the end of
|
||||
the voting period is superior to 1/2.
|
||||
|
||||
For expedited proposals, by default, the threshold is higher than with a *normal proposal*, namely, 66.7%.
|
||||
|
||||
#### Inheritance
|
||||
|
||||
If a delegator does not vote, it will inherit its validator vote.
|
||||
@ -506,7 +512,7 @@ must not be larger than the `maxMetadataLen` config passed into the gov keeper.
|
||||
* Initialise `Proposal`'s attributes
|
||||
* Decrease balance of sender by `InitialDeposit`
|
||||
* If `MinDeposit` is reached:
|
||||
* Push `proposalID` in `ProposalProcessingQueue`
|
||||
* Push `proposalID` in `ProposalProcessingQueue`
|
||||
* Transfer `InitialDeposit` from the `Proposer` to the governance `ModuleAccount`
|
||||
|
||||
A `MsgSubmitProposal` transaction can be handled according to the following
|
||||
@ -571,7 +577,7 @@ https://github.com/cosmos/cosmos-sdk/blob/v0.47.0-rc1/proto/cosmos/gov/v1/tx.pro
|
||||
* Add `deposit` of sender in `proposal.Deposits`
|
||||
* Increase `proposal.TotalDeposit` by sender's `deposit`
|
||||
* If `MinDeposit` is reached:
|
||||
* Push `proposalID` in `ProposalProcessingQueueEnd`
|
||||
* Push `proposalID` in `ProposalProcessingQueueEnd`
|
||||
* Transfer `Deposit` from the `proposer` to the governance `ModuleAccount`
|
||||
|
||||
A `MsgDeposit` transaction has to go through a number of checks to be valid.
|
||||
@ -711,13 +717,13 @@ The governance module emits the following events:
|
||||
|
||||
#### MsgVoteWeighted
|
||||
|
||||
| Type | Attribute Key | Attribute Value |
|
||||
| ------------- | ------------- | ------------------------ |
|
||||
| proposal_vote | option | {weightedVoteOptions} |
|
||||
| proposal_vote | proposal_id | {proposalID} |
|
||||
| message | module | governance |
|
||||
| message | action | vote |
|
||||
| message | sender | {senderAddress} |
|
||||
| Type | Attribute Key | Attribute Value |
|
||||
| ------------- | ------------- | --------------------- |
|
||||
| proposal_vote | option | {weightedVoteOptions} |
|
||||
| proposal_vote | proposal_id | {proposalID} |
|
||||
| message | module | governance |
|
||||
| message | action | vote |
|
||||
| message | sender | {senderAddress} |
|
||||
|
||||
#### MsgDeposit
|
||||
|
||||
@ -736,22 +742,17 @@ The governance module emits the following events:
|
||||
|
||||
The governance module contains the following parameters:
|
||||
|
||||
| Key | Type | Example |
|
||||
|---------------|--------|----------------------------------------------------------------------------------------------------|
|
||||
| depositparams | object | {"min_deposit":[{"denom":"uatom","amount":"10000000"}],"max_deposit_period":"172800000000000"} |
|
||||
| votingparams | object | {"voting_period":"172800000000000"} |
|
||||
| tallyparams | object | {"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto":"0.334000000000000000"} |
|
||||
|
||||
### SubKeys
|
||||
|
||||
| Key | Type | Example |
|
||||
|--------------------|------------------|-----------------------------------------|
|
||||
| min_deposit | array (coins) | [{"denom":"uatom","amount":"10000000"}] |
|
||||
| max_deposit_period | string (time ns) | "172800000000000" |
|
||||
| voting_period | string (time ns) | "172800000000000" |
|
||||
| quorum | string (dec) | "0.334000000000000000" |
|
||||
| threshold | string (dec) | "0.500000000000000000" |
|
||||
| veto | string (dec) | "0.334000000000000000" |
|
||||
| Key | Type | Example |
|
||||
| ----------------------- | ---------------- | --------------------------------------- |
|
||||
| min_deposit | array (coins) | [{"denom":"uatom","amount":"10000000"}] |
|
||||
| max_deposit_period | string (time ns) | "172800000000000" (17280s) |
|
||||
| voting_period | string (time ns) | "172800000000000" (17280s) |
|
||||
| quorum | string (dec) | "0.334000000000000000" |
|
||||
| threshold | string (dec) | "0.500000000000000000" |
|
||||
| veto | string (dec) | "0.334000000000000000" |
|
||||
| expedited_threshold | string (time ns) | "0.667000000000000000" |
|
||||
| expedited_voting_period | string (time ns) | "86400000000000" (8600s) |
|
||||
| expedited_min_deposit | array (coins) | [{"denom":"uatom","amount":"50000000"}] |
|
||||
|
||||
**NOTE**: The governance module contains parameters that are objects unlike other
|
||||
modules. If only a subset of parameters are desired to be changed, only they need
|
||||
@ -866,6 +867,11 @@ deposit_params:
|
||||
- amount: "10000000"
|
||||
denom: stake
|
||||
params:
|
||||
expedited_min_deposit:
|
||||
- amount: "50000000"
|
||||
denom: stake
|
||||
expedited_threshold: "0.670000000000000000"
|
||||
expedited_voting_period: 86400s
|
||||
max_deposit_period: 172800s
|
||||
min_deposit:
|
||||
- amount: "10000000"
|
||||
|
||||
@ -36,7 +36,9 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) {
|
||||
logger.Info(
|
||||
"proposal did not meet minimum deposit; deleted",
|
||||
"proposal", proposal.Id,
|
||||
"min_deposit", sdk.NewCoins(keeper.GetParams(ctx).MinDeposit...).String(),
|
||||
"expedited", proposal.Expedited,
|
||||
"title", proposal.Title,
|
||||
"min_deposit", sdk.NewCoins(proposal.GetMinDepositFromParams(keeper.GetParams(ctx))...).String(),
|
||||
"total_deposit", sdk.NewCoins(proposal.TotalDeposit...).String(),
|
||||
)
|
||||
|
||||
@ -49,13 +51,22 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) {
|
||||
|
||||
passes, burnDeposits, tallyResults := keeper.Tally(ctx, proposal)
|
||||
|
||||
if burnDeposits {
|
||||
keeper.DeleteAndBurnDeposits(ctx, proposal.Id)
|
||||
} else {
|
||||
keeper.RefundAndDeleteDeposits(ctx, proposal.Id)
|
||||
// If an expedited proposal fails, we do not want to update
|
||||
// the deposit at this point since the proposal is converted to regular.
|
||||
// As a result, the deposits are either deleted or refunded in all casses
|
||||
// EXCEPT when an expedited proposal fails.
|
||||
if !(proposal.Expedited && !passes) {
|
||||
if burnDeposits {
|
||||
keeper.DeleteAndBurnDeposits(ctx, proposal.Id)
|
||||
} else {
|
||||
keeper.RefundAndDeleteDeposits(ctx, proposal.Id)
|
||||
}
|
||||
}
|
||||
|
||||
if passes {
|
||||
keeper.RemoveFromActiveProposalQueue(ctx, proposal.Id, *proposal.VotingEndTime)
|
||||
|
||||
switch {
|
||||
case passes:
|
||||
var (
|
||||
idx int
|
||||
events sdk.Events
|
||||
@ -99,7 +110,21 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) {
|
||||
tagValue = types.AttributeValueProposalFailed
|
||||
logMsg = fmt.Sprintf("passed, but msg %d (%s) failed on execution: %s", idx, sdk.MsgTypeURL(msg), err)
|
||||
}
|
||||
} else {
|
||||
case proposal.Expedited:
|
||||
// When expedited proposal fails, it is converted
|
||||
// to a regular proposal. As a result, the voting period is extended, and,
|
||||
// once the regular voting period expires again, the tally is repeated
|
||||
// according to the regular proposal rules.
|
||||
proposal.Expedited = false
|
||||
params := keeper.GetParams(ctx)
|
||||
endTime := proposal.VotingStartTime.Add(*params.VotingPeriod)
|
||||
proposal.VotingEndTime = &endTime
|
||||
|
||||
keeper.InsertActiveProposalQueue(ctx, proposal.Id, *proposal.VotingEndTime)
|
||||
|
||||
tagValue = types.AttributeValueExpeditedProposalRejected
|
||||
logMsg = "expedited proposal converted to regular"
|
||||
default:
|
||||
proposal.Status = v1.StatusRejected
|
||||
tagValue = types.AttributeValueProposalRejected
|
||||
logMsg = "rejected"
|
||||
@ -108,7 +133,6 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) {
|
||||
proposal.FinalTallyResult = &tallyResults
|
||||
|
||||
keeper.SetProposal(ctx, proposal)
|
||||
keeper.RemoveFromActiveProposalQueue(ctx, proposal.Id, *proposal.VotingEndTime)
|
||||
|
||||
// when proposal become active
|
||||
keeper.Hooks().AfterProposalVotingPeriodEnded(ctx, proposal.Id)
|
||||
@ -116,6 +140,8 @@ func EndBlocker(ctx sdk.Context, keeper *keeper.Keeper) {
|
||||
logger.Info(
|
||||
"proposal tallied",
|
||||
"proposal", proposal.Id,
|
||||
"expedited", proposal.Expedited,
|
||||
"title", proposal.Title,
|
||||
"results", logMsg,
|
||||
)
|
||||
|
||||
|
||||
@ -44,6 +44,7 @@ func TestTickExpiredDepositPeriod(t *testing.T) {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -100,6 +101,7 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -126,6 +128,7 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -187,6 +190,7 @@ func TestTickPassedDepositPeriod(t *testing.T) {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -220,123 +224,180 @@ func TestTickPassedDepositPeriod(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestTickPassedVotingPeriod(t *testing.T) {
|
||||
suite := createTestSuite(t)
|
||||
app := suite.App
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
addrs := simtestutil.AddTestAddrs(suite.BankKeeper, suite.StakingKeeper, ctx, 10, valTokens)
|
||||
testcases := []struct {
|
||||
name string
|
||||
expedited bool
|
||||
}{
|
||||
{
|
||||
name: "regular - deleted",
|
||||
},
|
||||
{
|
||||
name: "expedited - converted to regular",
|
||||
expedited: true,
|
||||
},
|
||||
}
|
||||
|
||||
SortAddresses(addrs)
|
||||
for _, tc := range testcases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
suite := createTestSuite(t)
|
||||
app := suite.App
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
depositMultiplier := getDepositMultiplier(tc.expedited)
|
||||
addrs := simtestutil.AddTestAddrs(suite.BankKeeper, suite.StakingKeeper, ctx, 10, valTokens.Mul(math.NewInt(depositMultiplier)))
|
||||
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
SortAddresses(addrs)
|
||||
|
||||
govMsgSvr := keeper.NewMsgServerImpl(suite.GovKeeper)
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
inactiveQueue := suite.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, inactiveQueue.Valid())
|
||||
inactiveQueue.Close()
|
||||
activeQueue := suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, activeQueue.Valid())
|
||||
activeQueue.Close()
|
||||
govMsgSvr := keeper.NewMsgServerImpl(suite.GovKeeper)
|
||||
|
||||
proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 5))}
|
||||
newProposalMsg, err := v1.NewMsgSubmitProposal([]sdk.Msg{mkTestLegacyContent(t)}, proposalCoins, addrs[0].String(), "", "Proposal", "description of proposal")
|
||||
require.NoError(t, err)
|
||||
inactiveQueue := suite.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, inactiveQueue.Valid())
|
||||
inactiveQueue.Close()
|
||||
activeQueue := suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, activeQueue.Valid())
|
||||
activeQueue.Close()
|
||||
|
||||
res, err := govMsgSvr.SubmitProposal(ctx, newProposalMsg)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, res)
|
||||
proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 5*depositMultiplier))}
|
||||
newProposalMsg, err := v1.NewMsgSubmitProposal([]sdk.Msg{mkTestLegacyContent(t)}, proposalCoins, addrs[0].String(), "", "Proposal", "description of proposal", tc.expedited)
|
||||
require.NoError(t, err)
|
||||
|
||||
proposalID := res.ProposalId
|
||||
res, err := govMsgSvr.SubmitProposal(ctx, newProposalMsg)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, res)
|
||||
|
||||
newHeader := ctx.BlockHeader()
|
||||
newHeader.Time = ctx.BlockHeader().Time.Add(time.Duration(1) * time.Second)
|
||||
ctx = ctx.WithBlockHeader(newHeader)
|
||||
proposalID := res.ProposalId
|
||||
|
||||
newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, proposalCoins)
|
||||
newHeader := ctx.BlockHeader()
|
||||
newHeader.Time = ctx.BlockHeader().Time.Add(time.Duration(1) * time.Second)
|
||||
ctx = ctx.WithBlockHeader(newHeader)
|
||||
|
||||
res1, err := govMsgSvr.Deposit(ctx, newDepositMsg)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, res1)
|
||||
newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, proposalCoins)
|
||||
|
||||
newHeader = ctx.BlockHeader()
|
||||
newHeader.Time = ctx.BlockHeader().Time.Add(*suite.GovKeeper.GetParams(ctx).MaxDepositPeriod).Add(*suite.GovKeeper.GetParams(ctx).VotingPeriod)
|
||||
ctx = ctx.WithBlockHeader(newHeader)
|
||||
res1, err := govMsgSvr.Deposit(ctx, newDepositMsg)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, res1)
|
||||
|
||||
inactiveQueue = suite.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, inactiveQueue.Valid())
|
||||
inactiveQueue.Close()
|
||||
params := suite.GovKeeper.GetParams(ctx)
|
||||
votingPeriod := params.VotingPeriod
|
||||
if tc.expedited {
|
||||
votingPeriod = params.ExpeditedVotingPeriod
|
||||
}
|
||||
|
||||
activeQueue = suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.True(t, activeQueue.Valid())
|
||||
newHeader = ctx.BlockHeader()
|
||||
newHeader.Time = ctx.BlockHeader().Time.Add(*suite.GovKeeper.GetParams(ctx).MaxDepositPeriod).Add(*votingPeriod)
|
||||
ctx = ctx.WithBlockHeader(newHeader)
|
||||
|
||||
activeProposalID := types.GetProposalIDFromBytes(activeQueue.Value())
|
||||
proposal, ok := suite.GovKeeper.GetProposal(ctx, activeProposalID)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, v1.StatusVotingPeriod, proposal.Status)
|
||||
inactiveQueue = suite.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, inactiveQueue.Valid())
|
||||
inactiveQueue.Close()
|
||||
|
||||
activeQueue.Close()
|
||||
activeQueue = suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.True(t, activeQueue.Valid())
|
||||
|
||||
gov.EndBlocker(ctx, suite.GovKeeper)
|
||||
activeProposalID := types.GetProposalIDFromBytes(activeQueue.Value())
|
||||
proposal, ok := suite.GovKeeper.GetProposal(ctx, activeProposalID)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, v1.StatusVotingPeriod, proposal.Status)
|
||||
|
||||
activeQueue = suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, activeQueue.Valid())
|
||||
activeQueue.Close()
|
||||
activeQueue.Close()
|
||||
|
||||
gov.EndBlocker(ctx, suite.GovKeeper)
|
||||
|
||||
activeQueue = suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
if !tc.expedited {
|
||||
require.False(t, activeQueue.Valid())
|
||||
activeQueue.Close()
|
||||
return
|
||||
}
|
||||
|
||||
// If expedited, it should be converted to a regular proposal instead.
|
||||
require.True(t, activeQueue.Valid())
|
||||
|
||||
activeProposalID = types.GetProposalIDFromBytes(activeQueue.Value())
|
||||
proposal, ok = suite.GovKeeper.GetProposal(ctx, activeProposalID)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, v1.StatusVotingPeriod, proposal.Status)
|
||||
require.False(t, proposal.Expedited)
|
||||
require.Equal(t, proposal.VotingStartTime.Add(*params.VotingPeriod), *proposal.VotingEndTime)
|
||||
|
||||
activeQueue.Close()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestProposalPassedEndblocker(t *testing.T) {
|
||||
suite := createTestSuite(t)
|
||||
app := suite.App
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
addrs := simtestutil.AddTestAddrs(suite.BankKeeper, suite.StakingKeeper, ctx, 10, valTokens)
|
||||
testcases := []struct {
|
||||
name string
|
||||
expedited bool
|
||||
}{
|
||||
{
|
||||
name: "regular",
|
||||
},
|
||||
{
|
||||
name: "expedited",
|
||||
expedited: true,
|
||||
},
|
||||
}
|
||||
|
||||
SortAddresses(addrs)
|
||||
for _, tc := range testcases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
suite := createTestSuite(t)
|
||||
app := suite.App
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
depositMultiplier := getDepositMultiplier(tc.expedited)
|
||||
addrs := simtestutil.AddTestAddrs(suite.BankKeeper, suite.StakingKeeper, ctx, 10, valTokens.Mul(math.NewInt(depositMultiplier)))
|
||||
|
||||
govMsgSvr := keeper.NewMsgServerImpl(suite.GovKeeper)
|
||||
stakingMsgSvr := stakingkeeper.NewMsgServerImpl(suite.StakingKeeper)
|
||||
SortAddresses(addrs)
|
||||
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
govMsgSvr := keeper.NewMsgServerImpl(suite.GovKeeper)
|
||||
stakingMsgSvr := stakingkeeper.NewMsgServerImpl(suite.StakingKeeper)
|
||||
|
||||
valAddr := sdk.ValAddress(addrs[0])
|
||||
proposer := addrs[0]
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
createValidators(t, stakingMsgSvr, ctx, []sdk.ValAddress{valAddr}, []int64{10})
|
||||
staking.EndBlocker(ctx, suite.StakingKeeper)
|
||||
valAddr := sdk.ValAddress(addrs[0])
|
||||
proposer := addrs[0]
|
||||
|
||||
macc := suite.GovKeeper.GetGovernanceAccount(ctx)
|
||||
require.NotNil(t, macc)
|
||||
initialModuleAccCoins := suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress())
|
||||
createValidators(t, stakingMsgSvr, ctx, []sdk.ValAddress{valAddr}, []int64{10})
|
||||
staking.EndBlocker(ctx, suite.StakingKeeper)
|
||||
|
||||
proposal, err := suite.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "", "title", "summary", proposer)
|
||||
require.NoError(t, err)
|
||||
macc := suite.GovKeeper.GetGovernanceAccount(ctx)
|
||||
require.NotNil(t, macc)
|
||||
initialModuleAccCoins := suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress())
|
||||
|
||||
proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 10))}
|
||||
newDepositMsg := v1.NewMsgDeposit(addrs[0], proposal.Id, proposalCoins)
|
||||
proposal, err := suite.GovKeeper.SubmitProposal(ctx, []sdk.Msg{mkTestLegacyContent(t)}, "", "title", "summary", proposer, tc.expedited)
|
||||
require.NoError(t, err)
|
||||
|
||||
res, err := govMsgSvr.Deposit(ctx, newDepositMsg)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, res)
|
||||
proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 10*depositMultiplier))}
|
||||
newDepositMsg := v1.NewMsgDeposit(addrs[0], proposal.Id, proposalCoins)
|
||||
|
||||
macc = suite.GovKeeper.GetGovernanceAccount(ctx)
|
||||
require.NotNil(t, macc)
|
||||
moduleAccCoins := suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress())
|
||||
res, err := govMsgSvr.Deposit(ctx, newDepositMsg)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, res)
|
||||
|
||||
deposits := initialModuleAccCoins.Add(proposal.TotalDeposit...).Add(proposalCoins...)
|
||||
require.True(t, moduleAccCoins.Equal(deposits))
|
||||
macc = suite.GovKeeper.GetGovernanceAccount(ctx)
|
||||
require.NotNil(t, macc)
|
||||
moduleAccCoins := suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress())
|
||||
|
||||
err = suite.GovKeeper.AddVote(ctx, proposal.Id, addrs[0], v1.NewNonSplitVoteOption(v1.OptionYes), "")
|
||||
require.NoError(t, err)
|
||||
deposits := initialModuleAccCoins.Add(proposal.TotalDeposit...).Add(proposalCoins...)
|
||||
require.True(t, moduleAccCoins.Equal(deposits))
|
||||
|
||||
newHeader := ctx.BlockHeader()
|
||||
newHeader.Time = ctx.BlockHeader().Time.Add(*suite.GovKeeper.GetParams(ctx).MaxDepositPeriod).Add(*suite.GovKeeper.GetParams(ctx).VotingPeriod)
|
||||
ctx = ctx.WithBlockHeader(newHeader)
|
||||
err = suite.GovKeeper.AddVote(ctx, proposal.Id, addrs[0], v1.NewNonSplitVoteOption(v1.OptionYes), "")
|
||||
require.NoError(t, err)
|
||||
|
||||
gov.EndBlocker(ctx, suite.GovKeeper)
|
||||
newHeader := ctx.BlockHeader()
|
||||
newHeader.Time = ctx.BlockHeader().Time.Add(*suite.GovKeeper.GetParams(ctx).MaxDepositPeriod).Add(*suite.GovKeeper.GetParams(ctx).VotingPeriod)
|
||||
ctx = ctx.WithBlockHeader(newHeader)
|
||||
|
||||
macc = suite.GovKeeper.GetGovernanceAccount(ctx)
|
||||
require.NotNil(t, macc)
|
||||
require.True(t, suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress()).Equal(initialModuleAccCoins))
|
||||
gov.EndBlocker(ctx, suite.GovKeeper)
|
||||
|
||||
macc = suite.GovKeeper.GetGovernanceAccount(ctx)
|
||||
require.NotNil(t, macc)
|
||||
require.True(t, suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress()).Equal(initialModuleAccCoins))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestEndBlockerProposalHandlerFailed(t *testing.T) {
|
||||
@ -358,7 +419,7 @@ func TestEndBlockerProposalHandlerFailed(t *testing.T) {
|
||||
staking.EndBlocker(ctx, suite.StakingKeeper)
|
||||
|
||||
msg := banktypes.NewMsgSend(authtypes.NewModuleAddress(types.ModuleName), addrs[0], sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000))))
|
||||
proposal, err := suite.GovKeeper.SubmitProposal(ctx, []sdk.Msg{msg}, "", "title", "summary", proposer)
|
||||
proposal, err := suite.GovKeeper.SubmitProposal(ctx, []sdk.Msg{msg}, "", "title", "summary", proposer, false)
|
||||
require.NoError(t, err)
|
||||
|
||||
proposalCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 10)))
|
||||
@ -384,6 +445,213 @@ func TestEndBlockerProposalHandlerFailed(t *testing.T) {
|
||||
require.Equal(t, v1.StatusFailed, proposal.Status)
|
||||
}
|
||||
|
||||
func TestExpeditedProposal_PassAndConversionToRegular(t *testing.T) {
|
||||
testcases := []struct {
|
||||
name string
|
||||
// indicates whether the expedited proposal passes.
|
||||
expeditedPasses bool
|
||||
// indicates whether the converted regular proposal is expected to eventually pass
|
||||
regularEventuallyPassing bool
|
||||
}{
|
||||
{
|
||||
name: "expedited passes and not converted to regular",
|
||||
expeditedPasses: true,
|
||||
},
|
||||
{
|
||||
name: "expedited fails, converted to regular - regular eventually passes",
|
||||
expeditedPasses: false,
|
||||
regularEventuallyPassing: true,
|
||||
},
|
||||
{
|
||||
name: "expedited fails, converted to regular - regular eventually fails",
|
||||
expeditedPasses: false,
|
||||
regularEventuallyPassing: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testcases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
suite := createTestSuite(t)
|
||||
app := suite.App
|
||||
ctx := app.BaseApp.NewContext(false, tmproto.Header{})
|
||||
depositMultiplier := getDepositMultiplier(true)
|
||||
addrs := simtestutil.AddTestAddrs(suite.BankKeeper, suite.StakingKeeper, ctx, 3, valTokens.Mul(math.NewInt(depositMultiplier)))
|
||||
params := suite.GovKeeper.GetParams(ctx)
|
||||
|
||||
SortAddresses(addrs)
|
||||
|
||||
govMsgSvr := keeper.NewMsgServerImpl(suite.GovKeeper)
|
||||
stakingMsgSvr := stakingkeeper.NewMsgServerImpl(suite.StakingKeeper)
|
||||
|
||||
header := tmproto.Header{Height: app.LastBlockHeight() + 1}
|
||||
app.BeginBlock(abci.RequestBeginBlock{Header: header})
|
||||
|
||||
valAddr := sdk.ValAddress(addrs[0])
|
||||
proposer := addrs[0]
|
||||
|
||||
// Create a validator so that able to vote on proposal.
|
||||
createValidators(t, stakingMsgSvr, ctx, []sdk.ValAddress{valAddr}, []int64{10})
|
||||
staking.EndBlocker(ctx, suite.StakingKeeper)
|
||||
|
||||
inactiveQueue := suite.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, inactiveQueue.Valid())
|
||||
inactiveQueue.Close()
|
||||
activeQueue := suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, activeQueue.Valid())
|
||||
activeQueue.Close()
|
||||
|
||||
macc := suite.GovKeeper.GetGovernanceAccount(ctx)
|
||||
require.NotNil(t, macc)
|
||||
initialModuleAccCoins := suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress())
|
||||
|
||||
submitterInitialBalance := suite.BankKeeper.GetAllBalances(ctx, addrs[0])
|
||||
depositorInitialBalance := suite.BankKeeper.GetAllBalances(ctx, addrs[1])
|
||||
|
||||
proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 5*depositMultiplier))}
|
||||
newProposalMsg, err := v1.NewMsgSubmitProposal([]sdk.Msg{}, proposalCoins, proposer.String(), "metadata", "title", "summary", true)
|
||||
require.NoError(t, err)
|
||||
|
||||
res, err := govMsgSvr.SubmitProposal(ctx, newProposalMsg)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, res)
|
||||
|
||||
proposalID := res.ProposalId
|
||||
|
||||
newHeader := ctx.BlockHeader()
|
||||
newHeader.Time = ctx.BlockHeader().Time.Add(time.Duration(1) * time.Second)
|
||||
ctx = ctx.WithBlockHeader(newHeader)
|
||||
|
||||
newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, proposalCoins)
|
||||
|
||||
res1, err := govMsgSvr.Deposit(ctx, newDepositMsg)
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, res1)
|
||||
|
||||
newHeader = ctx.BlockHeader()
|
||||
newHeader.Time = ctx.BlockHeader().Time.Add(*params.MaxDepositPeriod).Add(*params.ExpeditedVotingPeriod)
|
||||
ctx = ctx.WithBlockHeader(newHeader)
|
||||
|
||||
inactiveQueue = suite.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, inactiveQueue.Valid())
|
||||
inactiveQueue.Close()
|
||||
|
||||
activeQueue = suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.True(t, activeQueue.Valid())
|
||||
|
||||
activeProposalID := types.GetProposalIDFromBytes(activeQueue.Value())
|
||||
proposal, ok := suite.GovKeeper.GetProposal(ctx, activeProposalID)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, v1.StatusVotingPeriod, proposal.Status)
|
||||
|
||||
activeQueue.Close()
|
||||
|
||||
if tc.expeditedPasses {
|
||||
// Validator votes YES, letting the expedited proposal pass.
|
||||
err = suite.GovKeeper.AddVote(ctx, proposal.Id, addrs[0], v1.NewNonSplitVoteOption(v1.OptionYes), "metadata")
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
// Here the expedited proposal is converted to regular after expiry.
|
||||
gov.EndBlocker(ctx, suite.GovKeeper)
|
||||
|
||||
activeQueue = suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
|
||||
if tc.expeditedPasses {
|
||||
require.False(t, activeQueue.Valid())
|
||||
|
||||
proposal, ok = suite.GovKeeper.GetProposal(ctx, activeProposalID)
|
||||
require.True(t, ok)
|
||||
|
||||
require.Equal(t, v1.StatusPassed, proposal.Status)
|
||||
|
||||
submitterEventualBalance := suite.BankKeeper.GetAllBalances(ctx, addrs[0])
|
||||
depositorEventualBalance := suite.BankKeeper.GetAllBalances(ctx, addrs[1])
|
||||
|
||||
eventualModuleAccCoins := suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress())
|
||||
|
||||
// Module account has refunded the deposit
|
||||
require.Equal(t, initialModuleAccCoins, eventualModuleAccCoins)
|
||||
|
||||
require.Equal(t, submitterInitialBalance, submitterEventualBalance)
|
||||
require.Equal(t, depositorInitialBalance, depositorEventualBalance)
|
||||
return
|
||||
}
|
||||
|
||||
// Expedited proposal should be converted to a regular proposal instead.
|
||||
require.True(t, activeQueue.Valid())
|
||||
|
||||
activeProposalID = types.GetProposalIDFromBytes(activeQueue.Value())
|
||||
activeQueue.Close()
|
||||
|
||||
proposal, ok = suite.GovKeeper.GetProposal(ctx, activeProposalID)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, v1.StatusVotingPeriod, proposal.Status)
|
||||
require.False(t, proposal.Expedited)
|
||||
require.Equal(t, proposal.VotingStartTime.Add(*params.VotingPeriod), *proposal.VotingEndTime)
|
||||
|
||||
// We also want to make sure that the deposit is not refunded yet and is still present in the module account
|
||||
macc = suite.GovKeeper.GetGovernanceAccount(ctx)
|
||||
require.NotNil(t, macc)
|
||||
intermediateModuleAccCoins := suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress())
|
||||
require.NotEqual(t, initialModuleAccCoins, intermediateModuleAccCoins)
|
||||
|
||||
// Submit proposal deposit + 1 extra top up deposit
|
||||
expectedIntermediateMofuleAccCoings := initialModuleAccCoins.Add(proposalCoins...).Add(proposalCoins...)
|
||||
require.Equal(t, expectedIntermediateMofuleAccCoings, intermediateModuleAccCoins)
|
||||
|
||||
// block header time at the voting period
|
||||
newHeader.Time = ctx.BlockHeader().Time.Add(*params.MaxDepositPeriod).Add(*params.VotingPeriod)
|
||||
ctx = ctx.WithBlockHeader(newHeader)
|
||||
|
||||
inactiveQueue = suite.GovKeeper.InactiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, inactiveQueue.Valid())
|
||||
inactiveQueue.Close()
|
||||
|
||||
activeQueue = suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.True(t, activeQueue.Valid())
|
||||
|
||||
if tc.regularEventuallyPassing {
|
||||
// Validator votes YES, letting the converted regular proposal pass.
|
||||
err = suite.GovKeeper.AddVote(ctx, proposal.Id, addrs[0], v1.NewNonSplitVoteOption(v1.OptionYes), "metadata")
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
// Here we validate the converted regular proposal
|
||||
gov.EndBlocker(ctx, suite.GovKeeper)
|
||||
|
||||
macc = suite.GovKeeper.GetGovernanceAccount(ctx)
|
||||
require.NotNil(t, macc)
|
||||
eventualModuleAccCoins := suite.BankKeeper.GetAllBalances(ctx, macc.GetAddress())
|
||||
|
||||
submitterEventualBalance := suite.BankKeeper.GetAllBalances(ctx, addrs[0])
|
||||
depositorEventualBalance := suite.BankKeeper.GetAllBalances(ctx, addrs[1])
|
||||
|
||||
activeQueue = suite.GovKeeper.ActiveProposalQueueIterator(ctx, ctx.BlockHeader().Time)
|
||||
require.False(t, activeQueue.Valid())
|
||||
|
||||
proposal, ok = suite.GovKeeper.GetProposal(ctx, activeProposalID)
|
||||
require.True(t, ok)
|
||||
|
||||
if tc.regularEventuallyPassing {
|
||||
// Module account has refunded the deposit
|
||||
require.Equal(t, initialModuleAccCoins, eventualModuleAccCoins)
|
||||
require.Equal(t, submitterInitialBalance, submitterEventualBalance)
|
||||
require.Equal(t, depositorInitialBalance, depositorEventualBalance)
|
||||
|
||||
require.Equal(t, v1.StatusPassed, proposal.Status)
|
||||
return
|
||||
}
|
||||
|
||||
// Not enough votes - module account has returned the deposit
|
||||
require.Equal(t, initialModuleAccCoins, eventualModuleAccCoins)
|
||||
require.Equal(t, submitterInitialBalance, submitterEventualBalance)
|
||||
require.Equal(t, depositorInitialBalance, depositorEventualBalance)
|
||||
|
||||
require.Equal(t, v1.StatusRejected, proposal.Status)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func createValidators(t *testing.T, stakingMsgSvr stakingtypes.MsgServer, ctx sdk.Context, addrs []sdk.ValAddress, powerAmt []int64) {
|
||||
require.True(t, len(addrs) <= len(pubkeys), "Not enough pubkeys specified at top of file.")
|
||||
|
||||
@ -399,3 +667,14 @@ func createValidators(t *testing.T, stakingMsgSvr stakingtypes.MsgServer, ctx sd
|
||||
require.NotNil(t, res)
|
||||
}
|
||||
}
|
||||
|
||||
// With expedited proposal's minimum deposit set higher than the default deposit, we must
|
||||
// initialize and deposit an amount depositMultiplier times larger
|
||||
// than the regular min deposit amount.
|
||||
func getDepositMultiplier(expedited bool) int64 {
|
||||
if expedited {
|
||||
return v1.DefaultMinExpeditedDepositTokensRatio
|
||||
}
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
@ -108,7 +108,8 @@ Where proposal.json contains:
|
||||
"metadata: "4pIMOgIGx1vZGU=", // base64-encoded metadata
|
||||
"deposit": "10stake"
|
||||
"title: "My proposal"
|
||||
"summary": "A short summary of my proposal"
|
||||
"summary": "A short summary of my proposal",
|
||||
"expedited": false
|
||||
}
|
||||
`,
|
||||
version.AppName,
|
||||
@ -120,12 +121,12 @@ Where proposal.json contains:
|
||||
return err
|
||||
}
|
||||
|
||||
msgs, metadata, title, summary, deposit, err := parseSubmitProposal(clientCtx.Codec, args[0])
|
||||
proposal, msgs, deposit, err := parseSubmitProposal(clientCtx.Codec, args[0])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
msg, err := v1.NewMsgSubmitProposal(msgs, deposit, clientCtx.GetFromAddress().String(), metadata, title, summary)
|
||||
msg, err := v1.NewMsgSubmitProposal(msgs, deposit, clientCtx.GetFromAddress().String(), proposal.Metadata, proposal.Title, proposal.Summary, proposal.Expedited)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid message: %w", err)
|
||||
}
|
||||
|
||||
@ -82,25 +82,26 @@ func parseSubmitLegacyProposal(fs *pflag.FlagSet) (*legacyProposal, error) {
|
||||
// proposal defines the new Msg-based proposal.
|
||||
type proposal struct {
|
||||
// Msgs defines an array of sdk.Msgs proto-JSON-encoded as Anys.
|
||||
Messages []json.RawMessage `json:"messages,omitempty"`
|
||||
Metadata string `json:"metadata"`
|
||||
Deposit string `json:"deposit"`
|
||||
Title string `json:"title"`
|
||||
Summary string `json:"summary"`
|
||||
Messages []json.RawMessage `json:"messages,omitempty"`
|
||||
Metadata string `json:"metadata"`
|
||||
Deposit string `json:"deposit"`
|
||||
Title string `json:"title"`
|
||||
Summary string `json:"summary"`
|
||||
Expedited bool `json:"expedited"`
|
||||
}
|
||||
|
||||
// parseSubmitProposal reads and parses the proposal.
|
||||
func parseSubmitProposal(cdc codec.Codec, path string) ([]sdk.Msg, string, string, string, sdk.Coins, error) {
|
||||
func parseSubmitProposal(cdc codec.Codec, path string) (proposal, []sdk.Msg, sdk.Coins, error) {
|
||||
var proposal proposal
|
||||
|
||||
contents, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
return nil, "", "", "", nil, err
|
||||
return proposal, nil, nil, err
|
||||
}
|
||||
|
||||
err = json.Unmarshal(contents, &proposal)
|
||||
if err != nil {
|
||||
return nil, "", "", "", nil, err
|
||||
return proposal, nil, nil, err
|
||||
}
|
||||
|
||||
msgs := make([]sdk.Msg, len(proposal.Messages))
|
||||
@ -108,7 +109,7 @@ func parseSubmitProposal(cdc codec.Codec, path string) ([]sdk.Msg, string, strin
|
||||
var msg sdk.Msg
|
||||
err := cdc.UnmarshalInterfaceJSON(anyJSON, &msg)
|
||||
if err != nil {
|
||||
return nil, "", "", "", nil, err
|
||||
return proposal, nil, nil, err
|
||||
}
|
||||
|
||||
msgs[i] = msg
|
||||
@ -116,10 +117,10 @@ func parseSubmitProposal(cdc codec.Codec, path string) ([]sdk.Msg, string, strin
|
||||
|
||||
deposit, err := sdk.ParseCoinsNormalized(proposal.Deposit)
|
||||
if err != nil {
|
||||
return nil, "", "", "", nil, err
|
||||
return proposal, nil, nil, err
|
||||
}
|
||||
|
||||
return msgs, proposal.Metadata, proposal.Title, proposal.Summary, deposit, nil
|
||||
return proposal, msgs, deposit, nil
|
||||
}
|
||||
|
||||
// AddGovPropFlagsToCmd adds flags for defining MsgSubmitProposal fields.
|
||||
|
||||
@ -163,25 +163,26 @@ func TestParseSubmitProposal(t *testing.T) {
|
||||
"metadata": "%s",
|
||||
"title": "My awesome title",
|
||||
"summary": "My awesome summary",
|
||||
"deposit": "1000test"
|
||||
"deposit": "1000test",
|
||||
"expedited": true
|
||||
}
|
||||
`, addr, addr, addr, addr, addr, base64.StdEncoding.EncodeToString(expectedMetadata)))
|
||||
|
||||
badJSON := testutil.WriteToNewTempFile(t, "bad json")
|
||||
|
||||
// nonexistent json
|
||||
_, _, _, _, _, err := parseSubmitProposal(cdc, "fileDoesNotExist") //nolint: dogsled
|
||||
_, _, _, err := parseSubmitProposal(cdc, "fileDoesNotExist")
|
||||
require.Error(t, err)
|
||||
|
||||
// invalid json
|
||||
_, _, _, _, _, err = parseSubmitProposal(cdc, badJSON.Name()) //nolint: dogsled
|
||||
_, _, _, err = parseSubmitProposal(cdc, badJSON.Name())
|
||||
require.Error(t, err)
|
||||
|
||||
// ok json
|
||||
msgs, metadata, title, summary, deposit, err := parseSubmitProposal(cdc, okJSON.Name())
|
||||
proposal, msgs, deposit, err := parseSubmitProposal(cdc, okJSON.Name())
|
||||
require.NoError(t, err, "unexpected error")
|
||||
require.Equal(t, sdk.NewCoins(sdk.NewCoin("test", sdk.NewInt(1000))), deposit)
|
||||
require.Equal(t, base64.StdEncoding.EncodeToString(expectedMetadata), metadata)
|
||||
require.Equal(t, base64.StdEncoding.EncodeToString(expectedMetadata), proposal.Metadata)
|
||||
require.Len(t, msgs, 3)
|
||||
msg1, ok := msgs[0].(*banktypes.MsgSend)
|
||||
require.True(t, ok)
|
||||
@ -200,8 +201,9 @@ func TestParseSubmitProposal(t *testing.T) {
|
||||
require.True(t, ok)
|
||||
require.Equal(t, "My awesome title", textProp.Title)
|
||||
require.Equal(t, "My awesome description", textProp.Description)
|
||||
require.Equal(t, "My awesome title", title)
|
||||
require.Equal(t, "My awesome summary", summary)
|
||||
require.Equal(t, "My awesome title", proposal.Title)
|
||||
require.Equal(t, "My awesome summary", proposal.Summary)
|
||||
require.Equal(t, true, proposal.Expedited)
|
||||
|
||||
err = okJSON.Close()
|
||||
require.Nil(t, err, "unexpected error")
|
||||
|
||||
@ -133,8 +133,9 @@ func (keeper Keeper) AddDeposit(ctx sdk.Context, proposalID uint64, depositorAdd
|
||||
|
||||
// Check if deposit has provided sufficient total funds to transition the proposal into the voting period
|
||||
activatedVotingPeriod := false
|
||||
minDepositAmount := proposal.GetMinDepositFromParams(keeper.GetParams(ctx))
|
||||
|
||||
if proposal.Status == v1.StatusDepositPeriod && sdk.NewCoins(proposal.TotalDeposit...).IsAllGTE(keeper.GetParams(ctx).MinDeposit) {
|
||||
if proposal.Status == v1.StatusDepositPeriod && sdk.NewCoins(proposal.TotalDeposit...).IsAllGTE(minDepositAmount) {
|
||||
keeper.ActivateVotingPeriod(ctx, proposal)
|
||||
|
||||
activatedVotingPeriod = true
|
||||
@ -256,7 +257,7 @@ func (keeper Keeper) RefundAndDeleteDeposits(ctx sdk.Context, proposalID uint64)
|
||||
// validateInitialDeposit validates if initial deposit is greater than or equal to the minimum
|
||||
// required at the time of proposal submission. This threshold amount is determined by
|
||||
// the deposit parameters. Returns nil on success, error otherwise.
|
||||
func (keeper Keeper) validateInitialDeposit(ctx sdk.Context, initialDeposit sdk.Coins) error {
|
||||
func (keeper Keeper) validateInitialDeposit(ctx sdk.Context, initialDeposit sdk.Coins, expedited bool) error {
|
||||
params := keeper.GetParams(ctx)
|
||||
minInitialDepositRatio, err := sdk.NewDecFromStr(params.MinInitialDepositRatio)
|
||||
if err != nil {
|
||||
@ -265,7 +266,14 @@ func (keeper Keeper) validateInitialDeposit(ctx sdk.Context, initialDeposit sdk.
|
||||
if minInitialDepositRatio.IsZero() {
|
||||
return nil
|
||||
}
|
||||
minDepositCoins := params.MinDeposit
|
||||
|
||||
var minDepositCoins sdk.Coins
|
||||
if expedited {
|
||||
minDepositCoins = params.ExpeditedMinDeposit
|
||||
} else {
|
||||
minDepositCoins = params.MinDeposit
|
||||
}
|
||||
|
||||
for i := range minDepositCoins {
|
||||
minDepositCoins[i].Amount = sdk.NewDecFromInt(minDepositCoins[i].Amount).Mul(minInitialDepositRatio).RoundInt()
|
||||
}
|
||||
|
||||
@ -20,104 +20,130 @@ const (
|
||||
)
|
||||
|
||||
func TestDeposits(t *testing.T) {
|
||||
govKeeper, _, bankKeeper, stakingKeeper, distKeeper, _, ctx := setupGovKeeper(t)
|
||||
trackMockBalances(bankKeeper, distKeeper)
|
||||
TestAddrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(10000000))
|
||||
testcases := []struct {
|
||||
name string
|
||||
expedited bool
|
||||
}{
|
||||
{
|
||||
name: "regular",
|
||||
},
|
||||
{
|
||||
name: "expedited",
|
||||
expedited: true,
|
||||
},
|
||||
}
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "summary", TestAddrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
for _, tc := range testcases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
govKeeper, _, bankKeeper, stakingKeeper, distKeeper, _, ctx := setupGovKeeper(t)
|
||||
trackMockBalances(bankKeeper, distKeeper)
|
||||
|
||||
fourStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, stakingKeeper.TokensFromConsensusPower(ctx, 4)))
|
||||
fiveStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, stakingKeeper.TokensFromConsensusPower(ctx, 5)))
|
||||
// With expedited proposals the minimum deposit is higher, so we must
|
||||
// initialize and deposit an amount depositMultiplier times larger
|
||||
// than the regular min deposit amount.
|
||||
depositMultiplier := int64(1)
|
||||
if tc.expedited {
|
||||
depositMultiplier = v1.DefaultMinExpeditedDepositTokensRatio
|
||||
}
|
||||
|
||||
addr0Initial := bankKeeper.GetAllBalances(ctx, TestAddrs[0])
|
||||
addr1Initial := bankKeeper.GetAllBalances(ctx, TestAddrs[1])
|
||||
TestAddrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(10000000*depositMultiplier))
|
||||
|
||||
require.True(t, sdk.NewCoins(proposal.TotalDeposit...).Equal(sdk.NewCoins()))
|
||||
tp := TestProposal
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "summary", TestAddrs[0], tc.expedited)
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
|
||||
// Check no deposits at beginning
|
||||
_, found := govKeeper.GetDeposit(ctx, proposalID, TestAddrs[1])
|
||||
require.False(t, found)
|
||||
proposal, ok := govKeeper.GetProposal(ctx, proposalID)
|
||||
require.True(t, ok)
|
||||
require.Nil(t, proposal.VotingStartTime)
|
||||
fourStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, stakingKeeper.TokensFromConsensusPower(ctx, 4*depositMultiplier)))
|
||||
fiveStake := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, stakingKeeper.TokensFromConsensusPower(ctx, 5*depositMultiplier)))
|
||||
|
||||
// Check first deposit
|
||||
votingStarted, err := govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fourStake)
|
||||
require.NoError(t, err)
|
||||
require.False(t, votingStarted)
|
||||
deposit, found := govKeeper.GetDeposit(ctx, proposalID, TestAddrs[0])
|
||||
require.True(t, found)
|
||||
require.Equal(t, fourStake, sdk.NewCoins(deposit.Amount...))
|
||||
require.Equal(t, TestAddrs[0].String(), deposit.Depositor)
|
||||
proposal, ok = govKeeper.GetProposal(ctx, proposalID)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, fourStake, sdk.NewCoins(proposal.TotalDeposit...))
|
||||
require.Equal(t, addr0Initial.Sub(fourStake...), bankKeeper.GetAllBalances(ctx, TestAddrs[0]))
|
||||
addr0Initial := bankKeeper.GetAllBalances(ctx, TestAddrs[0])
|
||||
addr1Initial := bankKeeper.GetAllBalances(ctx, TestAddrs[1])
|
||||
|
||||
// Check a second deposit from same address
|
||||
votingStarted, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fiveStake)
|
||||
require.NoError(t, err)
|
||||
require.False(t, votingStarted)
|
||||
deposit, found = govKeeper.GetDeposit(ctx, proposalID, TestAddrs[0])
|
||||
require.True(t, found)
|
||||
require.Equal(t, fourStake.Add(fiveStake...), sdk.NewCoins(deposit.Amount...))
|
||||
require.Equal(t, TestAddrs[0].String(), deposit.Depositor)
|
||||
proposal, ok = govKeeper.GetProposal(ctx, proposalID)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, fourStake.Add(fiveStake...), sdk.NewCoins(proposal.TotalDeposit...))
|
||||
require.Equal(t, addr0Initial.Sub(fourStake...).Sub(fiveStake...), bankKeeper.GetAllBalances(ctx, TestAddrs[0]))
|
||||
require.True(t, sdk.NewCoins(proposal.TotalDeposit...).Equal(sdk.NewCoins()))
|
||||
|
||||
// Check third deposit from a new address
|
||||
votingStarted, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[1], fourStake)
|
||||
require.NoError(t, err)
|
||||
require.True(t, votingStarted)
|
||||
deposit, found = govKeeper.GetDeposit(ctx, proposalID, TestAddrs[1])
|
||||
require.True(t, found)
|
||||
require.Equal(t, TestAddrs[1].String(), deposit.Depositor)
|
||||
require.Equal(t, fourStake, sdk.NewCoins(deposit.Amount...))
|
||||
proposal, ok = govKeeper.GetProposal(ctx, proposalID)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, fourStake.Add(fiveStake...).Add(fourStake...), sdk.NewCoins(proposal.TotalDeposit...))
|
||||
require.Equal(t, addr1Initial.Sub(fourStake...), bankKeeper.GetAllBalances(ctx, TestAddrs[1]))
|
||||
// Check no deposits at beginning
|
||||
_, found := govKeeper.GetDeposit(ctx, proposalID, TestAddrs[1])
|
||||
require.False(t, found)
|
||||
proposal, ok := govKeeper.GetProposal(ctx, proposalID)
|
||||
require.True(t, ok)
|
||||
require.Nil(t, proposal.VotingStartTime)
|
||||
|
||||
// Check that proposal moved to voting period
|
||||
proposal, ok = govKeeper.GetProposal(ctx, proposalID)
|
||||
require.True(t, ok)
|
||||
require.True(t, proposal.VotingStartTime.Equal(ctx.BlockHeader().Time))
|
||||
// Check first deposit
|
||||
votingStarted, err := govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fourStake)
|
||||
require.NoError(t, err)
|
||||
require.False(t, votingStarted)
|
||||
deposit, found := govKeeper.GetDeposit(ctx, proposalID, TestAddrs[0])
|
||||
require.True(t, found)
|
||||
require.Equal(t, fourStake, sdk.NewCoins(deposit.Amount...))
|
||||
require.Equal(t, TestAddrs[0].String(), deposit.Depositor)
|
||||
proposal, ok = govKeeper.GetProposal(ctx, proposalID)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, fourStake, sdk.NewCoins(proposal.TotalDeposit...))
|
||||
require.Equal(t, addr0Initial.Sub(fourStake...), bankKeeper.GetAllBalances(ctx, TestAddrs[0]))
|
||||
|
||||
// Test deposit iterator
|
||||
// NOTE order of deposits is determined by the addresses
|
||||
deposits := govKeeper.GetAllDeposits(ctx)
|
||||
require.Len(t, deposits, 2)
|
||||
require.Equal(t, deposits, govKeeper.GetDeposits(ctx, proposalID))
|
||||
require.Equal(t, TestAddrs[0].String(), deposits[0].Depositor)
|
||||
require.Equal(t, fourStake.Add(fiveStake...), sdk.NewCoins(deposits[0].Amount...))
|
||||
require.Equal(t, TestAddrs[1].String(), deposits[1].Depositor)
|
||||
require.Equal(t, fourStake, sdk.NewCoins(deposits[1].Amount...))
|
||||
// Check a second deposit from same address
|
||||
votingStarted, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fiveStake)
|
||||
require.NoError(t, err)
|
||||
require.False(t, votingStarted)
|
||||
deposit, found = govKeeper.GetDeposit(ctx, proposalID, TestAddrs[0])
|
||||
require.True(t, found)
|
||||
require.Equal(t, fourStake.Add(fiveStake...), sdk.NewCoins(deposit.Amount...))
|
||||
require.Equal(t, TestAddrs[0].String(), deposit.Depositor)
|
||||
proposal, ok = govKeeper.GetProposal(ctx, proposalID)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, fourStake.Add(fiveStake...), sdk.NewCoins(proposal.TotalDeposit...))
|
||||
require.Equal(t, addr0Initial.Sub(fourStake...).Sub(fiveStake...), bankKeeper.GetAllBalances(ctx, TestAddrs[0]))
|
||||
|
||||
// Test Refund Deposits
|
||||
deposit, found = govKeeper.GetDeposit(ctx, proposalID, TestAddrs[1])
|
||||
require.True(t, found)
|
||||
require.Equal(t, fourStake, sdk.NewCoins(deposit.Amount...))
|
||||
govKeeper.RefundAndDeleteDeposits(ctx, proposalID)
|
||||
deposit, found = govKeeper.GetDeposit(ctx, proposalID, TestAddrs[1])
|
||||
require.False(t, found)
|
||||
require.Equal(t, addr0Initial, bankKeeper.GetAllBalances(ctx, TestAddrs[0]))
|
||||
require.Equal(t, addr1Initial, bankKeeper.GetAllBalances(ctx, TestAddrs[1]))
|
||||
// Check third deposit from a new address
|
||||
votingStarted, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[1], fourStake)
|
||||
require.NoError(t, err)
|
||||
require.True(t, votingStarted)
|
||||
deposit, found = govKeeper.GetDeposit(ctx, proposalID, TestAddrs[1])
|
||||
require.True(t, found)
|
||||
require.Equal(t, TestAddrs[1].String(), deposit.Depositor)
|
||||
require.Equal(t, fourStake, sdk.NewCoins(deposit.Amount...))
|
||||
proposal, ok = govKeeper.GetProposal(ctx, proposalID)
|
||||
require.True(t, ok)
|
||||
require.Equal(t, fourStake.Add(fiveStake...).Add(fourStake...), sdk.NewCoins(proposal.TotalDeposit...))
|
||||
require.Equal(t, addr1Initial.Sub(fourStake...), bankKeeper.GetAllBalances(ctx, TestAddrs[1]))
|
||||
|
||||
// Test delete and burn deposits
|
||||
proposal, err = govKeeper.SubmitProposal(ctx, tp, "", "title", "summary", TestAddrs[0])
|
||||
require.NoError(t, err)
|
||||
proposalID = proposal.Id
|
||||
_, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fourStake)
|
||||
require.NoError(t, err)
|
||||
govKeeper.DeleteAndBurnDeposits(ctx, proposalID)
|
||||
deposits = govKeeper.GetDeposits(ctx, proposalID)
|
||||
require.Len(t, deposits, 0)
|
||||
require.Equal(t, addr0Initial.Sub(fourStake...), bankKeeper.GetAllBalances(ctx, TestAddrs[0]))
|
||||
// Check that proposal moved to voting period
|
||||
proposal, ok = govKeeper.GetProposal(ctx, proposalID)
|
||||
require.True(t, ok)
|
||||
require.True(t, proposal.VotingStartTime.Equal(ctx.BlockHeader().Time))
|
||||
|
||||
// Test deposit iterator
|
||||
// NOTE order of deposits is determined by the addresses
|
||||
deposits := govKeeper.GetAllDeposits(ctx)
|
||||
require.Len(t, deposits, 2)
|
||||
require.Equal(t, deposits, govKeeper.GetDeposits(ctx, proposalID))
|
||||
require.Equal(t, TestAddrs[0].String(), deposits[0].Depositor)
|
||||
require.Equal(t, fourStake.Add(fiveStake...), sdk.NewCoins(deposits[0].Amount...))
|
||||
require.Equal(t, TestAddrs[1].String(), deposits[1].Depositor)
|
||||
require.Equal(t, fourStake, sdk.NewCoins(deposits[1].Amount...))
|
||||
|
||||
// Test Refund Deposits
|
||||
deposit, found = govKeeper.GetDeposit(ctx, proposalID, TestAddrs[1])
|
||||
require.True(t, found)
|
||||
require.Equal(t, fourStake, sdk.NewCoins(deposit.Amount...))
|
||||
govKeeper.RefundAndDeleteDeposits(ctx, proposalID)
|
||||
deposit, found = govKeeper.GetDeposit(ctx, proposalID, TestAddrs[1])
|
||||
require.False(t, found)
|
||||
require.Equal(t, addr0Initial, bankKeeper.GetAllBalances(ctx, TestAddrs[0]))
|
||||
require.Equal(t, addr1Initial, bankKeeper.GetAllBalances(ctx, TestAddrs[1]))
|
||||
|
||||
// Test delete and burn deposits
|
||||
proposal, err = govKeeper.SubmitProposal(ctx, tp, "", "title", "summary", TestAddrs[0], true)
|
||||
require.NoError(t, err)
|
||||
proposalID = proposal.Id
|
||||
_, err = govKeeper.AddDeposit(ctx, proposalID, TestAddrs[0], fourStake)
|
||||
require.NoError(t, err)
|
||||
govKeeper.DeleteAndBurnDeposits(ctx, proposalID)
|
||||
deposits = govKeeper.GetDeposits(ctx, proposalID)
|
||||
require.Len(t, deposits, 0)
|
||||
require.Equal(t, addr0Initial.Sub(fourStake...), bankKeeper.GetAllBalances(ctx, TestAddrs[0]))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestValidateInitialDeposit(t *testing.T) {
|
||||
@ -125,6 +151,7 @@ func TestValidateInitialDeposit(t *testing.T) {
|
||||
minDeposit sdk.Coins
|
||||
minInitialDepositPercent int64
|
||||
initialDeposit sdk.Coins
|
||||
expedited bool
|
||||
|
||||
expectError bool
|
||||
}{
|
||||
@ -180,8 +207,7 @@ func TestValidateInitialDeposit(t *testing.T) {
|
||||
expectError: true,
|
||||
},
|
||||
"min deposit * initial percent < initial deposit (multiple coins - coin not required by min deposit): success": {
|
||||
minDeposit: sdk.NewCoins(
|
||||
sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(baseDepositTestAmount))),
|
||||
minDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(baseDepositTestAmount))),
|
||||
minInitialDepositPercent: baseDepositTestPercent,
|
||||
initialDeposit: sdk.NewCoins(
|
||||
sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(baseDepositTestAmount*baseDepositTestPercent/100)),
|
||||
@ -193,6 +219,18 @@ func TestValidateInitialDeposit(t *testing.T) {
|
||||
minInitialDepositPercent: 0,
|
||||
initialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(baseDepositTestAmount*baseDepositTestPercent/100))),
|
||||
},
|
||||
"expedited min deposit * initial percent == initial deposit: success": {
|
||||
minDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(baseDepositTestAmount))),
|
||||
minInitialDepositPercent: baseDepositTestPercent,
|
||||
initialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(baseDepositTestAmount*baseDepositTestPercent/100))),
|
||||
expedited: true,
|
||||
},
|
||||
"expedited - 0 initial percent: success": {
|
||||
minDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(baseDepositTestAmount))),
|
||||
minInitialDepositPercent: 0,
|
||||
initialDeposit: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(baseDepositTestAmount*baseDepositTestPercent/100))),
|
||||
expedited: true,
|
||||
},
|
||||
}
|
||||
|
||||
for name, tc := range testcases {
|
||||
@ -200,12 +238,16 @@ func TestValidateInitialDeposit(t *testing.T) {
|
||||
govKeeper, _, _, _, _, _, ctx := setupGovKeeper(t)
|
||||
|
||||
params := v1.DefaultParams()
|
||||
params.MinDeposit = tc.minDeposit
|
||||
if tc.expedited {
|
||||
params.ExpeditedMinDeposit = tc.minDeposit
|
||||
} else {
|
||||
params.MinDeposit = tc.minDeposit
|
||||
}
|
||||
params.MinInitialDepositRatio = sdk.NewDec(tc.minInitialDepositPercent).Quo(sdk.NewDec(100)).String()
|
||||
|
||||
govKeeper.SetParams(ctx, params)
|
||||
|
||||
err := govKeeper.ValidateInitialDeposit(ctx, tc.initialDeposit)
|
||||
err := govKeeper.ValidateInitialDeposit(ctx, tc.initialDeposit, tc.expedited)
|
||||
|
||||
if tc.expectError {
|
||||
require.Error(t, err)
|
||||
@ -276,7 +318,7 @@ func TestChargeDeposit(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "summary", TestAddrs[0])
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "summary", TestAddrs[0], false)
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
// deposit to proposal
|
||||
|
||||
@ -4,6 +4,6 @@ import sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
// ValidateInitialDeposit is a helper function used only in deposit tests which returns the same
|
||||
// functionality of validateInitialDeposit private function.
|
||||
func (k Keeper) ValidateInitialDeposit(ctx sdk.Context, initialDeposit sdk.Coins) error {
|
||||
return k.validateInitialDeposit(ctx, initialDeposit)
|
||||
func (k Keeper) ValidateInitialDeposit(ctx sdk.Context, initialDeposit sdk.Coins, expedited bool) error {
|
||||
return k.validateInitialDeposit(ctx, initialDeposit, expedited)
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposal() {
|
||||
testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal")
|
||||
msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String())
|
||||
suite.Require().NoError(err)
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "title", "summary", addrs[0])
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "title", "summary", addrs[0], false)
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotEmpty(submittedProposal)
|
||||
|
||||
@ -127,7 +127,23 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposal() {
|
||||
testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal")
|
||||
msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String())
|
||||
suite.Require().NoError(err)
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "title", "summary", addrs[0])
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "title", "summary", addrs[0], false)
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotEmpty(submittedProposal)
|
||||
|
||||
expProposal, err = v3.ConvertToLegacyProposal(submittedProposal)
|
||||
suite.Require().NoError(err)
|
||||
},
|
||||
true,
|
||||
},
|
||||
{
|
||||
"valid request - expedited",
|
||||
func() {
|
||||
req = &v1beta1.QueryProposalRequest{ProposalId: 2}
|
||||
testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal")
|
||||
msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String())
|
||||
suite.Require().NoError(err)
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "title", "summary", addrs[0], true)
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotEmpty(submittedProposal)
|
||||
|
||||
@ -188,7 +204,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() {
|
||||
testProposal := []sdk.Msg{
|
||||
v1.NewMsgVote(govAddress, uint64(i), v1.OptionYes, ""),
|
||||
}
|
||||
proposal, err := suite.govKeeper.SubmitProposal(ctx, testProposal, "", "title", "summary", addrs[0])
|
||||
proposal, err := suite.govKeeper.SubmitProposal(ctx, testProposal, "", "title", "summary", addrs[0], false)
|
||||
suite.Require().NotEmpty(proposal)
|
||||
suite.Require().NoError(err)
|
||||
testProposals = append(testProposals, &proposal)
|
||||
@ -321,7 +337,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposals() {
|
||||
testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal")
|
||||
msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String())
|
||||
suite.Require().NoError(err)
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "title", "summary", addrs[0])
|
||||
submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "title", "summary", addrs[0], false)
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotEmpty(submittedProposal)
|
||||
},
|
||||
@ -402,7 +418,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() {
|
||||
"no votes present",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0])
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0], false)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1.QueryVoteRequest{
|
||||
@ -516,7 +532,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVote() {
|
||||
"no votes present",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0])
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0], false)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1beta1.QueryVoteRequest{
|
||||
@ -622,7 +638,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVotes() {
|
||||
"create a proposal and get votes",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0])
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0], false)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1.QueryVotesRequest{
|
||||
@ -724,7 +740,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVotes() {
|
||||
"create a proposal and get votes",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0])
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0], false)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1beta1.QueryVotesRequest{
|
||||
@ -1009,7 +1025,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() {
|
||||
"no deposits proposal",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0])
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0], false)
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotNil(proposal)
|
||||
|
||||
@ -1110,7 +1126,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposit() {
|
||||
"no deposits proposal",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0])
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0], false)
|
||||
suite.Require().NoError(err)
|
||||
suite.Require().NotNil(proposal)
|
||||
|
||||
@ -1200,7 +1216,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposits() {
|
||||
"create a proposal and get deposits",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0])
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0], true)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1.QueryDepositsRequest{
|
||||
@ -1295,7 +1311,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposits() {
|
||||
"create a proposal and get deposits",
|
||||
func() {
|
||||
var err error
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0])
|
||||
proposal, err = suite.govKeeper.SubmitProposal(ctx, TestProposal, "", "title", "summary", addrs[0], false)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
req = &v1beta1.QueryDepositsRequest{
|
||||
|
||||
@ -63,7 +63,7 @@ func TestHooks(t *testing.T) {
|
||||
require.False(t, govHooksReceiver.AfterProposalVotingPeriodEndedValid)
|
||||
|
||||
tp := TestProposal
|
||||
_, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
_, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
require.True(t, govHooksReceiver.AfterProposalSubmissionValid)
|
||||
|
||||
@ -74,7 +74,7 @@ func TestHooks(t *testing.T) {
|
||||
|
||||
require.True(t, govHooksReceiver.AfterProposalFailedMinDepositValid)
|
||||
|
||||
p2, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
p2, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
|
||||
activated, err := govKeeper.AddDeposit(ctx, p2.Id, addrs[0], minDeposit)
|
||||
|
||||
@ -76,17 +76,17 @@ func TestIncrementProposalNumber(t *testing.T) {
|
||||
govKeeper, _, _, _, _, _, ctx := setupGovKeeper(t) //nolint:dogsled
|
||||
|
||||
tp := TestProposal
|
||||
_, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
_, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), true)
|
||||
require.NoError(t, err)
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), true)
|
||||
require.NoError(t, err)
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
_, err = govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
proposal6, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
proposal6, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, uint64(6), proposal6.Id)
|
||||
@ -97,7 +97,7 @@ func TestProposalQueues(t *testing.T) {
|
||||
|
||||
// create test proposals
|
||||
tp := TestProposal
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
|
||||
inactiveIterator := govKeeper.InactiveProposalQueueIterator(ctx, *proposal.DepositEndTime)
|
||||
|
||||
@ -6,6 +6,7 @@ import (
|
||||
v2 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v2"
|
||||
v3 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v3"
|
||||
v4 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v4"
|
||||
v5 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v5"
|
||||
)
|
||||
|
||||
// Migrator is a struct for handling in-place store migrations.
|
||||
@ -36,3 +37,8 @@ func (m Migrator) Migrate2to3(ctx sdk.Context) error {
|
||||
func (m Migrator) Migrate3to4(ctx sdk.Context) error {
|
||||
return v4.MigrateStore(ctx, m.keeper.storeKey, m.legacySubspace, m.keeper.cdc)
|
||||
}
|
||||
|
||||
// Migrate3to4 migrates from version 4 to 5.
|
||||
func (m Migrator) Migrate4to5(ctx sdk.Context) error {
|
||||
return v5.MigrateStore(ctx, m.keeper.storeKey, m.keeper.cdc)
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos
|
||||
|
||||
initialDeposit := msg.GetInitialDeposit()
|
||||
|
||||
if err := k.validateInitialDeposit(ctx, initialDeposit); err != nil {
|
||||
if err := k.validateInitialDeposit(ctx, initialDeposit, msg.Expedited); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *v1.MsgSubmitPropos
|
||||
return nil, err
|
||||
}
|
||||
|
||||
proposal, err := k.Keeper.SubmitProposal(ctx, proposalMsgs, msg.Metadata, msg.Title, msg.Summary, proposer)
|
||||
proposal, err := k.Keeper.SubmitProposal(ctx, proposalMsgs, msg.Metadata, msg.Title, msg.Summary, proposer, msg.Expedited)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -255,6 +255,7 @@ func (k legacyMsgServer) SubmitProposal(goCtx context.Context, msg *v1beta1.MsgS
|
||||
"",
|
||||
msg.GetContent().GetTitle(),
|
||||
msg.GetContent().GetDescription(),
|
||||
false, // legacy proposals cannot be expedited
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@ -41,6 +41,7 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
strings.Repeat("1", 300),
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
},
|
||||
expErr: true,
|
||||
@ -55,6 +56,7 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
},
|
||||
expErr: true,
|
||||
@ -69,6 +71,7 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
},
|
||||
expErr: true,
|
||||
@ -83,6 +86,7 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
},
|
||||
expErr: true,
|
||||
@ -97,6 +101,7 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
},
|
||||
expErr: false,
|
||||
@ -110,6 +115,7 @@ func (suite *KeeperTestSuite) TestSubmitProposalReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
},
|
||||
expErr: false,
|
||||
@ -147,8 +153,9 @@ func (suite *KeeperTestSuite) TestCancelProposalReq() {
|
||||
msg, err := v1.NewMsgSubmitProposal(
|
||||
[]sdk.Msg{bankMsg},
|
||||
coins,
|
||||
proposer.String(), "",
|
||||
"title", "summary",
|
||||
proposer.String(),
|
||||
"", "title", "summary",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -221,6 +228,7 @@ func (suite *KeeperTestSuite) TestVoteReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -246,6 +254,7 @@ func (suite *KeeperTestSuite) TestVoteReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -289,6 +298,7 @@ func (suite *KeeperTestSuite) TestVoteReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -340,6 +350,7 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -366,6 +377,7 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -409,6 +421,7 @@ func (suite *KeeperTestSuite) TestVoteWeightedReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -459,6 +472,7 @@ func (suite *KeeperTestSuite) TestDepositReq() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -579,6 +593,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -604,6 +619,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -637,6 +653,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -688,6 +705,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -714,6 +732,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -747,6 +766,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -797,6 +817,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgDeposit() {
|
||||
"",
|
||||
"Proposal",
|
||||
"description of proposal",
|
||||
false,
|
||||
)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
@ -1175,7 +1196,7 @@ func (suite *KeeperTestSuite) TestSubmitProposal_InitialDeposit() {
|
||||
params.MinInitialDepositRatio = tc.minInitialDepositRatio.String()
|
||||
govKeeper.SetParams(ctx, params)
|
||||
|
||||
msg, err := v1.NewMsgSubmitProposal(TestProposal, tc.initialDeposit, address.String(), "test", "Proposal", "description of proposal")
|
||||
msg, err := v1.NewMsgSubmitProposal(TestProposal, tc.initialDeposit, address.String(), "test", "Proposal", "description of proposal", false)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
// System under test
|
||||
|
||||
@ -3,6 +3,7 @@ package keeper
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
|
||||
@ -14,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
// SubmitProposal creates a new proposal given an array of messages
|
||||
func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadata, title, summary string, proposer sdk.AccAddress) (v1.Proposal, error) {
|
||||
func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadata, title, summary string, proposer sdk.AccAddress, expedited bool) (v1.Proposal, error) {
|
||||
err := keeper.assertMetadataLength(metadata)
|
||||
if err != nil {
|
||||
return v1.Proposal{}, err
|
||||
@ -86,7 +87,7 @@ func (keeper Keeper) SubmitProposal(ctx sdk.Context, messages []sdk.Msg, metadat
|
||||
submitTime := ctx.BlockHeader().Time
|
||||
depositPeriod := keeper.GetParams(ctx).MaxDepositPeriod
|
||||
|
||||
proposal, err := v1.NewProposal(messages, proposalID, submitTime, submitTime.Add(*depositPeriod), metadata, title, summary, proposer)
|
||||
proposal, err := v1.NewProposal(messages, proposalID, submitTime, submitTime.Add(*depositPeriod), metadata, title, summary, proposer, expedited)
|
||||
if err != nil {
|
||||
return v1.Proposal{}, err
|
||||
}
|
||||
@ -314,7 +315,12 @@ func (keeper Keeper) SetProposalID(ctx sdk.Context, proposalID uint64) {
|
||||
func (keeper Keeper) ActivateVotingPeriod(ctx sdk.Context, proposal v1.Proposal) {
|
||||
startTime := ctx.BlockHeader().Time
|
||||
proposal.VotingStartTime = &startTime
|
||||
votingPeriod := keeper.GetParams(ctx).VotingPeriod
|
||||
var votingPeriod *time.Duration
|
||||
if proposal.Expedited {
|
||||
votingPeriod = keeper.GetParams(ctx).ExpeditedVotingPeriod
|
||||
} else {
|
||||
votingPeriod = keeper.GetParams(ctx).VotingPeriod
|
||||
}
|
||||
endTime := proposal.VotingStartTime.Add(*votingPeriod)
|
||||
proposal.VotingEndTime = &endTime
|
||||
proposal.Status = v1.StatusVotingPeriod
|
||||
|
||||
@ -17,53 +17,86 @@ import (
|
||||
)
|
||||
|
||||
func (suite *KeeperTestSuite) TestGetSetProposal() {
|
||||
tp := TestProposal
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().NoError(err)
|
||||
proposalID := proposal.Id
|
||||
suite.govKeeper.SetProposal(suite.ctx, proposal)
|
||||
testCases := map[string]struct {
|
||||
expedited bool
|
||||
}{
|
||||
"regular proposal": {},
|
||||
"expedited proposal": {
|
||||
expedited: true,
|
||||
},
|
||||
}
|
||||
|
||||
gotProposal, ok := suite.govKeeper.GetProposal(suite.ctx, proposalID)
|
||||
suite.Require().True(ok)
|
||||
suite.Require().Equal(proposal, gotProposal)
|
||||
for _, tc := range testCases {
|
||||
tp := TestProposal
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), tc.expedited)
|
||||
suite.Require().NoError(err)
|
||||
proposalID := proposal.Id
|
||||
suite.govKeeper.SetProposal(suite.ctx, proposal)
|
||||
|
||||
gotProposal, ok := suite.govKeeper.GetProposal(suite.ctx, proposalID)
|
||||
suite.Require().True(ok)
|
||||
suite.Require().Equal(proposal, gotProposal)
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestDeleteProposal() {
|
||||
// delete non-existing proposal
|
||||
suite.Require().PanicsWithValue(fmt.Sprintf("couldn't find proposal with id#%d", 10),
|
||||
func() {
|
||||
suite.govKeeper.DeleteProposal(suite.ctx, 10)
|
||||
testCases := map[string]struct {
|
||||
expedited bool
|
||||
}{
|
||||
"regular proposal": {},
|
||||
"expedited proposal": {
|
||||
expedited: true,
|
||||
},
|
||||
)
|
||||
tp := TestProposal
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().NoError(err)
|
||||
proposalID := proposal.Id
|
||||
suite.govKeeper.SetProposal(suite.ctx, proposal)
|
||||
suite.Require().NotPanics(func() {
|
||||
suite.govKeeper.DeleteProposal(suite.ctx, proposalID)
|
||||
}, "")
|
||||
}
|
||||
|
||||
for _, tc := range testCases {
|
||||
// delete non-existing proposal
|
||||
suite.Require().PanicsWithValue(fmt.Sprintf("couldn't find proposal with id#%d", 10),
|
||||
func() {
|
||||
suite.govKeeper.DeleteProposal(suite.ctx, 10)
|
||||
},
|
||||
)
|
||||
tp := TestProposal
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), tc.expedited)
|
||||
suite.Require().NoError(err)
|
||||
proposalID := proposal.Id
|
||||
suite.govKeeper.SetProposal(suite.ctx, proposal)
|
||||
suite.Require().NotPanics(func() {
|
||||
suite.govKeeper.DeleteProposal(suite.ctx, proposalID)
|
||||
}, "")
|
||||
}
|
||||
}
|
||||
|
||||
func (suite *KeeperTestSuite) TestActivateVotingPeriod() {
|
||||
tp := TestProposal
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
suite.Require().NoError(err)
|
||||
testCases := map[string]struct {
|
||||
expedited bool
|
||||
}{
|
||||
"regular proposal": {},
|
||||
"expedited proposal": {
|
||||
expedited: true,
|
||||
},
|
||||
}
|
||||
|
||||
suite.Require().Nil(proposal.VotingStartTime)
|
||||
for _, tc := range testCases {
|
||||
tp := TestProposal
|
||||
proposal, err := suite.govKeeper.SubmitProposal(suite.ctx, tp, "", "test", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), tc.expedited)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
suite.govKeeper.ActivateVotingPeriod(suite.ctx, proposal)
|
||||
suite.Require().Nil(proposal.VotingStartTime)
|
||||
|
||||
proposal, ok := suite.govKeeper.GetProposal(suite.ctx, proposal.Id)
|
||||
suite.Require().True(ok)
|
||||
suite.Require().True(proposal.VotingStartTime.Equal(suite.ctx.BlockHeader().Time))
|
||||
suite.govKeeper.ActivateVotingPeriod(suite.ctx, proposal)
|
||||
|
||||
activeIterator := suite.govKeeper.ActiveProposalQueueIterator(suite.ctx, *proposal.VotingEndTime)
|
||||
suite.Require().True(activeIterator.Valid())
|
||||
proposal, ok := suite.govKeeper.GetProposal(suite.ctx, proposal.Id)
|
||||
suite.Require().True(ok)
|
||||
suite.Require().True(proposal.VotingStartTime.Equal(suite.ctx.BlockHeader().Time))
|
||||
|
||||
proposalID := types.GetProposalIDFromBytes(activeIterator.Value())
|
||||
suite.Require().Equal(proposalID, proposal.Id)
|
||||
activeIterator.Close()
|
||||
activeIterator := suite.govKeeper.ActiveProposalQueueIterator(suite.ctx, *proposal.VotingEndTime)
|
||||
suite.Require().True(activeIterator.Valid())
|
||||
|
||||
proposalID := types.GetProposalIDFromBytes(activeIterator.Value())
|
||||
suite.Require().Equal(proposalID, proposal.Id)
|
||||
activeIterator.Close()
|
||||
}
|
||||
}
|
||||
|
||||
type invalidProposalRoute struct{ v1beta1.TextProposal }
|
||||
@ -79,26 +112,28 @@ func (suite *KeeperTestSuite) TestSubmitProposal() {
|
||||
content v1beta1.Content
|
||||
authority string
|
||||
metadata string
|
||||
expedited bool
|
||||
expectedErr error
|
||||
}{
|
||||
{&tp, govAcct, "", nil},
|
||||
{&tp, govAcct, "", false, nil},
|
||||
{&tp, govAcct, "", true, nil},
|
||||
// Keeper does not check the validity of title and description, no error
|
||||
{&v1beta1.TextProposal{Title: "", Description: "description"}, govAcct, "", nil},
|
||||
{&v1beta1.TextProposal{Title: strings.Repeat("1234567890", 100), Description: "description"}, govAcct, "", nil},
|
||||
{&v1beta1.TextProposal{Title: "title", Description: ""}, govAcct, "", nil},
|
||||
{&v1beta1.TextProposal{Title: "title", Description: strings.Repeat("1234567890", 1000)}, govAcct, "", nil},
|
||||
{&v1beta1.TextProposal{Title: "", Description: "description"}, govAcct, "", false, nil},
|
||||
{&v1beta1.TextProposal{Title: strings.Repeat("1234567890", 100), Description: "description"}, govAcct, "", false, nil},
|
||||
{&v1beta1.TextProposal{Title: "title", Description: ""}, govAcct, "", false, nil},
|
||||
{&v1beta1.TextProposal{Title: "title", Description: strings.Repeat("1234567890", 1000)}, govAcct, "", true, nil},
|
||||
// error when metadata is too long (>10000)
|
||||
{&tp, govAcct, strings.Repeat("a", 100001), types.ErrMetadataTooLong},
|
||||
{&tp, govAcct, strings.Repeat("a", 100001), true, types.ErrMetadataTooLong},
|
||||
// error when signer is not gov acct
|
||||
{&tp, randomAddr.String(), "", types.ErrInvalidSigner},
|
||||
{&tp, randomAddr.String(), "", false, types.ErrInvalidSigner},
|
||||
// error only when invalid route
|
||||
{&invalidProposalRoute{}, govAcct, "", types.ErrNoProposalHandlerExists},
|
||||
{&invalidProposalRoute{}, govAcct, "", false, types.ErrNoProposalHandlerExists},
|
||||
}
|
||||
|
||||
for i, tc := range testCases {
|
||||
prop, err := v1.NewLegacyContent(tc.content, tc.authority)
|
||||
suite.Require().NoError(err)
|
||||
_, err = suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, tc.metadata, "title", "", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
_, err = suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, tc.metadata, "title", "", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), tc.expedited)
|
||||
suite.Require().True(errors.Is(tc.expectedErr, err), "tc #%d; got: %v, expected: %v", i, err, tc.expectedErr)
|
||||
}
|
||||
}
|
||||
@ -111,7 +146,7 @@ func (suite *KeeperTestSuite) TestGetProposalsFiltered() {
|
||||
|
||||
for _, s := range status {
|
||||
for i := 0; i < 50; i++ {
|
||||
p, err := v1.NewProposal(TestProposal, proposalID, time.Now(), time.Now(), "", "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
p, err := v1.NewProposal(TestProposal, proposalID, time.Now(), time.Now(), "metadata", "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
suite.Require().NoError(err)
|
||||
|
||||
p.Status = s
|
||||
@ -165,11 +200,11 @@ func (suite *KeeperTestSuite) TestCancelProposal() {
|
||||
tp := v1beta1.TextProposal{Title: "title", Description: "description"}
|
||||
prop, err := v1.NewLegacyContent(&tp, govAcct)
|
||||
suite.Require().NoError(err)
|
||||
proposalResp, err := suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, "", "title", "summary", suite.addrs[0])
|
||||
proposalResp, err := suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, "", "title", "summary", suite.addrs[0], false)
|
||||
suite.Require().NoError(err)
|
||||
proposalID := proposalResp.Id
|
||||
|
||||
proposal2Resp, err := suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, "", "title", "summary", suite.addrs[1])
|
||||
proposal2Resp, err := suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, "", "title", "summary", suite.addrs[1], true)
|
||||
proposal2ID := proposal2Resp.Id
|
||||
makeProposalPass := func() {
|
||||
proposal2, ok := suite.govKeeper.GetProposal(suite.ctx, proposal2ID)
|
||||
|
||||
@ -89,7 +89,7 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal v1.Proposal) (passes bool,
|
||||
totalVotingPower = totalVotingPower.Add(votingPower)
|
||||
}
|
||||
|
||||
tallyParams := keeper.GetParams(ctx)
|
||||
params := keeper.GetParams(ctx)
|
||||
tallyResults = v1.NewTallyResultFromMap(results)
|
||||
|
||||
// TODO: Upgrade the spec to cover all of these cases & remove pseudocode.
|
||||
@ -100,7 +100,7 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal v1.Proposal) (passes bool,
|
||||
|
||||
// If there is not enough quorum of votes, the proposal fails
|
||||
percentVoting := totalVotingPower.Quo(sdk.NewDecFromInt(keeper.sk.TotalBondedTokens(ctx)))
|
||||
quorum, _ := sdk.NewDecFromStr(tallyParams.Quorum)
|
||||
quorum, _ := sdk.NewDecFromStr(params.Quorum)
|
||||
if percentVoting.LT(quorum) {
|
||||
return false, false, tallyResults
|
||||
}
|
||||
@ -111,13 +111,21 @@ func (keeper Keeper) Tally(ctx sdk.Context, proposal v1.Proposal) (passes bool,
|
||||
}
|
||||
|
||||
// If more than 1/3 of voters veto, proposal fails
|
||||
vetoThreshold, _ := sdk.NewDecFromStr(tallyParams.VetoThreshold)
|
||||
vetoThreshold, _ := sdk.NewDecFromStr(params.VetoThreshold)
|
||||
if results[v1.OptionNoWithVeto].Quo(totalVotingPower).GT(vetoThreshold) {
|
||||
return false, true, tallyResults
|
||||
}
|
||||
|
||||
// If more than 1/2 of non-abstaining voters vote Yes, proposal passes
|
||||
threshold, _ := sdk.NewDecFromStr(tallyParams.Threshold)
|
||||
// For expedited 2/3
|
||||
var thresholdStr string
|
||||
if proposal.Expedited {
|
||||
thresholdStr = params.GetExpeditedThreshold()
|
||||
} else {
|
||||
thresholdStr = params.GetThreshold()
|
||||
}
|
||||
|
||||
threshold, _ := sdk.NewDecFromStr(thresholdStr)
|
||||
if results[v1.OptionYes].Quo(totalVotingPower.Sub(results[v1.OptionAbstain])).GT(threshold) {
|
||||
return true, false, tallyResults
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@ func TestVotes(t *testing.T) {
|
||||
addrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdk.NewInt(10000000))
|
||||
|
||||
tp := TestProposal
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
proposalID := proposal.Id
|
||||
metadata := "metadata"
|
||||
|
||||
@ -87,6 +87,7 @@ func TestMigrateJSON(t *testing.T) {
|
||||
"proposals": [
|
||||
{
|
||||
"deposit_end_time": "2001-09-09T01:46:40Z",
|
||||
"expedited": false,
|
||||
"final_tally_result": {
|
||||
"abstain_count": "0",
|
||||
"no_count": "0",
|
||||
|
||||
@ -11,16 +11,21 @@ import (
|
||||
// Addition of the new min initial deposit ratio parameter that is set to 0 by default.
|
||||
// Proposals in voting period are tracked in a separate index.
|
||||
func MigrateJSON(oldState *v1.GenesisState) (*v1.GenesisState, error) {
|
||||
defaultParams := v1.DefaultParams()
|
||||
|
||||
params := v1.NewParams(
|
||||
oldState.DepositParams.MinDeposit,
|
||||
defaultParams.ExpeditedMinDeposit,
|
||||
*oldState.DepositParams.MaxDepositPeriod,
|
||||
*oldState.VotingParams.VotingPeriod,
|
||||
*defaultParams.ExpeditedVotingPeriod,
|
||||
oldState.TallyParams.Quorum,
|
||||
oldState.TallyParams.Threshold,
|
||||
defaultParams.ExpeditedThreshold,
|
||||
oldState.TallyParams.VetoThreshold,
|
||||
v1.DefaultParams().MinInitialDepositRatio,
|
||||
v1.DefaultParams().ProposalCancelRatio,
|
||||
v1.DefaultParams().ProposalCancelDest,
|
||||
defaultParams.MinInitialDepositRatio,
|
||||
defaultParams.ProposalCancelRatio,
|
||||
defaultParams.ProposalCancelDest,
|
||||
)
|
||||
|
||||
return &v1.GenesisState{
|
||||
|
||||
@ -59,6 +59,14 @@ func TestMigrateJSON(t *testing.T) {
|
||||
"deposit_params": null,
|
||||
"deposits": [],
|
||||
"params": {
|
||||
"expedited_min_deposit": [
|
||||
{
|
||||
"amount": "50000000",
|
||||
"denom": "stake"
|
||||
}
|
||||
],
|
||||
"expedited_threshold": "0.667000000000000000",
|
||||
"expedited_voting_period": "86400s",
|
||||
"max_deposit_period": "172800s",
|
||||
"min_deposit": [
|
||||
{
|
||||
|
||||
@ -27,10 +27,13 @@ func migrateParams(ctx sdk.Context, storeKey storetypes.StoreKey, legacySubspace
|
||||
|
||||
params := govv1.NewParams(
|
||||
dp.MinDeposit,
|
||||
govv1.DefaultParams().ExpeditedMinDeposit,
|
||||
*dp.MaxDepositPeriod,
|
||||
*vp.VotingPeriod,
|
||||
*govv1.DefaultParams().ExpeditedVotingPeriod,
|
||||
tp.Quorum,
|
||||
tp.Threshold,
|
||||
govv1.DefaultParams().ExpeditedThreshold,
|
||||
tp.VetoThreshold,
|
||||
sdk.ZeroDec().String(),
|
||||
sdk.ZeroDec().String(),
|
||||
|
||||
@ -76,13 +76,13 @@ func TestMigrateStore(t *testing.T) {
|
||||
// Create 2 proposals
|
||||
prop1Content, err := v1.NewLegacyContent(v1beta1.NewTextProposal("Test", "description"), authtypes.NewModuleAddress("gov").String())
|
||||
require.NoError(t, err)
|
||||
proposal1, err := v1.NewProposal([]sdk.Msg{prop1Content}, 1, propTime, propTime, "some metadata for the legacy content", "Test", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
proposal1, err := v1.NewProposal([]sdk.Msg{prop1Content}, 1, propTime, propTime, "some metadata for the legacy content", "Test", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
prop1Bz, err := cdc.Marshal(&proposal1)
|
||||
require.NoError(t, err)
|
||||
store.Set(v1gov.ProposalKey(proposal1.Id), prop1Bz)
|
||||
|
||||
proposal2, err := v1.NewProposal(getTestProposal(), 2, propTime, propTime, "some metadata for the legacy content", "Test", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
proposal2, err := v1.NewProposal(getTestProposal(), 2, propTime, propTime, "some metadata for the legacy content", "Test", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
proposal2.Status = v1.StatusVotingPeriod
|
||||
require.NoError(t, err)
|
||||
prop2Bz, err := cdc.Marshal(&proposal2)
|
||||
|
||||
36
x/gov/migrations/v5/store.go
Normal file
36
x/gov/migrations/v5/store.go
Normal file
@ -0,0 +1,36 @@
|
||||
package v5
|
||||
|
||||
import (
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
v4 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v4"
|
||||
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
|
||||
)
|
||||
|
||||
// MigrateStore performs in-place store migrations from v4 (v0.47) to v5 (v0.48). The
|
||||
// migration includes:
|
||||
//
|
||||
// Addition of the new proposal expedited parameters that are set to 0 by default.
|
||||
func MigrateStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error {
|
||||
store := ctx.KVStore(storeKey)
|
||||
paramsBz := store.Get(v4.ParamsKey)
|
||||
|
||||
var params govv1.Params
|
||||
cdc.MustUnmarshal(paramsBz, ¶ms)
|
||||
|
||||
defaultParams := govv1.DefaultParams()
|
||||
params.ExpeditedMinDeposit = defaultParams.ExpeditedMinDeposit
|
||||
params.ExpeditedVotingPeriod = defaultParams.ExpeditedVotingPeriod
|
||||
params.ExpeditedThreshold = defaultParams.ExpeditedThreshold
|
||||
|
||||
bz, err := cdc.Marshal(¶ms)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
store.Set(v4.ParamsKey, bz)
|
||||
|
||||
return nil
|
||||
}
|
||||
44
x/gov/migrations/v5/store_test.go
Normal file
44
x/gov/migrations/v5/store_test.go
Normal file
@ -0,0 +1,44 @@
|
||||
package v5_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
|
||||
"github.com/cosmos/cosmos-sdk/x/bank"
|
||||
"github.com/cosmos/cosmos-sdk/x/gov"
|
||||
v4 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v4"
|
||||
v5 "github.com/cosmos/cosmos-sdk/x/gov/migrations/v5"
|
||||
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
|
||||
)
|
||||
|
||||
func TestMigrateStore(t *testing.T) {
|
||||
cdc := moduletestutil.MakeTestEncodingConfig(gov.AppModuleBasic{}, bank.AppModuleBasic{}).Codec
|
||||
govKey := storetypes.NewKVStoreKey("gov")
|
||||
ctx := testutil.DefaultContext(govKey, storetypes.NewTransientStoreKey("transient_test"))
|
||||
store := ctx.KVStore(govKey)
|
||||
|
||||
var params v1.Params
|
||||
bz := store.Get(v4.ParamsKey)
|
||||
require.NoError(t, cdc.Unmarshal(bz, ¶ms))
|
||||
require.NotNil(t, params)
|
||||
require.Equal(t, "", params.ExpeditedThreshold)
|
||||
require.Equal(t, (*time.Duration)(nil), params.ExpeditedVotingPeriod)
|
||||
|
||||
// Run migrations.
|
||||
err := v5.MigrateStore(ctx, govKey, cdc)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Check params
|
||||
bz = store.Get(v4.ParamsKey)
|
||||
require.NoError(t, cdc.Unmarshal(bz, ¶ms))
|
||||
require.NotNil(t, params)
|
||||
require.Equal(t, v1.DefaultParams().ExpeditedMinDeposit, params.ExpeditedMinDeposit)
|
||||
require.Equal(t, v1.DefaultParams().ExpeditedThreshold, params.ExpeditedThreshold)
|
||||
require.Equal(t, v1.DefaultParams().ExpeditedVotingPeriod, params.ExpeditedVotingPeriod)
|
||||
}
|
||||
@ -36,7 +36,7 @@ import (
|
||||
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
|
||||
)
|
||||
|
||||
const ConsensusVersion = 4
|
||||
const ConsensusVersion = 5
|
||||
|
||||
var (
|
||||
_ module.EndBlockAppModule = AppModule{}
|
||||
@ -285,18 +285,21 @@ func (am AppModule) RegisterServices(cfg module.Configurator) {
|
||||
v1.RegisterQueryServer(cfg.QueryServer(), am.keeper)
|
||||
|
||||
m := keeper.NewMigrator(am.keeper, am.legacySubspace)
|
||||
err := cfg.RegisterMigration(govtypes.ModuleName, 1, m.Migrate1to2)
|
||||
if err != nil {
|
||||
if err := cfg.RegisterMigration(govtypes.ModuleName, 1, m.Migrate1to2); err != nil {
|
||||
panic(fmt.Sprintf("failed to migrate x/gov from version 1 to 2: %v", err))
|
||||
}
|
||||
err = cfg.RegisterMigration(govtypes.ModuleName, 2, m.Migrate2to3)
|
||||
if err != nil {
|
||||
|
||||
if err := cfg.RegisterMigration(govtypes.ModuleName, 2, m.Migrate2to3); err != nil {
|
||||
panic(fmt.Sprintf("failed to migrate x/gov from version 2 to 3: %v", err))
|
||||
}
|
||||
err = cfg.RegisterMigration(govtypes.ModuleName, 3, m.Migrate3to4)
|
||||
if err != nil {
|
||||
|
||||
if err := cfg.RegisterMigration(govtypes.ModuleName, 3, m.Migrate3to4); err != nil {
|
||||
panic(fmt.Sprintf("failed to migrate x/gov from version 3 to 4: %v", err))
|
||||
}
|
||||
|
||||
if err := cfg.RegisterMigration(govtypes.ModuleName, 4, m.Migrate4to5); err != nil {
|
||||
panic(fmt.Sprintf("failed to migrate x/gov from version 4 to 5: %v", err))
|
||||
}
|
||||
}
|
||||
|
||||
// InitGenesis performs genesis initialization for the gov module. It returns
|
||||
|
||||
@ -8,6 +8,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
"github.com/cosmos/cosmos-sdk/types/kv"
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
||||
)
|
||||
|
||||
@ -17,18 +18,27 @@ func NewDecodeStore(cdc codec.Codec) func(kvA, kvB kv.Pair) string {
|
||||
return func(kvA, kvB kv.Pair) string {
|
||||
switch {
|
||||
case bytes.Equal(kvA.Key[:1], types.ProposalsKeyPrefix):
|
||||
var proposalA v1beta1.Proposal
|
||||
err := cdc.Unmarshal(kvA.Value, &proposalA)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
var proposalB v1beta1.Proposal
|
||||
err = cdc.Unmarshal(kvB.Value, &proposalB)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
return fmt.Sprintf("%v\n%v", proposalA, proposalB)
|
||||
var (
|
||||
proposalA v1beta1.Proposal
|
||||
proposalB v1beta1.Proposal
|
||||
|
||||
proposalD v1.Proposal
|
||||
proposalC v1.Proposal
|
||||
)
|
||||
if err := cdc.Unmarshal(kvA.Value, &proposalC); err != nil {
|
||||
cdc.MustUnmarshal(kvA.Value, &proposalA)
|
||||
}
|
||||
|
||||
if err := cdc.Unmarshal(kvB.Value, &proposalD); err != nil {
|
||||
cdc.MustUnmarshal(kvB.Value, &proposalB)
|
||||
}
|
||||
|
||||
// this is to check if the proposal has been unmarshalled as v1 correctly (and not v1beta1)
|
||||
if proposalC.Title != "" || proposalD.Title != "" {
|
||||
return fmt.Sprintf("%v\n%v", proposalC, proposalD)
|
||||
}
|
||||
|
||||
return fmt.Sprintf("%v\n%v", proposalA, proposalB)
|
||||
case bytes.Equal(kvA.Key[:1], types.ActiveProposalQueuePrefix),
|
||||
bytes.Equal(kvA.Key[:1], types.InactiveProposalQueuePrefix),
|
||||
bytes.Equal(kvA.Key[:1], types.ProposalIDKey):
|
||||
|
||||
@ -16,6 +16,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/x/gov"
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/simulation"
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
|
||||
"github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1"
|
||||
)
|
||||
|
||||
@ -35,17 +36,16 @@ func TestDecodeStore(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
proposalB, err := v1beta1.NewProposal(content, 2, endTime, endTime.Add(24*time.Hour))
|
||||
require.NoError(t, err)
|
||||
proposalC, err := v1.NewProposal([]sdk.Msg{}, 3, endTime, endTime.Add(24*time.Hour), "metadata", "title", "summary", delAddr1, false)
|
||||
require.NoError(t, err)
|
||||
proposalD, err := v1.NewProposal([]sdk.Msg{}, 4, endTime, endTime.Add(24*time.Hour), "metadata", "title", "summary", delAddr1, true)
|
||||
require.NoError(t, err)
|
||||
|
||||
proposalIDBz := make([]byte, 8)
|
||||
binary.LittleEndian.PutUint64(proposalIDBz, 1)
|
||||
deposit := v1beta1.NewDeposit(1, delAddr1, sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.OneInt())))
|
||||
vote := v1beta1.NewVote(1, delAddr1, v1beta1.NewNonSplitVoteOption(v1beta1.OptionYes))
|
||||
|
||||
proposalBzA, err := cdc.Marshal(&proposalA)
|
||||
require.NoError(t, err)
|
||||
proposalBzB, err := cdc.Marshal(&proposalB)
|
||||
require.NoError(t, err)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
kvA, kvB kv.Pair
|
||||
@ -53,11 +53,17 @@ func TestDecodeStore(t *testing.T) {
|
||||
wantPanic bool
|
||||
}{
|
||||
{
|
||||
"proposals",
|
||||
kv.Pair{Key: types.ProposalKey(1), Value: proposalBzA},
|
||||
kv.Pair{Key: types.ProposalKey(2), Value: proposalBzB},
|
||||
"proposals v1beta",
|
||||
kv.Pair{Key: types.ProposalKey(1), Value: cdc.MustMarshal(&proposalA)},
|
||||
kv.Pair{Key: types.ProposalKey(2), Value: cdc.MustMarshal(&proposalB)},
|
||||
fmt.Sprintf("%v\n%v", proposalA, proposalB), false,
|
||||
},
|
||||
{
|
||||
"proposals v1",
|
||||
kv.Pair{Key: types.ProposalKey(3), Value: cdc.MustMarshal(&proposalC)},
|
||||
kv.Pair{Key: types.ProposalKey(4), Value: cdc.MustMarshal(&proposalD)},
|
||||
fmt.Sprintf("%v\n%v", proposalC, proposalD), false,
|
||||
},
|
||||
{
|
||||
"proposal IDs",
|
||||
kv.Pair{Key: types.InactiveProposalQueueKey(1, endTime), Value: proposalIDBz},
|
||||
|
||||
@ -17,24 +17,41 @@ import (
|
||||
|
||||
// Simulation parameter constants
|
||||
const (
|
||||
DepositParamsMinDeposit = "deposit_params_min_deposit"
|
||||
DepositParamsDepositPeriod = "deposit_params_deposit_period"
|
||||
DepositMinInitialRatio = "deposit_params_min_initial_ratio"
|
||||
VotingParamsVotingPeriod = "voting_params_voting_period"
|
||||
TallyParamsQuorum = "tally_params_quorum"
|
||||
TallyParamsThreshold = "tally_params_threshold"
|
||||
TallyParamsVeto = "tally_params_veto"
|
||||
ProposalCancelRate = "proposal_cancel_rate"
|
||||
MinDeposit = "min_deposit"
|
||||
ExpeditedMinDeposit = "expedited_min_deposit"
|
||||
DepositPeriod = "deposit_period"
|
||||
MinInitialRatio = "min_initial_ratio"
|
||||
VotingPeriod = "voting_period"
|
||||
ExpeditedVotingPeriod = "expedited_voting_period"
|
||||
Quorum = "quorum"
|
||||
Threshold = "threshold"
|
||||
ExpeditedThreshold = "expedited_threshold"
|
||||
Veto = "veto"
|
||||
ProposalCancelRate = "proposal_cancel_rate"
|
||||
|
||||
// ExpeditedThreshold must be at least as large as the regular Threshold
|
||||
// Therefore, we use this break out point in randomization.
|
||||
tallyNonExpeditedMax = 500
|
||||
|
||||
// Similarly, expedited voting period must be strictly less than the regular
|
||||
// voting period to be valid. Therefore, we use this break out point in randomization.
|
||||
expeditedMaxVotingPeriod = 60 * 60 * 24 * 2
|
||||
)
|
||||
|
||||
// GenDepositParamsDepositPeriod returns randomized DepositParamsDepositPeriod
|
||||
func GenDepositParamsDepositPeriod(r *rand.Rand) time.Duration {
|
||||
// GenDepositPeriod returns randomized DepositPeriod
|
||||
func GenDepositPeriod(r *rand.Rand) time.Duration {
|
||||
return time.Duration(simulation.RandIntBetween(r, 1, 2*60*60*24*2)) * time.Second
|
||||
}
|
||||
|
||||
// GenDepositParamsMinDeposit returns randomized DepositParamsMinDeposit
|
||||
func GenDepositParamsMinDeposit(r *rand.Rand, bondDenom string) sdk.Coins {
|
||||
return sdk.NewCoins(sdk.NewInt64Coin(bondDenom, int64(simulation.RandIntBetween(r, 1, 1e3))))
|
||||
// GenMinDeposit returns randomized MinDeposit
|
||||
func GenMinDeposit(r *rand.Rand, bondDenom string) sdk.Coins {
|
||||
return sdk.NewCoins(sdk.NewInt64Coin(bondDenom, int64(simulation.RandIntBetween(r, 1, 1e3/2))))
|
||||
}
|
||||
|
||||
// GenExpeditedMinDeposit returns randomized ExpeditedMinDeposit
|
||||
// It is always greater than GenMinDeposit
|
||||
func GenExpeditedMinDeposit(r *rand.Rand, bondDenom string) sdk.Coins {
|
||||
return sdk.NewCoins(sdk.NewInt64Coin(bondDenom, int64(simulation.RandIntBetween(r, 1e3/2, 1e3))))
|
||||
}
|
||||
|
||||
// GenDepositMinInitialRatio returns randomized DepositMinInitialRatio
|
||||
@ -47,23 +64,33 @@ func GenProposalCancelRate(r *rand.Rand) sdk.Dec {
|
||||
return sdk.NewDec(int64(simulation.RandIntBetween(r, 0, 99))).Quo(sdk.NewDec(100))
|
||||
}
|
||||
|
||||
// GenVotingParamsVotingPeriod returns randomized VotingParamsVotingPeriod
|
||||
func GenVotingParamsVotingPeriod(r *rand.Rand) time.Duration {
|
||||
return time.Duration(simulation.RandIntBetween(r, 1, 2*60*60*24*2)) * time.Second
|
||||
// GenVotingPeriod returns randomized VotingPeriod
|
||||
func GenVotingPeriod(r *rand.Rand) time.Duration {
|
||||
return time.Duration(simulation.RandIntBetween(r, expeditedMaxVotingPeriod, 2*expeditedMaxVotingPeriod)) * time.Second
|
||||
}
|
||||
|
||||
// GenTallyParamsQuorum returns randomized TallyParamsQuorum
|
||||
func GenTallyParamsQuorum(r *rand.Rand) math.LegacyDec {
|
||||
// GenExpeditedVotingPeriod randomized ExpeditedVotingPeriod
|
||||
func GenExpeditedVotingPeriod(r *rand.Rand) time.Duration {
|
||||
return time.Duration(simulation.RandIntBetween(r, 1, expeditedMaxVotingPeriod)) * time.Second
|
||||
}
|
||||
|
||||
// GenQuorum returns randomized Quorum
|
||||
func GenQuorum(r *rand.Rand) math.LegacyDec {
|
||||
return sdk.NewDecWithPrec(int64(simulation.RandIntBetween(r, 334, 500)), 3)
|
||||
}
|
||||
|
||||
// GenTallyParamsThreshold returns randomized TallyParamsThreshold
|
||||
func GenTallyParamsThreshold(r *rand.Rand) math.LegacyDec {
|
||||
return sdk.NewDecWithPrec(int64(simulation.RandIntBetween(r, 450, 550)), 3)
|
||||
// GenThreshold returns randomized Threshold
|
||||
func GenThreshold(r *rand.Rand) math.LegacyDec {
|
||||
return sdk.NewDecWithPrec(int64(simulation.RandIntBetween(r, 450, tallyNonExpeditedMax+1)), 3)
|
||||
}
|
||||
|
||||
// GenTallyParamsVeto returns randomized TallyParamsVeto
|
||||
func GenTallyParamsVeto(r *rand.Rand) math.LegacyDec {
|
||||
// GenExpeditedThreshold randomized ExpeditedThreshold
|
||||
func GenExpeditedThreshold(r *rand.Rand) sdk.Dec {
|
||||
return sdk.NewDecWithPrec(int64(simulation.RandIntBetween(r, tallyNonExpeditedMax, 550)), 3)
|
||||
}
|
||||
|
||||
// GenVeto returns randomized Veto
|
||||
func GenVeto(r *rand.Rand) math.LegacyDec {
|
||||
return sdk.NewDecWithPrec(int64(simulation.RandIntBetween(r, 250, 334)), 3)
|
||||
}
|
||||
|
||||
@ -73,19 +100,25 @@ func RandomizedGenState(simState *module.SimulationState) {
|
||||
|
||||
var minDeposit sdk.Coins
|
||||
simState.AppParams.GetOrGenerate(
|
||||
simState.Cdc, DepositParamsMinDeposit, &minDeposit, simState.Rand,
|
||||
func(r *rand.Rand) { minDeposit = GenDepositParamsMinDeposit(r, simState.BondDenom) },
|
||||
simState.Cdc, MinDeposit, &minDeposit, simState.Rand,
|
||||
func(r *rand.Rand) { minDeposit = GenMinDeposit(r, simState.BondDenom) },
|
||||
)
|
||||
|
||||
var expeditedMinDeposit sdk.Coins
|
||||
simState.AppParams.GetOrGenerate(
|
||||
simState.Cdc, ExpeditedMinDeposit, &expeditedMinDeposit, simState.Rand,
|
||||
func(r *rand.Rand) { expeditedMinDeposit = GenExpeditedMinDeposit(r, simState.BondDenom) },
|
||||
)
|
||||
|
||||
var depositPeriod time.Duration
|
||||
simState.AppParams.GetOrGenerate(
|
||||
simState.Cdc, DepositParamsDepositPeriod, &depositPeriod, simState.Rand,
|
||||
func(r *rand.Rand) { depositPeriod = GenDepositParamsDepositPeriod(r) },
|
||||
simState.Cdc, DepositPeriod, &depositPeriod, simState.Rand,
|
||||
func(r *rand.Rand) { depositPeriod = GenDepositPeriod(r) },
|
||||
)
|
||||
|
||||
var minInitialDepositRatio sdk.Dec
|
||||
simState.AppParams.GetOrGenerate(
|
||||
simState.Cdc, DepositMinInitialRatio, &minInitialDepositRatio, simState.Rand,
|
||||
simState.Cdc, MinInitialRatio, &minInitialDepositRatio, simState.Rand,
|
||||
func(r *rand.Rand) { minInitialDepositRatio = GenDepositMinInitialDepositRatio(r) },
|
||||
)
|
||||
|
||||
@ -97,31 +130,43 @@ func RandomizedGenState(simState *module.SimulationState) {
|
||||
|
||||
var votingPeriod time.Duration
|
||||
simState.AppParams.GetOrGenerate(
|
||||
simState.Cdc, VotingParamsVotingPeriod, &votingPeriod, simState.Rand,
|
||||
func(r *rand.Rand) { votingPeriod = GenVotingParamsVotingPeriod(r) },
|
||||
simState.Cdc, VotingPeriod, &votingPeriod, simState.Rand,
|
||||
func(r *rand.Rand) { votingPeriod = GenVotingPeriod(r) },
|
||||
)
|
||||
|
||||
var expeditedVotingPeriod time.Duration
|
||||
simState.AppParams.GetOrGenerate(
|
||||
simState.Cdc, ExpeditedVotingPeriod, &expeditedVotingPeriod, simState.Rand,
|
||||
func(r *rand.Rand) { expeditedVotingPeriod = GenExpeditedVotingPeriod(r) },
|
||||
)
|
||||
|
||||
var quorum sdk.Dec
|
||||
simState.AppParams.GetOrGenerate(
|
||||
simState.Cdc, TallyParamsQuorum, &quorum, simState.Rand,
|
||||
func(r *rand.Rand) { quorum = GenTallyParamsQuorum(r) },
|
||||
simState.Cdc, Quorum, &quorum, simState.Rand,
|
||||
func(r *rand.Rand) { quorum = GenQuorum(r) },
|
||||
)
|
||||
|
||||
var threshold sdk.Dec
|
||||
simState.AppParams.GetOrGenerate(
|
||||
simState.Cdc, TallyParamsThreshold, &threshold, simState.Rand,
|
||||
func(r *rand.Rand) { threshold = GenTallyParamsThreshold(r) },
|
||||
simState.Cdc, Threshold, &threshold, simState.Rand,
|
||||
func(r *rand.Rand) { threshold = GenThreshold(r) },
|
||||
)
|
||||
|
||||
var expitedVotingThreshold sdk.Dec
|
||||
simState.AppParams.GetOrGenerate(
|
||||
simState.Cdc, ExpeditedThreshold, &expitedVotingThreshold, simState.Rand,
|
||||
func(r *rand.Rand) { expitedVotingThreshold = GenExpeditedThreshold(r) },
|
||||
)
|
||||
|
||||
var veto sdk.Dec
|
||||
simState.AppParams.GetOrGenerate(
|
||||
simState.Cdc, TallyParamsVeto, &veto, simState.Rand,
|
||||
func(r *rand.Rand) { veto = GenTallyParamsVeto(r) },
|
||||
simState.Cdc, Veto, &veto, simState.Rand,
|
||||
func(r *rand.Rand) { veto = GenVeto(r) },
|
||||
)
|
||||
|
||||
govGenesis := v1.NewGenesisState(
|
||||
startingProposalID,
|
||||
v1.NewParams(minDeposit, depositPeriod, votingPeriod, quorum.String(), threshold.String(), veto.String(), minInitialDepositRatio.String(), proposalCancelRate.String(), ""),
|
||||
v1.NewParams(minDeposit, expeditedMinDeposit, depositPeriod, votingPeriod, expeditedVotingPeriod, quorum.String(), threshold.String(), expitedVotingThreshold.String(), veto.String(), minInitialDepositRatio.String(), proposalCancelRate.String(), ""),
|
||||
)
|
||||
|
||||
bz, err := json.MarshalIndent(&govGenesis, "", " ")
|
||||
|
||||
@ -6,6 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"gotest.tools/v3/assert"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
@ -44,22 +45,26 @@ func TestRandomizedGenState(t *testing.T) {
|
||||
simState.Cdc.MustUnmarshalJSON(simState.GenState[types.ModuleName], &govGenesis)
|
||||
|
||||
const (
|
||||
tallyQuorum = "0.375000000000000000"
|
||||
tallyThreshold = "0.478000000000000000"
|
||||
tallyVetoThreshold = "0.324000000000000000"
|
||||
minInitialDepositDec = "0.590000000000000000"
|
||||
tallyQuorum = "0.350000000000000000"
|
||||
tallyThreshold = "0.495000000000000000"
|
||||
tallyExpeditedThreshold = "0.545000000000000000"
|
||||
tallyVetoThreshold = "0.327000000000000000"
|
||||
minInitialDepositDec = "0.880000000000000000"
|
||||
)
|
||||
|
||||
require.Equal(t, "905stake", govGenesis.Params.MinDeposit[0].String())
|
||||
require.Equal(t, "77h26m10s", govGenesis.Params.MaxDepositPeriod.String())
|
||||
require.Equal(t, float64(135894), govGenesis.Params.VotingPeriod.Seconds())
|
||||
require.Equal(t, tallyQuorum, govGenesis.Params.Quorum)
|
||||
require.Equal(t, tallyThreshold, govGenesis.Params.Threshold)
|
||||
require.Equal(t, tallyVetoThreshold, govGenesis.Params.VetoThreshold)
|
||||
require.Equal(t, uint64(0x28), govGenesis.StartingProposalId)
|
||||
require.Equal(t, []*v1.Deposit{}, govGenesis.Deposits)
|
||||
require.Equal(t, []*v1.Vote{}, govGenesis.Votes)
|
||||
require.Equal(t, []*v1.Proposal{}, govGenesis.Proposals)
|
||||
assert.Equal(t, "272stake", govGenesis.Params.MinDeposit[0].String())
|
||||
assert.Equal(t, "800stake", govGenesis.Params.ExpeditedMinDeposit[0].String())
|
||||
assert.Equal(t, "41h11m36s", govGenesis.Params.MaxDepositPeriod.String())
|
||||
assert.Equal(t, float64(283889), govGenesis.Params.VotingPeriod.Seconds())
|
||||
assert.Equal(t, float64(123081), govGenesis.Params.ExpeditedVotingPeriod.Seconds())
|
||||
assert.Equal(t, tallyQuorum, govGenesis.Params.Quorum)
|
||||
assert.Equal(t, tallyThreshold, govGenesis.Params.Threshold)
|
||||
assert.Equal(t, tallyExpeditedThreshold, govGenesis.Params.ExpeditedThreshold)
|
||||
assert.Equal(t, tallyVetoThreshold, govGenesis.Params.VetoThreshold)
|
||||
assert.Equal(t, uint64(0x28), govGenesis.StartingProposalId)
|
||||
assert.DeepEqual(t, []*v1.Deposit{}, govGenesis.Deposits)
|
||||
assert.DeepEqual(t, []*v1.Vote{}, govGenesis.Votes)
|
||||
assert.DeepEqual(t, []*v1.Proposal{}, govGenesis.Proposals)
|
||||
}
|
||||
|
||||
// TestRandomizedGenState tests abnormal scenarios of applying RandomizedGenState.
|
||||
|
||||
@ -5,6 +5,7 @@ import (
|
||||
"math/rand"
|
||||
"time"
|
||||
|
||||
sdkmath "cosmossdk.io/math"
|
||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
|
||||
@ -211,6 +212,11 @@ func simulateMsgSubmitProposal(ak types.AccountKeeper, bk types.BankKeeper, k *k
|
||||
return simtypes.NoOpMsg(types.ModuleName, TypeMsgSubmitProposal, "unable to generate deposit"), nil, err
|
||||
}
|
||||
|
||||
expedited := r.Intn(2) == 0
|
||||
if expedited {
|
||||
deposit = deposit.MulInt(sdkmath.NewInt(v1.DefaultMinExpeditedDepositTokensRatio))
|
||||
}
|
||||
|
||||
msg, err := v1.NewMsgSubmitProposal(
|
||||
proposalMsgs,
|
||||
deposit,
|
||||
@ -218,6 +224,7 @@ func simulateMsgSubmitProposal(ak types.AccountKeeper, bk types.BankKeeper, k *k
|
||||
simtypes.RandStringOfLength(r, 100),
|
||||
simtypes.RandStringOfLength(r, 100),
|
||||
simtypes.RandStringOfLength(r, 100),
|
||||
expedited,
|
||||
)
|
||||
if err != nil {
|
||||
return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "unable to generate a submit proposal msg"), nil, err
|
||||
|
||||
@ -184,7 +184,7 @@ func TestSimulateMsgSubmitLegacyProposal(t *testing.T) {
|
||||
require.True(t, operationMsg.OK)
|
||||
require.Equal(t, "cosmos1p8wcgrjr4pjju90xg6u9cgq55dxwq8j7u4x9a0", msg.Proposer)
|
||||
require.NotEqual(t, len(msg.InitialDeposit), 0)
|
||||
require.Equal(t, "2686011stake", msg.InitialDeposit[0].String())
|
||||
require.Equal(t, "13430055stake", msg.InitialDeposit[0].String())
|
||||
require.Equal(t, "title-3: ZBSpYuLyYggwexjxusrBqDOTtGTOWeLrQKjLxzIivHSlcxgdXhhuTSkuxKGLwQvuyNhYFmBZHeAerqyNEUzXPFGkqEGqiQWIXnku", msg.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetTitle())
|
||||
require.Equal(t, "description-3: NJWzHdBNpAXKJPHWQdrGYcAHSctgVlqwqHoLfHsXUdStwfefwzqLuKEhmMyYLdbZrcPgYqjNHxPexsruwEGStAneKbWkQDDIlCWBLSi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FRItPfvisehFmoBhQqmkfbHVsgfHXDPJVyhwPllQpuYLRYvGodxKjkarnSNgsXoKEMlaSKxKdcVgvOkuLcfLFfdtXGTclqfPOfeoVLbqcjcXCUEBgAGplrkgsmIEhWRZLlGPGCwKWRaCKMkBHTAcypUrYjWwCLtOPVygMwMANGoQwFnCqFrUGMCRZUGJKTZIGPyldsifauoMnJPLTcDHmilcmahlqOELaAUYDBuzsVywnDQfwRLGIWozYaOAilMBcObErwgTDNGWnwQMUgFFSKtPDMEoEQCTKVREqrXZSGLqwTMcxHfWotDllNkIJPMbXzjDVjPOOjCFuIvTyhXKLyhUScOXvYthRXpPfKwMhptXaxIxgqBoUqzrWbaoLTVpQoottZyPFfNOoMioXHRuFwMRYUiKvcWPkrayyTLOCFJlAyslDameIuqVAuxErqFPEWIScKpBORIuZqoXlZuTvAjEdlEWDODFRregDTqGNoFBIHxvimmIZwLfFyKUfEWAnNBdtdzDmTPXtpHRGdIbuucfTjOygZsTxPjfweXhSUkMhPjMaxKlMIJMOXcnQfyzeOcbWwNbeH", msg.Messages[0].GetCachedValue().(*v1.MsgExecLegacyContent).Content.GetCachedValue().(v1beta1.Content).GetDescription())
|
||||
require.Equal(t, simulation.TypeMsgSubmitProposal, sdk.MsgTypeURL(&msg))
|
||||
@ -211,7 +211,7 @@ func TestSimulateMsgCancelProposal(t *testing.T) {
|
||||
submitTime := ctx.BlockHeader().Time
|
||||
depositPeriod := suite.GovKeeper.GetParams(ctx).MaxDepositPeriod
|
||||
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "title", "summary", proposer)
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "title", "summary", proposer, false)
|
||||
require.NoError(t, err)
|
||||
|
||||
suite.GovKeeper.SetProposal(ctx, proposal)
|
||||
@ -255,7 +255,7 @@ func TestSimulateMsgDeposit(t *testing.T) {
|
||||
submitTime := ctx.BlockHeader().Time
|
||||
depositPeriod := suite.GovKeeper.GetParams(ctx).MaxDepositPeriod
|
||||
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
|
||||
suite.GovKeeper.SetProposal(ctx, proposal)
|
||||
@ -301,7 +301,7 @@ func TestSimulateMsgVote(t *testing.T) {
|
||||
submitTime := ctx.BlockHeader().Time
|
||||
depositPeriod := suite.GovKeeper.GetParams(ctx).MaxDepositPeriod
|
||||
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
|
||||
suite.GovKeeper.ActivateVotingPeriod(ctx, proposal)
|
||||
@ -344,7 +344,7 @@ func TestSimulateMsgVoteWeighted(t *testing.T) {
|
||||
submitTime := ctx.BlockHeader().Time
|
||||
depositPeriod := suite.GovKeeper.GetParams(ctx).MaxDepositPeriod
|
||||
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "test", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "test", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
|
||||
suite.GovKeeper.ActivateVotingPeriod(ctx, proposal)
|
||||
|
||||
@ -10,16 +10,17 @@ const (
|
||||
EventTypeSignalProposal = "signal_proposal"
|
||||
EventTypeCancelProposal = "cancel_proposal"
|
||||
|
||||
AttributeKeyProposalResult = "proposal_result"
|
||||
AttributeKeyOption = "option"
|
||||
AttributeKeyProposalID = "proposal_id"
|
||||
AttributeKeyProposalMessages = "proposal_messages" // Msg type_urls in the proposal
|
||||
AttributeKeyVotingPeriodStart = "voting_period_start"
|
||||
AttributeValueProposalDropped = "proposal_dropped" // didn't meet min deposit
|
||||
AttributeValueProposalPassed = "proposal_passed" // met vote quorum
|
||||
AttributeValueProposalRejected = "proposal_rejected" // didn't meet vote quorum
|
||||
AttributeValueProposalFailed = "proposal_failed" // error on proposal handler
|
||||
AttributeValueProposalCanceled = "proposal_canceled" // error on proposal handler
|
||||
AttributeKeyProposalResult = "proposal_result"
|
||||
AttributeKeyOption = "option"
|
||||
AttributeKeyProposalID = "proposal_id"
|
||||
AttributeKeyProposalMessages = "proposal_messages" // Msg type_urls in the proposal
|
||||
AttributeKeyVotingPeriodStart = "voting_period_start"
|
||||
AttributeValueProposalDropped = "proposal_dropped" // didn't meet min deposit
|
||||
AttributeValueProposalPassed = "proposal_passed" // met vote quorum
|
||||
AttributeValueProposalRejected = "proposal_rejected" // didn't meet vote quorum
|
||||
AttributeValueExpeditedProposalRejected = "expedited_proposal_rejected" // didn't meet expedited vote quorum
|
||||
AttributeValueProposalFailed = "proposal_failed" // error on proposal handler
|
||||
AttributeValueProposalCanceled = "proposal_canceled" // error on proposal handler
|
||||
|
||||
AttributeKeyProposalType = "proposal_type"
|
||||
AttributeSignalTitle = "signal_title"
|
||||
|
||||
@ -273,10 +273,14 @@ type Proposal struct {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
Summary string `protobuf:"bytes,12,opt,name=summary,proto3" json:"summary,omitempty"`
|
||||
// Proposer is the address of the proposal sumbitter
|
||||
// proposer is the address of the proposal sumbitter
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
Proposer string `protobuf:"bytes,13,opt,name=proposer,proto3" json:"proposer,omitempty"`
|
||||
// expedited defines if the proposal is expedited
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
Expedited bool `protobuf:"varint,14,opt,name=expedited,proto3" json:"expedited,omitempty"`
|
||||
}
|
||||
|
||||
func (m *Proposal) Reset() { *m = Proposal{} }
|
||||
@ -403,6 +407,13 @@ func (m *Proposal) GetProposer() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Proposal) GetExpedited() bool {
|
||||
if m != nil {
|
||||
return m.Expedited
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// TallyResult defines a standard tally for a governance proposal.
|
||||
type TallyResult struct {
|
||||
// yes_count is the number of yes votes on a proposal.
|
||||
@ -551,6 +562,8 @@ func (m *Vote) GetMetadata() string {
|
||||
}
|
||||
|
||||
// DepositParams defines the params for deposits on governance proposals.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
type DepositParams struct {
|
||||
// Minimum deposit for a proposal to enter voting period.
|
||||
MinDeposit []types.Coin `protobuf:"bytes,1,rep,name=min_deposit,json=minDeposit,proto3" json:"min_deposit,omitempty"`
|
||||
@ -607,6 +620,8 @@ func (m *DepositParams) GetMaxDepositPeriod() *time.Duration {
|
||||
}
|
||||
|
||||
// VotingParams defines the params for voting on governance proposals.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
type VotingParams struct {
|
||||
// Duration of the voting period.
|
||||
VotingPeriod *time.Duration `protobuf:"bytes,1,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period,omitempty"`
|
||||
@ -653,6 +668,8 @@ func (m *VotingParams) GetVotingPeriod() *time.Duration {
|
||||
}
|
||||
|
||||
// TallyParams defines the params for tallying votes on governance proposals.
|
||||
//
|
||||
// Deprecated: Do not use.
|
||||
type TallyParams struct {
|
||||
// Minimum percentage of total stake needed to vote for a result to be
|
||||
// considered valid.
|
||||
@ -748,6 +765,16 @@ type Params struct {
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
ProposalCancelDest string `protobuf:"bytes,9,opt,name=proposal_cancel_dest,json=proposalCancelDest,proto3" json:"proposal_cancel_dest,omitempty"`
|
||||
// Duration of the voting period of an expedited proposal.
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
ExpeditedVotingPeriod *time.Duration `protobuf:"bytes,10,opt,name=expedited_voting_period,json=expeditedVotingPeriod,proto3,stdduration" json:"expedited_voting_period,omitempty"`
|
||||
// Minimum proportion of Yes votes for proposal to pass. Default value: 0.67.
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
ExpeditedThreshold string `protobuf:"bytes,11,opt,name=expedited_threshold,json=expeditedThreshold,proto3" json:"expedited_threshold,omitempty"`
|
||||
// Minimum expedited deposit for a proposal to enter voting period.
|
||||
ExpeditedMinDeposit []types.Coin `protobuf:"bytes,12,rep,name=expedited_min_deposit,json=expeditedMinDeposit,proto3" json:"expedited_min_deposit"`
|
||||
}
|
||||
|
||||
func (m *Params) Reset() { *m = Params{} }
|
||||
@ -846,6 +873,27 @@ func (m *Params) GetProposalCancelDest() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Params) GetExpeditedVotingPeriod() *time.Duration {
|
||||
if m != nil {
|
||||
return m.ExpeditedVotingPeriod
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Params) GetExpeditedThreshold() string {
|
||||
if m != nil {
|
||||
return m.ExpeditedThreshold
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *Params) GetExpeditedMinDeposit() []types.Coin {
|
||||
if m != nil {
|
||||
return m.ExpeditedMinDeposit
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("cosmos.gov.v1.VoteOption", VoteOption_name, VoteOption_value)
|
||||
proto.RegisterEnum("cosmos.gov.v1.ProposalStatus", ProposalStatus_name, ProposalStatus_value)
|
||||
@ -863,86 +911,90 @@ func init() {
|
||||
func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) }
|
||||
|
||||
var fileDescriptor_e05cb1c0d030febb = []byte{
|
||||
// 1252 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcf, 0x73, 0xd3, 0x46,
|
||||
0x14, 0x8e, 0x6c, 0xd9, 0x71, 0x9e, 0x63, 0x63, 0x96, 0x00, 0x4a, 0x00, 0x3b, 0x78, 0x3a, 0x4c,
|
||||
0xca, 0x0f, 0xbb, 0x81, 0xd2, 0x0b, 0xbd, 0xd8, 0xb1, 0x28, 0xca, 0xd0, 0xd8, 0x23, 0x8b, 0x30,
|
||||
0xf4, 0xa2, 0x51, 0xac, 0xc5, 0xd9, 0xa9, 0xa5, 0x75, 0xb5, 0x6b, 0x83, 0xff, 0x84, 0xde, 0x38,
|
||||
0x76, 0x7a, 0xea, 0xb1, 0xc7, 0x1e, 0x98, 0xde, 0x7b, 0xe3, 0xd0, 0xe9, 0x30, 0x5c, 0xda, 0x5e,
|
||||
0x68, 0x07, 0x0e, 0x9d, 0xe1, 0xaf, 0xe8, 0x68, 0xb5, 0x8a, 0x1d, 0xc5, 0x6d, 0x02, 0x17, 0x5b,
|
||||
0x7a, 0xef, 0xfb, 0xbe, 0x7d, 0xfb, 0x7e, 0xac, 0x16, 0xce, 0xf7, 0x28, 0xf3, 0x28, 0xab, 0xf7,
|
||||
0xe9, 0xb8, 0x3e, 0xde, 0x0c, 0xff, 0x6a, 0xc3, 0x80, 0x72, 0x8a, 0x0a, 0x91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, 0xe1, 0xa2, 0xcf, 0x60, 0xc9, 0x8d,
|
||||
0xb0, 0x34, 0x90, 0xba, 0xda, 0xab, 0xe7, 0x37, 0x56, 0xa4, 0x6e, 0xc3, 0x75, 0x03, 0xcc, 0x58,
|
||||
0x97, 0x07, 0xc4, 0xef, 0x9b, 0x53, 0x28, 0xfa, 0x1c, 0xb2, 0x8e, 0x47, 0x47, 0x3e, 0xd7, 0xd2,
|
||||
0xeb, 0xe9, 0x8d, 0xfc, 0x34, 0xfe, 0xb0, 0x4c, 0x35, 0x59, 0xa6, 0xda, 0x16, 0x25, 0x7e, 0x73,
|
||||
0xe9, 0xc5, 0xeb, 0xca, 0xc2, 0x8f, 0xff, 0xfc, 0x74, 0x55, 0x31, 0x25, 0xa7, 0xfa, 0x4b, 0x06,
|
||||
0x72, 0x1d, 0x19, 0x04, 0x2a, 0x42, 0xea, 0x20, 0xb4, 0x14, 0x71, 0xd1, 0x27, 0x90, 0xf3, 0x30,
|
||||
0x63, 0x4e, 0x1f, 0x33, 0x2d, 0x25, 0xc4, 0x57, 0x6a, 0x51, 0x45, 0x6a, 0x71, 0x45, 0x6a, 0x0d,
|
||||
0x7f, 0x62, 0x1e, 0xa0, 0xd0, 0x6d, 0xc8, 0x32, 0xee, 0xf0, 0x11, 0xd3, 0xd2, 0x22, 0x99, 0x97,
|
||||
0x12, 0xc9, 0x8c, 0x97, 0xea, 0x0a, 0x90, 0x29, 0xc1, 0xe8, 0x1e, 0xa0, 0xc7, 0xc4, 0x77, 0x06,
|
||||
0x36, 0x77, 0x06, 0x83, 0x89, 0x1d, 0x60, 0x36, 0x1a, 0x70, 0x4d, 0x5d, 0x57, 0x36, 0xf2, 0x37,
|
||||
0xd7, 0x12, 0x12, 0x56, 0x08, 0x31, 0x05, 0xc2, 0x2c, 0x09, 0xd6, 0x8c, 0x05, 0x35, 0x20, 0xcf,
|
||||
0x46, 0x7b, 0x1e, 0xe1, 0x76, 0xd8, 0x66, 0x5a, 0x46, 0x4a, 0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
0xa4, 0xce, 0x63, 0xde, 0x6d, 0x18, 0xf7, 0xf5, 0x56, 0x29, 0xd3, 0xd4, 0x5f, 0xbc, 0x29, 0x2b,
|
||||
0x2f, 0xdf, 0x94, 0x95, 0xbf, 0xdf, 0x94, 0x95, 0x67, 0x6f, 0xcb, 0x0b, 0x2f, 0xdf, 0x96, 0x17,
|
||||
0xfe, 0x78, 0x5b, 0x5e, 0xf8, 0xea, 0x5a, 0x9f, 0xf0, 0xfd, 0xd1, 0x5e, 0xad, 0x47, 0x3d, 0x79,
|
||||
0x57, 0x96, 0x7f, 0x37, 0x98, 0xfb, 0x75, 0xfd, 0xa9, 0xb8, 0xff, 0xf3, 0xc9, 0x10, 0xb3, 0xf0,
|
||||
0x72, 0x9f, 0x15, 0x23, 0x73, 0xeb, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x56, 0xd0, 0x44, 0x5e,
|
||||
0x1d, 0x0c, 0x00, 0x00,
|
||||
// 1328 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcd, 0x73, 0xd3, 0xc6,
|
||||
0x1b, 0x8e, 0xfc, 0x15, 0xfb, 0x75, 0x6c, 0xcc, 0x26, 0x10, 0x25, 0x80, 0x1d, 0x3c, 0xbf, 0x61,
|
||||
0xf2, 0xe3, 0xc3, 0x6e, 0xa0, 0xf4, 0x50, 0x3a, 0xd3, 0xb1, 0x63, 0x51, 0x94, 0x81, 0xd8, 0x23,
|
||||
0x1b, 0x07, 0x7a, 0xd1, 0x28, 0xd6, 0xe2, 0x68, 0x6a, 0x69, 0x5d, 0xed, 0xda, 0xc4, 0x7f, 0x42,
|
||||
0x6f, 0x1c, 0x7b, 0xea, 0xf4, 0xd8, 0x63, 0x0f, 0x4c, 0xcf, 0x3d, 0x72, 0xea, 0x30, 0x5c, 0xda,
|
||||
0x4b, 0xa1, 0x43, 0x0e, 0x9d, 0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0x0d, 0x69, 0x33, 0x55, 0xcd, 0xbe, 0x79, 0x79, 0x0b, 0x04, 0xab, 0x86, 0x3b,
|
||||
0x9a, 0xf0, 0x16, 0x7f, 0x94, 0x60, 0xb1, 0x86, 0xfb, 0x84, 0x5a, 0x0c, 0x15, 0x20, 0xdd, 0x77,
|
||||
0x49, 0x9f, 0x50, 0xa3, 0xa7, 0x5b, 0x26, 0x5f, 0x2b, 0xa6, 0x41, 0x60, 0x52, 0x4d, 0xf4, 0x19,
|
||||
0xa4, 0x4c, 0x1f, 0x4b, 0x5c, 0xa1, 0x2b, 0xbf, 0x79, 0x79, 0x6b, 0x45, 0xe8, 0x56, 0x4c, 0xd3,
|
||||
0xc5, 0x94, 0x36, 0x99, 0x6b, 0x39, 0x5d, 0x2d, 0x84, 0xa2, 0x2f, 0x20, 0x61, 0xd8, 0x64, 0xe0,
|
||||
0x30, 0x39, 0xba, 0x11, 0xdd, 0x4c, 0x87, 0xf1, 0x7b, 0x65, 0x2a, 0x89, 0x32, 0x95, 0xb6, 0x89,
|
||||
0xe5, 0x54, 0x53, 0xaf, 0xde, 0x16, 0x16, 0x7e, 0xfa, 0xfb, 0xe7, 0xeb, 0x92, 0x26, 0x38, 0xc5,
|
||||
0x77, 0x71, 0x48, 0x36, 0x44, 0x10, 0x28, 0x0b, 0x91, 0x71, 0x68, 0x11, 0xcb, 0x44, 0x9f, 0x40,
|
||||
0xd2, 0xc6, 0x94, 0x1a, 0x5d, 0x4c, 0xe5, 0x08, 0x17, 0x5f, 0x29, 0xf9, 0x15, 0x29, 0x05, 0x15,
|
||||
0x29, 0x55, 0x9c, 0x91, 0x36, 0x46, 0xa1, 0xbb, 0x90, 0xa0, 0xcc, 0x60, 0x03, 0x2a, 0x47, 0x79,
|
||||
0x32, 0xaf, 0xcc, 0x24, 0x33, 0x58, 0xaa, 0xc9, 0x41, 0x9a, 0x00, 0xa3, 0x07, 0x80, 0x9e, 0x59,
|
||||
0x8e, 0xd1, 0xd3, 0x99, 0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 0x51, 0x1f, 0x53, 0xef, 0xd3, 0x27, 0xc1, 0xdb,
|
||||
0xed, 0xce, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x77, 0xd5, 0x45, 0x3f, 0x3b, 0x0d, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) {
|
||||
@ -1049,6 +1101,16 @@ func (m *Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Expedited {
|
||||
i--
|
||||
if m.Expedited {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x70
|
||||
}
|
||||
if len(m.Proposer) > 0 {
|
||||
i -= len(m.Proposer)
|
||||
copy(dAtA[i:], m.Proposer)
|
||||
@ -1421,6 +1483,37 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.ExpeditedMinDeposit) > 0 {
|
||||
for iNdEx := len(m.ExpeditedMinDeposit) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.ExpeditedMinDeposit[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintGov(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x62
|
||||
}
|
||||
}
|
||||
if len(m.ExpeditedThreshold) > 0 {
|
||||
i -= len(m.ExpeditedThreshold)
|
||||
copy(dAtA[i:], m.ExpeditedThreshold)
|
||||
i = encodeVarintGov(dAtA, i, uint64(len(m.ExpeditedThreshold)))
|
||||
i--
|
||||
dAtA[i] = 0x5a
|
||||
}
|
||||
if m.ExpeditedVotingPeriod != nil {
|
||||
n8, err8 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.ExpeditedVotingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.ExpeditedVotingPeriod):])
|
||||
if err8 != nil {
|
||||
return 0, err8
|
||||
}
|
||||
i -= n8
|
||||
i = encodeVarintGov(dAtA, i, uint64(n8))
|
||||
i--
|
||||
dAtA[i] = 0x52
|
||||
}
|
||||
if len(m.ProposalCancelDest) > 0 {
|
||||
i -= len(m.ProposalCancelDest)
|
||||
copy(dAtA[i:], m.ProposalCancelDest)
|
||||
@ -1464,23 +1557,23 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
dAtA[i] = 0x22
|
||||
}
|
||||
if m.VotingPeriod != nil {
|
||||
n8, err8 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.VotingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.VotingPeriod):])
|
||||
if err8 != nil {
|
||||
return 0, err8
|
||||
}
|
||||
i -= n8
|
||||
i = encodeVarintGov(dAtA, i, uint64(n8))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if m.MaxDepositPeriod != nil {
|
||||
n9, err9 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.MaxDepositPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.MaxDepositPeriod):])
|
||||
n9, err9 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.VotingPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.VotingPeriod):])
|
||||
if err9 != nil {
|
||||
return 0, err9
|
||||
}
|
||||
i -= n9
|
||||
i = encodeVarintGov(dAtA, i, uint64(n9))
|
||||
i--
|
||||
dAtA[i] = 0x1a
|
||||
}
|
||||
if m.MaxDepositPeriod != nil {
|
||||
n10, err10 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(*m.MaxDepositPeriod, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.MaxDepositPeriod):])
|
||||
if err10 != nil {
|
||||
return 0, err10
|
||||
}
|
||||
i -= n10
|
||||
i = encodeVarintGov(dAtA, i, uint64(n10))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.MinDeposit) > 0 {
|
||||
@ -1609,6 +1702,9 @@ func (m *Proposal) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovGov(uint64(l))
|
||||
}
|
||||
if m.Expedited {
|
||||
n += 2
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@ -1760,6 +1856,20 @@ func (m *Params) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovGov(uint64(l))
|
||||
}
|
||||
if m.ExpeditedVotingPeriod != nil {
|
||||
l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(*m.ExpeditedVotingPeriod)
|
||||
n += 1 + l + sovGov(uint64(l))
|
||||
}
|
||||
l = len(m.ExpeditedThreshold)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovGov(uint64(l))
|
||||
}
|
||||
if len(m.ExpeditedMinDeposit) > 0 {
|
||||
for _, e := range m.ExpeditedMinDeposit {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovGov(uint64(l))
|
||||
}
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@ -2448,6 +2558,26 @@ func (m *Proposal) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
m.Proposer = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 14:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Expedited", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGov
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.Expedited = bool(v != 0)
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGov(dAtA[iNdEx:])
|
||||
@ -3493,6 +3623,108 @@ func (m *Params) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
m.ProposalCancelDest = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 10:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ExpeditedVotingPeriod", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGov
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.ExpeditedVotingPeriod == nil {
|
||||
m.ExpeditedVotingPeriod = new(time.Duration)
|
||||
}
|
||||
if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(m.ExpeditedVotingPeriod, dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 11:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ExpeditedThreshold", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGov
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ExpeditedThreshold = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 12:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field ExpeditedMinDeposit", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowGov
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthGov
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.ExpeditedMinDeposit = append(m.ExpeditedMinDeposit, types.Coin{})
|
||||
if err := m.ExpeditedMinDeposit[len(m.ExpeditedMinDeposit)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipGov(dAtA[iNdEx:])
|
||||
|
||||
@ -24,13 +24,19 @@ var (
|
||||
// NewMsgSubmitProposal creates a new MsgSubmitProposal.
|
||||
//
|
||||
//nolint:interfacer
|
||||
func NewMsgSubmitProposal(messages []sdk.Msg, initialDeposit sdk.Coins, proposer, metadata, title, summary string) (*MsgSubmitProposal, error) {
|
||||
func NewMsgSubmitProposal(
|
||||
messages []sdk.Msg,
|
||||
initialDeposit sdk.Coins,
|
||||
proposer, metadata, title, summary string,
|
||||
expedited bool,
|
||||
) (*MsgSubmitProposal, error) {
|
||||
m := &MsgSubmitProposal{
|
||||
InitialDeposit: initialDeposit,
|
||||
Proposer: proposer,
|
||||
Metadata: metadata,
|
||||
Title: title,
|
||||
Summary: summary,
|
||||
Expedited: expedited,
|
||||
}
|
||||
|
||||
anys, err := sdktx.SetMsgs(messages)
|
||||
|
||||
@ -144,26 +144,25 @@ func TestMsgSubmitProposal_ValidateBasic(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
proposer string
|
||||
initialDeposit sdk.Coins
|
||||
messages []sdk.Msg
|
||||
metadata string
|
||||
title string
|
||||
summary string
|
||||
expErr bool
|
||||
name string
|
||||
proposer string
|
||||
initialDeposit sdk.Coins
|
||||
messages []sdk.Msg
|
||||
metadata, title, summary string
|
||||
expedited bool
|
||||
expErr bool
|
||||
}{
|
||||
{"invalid addr", "", coinsPos, []sdk.Msg{msg1}, metadata, "Title", "Summary", true},
|
||||
{"empty msgs and metadata", addrs[0].String(), coinsPos, nil, "", "Title", "Summary", true},
|
||||
{"empty title and summary", addrs[0].String(), coinsPos, nil, "", "", "", true},
|
||||
{"invalid msg", addrs[0].String(), coinsPos, []sdk.Msg{msg1, msg2}, metadata, "Title", "Summary", true},
|
||||
{"valid with no Msg", addrs[0].String(), coinsPos, nil, metadata, "Title", "Summary", false},
|
||||
{"valid with no metadata", addrs[0].String(), coinsPos, []sdk.Msg{msg1}, "", "Title", "Summary", false},
|
||||
{"valid with everything", addrs[0].String(), coinsPos, []sdk.Msg{msg1}, metadata, "Title", "Summary", false},
|
||||
{"invalid addr", "", coinsPos, []sdk.Msg{msg1}, metadata, "Title", "Summary", false, true},
|
||||
{"empty msgs and metadata", addrs[0].String(), coinsPos, nil, "", "Title", "Summary", false, true},
|
||||
{"empty title and summary", addrs[0].String(), coinsPos, nil, "", "", "", false, true},
|
||||
{"invalid msg", addrs[0].String(), coinsPos, []sdk.Msg{msg1, msg2}, metadata, "Title", "Summary", false, true},
|
||||
{"valid with no Msg", addrs[0].String(), coinsPos, nil, metadata, "Title", "Summary", false, false},
|
||||
{"valid with no metadata", addrs[0].String(), coinsPos, []sdk.Msg{msg1}, "", "Title", "Summary", false, false},
|
||||
{"valid with everything", addrs[0].String(), coinsPos, []sdk.Msg{msg1}, metadata, "Title", "Summary", true, false},
|
||||
}
|
||||
|
||||
for _, tc := range tests {
|
||||
msg, err := v1.NewMsgSubmitProposal(tc.messages, tc.initialDeposit, tc.proposer, tc.metadata, tc.title, tc.summary)
|
||||
msg, err := v1.NewMsgSubmitProposal(tc.messages, tc.initialDeposit, tc.proposer, tc.metadata, tc.title, tc.summary, tc.expedited)
|
||||
require.NoError(t, err)
|
||||
if tc.expErr {
|
||||
require.Error(t, msg.ValidateBasic(), "test: %s", tc.name)
|
||||
@ -180,6 +179,7 @@ func TestMsgSubmitProposal_GetSignBytes(t *testing.T) {
|
||||
proposal []sdk.Msg
|
||||
title string
|
||||
summary string
|
||||
expedited bool
|
||||
expSignBz string
|
||||
}{
|
||||
{
|
||||
@ -187,6 +187,7 @@ func TestMsgSubmitProposal_GetSignBytes(t *testing.T) {
|
||||
[]sdk.Msg{v1.NewMsgVote(addrs[0], 1, v1.OptionYes, "")},
|
||||
"gov/MsgVote",
|
||||
"Proposal for a governance vote msg",
|
||||
false,
|
||||
`{"type":"cosmos-sdk/v1/MsgSubmitProposal","value":{"initial_deposit":[],"messages":[{"type":"cosmos-sdk/v1/MsgVote","value":{"option":1,"proposal_id":"1","voter":"cosmos1w3jhxap3gempvr"}}],"summary":"Proposal for a governance vote msg","title":"gov/MsgVote"}}`,
|
||||
},
|
||||
{
|
||||
@ -194,13 +195,14 @@ func TestMsgSubmitProposal_GetSignBytes(t *testing.T) {
|
||||
[]sdk.Msg{banktypes.NewMsgSend(addrs[0], addrs[0], sdk.NewCoins())},
|
||||
"bank/MsgSend",
|
||||
"Proposal for a bank msg send",
|
||||
false,
|
||||
fmt.Sprintf(`{"type":"cosmos-sdk/v1/MsgSubmitProposal","value":{"initial_deposit":[],"messages":[{"type":"cosmos-sdk/MsgSend","value":{"amount":[],"from_address":"%s","to_address":"%s"}}],"summary":"Proposal for a bank msg send","title":"bank/MsgSend"}}`, addrs[0], addrs[0]),
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testcases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
msg, err := v1.NewMsgSubmitProposal(tc.proposal, sdk.NewCoins(), sdk.AccAddress{}.String(), "", tc.title, tc.summary)
|
||||
msg, err := v1.NewMsgSubmitProposal(tc.proposal, sdk.NewCoins(), sdk.AccAddress{}.String(), "", tc.title, tc.summary, tc.expedited)
|
||||
require.NoError(t, err)
|
||||
var bz []byte
|
||||
require.NotPanics(t, func() {
|
||||
|
||||
@ -11,14 +11,18 @@ import (
|
||||
|
||||
// Default period for deposits & voting
|
||||
const (
|
||||
DefaultPeriod time.Duration = time.Hour * 24 * 2 // 2 days
|
||||
DefaultPeriod time.Duration = time.Hour * 24 * 2 // 2 days
|
||||
DefaultExpeditedPeriod time.Duration = time.Hour * 24 * 1 // 1 day
|
||||
DefaultMinExpeditedDepositTokensRatio = 5
|
||||
)
|
||||
|
||||
// Default governance params
|
||||
var (
|
||||
DefaultMinDepositTokens = sdk.NewInt(10000000)
|
||||
DefaultMinExpeditedDepositTokens = DefaultMinDepositTokens.Mul(math.NewInt(DefaultMinExpeditedDepositTokensRatio))
|
||||
DefaultQuorum = sdk.NewDecWithPrec(334, 3)
|
||||
DefaultThreshold = sdk.NewDecWithPrec(5, 1)
|
||||
DefaultExpeditedThreshold = sdk.NewDecWithPrec(667, 3)
|
||||
DefaultVetoThreshold = sdk.NewDecWithPrec(334, 3)
|
||||
DefaultMinInitialDepositRatio = sdk.ZeroDec()
|
||||
DefaultProposalCancelRatio = sdk.MustNewDecFromStr("0.5")
|
||||
@ -51,15 +55,18 @@ func NewVotingParams(votingPeriod *time.Duration) VotingParams {
|
||||
|
||||
// NewParams creates a new Params instance with given values.
|
||||
func NewParams(
|
||||
minDeposit sdk.Coins, maxDepositPeriod time.Duration, votingPeriod time.Duration,
|
||||
quorum, threshold, vetoThreshold, minInitialDepositRatio, proposalCancelRatio, proposalCancelDest string,
|
||||
minDeposit, expeditedminDeposit sdk.Coins, maxDepositPeriod, votingPeriod, expeditedVotingPeriod time.Duration,
|
||||
quorum, threshold, expeditedThreshold, vetoThreshold, minInitialDepositRatio, proposalCancelRatio, proposalCancelDest string,
|
||||
) Params {
|
||||
return Params{
|
||||
MinDeposit: minDeposit,
|
||||
ExpeditedMinDeposit: expeditedminDeposit,
|
||||
MaxDepositPeriod: &maxDepositPeriod,
|
||||
VotingPeriod: &votingPeriod,
|
||||
ExpeditedVotingPeriod: &expeditedVotingPeriod,
|
||||
Quorum: quorum,
|
||||
Threshold: threshold,
|
||||
ExpeditedThreshold: expeditedThreshold,
|
||||
VetoThreshold: vetoThreshold,
|
||||
MinInitialDepositRatio: minInitialDepositRatio,
|
||||
ProposalCancelRatio: proposalCancelRatio,
|
||||
@ -71,10 +78,13 @@ func NewParams(
|
||||
func DefaultParams() Params {
|
||||
return NewParams(
|
||||
sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinDepositTokens)),
|
||||
sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinExpeditedDepositTokens)),
|
||||
DefaultPeriod,
|
||||
DefaultPeriod,
|
||||
DefaultExpeditedPeriod,
|
||||
DefaultQuorum.String(),
|
||||
DefaultThreshold.String(),
|
||||
DefaultExpeditedThreshold.String(),
|
||||
DefaultVetoThreshold.String(),
|
||||
DefaultMinInitialDepositRatio.String(),
|
||||
DefaultProposalCancelRatio.String(),
|
||||
@ -84,10 +94,17 @@ func DefaultParams() Params {
|
||||
|
||||
// ValidateBasic performs basic validation on governance parameters.
|
||||
func (p Params) ValidateBasic() error {
|
||||
if minDeposit := sdk.Coins(p.MinDeposit); minDeposit.Empty() || !minDeposit.IsValid() {
|
||||
minDeposit := sdk.Coins(p.MinDeposit)
|
||||
if minDeposit.Empty() || !minDeposit.IsValid() {
|
||||
return fmt.Errorf("invalid minimum deposit: %s", minDeposit)
|
||||
}
|
||||
|
||||
if minExpeditedDeposit := sdk.Coins(p.ExpeditedMinDeposit); minExpeditedDeposit.Empty() || !minExpeditedDeposit.IsValid() {
|
||||
return fmt.Errorf("invalid expedited minimum deposit: %s", minExpeditedDeposit)
|
||||
} else if minExpeditedDeposit.IsAllLTE(minDeposit) {
|
||||
return fmt.Errorf("expedited minimum deposit must be greater than minimum deposit: %s", minExpeditedDeposit)
|
||||
}
|
||||
|
||||
if p.MaxDepositPeriod == nil {
|
||||
return fmt.Errorf("maximum deposit period must not be nil: %d", p.MaxDepositPeriod)
|
||||
}
|
||||
@ -118,6 +135,20 @@ func (p Params) ValidateBasic() error {
|
||||
return fmt.Errorf("vote threshold too large: %s", threshold)
|
||||
}
|
||||
|
||||
expeditedThreshold, err := sdk.NewDecFromStr(p.ExpeditedThreshold)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid expedited threshold string: %w", err)
|
||||
}
|
||||
if !threshold.IsPositive() {
|
||||
return fmt.Errorf("expedited vote threshold must be positive: %s", threshold)
|
||||
}
|
||||
if threshold.GT(math.LegacyOneDec()) {
|
||||
return fmt.Errorf("expedited vote threshold too large: %s", threshold)
|
||||
}
|
||||
if expeditedThreshold.LTE(threshold) {
|
||||
return fmt.Errorf("expedited vote threshold %s, must be greater than the regular threshold %s", expeditedThreshold, threshold)
|
||||
}
|
||||
|
||||
vetoThreshold, err := sdk.NewDecFromStr(p.VetoThreshold)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid vetoThreshold string: %w", err)
|
||||
@ -132,11 +163,20 @@ func (p Params) ValidateBasic() error {
|
||||
if p.VotingPeriod == nil {
|
||||
return fmt.Errorf("voting period must not be nil: %d", p.VotingPeriod)
|
||||
}
|
||||
|
||||
if p.VotingPeriod.Seconds() <= 0 {
|
||||
return fmt.Errorf("voting period must be positive: %s", p.VotingPeriod)
|
||||
}
|
||||
|
||||
if p.ExpeditedVotingPeriod == nil {
|
||||
return fmt.Errorf("expedited voting period must not be nil: %d", p.ExpeditedVotingPeriod)
|
||||
}
|
||||
if p.ExpeditedVotingPeriod.Seconds() <= 0 {
|
||||
return fmt.Errorf("expedited voting period must be positive: %s", p.ExpeditedVotingPeriod)
|
||||
}
|
||||
if p.ExpeditedVotingPeriod.Seconds() >= p.VotingPeriod.Seconds() {
|
||||
return fmt.Errorf("expedited voting period %s must be strictly less that the regular voting period %s", p.ExpeditedVotingPeriod, p.VotingPeriod)
|
||||
}
|
||||
|
||||
minInitialDepositRatio, err := sdk.NewDecFromStr(p.MinInitialDepositRatio)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid mininum initial deposit ratio of proposal: %w", err)
|
||||
|
||||
@ -23,7 +23,7 @@ const (
|
||||
)
|
||||
|
||||
// NewProposal creates a new Proposal instance
|
||||
func NewProposal(messages []sdk.Msg, id uint64, submitTime, depositEndTime time.Time, metadata, title, summary string, proposer sdk.AccAddress) (Proposal, error) {
|
||||
func NewProposal(messages []sdk.Msg, id uint64, submitTime, depositEndTime time.Time, metadata, title, summary string, proposer sdk.AccAddress, expedited bool) (Proposal, error) {
|
||||
msgs, err := sdktx.SetMsgs(messages)
|
||||
if err != nil {
|
||||
return Proposal{}, err
|
||||
@ -42,6 +42,7 @@ func NewProposal(messages []sdk.Msg, id uint64, submitTime, depositEndTime time.
|
||||
Title: title,
|
||||
Summary: summary,
|
||||
Proposer: proposer.String(),
|
||||
Expedited: expedited,
|
||||
}
|
||||
|
||||
return p, nil
|
||||
@ -52,6 +53,16 @@ func (p Proposal) GetMsgs() ([]sdk.Msg, error) {
|
||||
return sdktx.GetMsgs(p.Messages, "sdk.MsgProposal")
|
||||
}
|
||||
|
||||
// GetMinDepositFromParams returns min expedited deposit from the gov params if
|
||||
// the proposal is expedited. Otherwise, returns the regular min deposit from
|
||||
// gov params.
|
||||
func (p Proposal) GetMinDepositFromParams(params Params) sdk.Coins {
|
||||
if p.Expedited {
|
||||
return params.ExpeditedMinDeposit
|
||||
}
|
||||
return params.MinDeposit
|
||||
}
|
||||
|
||||
// UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
|
||||
func (p Proposal) UnpackInterfaces(unpacker types.AnyUnpacker) error {
|
||||
return sdktx.UnpackInterfaces(unpacker, p.Messages)
|
||||
|
||||
@ -5,6 +5,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"cosmossdk.io/math"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
@ -35,9 +36,47 @@ func TestNestedAnys(t *testing.T) {
|
||||
testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal")
|
||||
msgContent, err := v1.NewLegacyContent(testProposal, "cosmos1govacct")
|
||||
require.NoError(t, err)
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{msgContent}, 1, time.Now(), time.Now(), "", "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"))
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{msgContent}, 1, time.Now(), time.Now(), "", "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), false)
|
||||
require.NoError(t, err)
|
||||
|
||||
require.NotPanics(t, func() { _ = proposal.String() })
|
||||
require.NotEmpty(t, proposal.String())
|
||||
}
|
||||
|
||||
func TestProposalSetExpedited(t *testing.T) {
|
||||
const startExpedited = false
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{}, 1, time.Now(), time.Now(), "", "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), startExpedited)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, startExpedited, proposal.Expedited)
|
||||
|
||||
proposal, err = v1.NewProposal([]sdk.Msg{}, 1, time.Now(), time.Now(), "", "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), !startExpedited)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, !startExpedited, proposal.Expedited)
|
||||
}
|
||||
|
||||
func TestProposalGetMinDepositFromParams(t *testing.T) {
|
||||
testcases := []struct {
|
||||
expedited bool
|
||||
expectedMinDeposit math.Int
|
||||
}{
|
||||
{
|
||||
expedited: true,
|
||||
expectedMinDeposit: v1.DefaultMinExpeditedDepositTokens,
|
||||
},
|
||||
{
|
||||
expedited: false,
|
||||
expectedMinDeposit: v1.DefaultMinDepositTokens,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tc := range testcases {
|
||||
proposal, err := v1.NewProposal([]sdk.Msg{}, 1, time.Now(), time.Now(), "", "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), tc.expedited)
|
||||
require.NoError(t, err)
|
||||
|
||||
actualMinDeposit := proposal.GetMinDepositFromParams(v1.DefaultParams())
|
||||
|
||||
require.Equal(t, 1, len(actualMinDeposit))
|
||||
require.Equal(t, sdk.DefaultBondDenom, actualMinDeposit[0].Denom)
|
||||
require.Equal(t, tc.expectedMinDeposit, actualMinDeposit[0].Amount)
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,6 +56,10 @@ type MsgSubmitProposal struct {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
Summary string `protobuf:"bytes,6,opt,name=summary,proto3" json:"summary,omitempty"`
|
||||
// expedided defines if the proposal is expedited or not
|
||||
//
|
||||
// Since: cosmos-sdk 0.48
|
||||
Expedited bool `protobuf:"varint,7,opt,name=expedited,proto3" json:"expedited,omitempty"`
|
||||
}
|
||||
|
||||
func (m *MsgSubmitProposal) Reset() { *m = MsgSubmitProposal{} }
|
||||
@ -133,6 +137,13 @@ func (m *MsgSubmitProposal) GetSummary() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgSubmitProposal) GetExpedited() bool {
|
||||
if m != nil {
|
||||
return m.Expedited
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type.
|
||||
type MsgSubmitProposalResponse struct {
|
||||
// proposal_id defines the unique id of the proposal.
|
||||
@ -833,72 +844,73 @@ func init() {
|
||||
func init() { proto.RegisterFile("cosmos/gov/v1/tx.proto", fileDescriptor_9ff8f4a63b6fc9a9) }
|
||||
|
||||
var fileDescriptor_9ff8f4a63b6fc9a9 = []byte{
|
||||
// 1027 bytes of a gzipped FileDescriptorProto
|
||||
// 1042 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xcd, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0xcf, 0x26, 0x8e, 0x9d, 0x4c, 0x9a, 0x44, 0x59, 0xb9, 0xed, 0x7a, 0x55, 0xd6, 0xe9, 0x16,
|
||||
0x41, 0x94, 0x90, 0x5d, 0x1c, 0x68, 0x85, 0x4c, 0x85, 0x54, 0x87, 0x0a, 0x2a, 0x61, 0xa8, 0xb6,
|
||||
0x50, 0x24, 0x84, 0x14, 0x8d, 0xbd, 0xc3, 0x66, 0x85, 0x77, 0x67, 0xe5, 0x19, 0x5b, 0xf1, 0x0d,
|
||||
0x71, 0xec, 0xa9, 0x7f, 0x06, 0xc7, 0x1c, 0x7a, 0xeb, 0x89, 0x5b, 0xe1, 0x54, 0x71, 0xe2, 0x14,
|
||||
0x50, 0x22, 0x08, 0xe2, 0x9f, 0x00, 0xcd, 0xc7, 0xae, 0xf7, 0x2b, 0x1f, 0x70, 0xe8, 0xc5, 0xda,
|
||||
0x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 0x8a, 0x8b, 0xd8, 0xe2, 0x5c,
|
||||
0x32, 0xde, 0xca, 0x92, 0xf1, 0x5a, 0x29, 0x19, 0xb1, 0x73, 0xb3, 0x01, 0xae, 0xe7, 0x44, 0x09,
|
||||
0x39, 0x7f, 0x2a, 0x00, 0x74, 0x89, 0x17, 0xf7, 0xfd, 0xff, 0xe4, 0xe5, 0x0e, 0x58, 0x94, 0x53,
|
||||
0x07, 0x5f, 0xcc, 0xcd, 0x14, 0xaa, 0xde, 0x05, 0x55, 0x18, 0xe0, 0x51, 0x48, 0x25, 0x3d, 0x97,
|
||||
0x1b, 0x56, 0xd2, 0xa6, 0xbd, 0xc5, 0x5b, 0x25, 0xf1, 0xc6, 0x88, 0xd0, 0x0a, 0x44, 0xc8, 0xcc,
|
||||
0xcc, 0x3a, 0x50, 0xa7, 0xa7, 0x24, 0xfd, 0xe7, 0xe2, 0x6d, 0x7c, 0x11, 0xb9, 0x90, 0xa2, 0x87,
|
||||
0x70, 0x08, 0x03, 0xc2, 0x92, 0x99, 0xf6, 0xa7, 0x72, 0x51, 0x32, 0x09, 0x54, 0x7d, 0x0f, 0x54,
|
||||
0x23, 0xee, 0x81, 0x33, 0xb0, 0xb4, 0x73, 0x35, 0x57, 0x6b, 0xe1, 0x3e, 0x93, 0x88, 0xc0, 0xb7,
|
||||
0xef, 0x14, 0x7b, 0xfe, 0x56, 0x2a, 0x91, 0x83, 0x78, 0x9f, 0xe5, 0x22, 0x95, 0x75, 0x4d, 0x8b,
|
||||
0x92, 0xc4, 0x9e, 0x28, 0x7c, 0xaf, 0xec, 0xc2, 0xb0, 0x8f, 0x06, 0xa9, 0xbd, 0x52, 0x52, 0xde,
|
||||
0xd5, 0x5c, 0x79, 0x33, 0x95, 0x4d, 0x2f, 0x82, 0xd9, 0xcb, 0x2e, 0x82, 0xf6, 0x72, 0x66, 0x78,
|
||||
0x9b, 0x3f, 0x2a, 0x7c, 0x32, 0x67, 0x83, 0x49, 0x26, 0xf3, 0x7f, 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, 0xf3,
|
||||
0x87, 0x02, 0x40, 0x8f, 0x78, 0xf1, 0x54, 0xf8, 0x8f, 0xbc, 0xdc, 0x01, 0x2b, 0x72, 0x26, 0xe1,
|
||||
0x8b, 0xb9, 0x99, 0xa9, 0xaa, 0x77, 0x41, 0x05, 0x06, 0x78, 0x1c, 0x52, 0x49, 0xcf, 0xe5, 0x46,
|
||||
0x99, 0xb4, 0xe9, 0x6c, 0xf3, 0x56, 0x49, 0xbc, 0x31, 0x22, 0xb4, 0x02, 0x11, 0x32, 0x33, 0xb3,
|
||||
0x06, 0xd4, 0xd9, 0x29, 0x49, 0xff, 0xb9, 0x78, 0x1b, 0x5f, 0x44, 0x2e, 0xa4, 0xe8, 0x21, 0x1c,
|
||||
0xc1, 0x80, 0xb0, 0x64, 0x66, 0xfd, 0xa9, 0x5c, 0x94, 0x4c, 0xa2, 0xaa, 0xbe, 0x07, 0x2a, 0x11,
|
||||
0xf7, 0xc0, 0x19, 0x58, 0xdd, 0xbd, 0x9a, 0xab, 0xb5, 0x70, 0x9f, 0x49, 0x44, 0xe8, 0x77, 0xee,
|
||||
0x14, 0x7b, 0xfe, 0x56, 0x2a, 0x91, 0xc3, 0x78, 0xdb, 0xe5, 0x22, 0x95, 0x75, 0x4d, 0x43, 0x49,
|
||||
0x62, 0x4f, 0x14, 0xbe, 0x75, 0xf6, 0x60, 0x38, 0x40, 0xc3, 0xd4, 0xd6, 0x29, 0x29, 0xef, 0x46,
|
||||
0xae, 0xbc, 0x99, 0xca, 0xa6, 0xd7, 0xc4, 0xfc, 0x65, 0xd7, 0x44, 0x67, 0x2d, 0x33, 0xbc, 0xcd,
|
||||
0x1f, 0x15, 0x3e, 0x99, 0xb3, 0xc1, 0x24, 0x93, 0xf9, 0xdf, 0x07, 0xf5, 0x00, 0xac, 0x0d, 0xb8,
|
||||
0x2f, 0xe4, 0xee, 0xb3, 0x75, 0x2b, 0x09, 0xd7, 0x0b, 0x73, 0xf9, 0xf3, 0x78, 0x17, 0x77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4, 0x60, 0xdc,
|
||||
0xb7, 0x06, 0x38, 0x90, 0x7f, 0x66, 0xed, 0xc2, 0x9c, 0xa0, 0xd3, 0x08, 0x11, 0xf6, 0xd7, 0xb9,
|
||||
0xc2, 0xdb, 0xe0, 0x9d, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xda, 0xbe, 0x64, 0x9b, 0x7a, 0x0b,
|
||||
0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -1243,6 +1255,16 @@ func (m *MsgSubmitProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Expedited {
|
||||
i--
|
||||
if m.Expedited {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x38
|
||||
}
|
||||
if len(m.Summary) > 0 {
|
||||
i -= len(m.Summary)
|
||||
copy(dAtA[i:], m.Summary)
|
||||
@ -1800,6 +1822,9 @@ func (m *MsgSubmitProposal) Size() (n int) {
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
if m.Expedited {
|
||||
n += 2
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
@ -2227,6 +2252,26 @@ func (m *MsgSubmitProposal) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
m.Summary = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 7:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Expedited", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.Expedited = bool(v != 0)
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user