From d321226154bed00f78e90f3c19fef0539d5e707c Mon Sep 17 00:00:00 2001 From: Reece Williams <31943163+Reecepbcups@users.noreply.github.com> Date: Mon, 5 Aug 2024 07:59:15 -0700 Subject: [PATCH] fix!: use authority admin, remove params (#184) * https://github.com/liftedinit/manifest-ledger/issues/21 * refactor: only use authority as admin (no params) * fix: re-add old param even though it is removed * refactor: remove params entirely * wip: testing * rm gov test which is no longer required * modify simulation * remove poa params e2e * fix: depinject issue with authority * depinject 1.0.0 * lint * Err -> idx 5 * single authority for depinject * so stick of sim testing whatever get in hardcoded w/ admin bypass * fix unit test * lint * fix: dont init() bypass * fix: codec * lint --- .github/workflows/e2e.yaml | 1 - .gitignore | 1 + Makefile | 3 - README.md | 36 - api/module/v1/module.pulsar.go | 182 +-- api/v1/genesis.pulsar.go | 210 ++- api/v1/params.pulsar.go | 705 +-------- api/v1/query.pulsar.go | 1074 ++------------ api/v1/query_grpc.pb.go | 39 - api/v1/tx.pulsar.go | 1277 ++--------------- api/v1/tx_grpc.pb.go | 39 - client/cli/tx.go | 48 - codec.go | 2 - codec_test.go | 3 +- e2e/Makefile | 5 +- e2e/go.mod | 18 +- e2e/go.sum | 36 +- e2e/helpers/action_builders.go | 22 +- e2e/helpers/poa.go | 23 - e2e/poa_gov_test.go | 161 --- e2e/poa_test.go | 16 +- e2e/setup.go | 11 +- errors.go | 6 +- genesis.go | 6 +- genesis.pb.go | 67 +- go.mod | 16 +- go.sum | 36 +- keeper/genesis.go | 14 +- keeper/genesis_test.go | 48 +- keeper/keeper.go | 35 +- keeper/keeper_test.go | 39 +- keeper/msg_server.go | 25 +- keeper/msg_server_test.go | 76 +- keeper/params.go | 26 - keeper/query_server.go | 10 - keeper/query_server_test.go | 57 - module/depinject.go | 10 +- params.go | 60 - params.pb.go | 317 +--- .../poa/module/v1/module.proto | 4 +- .../strangelove_ventures/poa/v1/genesis.proto | 5 +- .../strangelove_ventures/poa/v1/params.proto | 19 +- proto/strangelove_ventures/poa/v1/query.proto | 13 - proto/strangelove_ventures/poa/v1/tx.proto | 20 - query.pb.go | 398 +---- query.pb.gw.go | 65 - simapp/app.go | 1 + simapp/test_node.sh | 4 - simulation/genesis.go | 43 +- simulation/operations.go | 111 +- tx.pb.go | 507 +------ 51 files changed, 846 insertions(+), 5104 deletions(-) delete mode 100644 e2e/poa_gov_test.go delete mode 100644 keeper/params.go diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 74e8771..8330196 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -54,7 +54,6 @@ jobs: - "ictest-jail" - "ictest-val-add" - "ictest-val-remove" - - "ictest-gov" fail-fast: false steps: diff --git a/.gitignore b/.gitignore index c6bccf2..e41e7be 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ debug_container.dot build/ go.work.sum +debug_*.* \ No newline at end of file diff --git a/Makefile b/Makefile index a6d3049..6ce489d 100644 --- a/Makefile +++ b/Makefile @@ -35,9 +35,6 @@ ictest-val-add: ictest-val-remove: $(MAKE) -C e2e/ ictest-val-remove -ictest-gov: - $(MAKE) -C e2e/ ictest-gov - .PHONY: test ictest-poa ictest-jail ictest-val-add ictest-val-remove COV_ROOT="/tmp/poa-coverage" diff --git a/README.md b/README.md index 6ec0ec1..3f4d85b 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,6 @@ All delegation actions are disabled with the [disabled-staking ante](./INTEGRATI ## State -### Genesis -`Params` is found in the genesis state. This object contains the `admins` field, which is a list of bech32 addresses that are allowed to modify the validator set, PoA params, and validator params (via x/staking). If no admin is set, then the chain should set the governance account as the admin (default). By allowing for an array of admins, the chain can be controlled by multiple different parties according to your use case. For example, governance can be an admin while also allowing a multisig, DAO, and/or single account to control the validator set. There must be at least one admin in the list at all times. - -`AllowValidatorSelfExit` is a boolean option *(default true)* that toggles validators ability to remove themselves from the active set. This is useful for validators that are no longer able or decide this PoA network is no longer for them. If set to false, only admins can remove validators from the set. **NOTE** This does not stop validators from going down and being jailed for downtime. It just provides a graceful way to self remove power. - ### Pending Validators `PendingValidators` stores an array of PoA validator objects pending approval (from the admins) into the active set. This only is required after the chain has started. @@ -125,26 +120,6 @@ The `AbsoluteChangedPower` of +1 to each validator is 3, which is 33% of the pre } ``` -### UpdateParams (admin only) - -- `admins` is a list of bech32 addresses that control the validator set and parameters of the chain. -- `allow_validator_self_exit` allows validators to force remove themselves from the active set at any time. - -```json -{ - "@type": "/strangelove_ventures.poa.v1.MsgUpdateParams", - "sender": "cosmos1addr", - "params": { - "admins": [ - "cosmos1addr", - "cosmos1addr1", - "cosmos1addr2", - ], - "allow_validator_self_exit": true - } -} -``` - ### UpdateStakingParams (admin only) ```json { @@ -176,7 +151,6 @@ A validator is removed by an admin at height H; it increases the minimum self de | LCD / API | gRPC | |------------------------------|-----------------------------------------------------| -| `/poa/v1/params` |`strangelove_ventures.poa.v1.Query/Params` | | `/poa/v1/pending_validators` |`strangelove_ventures.poa.v1.Query/PendingValidators`| | `/poa/v1/{consensus_power}` |`strangelove_ventures.poa.v1.Query/ConsensusPower` | @@ -189,9 +163,6 @@ A user can query and interact with the `poa` module using the CLI. The `query` commands allow users to query the `poa` state. ```bash -# Get module params (admins list) -poad q poa params - # Get validators waiting to be added to the set poad q poa pending-validators @@ -222,13 +193,6 @@ poad tx poa remove [validator] # - --unsafe flag allows for bypassing the 30% max change per block poad tx poa set-power [validator] [amount] [--unsafe] -# (admin) Update the PoA module params -# - admins is a comma separated list of bech32 addresses -# - any admin can modify the list at any time -# - there must be at least one admin in the list at all times -# - allow_validator_self_exit is a bool to allow validators to force remove themselves from the set. -poad tx poa update-params [admin1,admin2,admin3,...] [allow_validator_self_exit] - # (admin) Update the staking module params # - unbondingTime is the time that a validator must wait to unbond (ex: 336h) # - maxVals is the maximum number of validators for the active set. diff --git a/api/module/v1/module.pulsar.go b/api/module/v1/module.pulsar.go index edd0ee7..3a2df7e 100644 --- a/api/module/v1/module.pulsar.go +++ b/api/module/v1/module.pulsar.go @@ -13,61 +13,15 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_Module_1_list)(nil) - -type _Module_1_list struct { - list *[]string -} - -func (x *_Module_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Module_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Module_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Module_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Module_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Module at list field Admins as it is not of Message kind")) -} - -func (x *_Module_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Module_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Module_1_list) IsValid() bool { - return x.list != nil -} - var ( - md_Module protoreflect.MessageDescriptor - fd_Module_admins protoreflect.FieldDescriptor + md_Module protoreflect.MessageDescriptor + fd_Module_authority protoreflect.FieldDescriptor ) func init() { file_strangelove_ventures_poa_module_v1_module_proto_init() md_Module = File_strangelove_ventures_poa_module_v1_module_proto.Messages().ByName("Module") - fd_Module_admins = md_Module.Fields().ByName("admins") + fd_Module_authority = md_Module.Fields().ByName("authority") } var _ protoreflect.Message = (*fastReflection_Module)(nil) @@ -135,9 +89,9 @@ func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Admins) != 0 { - value := protoreflect.ValueOfList(&_Module_1_list{list: &x.Admins}) - if !f(fd_Module_admins, value) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_Module_authority, value) { return } } @@ -156,8 +110,8 @@ func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "strangelove_ventures.poa.module.v1.Module.admins": - return len(x.Admins) != 0 + case "strangelove_ventures.poa.module.v1.Module.authority": + return x.Authority != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.module.v1.Module")) @@ -174,8 +128,8 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "strangelove_ventures.poa.module.v1.Module.admins": - x.Admins = nil + case "strangelove_ventures.poa.module.v1.Module.authority": + x.Authority = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.module.v1.Module")) @@ -192,12 +146,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "strangelove_ventures.poa.module.v1.Module.admins": - if len(x.Admins) == 0 { - return protoreflect.ValueOfList(&_Module_1_list{}) - } - listValue := &_Module_1_list{list: &x.Admins} - return protoreflect.ValueOfList(listValue) + case "strangelove_ventures.poa.module.v1.Module.authority": + value := x.Authority + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.module.v1.Module")) @@ -218,10 +169,8 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "strangelove_ventures.poa.module.v1.Module.admins": - lv := value.List() - clv := lv.(*_Module_1_list) - x.Admins = *clv.list + case "strangelove_ventures.poa.module.v1.Module.authority": + x.Authority = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.module.v1.Module")) @@ -242,12 +191,8 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "strangelove_ventures.poa.module.v1.Module.admins": - if x.Admins == nil { - x.Admins = []string{} - } - value := &_Module_1_list{list: &x.Admins} - return protoreflect.ValueOfList(value) + case "strangelove_ventures.poa.module.v1.Module.authority": + panic(fmt.Errorf("field authority of message strangelove_ventures.poa.module.v1.Module is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.module.v1.Module")) @@ -261,9 +206,8 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "strangelove_ventures.poa.module.v1.Module.admins": - list := []string{} - return protoreflect.ValueOfList(&_Module_1_list{list: &list}) + case "strangelove_ventures.poa.module.v1.Module.authority": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.module.v1.Module")) @@ -333,11 +277,9 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if len(x.Admins) > 0 { - for _, s := range x.Admins { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -368,14 +310,12 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Admins) > 0 { - for iNdEx := len(x.Admins) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Admins[iNdEx]) - copy(dAtA[i:], x.Admins[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admins[iNdEx]))) - i-- - dAtA[i] = 0xa - } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -428,7 +368,7 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Admins", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -456,7 +396,7 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Admins = append(x.Admins, string(dAtA[iNdEx:postIndex])) + x.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -513,9 +453,9 @@ type Module struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // admins defines the custom module admins. + // authority defines the custom module authority. // if not set, defaults to the governance module. - Admins []string `protobuf:"bytes,1,rep,name=admins,proto3" json:"admins,omitempty"` + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` } func (x *Module) Reset() { @@ -538,11 +478,11 @@ func (*Module) Descriptor() ([]byte, []int) { return file_strangelove_ventures_poa_module_v1_module_proto_rawDescGZIP(), []int{0} } -func (x *Module) GetAdmins() []string { +func (x *Module) GetAuthority() string { if x != nil { - return x.Admins + return x.Authority } - return nil + return "" } var File_strangelove_ventures_poa_module_v1_module_proto protoreflect.FileDescriptor @@ -555,32 +495,32 @@ var file_strangelove_ventures_poa_module_v1_module_proto_rawDesc = []byte{ 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4d, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x06, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x3a, 0x2b, 0xba, 0xc0, 0x96, 0xda, 0x01, - 0x25, 0x0a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x2d, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x42, 0xb1, 0x02, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x73, - 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, - 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x2d, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, - 0x6f, 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x50, 0x4d, 0xaa, 0x02, 0x21, 0x53, 0x74, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x2e, 0x50, 0x6f, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x21, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2d, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, - 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, 0x4d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x24, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, - 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x3a, 0x3a, 0x50, 0x6f, 0x61, 0x3a, 0x3a, - 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, + 0x2b, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x25, 0x0a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x2d, + 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x42, 0xb1, 0x02, 0x0a, + 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, + 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x53, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x2d, 0x76, + 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, + 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, + 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x50, + 0x4d, 0xaa, 0x02, 0x21, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, + 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x50, 0x6f, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x21, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, + 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, + 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x2d, 0x53, 0x74, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, + 0x50, 0x6f, 0x61, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x24, 0x53, 0x74, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x3a, + 0x3a, 0x50, 0x6f, 0x61, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/v1/genesis.pulsar.go b/api/v1/genesis.pulsar.go index 9ab715e..6f5fbb2 100644 --- a/api/v1/genesis.pulsar.go +++ b/api/v1/genesis.pulsar.go @@ -14,15 +14,66 @@ import ( sync "sync" ) +var _ protoreflect.List = (*_GenesisState_2_list)(nil) + +type _GenesisState_2_list struct { + list *[]*Validator +} + +func (x *_GenesisState_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Validator) + (*x.list)[i] = concreteValue +} + +func (x *_GenesisState_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Validator) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { + v := new(Validator) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GenesisState_2_list) NewElement() protoreflect.Value { + v := new(Validator) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GenesisState_2_list) IsValid() bool { + return x.list != nil +} + var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_vals protoreflect.FieldDescriptor ) func init() { file_strangelove_ventures_poa_v1_genesis_proto_init() md_GenesisState = File_strangelove_ventures_poa_v1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") + fd_GenesisState_vals = md_GenesisState.Fields().ByName("vals") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -90,9 +141,9 @@ func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { + if len(x.Vals) != 0 { + value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Vals}) + if !f(fd_GenesisState_vals, value) { return } } @@ -111,8 +162,8 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "strangelove_ventures.poa.v1.GenesisState.params": - return x.Params != nil + case "strangelove_ventures.poa.v1.GenesisState.vals": + return len(x.Vals) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.GenesisState")) @@ -129,8 +180,8 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "strangelove_ventures.poa.v1.GenesisState.params": - x.Params = nil + case "strangelove_ventures.poa.v1.GenesisState.vals": + x.Vals = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.GenesisState")) @@ -147,9 +198,12 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "strangelove_ventures.poa.v1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "strangelove_ventures.poa.v1.GenesisState.vals": + if len(x.Vals) == 0 { + return protoreflect.ValueOfList(&_GenesisState_2_list{}) + } + listValue := &_GenesisState_2_list{list: &x.Vals} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.GenesisState")) @@ -170,8 +224,10 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "strangelove_ventures.poa.v1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) + case "strangelove_ventures.poa.v1.GenesisState.vals": + lv := value.List() + clv := lv.(*_GenesisState_2_list) + x.Vals = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.GenesisState")) @@ -192,11 +248,12 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "strangelove_ventures.poa.v1.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) + case "strangelove_ventures.poa.v1.GenesisState.vals": + if x.Vals == nil { + x.Vals = []*Validator{} } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + value := &_GenesisState_2_list{list: &x.Vals} + return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.GenesisState")) @@ -210,9 +267,9 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "strangelove_ventures.poa.v1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "strangelove_ventures.poa.v1.GenesisState.vals": + list := []*Validator{} + return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.GenesisState")) @@ -282,9 +339,11 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Vals) > 0 { + for _, e := range x.Vals { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -315,19 +374,21 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err + if len(x.Vals) > 0 { + for iNdEx := len(x.Vals) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Vals[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] = 0x12 } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -378,9 +439,9 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Vals", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -407,10 +468,8 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { + x.Vals = append(x.Vals, &Validator{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Vals[len(x.Vals)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -872,8 +931,7 @@ type GenesisState struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Params defines all the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + Vals []*Validator `protobuf:"bytes,2,rep,name=vals,proto3" json:"vals,omitempty"` } func (x *GenesisState) Reset() { @@ -896,9 +954,9 @@ func (*GenesisState) Descriptor() ([]byte, []int) { return file_strangelove_ventures_poa_v1_genesis_proto_rawDescGZIP(), []int{0} } -func (x *GenesisState) GetParams() *Params { +func (x *GenesisState) GetVals() []*Validator { if x != nil { - return x.Params + return x.Vals } return nil } @@ -956,33 +1014,33 @@ var file_strangelove_ventures_poa_v1_genesis_proto_rawDesc = []byte{ 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, - 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x51, - 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x41, - 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x22, 0x37, 0x0a, 0x0a, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, - 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, - 0x70, 0x6f, 0x77, 0x65, 0x72, 0x3a, 0x13, 0x8a, 0xe7, 0xb0, 0x2a, 0x0e, 0x70, 0x6f, 0x61, 0x2f, - 0x50, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x42, 0x84, 0x02, 0x0a, 0x1f, 0x63, - 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, - 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0c, - 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, - 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x2d, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, - 0x70, 0x6f, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, - 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, - 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, - 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, - 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x50, 0x6f, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x53, - 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x26, 0x53, 0x74, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, - 0x50, 0x6f, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x1c, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, - 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x3a, 0x3a, 0x50, 0x6f, 0x61, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x50, + 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x40, + 0x0a, 0x04, 0x76, 0x61, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, + 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, + 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x04, 0x76, 0x61, 0x6c, 0x73, + 0x22, 0x37, 0x0a, 0x0a, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, + 0x6f, 0x77, 0x65, 0x72, 0x3a, 0x13, 0x8a, 0xe7, 0xb0, 0x2a, 0x0e, 0x70, 0x6f, 0x61, 0x2f, 0x50, + 0x6f, 0x77, 0x65, 0x72, 0x43, 0x61, 0x63, 0x68, 0x65, 0x42, 0x84, 0x02, 0x0a, 0x1f, 0x63, 0x6f, + 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, + 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x2d, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, + 0x6f, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, + 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, + 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, 0x02, + 0x1a, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x2e, 0x50, 0x6f, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x53, 0x74, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x26, 0x53, 0x74, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, + 0x6f, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x1c, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, + 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x3a, 0x3a, 0x50, 0x6f, 0x61, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1001,10 +1059,10 @@ var file_strangelove_ventures_poa_v1_genesis_proto_msgTypes = make([]protoimpl.M var file_strangelove_ventures_poa_v1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: strangelove_ventures.poa.v1.GenesisState (*PowerCache)(nil), // 1: strangelove_ventures.poa.v1.PowerCache - (*Params)(nil), // 2: strangelove_ventures.poa.v1.Params + (*Validator)(nil), // 2: strangelove_ventures.poa.v1.Validator } var file_strangelove_ventures_poa_v1_genesis_proto_depIdxs = []int32{ - 2, // 0: strangelove_ventures.poa.v1.GenesisState.params:type_name -> strangelove_ventures.poa.v1.Params + 2, // 0: strangelove_ventures.poa.v1.GenesisState.vals:type_name -> strangelove_ventures.poa.v1.Validator 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name diff --git a/api/v1/params.pulsar.go b/api/v1/params.pulsar.go index 483161b..ee62d9c 100644 --- a/api/v1/params.pulsar.go +++ b/api/v1/params.pulsar.go @@ -16,540 +16,6 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_Params_1_list)(nil) - -type _Params_1_list struct { - list *[]string -} - -func (x *_Params_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Params_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Params_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Params_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Params_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Params at list field Admins as it is not of Message kind")) -} - -func (x *_Params_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Params_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Params_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_admins protoreflect.FieldDescriptor - fd_Params_allow_validator_self_exit protoreflect.FieldDescriptor -) - -func init() { - file_strangelove_ventures_poa_v1_params_proto_init() - md_Params = File_strangelove_ventures_poa_v1_params_proto.Messages().ByName("Params") - fd_Params_admins = md_Params.Fields().ByName("admins") - fd_Params_allow_validator_self_exit = md_Params.Fields().ByName("allow_validator_self_exit") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_params_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Admins) != 0 { - value := protoreflect.ValueOfList(&_Params_1_list{list: &x.Admins}) - if !f(fd_Params_admins, value) { - return - } - } - if x.AllowValidatorSelfExit != false { - value := protoreflect.ValueOfBool(x.AllowValidatorSelfExit) - if !f(fd_Params_allow_validator_self_exit, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.Params.admins": - return len(x.Admins) != 0 - case "strangelove_ventures.poa.v1.Params.allow_validator_self_exit": - return x.AllowValidatorSelfExit != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.Params.admins": - x.Admins = nil - case "strangelove_ventures.poa.v1.Params.allow_validator_self_exit": - x.AllowValidatorSelfExit = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "strangelove_ventures.poa.v1.Params.admins": - if len(x.Admins) == 0 { - return protoreflect.ValueOfList(&_Params_1_list{}) - } - listValue := &_Params_1_list{list: &x.Admins} - return protoreflect.ValueOfList(listValue) - case "strangelove_ventures.poa.v1.Params.allow_validator_self_exit": - value := x.AllowValidatorSelfExit - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.Params does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.Params.admins": - lv := value.List() - clv := lv.(*_Params_1_list) - x.Admins = *clv.list - case "strangelove_ventures.poa.v1.Params.allow_validator_self_exit": - x.AllowValidatorSelfExit = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.Params does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.Params.admins": - if x.Admins == nil { - x.Admins = []string{} - } - value := &_Params_1_list{list: &x.Admins} - return protoreflect.ValueOfList(value) - case "strangelove_ventures.poa.v1.Params.allow_validator_self_exit": - panic(fmt.Errorf("field allow_validator_self_exit of message strangelove_ventures.poa.v1.Params is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.Params does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.Params.admins": - list := []string{} - return protoreflect.ValueOfList(&_Params_1_list{list: &list}) - case "strangelove_ventures.poa.v1.Params.allow_validator_self_exit": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.Params does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.Params", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Params) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Params) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Params) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Admins) > 0 { - for _, s := range x.Admins { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.AllowValidatorSelfExit { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.AllowValidatorSelfExit { - i-- - if x.AllowValidatorSelfExit { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(x.Admins) > 0 { - for iNdEx := len(x.Admins) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Admins[iNdEx]) - copy(dAtA[i:], x.Admins[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Admins[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire 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++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Admins", 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.Admins = append(x.Admins, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowValidatorSelfExit", 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.AllowValidatorSelfExit = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_StakingParams protoreflect.MessageDescriptor fd_StakingParams_unbonding_time protoreflect.FieldDescriptor @@ -580,7 +46,7 @@ func (x *StakingParams) ProtoReflect() protoreflect.Message { } func (x *StakingParams) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_params_proto_msgTypes[1] + mi := &file_strangelove_ventures_poa_v1_params_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1270,52 +736,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Params defines the parameters for the module. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Array of addresses that are allowed to control the chains validators power. - Admins []string `protobuf:"bytes,1,rep,name=admins,proto3" json:"admins,omitempty"` - // allow_validator_self_exit allows for a valdiator to remove themselves from the validator set. - AllowValidatorSelfExit bool `protobuf:"varint,2,opt,name=allow_validator_self_exit,json=allowValidatorSelfExit,proto3" json:"allow_validator_self_exit,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_params_proto_rawDescGZIP(), []int{0} -} - -func (x *Params) GetAdmins() []string { - if x != nil { - return x.Admins - } - return nil -} - -func (x *Params) GetAllowValidatorSelfExit() bool { - if x != nil { - return x.AllowValidatorSelfExit - } - return false -} - // StakingParams defines the parameters for the x/staking module. type StakingParams struct { state protoimpl.MessageState @@ -1341,7 +761,7 @@ type StakingParams struct { func (x *StakingParams) Reset() { *x = StakingParams{} if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_params_proto_msgTypes[1] + mi := &file_strangelove_ventures_poa_v1_params_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1355,7 +775,7 @@ func (*StakingParams) ProtoMessage() {} // Deprecated: Use StakingParams.ProtoReflect.Descriptor instead. func (*StakingParams) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_params_proto_rawDescGZIP(), []int{1} + return file_strangelove_ventures_poa_v1_params_proto_rawDescGZIP(), []int{0} } func (x *StakingParams) GetUnbondingTime() *durationpb.Duration { @@ -1413,58 +833,50 @@ var file_strangelove_ventures_poa_v1_params_proto_rawDesc = []byte{ 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x74, 0x0a, 0x06, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x73, 0x12, 0x39, 0x0a, - 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x16, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x53, 0x65, 0x6c, 0x66, 0x45, 0x78, 0x69, 0x74, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, - 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0a, 0x70, 0x6f, 0x61, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x22, 0xa3, 0x03, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0d, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6d, 0x61, - 0x78, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, - 0x61, 0x78, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, - 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, - 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x69, 0x63, 0x61, 0x6c, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, - 0x6f, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x62, 0x6f, 0x6e, 0x64, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x84, 0x01, 0x0a, 0x13, 0x6d, - 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, - 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x54, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, - 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, - 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, - 0x1a, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x22, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x11, - 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, - 0x65, 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, - 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x83, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, - 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, - 0x76, 0x65, 0x2d, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, - 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x3b, - 0x70, 0x6f, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, 0x02, 0x1a, 0x53, 0x74, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x2e, 0x50, 0x6f, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x6e, - 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, - 0x6f, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x26, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, - 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x1c, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x3a, 0x3a, 0x50, 0x6f, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x03, 0x0a, 0x0d, + 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4f, 0x0a, + 0x0e, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 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, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x0d, 0x75, 0x6e, 0x62, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, + 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x6e, 0x74, + 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x45, + 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, + 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x11, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x45, 0x6e, + 0x74, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6f, 0x6e, 0x64, 0x5f, 0x64, 0x65, + 0x6e, 0x6f, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6f, 0x6e, 0x64, 0x44, + 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x84, 0x01, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x54, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, + 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0xf2, 0xde, 0x1f, 0x1a, 0x79, 0x61, 0x6d, 0x6c, 0x3a, + 0x22, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x22, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x44, 0x65, 0x63, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x3a, 0x24, 0xe8, 0xa0, 0x1f, + 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, + 0x2f, 0x78, 0x2f, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x83, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, + 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x2d, 0x76, 0x65, 0x6e, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, + 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x61, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, + 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x50, 0x6f, 0x61, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, + 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x26, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x53, 0x74, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x3a, 0x3a, + 0x50, 0x6f, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1479,14 +891,13 @@ func file_strangelove_ventures_poa_v1_params_proto_rawDescGZIP() []byte { return file_strangelove_ventures_poa_v1_params_proto_rawDescData } -var file_strangelove_ventures_poa_v1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_strangelove_ventures_poa_v1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_strangelove_ventures_poa_v1_params_proto_goTypes = []interface{}{ - (*Params)(nil), // 0: strangelove_ventures.poa.v1.Params - (*StakingParams)(nil), // 1: strangelove_ventures.poa.v1.StakingParams - (*durationpb.Duration)(nil), // 2: google.protobuf.Duration + (*StakingParams)(nil), // 0: strangelove_ventures.poa.v1.StakingParams + (*durationpb.Duration)(nil), // 1: google.protobuf.Duration } var file_strangelove_ventures_poa_v1_params_proto_depIdxs = []int32{ - 2, // 0: strangelove_ventures.poa.v1.StakingParams.unbonding_time:type_name -> google.protobuf.Duration + 1, // 0: strangelove_ventures.poa.v1.StakingParams.unbonding_time:type_name -> google.protobuf.Duration 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -1501,18 +912,6 @@ func file_strangelove_ventures_poa_v1_params_proto_init() { } if !protoimpl.UnsafeEnabled { file_strangelove_ventures_poa_v1_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_strangelove_ventures_poa_v1_params_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StakingParams); i { case 0: return &v.state @@ -1531,7 +930,7 @@ func file_strangelove_ventures_poa_v1_params_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_strangelove_ventures_poa_v1_params_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, diff --git a/api/v1/query.pulsar.go b/api/v1/query.pulsar.go index acb5dab..928ec5a 100644 --- a/api/v1/query.pulsar.go +++ b/api/v1/query.pulsar.go @@ -14,797 +14,6 @@ import ( sync "sync" ) -var ( - md_QueryParamsRequest protoreflect.MessageDescriptor -) - -func init() { - file_strangelove_ventures_poa_v1_query_proto_init() - md_QueryParamsRequest = File_strangelove_ventures_poa_v1_query_proto.Messages().ByName("QueryParamsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) - -type fastReflection_QueryParamsRequest QueryParamsRequest - -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) -} - -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} - -type fastReflection_QueryParamsRequest_messageType struct{} - -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) -} -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryParamsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryParamsRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryParamsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.QueryParamsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire 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++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ParamsResponse protoreflect.MessageDescriptor - fd_ParamsResponse_params protoreflect.FieldDescriptor -) - -func init() { - file_strangelove_ventures_poa_v1_query_proto_init() - md_ParamsResponse = File_strangelove_ventures_poa_v1_query_proto.Messages().ByName("ParamsResponse") - fd_ParamsResponse_params = md_ParamsResponse.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_ParamsResponse)(nil) - -type fastReflection_ParamsResponse ParamsResponse - -func (x *ParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_ParamsResponse)(x) -} - -func (x *ParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ParamsResponse_messageType fastReflection_ParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_ParamsResponse_messageType{} - -type fastReflection_ParamsResponse_messageType struct{} - -func (x fastReflection_ParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_ParamsResponse)(nil) -} -func (x fastReflection_ParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_ParamsResponse) -} -func (x fastReflection_ParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_ParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_ParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ParamsResponse) New() protoreflect.Message { - return new(fastReflection_ParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ParamsResponse) Interface() protoreflect.ProtoMessage { - return (*ParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_ParamsResponse_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.ParamsResponse.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.ParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.ParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.ParamsResponse.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.ParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.ParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "strangelove_ventures.poa.v1.ParamsResponse.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.ParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.ParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.ParamsResponse.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.ParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.ParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.ParamsResponse.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.ParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.ParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.ParamsResponse.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.ParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.ParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.ParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - 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] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire 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++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_QueryPendingValidatorsRequest protoreflect.MessageDescriptor ) @@ -823,7 +32,7 @@ func (x *QueryPendingValidatorsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryPendingValidatorsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[2] + mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1232,7 +441,7 @@ func (x *PendingValidatorsResponse) ProtoReflect() protoreflect.Message { } func (x *PendingValidatorsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[3] + mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1675,7 +884,7 @@ func (x *QueryConsensusPowerRequest) ProtoReflect() protoreflect.Message { } func (x *QueryConsensusPowerRequest) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[4] + mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2095,7 +1304,7 @@ func (x *QueryConsensusPowerResponse) ProtoReflect() protoreflect.Message { } func (x *QueryConsensusPowerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[5] + mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2492,70 +1701,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsRequest) ProtoMessage() {} - -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{0} -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type ParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params is the returned parameter from the module - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *ParamsResponse) Reset() { - *x = ParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ParamsResponse) ProtoMessage() {} - -// Deprecated: Use ParamsResponse.ProtoReflect.Descriptor instead. -func (*ParamsResponse) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{1} -} - -func (x *ParamsResponse) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - // QueryPendingValidatorsRequest is the request type for the Query/PendingValidators RPC method. type QueryPendingValidatorsRequest struct { state protoimpl.MessageState @@ -2566,7 +1711,7 @@ type QueryPendingValidatorsRequest struct { func (x *QueryPendingValidatorsRequest) Reset() { *x = QueryPendingValidatorsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[2] + mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2580,7 +1725,7 @@ func (*QueryPendingValidatorsRequest) ProtoMessage() {} // Deprecated: Use QueryPendingValidatorsRequest.ProtoReflect.Descriptor instead. func (*QueryPendingValidatorsRequest) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{2} + return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{0} } // QueryPendingValidatorResponse is the response type for the Query/PendingValidators RPC method. @@ -2596,7 +1741,7 @@ type PendingValidatorsResponse struct { func (x *PendingValidatorsResponse) Reset() { *x = PendingValidatorsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[3] + mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2610,7 +1755,7 @@ func (*PendingValidatorsResponse) ProtoMessage() {} // Deprecated: Use PendingValidatorsResponse.ProtoReflect.Descriptor instead. func (*PendingValidatorsResponse) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{3} + return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{1} } func (x *PendingValidatorsResponse) GetPending() []*Validator { @@ -2633,7 +1778,7 @@ type QueryConsensusPowerRequest struct { func (x *QueryConsensusPowerRequest) Reset() { *x = QueryConsensusPowerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[4] + mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2647,7 +1792,7 @@ func (*QueryConsensusPowerRequest) ProtoMessage() {} // Deprecated: Use QueryConsensusPowerRequest.ProtoReflect.Descriptor instead. func (*QueryConsensusPowerRequest) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{4} + return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{2} } func (x *QueryConsensusPowerRequest) GetValidatorAddress() string { @@ -2670,7 +1815,7 @@ type QueryConsensusPowerResponse struct { func (x *QueryConsensusPowerResponse) Reset() { *x = QueryConsensusPowerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[5] + mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2684,7 +1829,7 @@ func (*QueryConsensusPowerResponse) ProtoMessage() {} // Deprecated: Use QueryConsensusPowerResponse.ProtoReflect.Descriptor instead. func (*QueryConsensusPowerResponse) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{5} + return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{3} } func (x *QueryConsensusPowerResponse) GetConsensusPower() int64 { @@ -2710,78 +1855,63 @@ var file_strangelove_ventures_poa_v1_query_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2b, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x53, 0x0a, 0x0e, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, - 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x1f, 0x0a, 0x1d, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x63, 0x0a, - 0x19, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x70, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x73, 0x74, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x22, 0x49, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x73, 0x75, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x46, 0x0a, - 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, - 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x0f, - 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x50, 0x6f, 0x77, 0x65, 0x72, 0x32, 0xdc, 0x03, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, - 0x7e, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x2f, 0x2e, 0x73, 0x74, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x73, 0x74, 0x72, + 0x6f, 0x22, 0x1f, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x63, 0x0a, 0x19, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x46, 0x0a, 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x26, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, + 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x49, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x46, 0x0a, 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, + 0x6f, 0x77, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x32, 0xdc, 0x02, 0x0a, 0x05, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0xab, 0x01, 0x0a, 0x11, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3a, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, - 0x0e, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0xab, 0x01, 0x0a, 0x11, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3a, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, + 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, + 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x2f, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, + 0x72, 0x73, 0x12, 0xa4, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x37, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x36, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, - 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1c, 0x12, 0x1a, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0xa4, 0x01, - 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, - 0x12, 0x37, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, - 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x6f, 0x77, - 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x73, 0x74, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x70, 0x6f, - 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5f, 0x70, - 0x6f, 0x77, 0x65, 0x72, 0x42, 0x82, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x74, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x2d, 0x76, - 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x61, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x50, 0x6f, - 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, - 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x26, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, - 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x53, 0x74, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x3a, 0x3a, 0x50, 0x6f, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, + 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x6f, 0x77, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, + 0x12, 0x17, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x42, 0x82, 0x02, 0x0a, 0x1f, 0x63, 0x6f, + 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, + 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, + 0x6f, 0x76, 0x65, 0x2d, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, + 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, + 0x3b, 0x70, 0x6f, 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, 0x02, 0x1a, 0x53, + 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x2e, 0x50, 0x6f, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, + 0x50, 0x6f, 0x61, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x26, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x1c, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x3a, 0x3a, 0x50, 0x6f, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2796,31 +1926,25 @@ func file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP() []byte { return file_strangelove_ventures_poa_v1_query_proto_rawDescData } -var file_strangelove_ventures_poa_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_strangelove_ventures_poa_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_strangelove_ventures_poa_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: strangelove_ventures.poa.v1.QueryParamsRequest - (*ParamsResponse)(nil), // 1: strangelove_ventures.poa.v1.ParamsResponse - (*QueryPendingValidatorsRequest)(nil), // 2: strangelove_ventures.poa.v1.QueryPendingValidatorsRequest - (*PendingValidatorsResponse)(nil), // 3: strangelove_ventures.poa.v1.PendingValidatorsResponse - (*QueryConsensusPowerRequest)(nil), // 4: strangelove_ventures.poa.v1.QueryConsensusPowerRequest - (*QueryConsensusPowerResponse)(nil), // 5: strangelove_ventures.poa.v1.QueryConsensusPowerResponse - (*Params)(nil), // 6: strangelove_ventures.poa.v1.Params - (*Validator)(nil), // 7: strangelove_ventures.poa.v1.Validator + (*QueryPendingValidatorsRequest)(nil), // 0: strangelove_ventures.poa.v1.QueryPendingValidatorsRequest + (*PendingValidatorsResponse)(nil), // 1: strangelove_ventures.poa.v1.PendingValidatorsResponse + (*QueryConsensusPowerRequest)(nil), // 2: strangelove_ventures.poa.v1.QueryConsensusPowerRequest + (*QueryConsensusPowerResponse)(nil), // 3: strangelove_ventures.poa.v1.QueryConsensusPowerResponse + (*Validator)(nil), // 4: strangelove_ventures.poa.v1.Validator } var file_strangelove_ventures_poa_v1_query_proto_depIdxs = []int32{ - 6, // 0: strangelove_ventures.poa.v1.ParamsResponse.params:type_name -> strangelove_ventures.poa.v1.Params - 7, // 1: strangelove_ventures.poa.v1.PendingValidatorsResponse.pending:type_name -> strangelove_ventures.poa.v1.Validator - 0, // 2: strangelove_ventures.poa.v1.Query.Params:input_type -> strangelove_ventures.poa.v1.QueryParamsRequest - 2, // 3: strangelove_ventures.poa.v1.Query.PendingValidators:input_type -> strangelove_ventures.poa.v1.QueryPendingValidatorsRequest - 4, // 4: strangelove_ventures.poa.v1.Query.ConsensusPower:input_type -> strangelove_ventures.poa.v1.QueryConsensusPowerRequest - 1, // 5: strangelove_ventures.poa.v1.Query.Params:output_type -> strangelove_ventures.poa.v1.ParamsResponse - 3, // 6: strangelove_ventures.poa.v1.Query.PendingValidators:output_type -> strangelove_ventures.poa.v1.PendingValidatorsResponse - 5, // 7: strangelove_ventures.poa.v1.Query.ConsensusPower:output_type -> strangelove_ventures.poa.v1.QueryConsensusPowerResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 4, // 0: strangelove_ventures.poa.v1.PendingValidatorsResponse.pending:type_name -> strangelove_ventures.poa.v1.Validator + 0, // 1: strangelove_ventures.poa.v1.Query.PendingValidators:input_type -> strangelove_ventures.poa.v1.QueryPendingValidatorsRequest + 2, // 2: strangelove_ventures.poa.v1.Query.ConsensusPower:input_type -> strangelove_ventures.poa.v1.QueryConsensusPowerRequest + 1, // 3: strangelove_ventures.poa.v1.Query.PendingValidators:output_type -> strangelove_ventures.poa.v1.PendingValidatorsResponse + 3, // 4: strangelove_ventures.poa.v1.Query.ConsensusPower:output_type -> strangelove_ventures.poa.v1.QueryConsensusPowerResponse + 3, // [3:5] is the sub-list for method output_type + 1, // [1:3] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_strangelove_ventures_poa_v1_query_proto_init() } @@ -2832,30 +1956,6 @@ func file_strangelove_ventures_poa_v1_query_proto_init() { file_strangelove_ventures_poa_v1_validator_proto_init() if !protoimpl.UnsafeEnabled { file_strangelove_ventures_poa_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_strangelove_ventures_poa_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_strangelove_ventures_poa_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryPendingValidatorsRequest); i { case 0: return &v.state @@ -2867,7 +1967,7 @@ func file_strangelove_ventures_poa_v1_query_proto_init() { return nil } } - file_strangelove_ventures_poa_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_strangelove_ventures_poa_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PendingValidatorsResponse); i { case 0: return &v.state @@ -2879,7 +1979,7 @@ func file_strangelove_ventures_poa_v1_query_proto_init() { return nil } } - file_strangelove_ventures_poa_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_strangelove_ventures_poa_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryConsensusPowerRequest); i { case 0: return &v.state @@ -2891,7 +1991,7 @@ func file_strangelove_ventures_poa_v1_query_proto_init() { return nil } } - file_strangelove_ventures_poa_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_strangelove_ventures_poa_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryConsensusPowerResponse); i { case 0: return &v.state @@ -2910,7 +2010,7 @@ func file_strangelove_ventures_poa_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_strangelove_ventures_poa_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/api/v1/query_grpc.pb.go b/api/v1/query_grpc.pb.go index 53f3005..c148f43 100644 --- a/api/v1/query_grpc.pb.go +++ b/api/v1/query_grpc.pb.go @@ -19,7 +19,6 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/strangelove_ventures.poa.v1.Query/Params" Query_PendingValidators_FullMethodName = "/strangelove_ventures.poa.v1.Query/PendingValidators" Query_ConsensusPower_FullMethodName = "/strangelove_ventures.poa.v1.Query/ConsensusPower" ) @@ -28,8 +27,6 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type QueryClient interface { - // Params returns the current params of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) // PendingValidators returns currently pending validators of the module. PendingValidators(ctx context.Context, in *QueryPendingValidatorsRequest, opts ...grpc.CallOption) (*PendingValidatorsResponse, error) // ConsensusPower returns the current consensus power of a validator. @@ -44,15 +41,6 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { return &queryClient{cc} } -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) { - out := new(ParamsResponse) - err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) PendingValidators(ctx context.Context, in *QueryPendingValidatorsRequest, opts ...grpc.CallOption) (*PendingValidatorsResponse, error) { out := new(PendingValidatorsResponse) err := c.cc.Invoke(ctx, Query_PendingValidators_FullMethodName, in, out, opts...) @@ -75,8 +63,6 @@ func (c *queryClient) ConsensusPower(ctx context.Context, in *QueryConsensusPowe // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { - // Params returns the current params of the module. - Params(context.Context, *QueryParamsRequest) (*ParamsResponse, error) // PendingValidators returns currently pending validators of the module. PendingValidators(context.Context, *QueryPendingValidatorsRequest) (*PendingValidatorsResponse, error) // ConsensusPower returns the current consensus power of a validator. @@ -88,9 +74,6 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*ParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} func (UnimplementedQueryServer) PendingValidators(context.Context, *QueryPendingValidatorsRequest) (*PendingValidatorsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PendingValidators not implemented") } @@ -110,24 +93,6 @@ func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { s.RegisterService(&Query_ServiceDesc, srv) } -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Params_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_PendingValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPendingValidatorsRequest) if err := dec(in); err != nil { @@ -171,10 +136,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{ ServiceName: "strangelove_ventures.poa.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, { MethodName: "PendingValidators", Handler: _Query_PendingValidators_Handler, diff --git a/api/v1/tx.pulsar.go b/api/v1/tx.pulsar.go index c53ed39..5dadbda 100644 --- a/api/v1/tx.pulsar.go +++ b/api/v1/tx.pulsar.go @@ -2640,861 +2640,6 @@ func (x *fastReflection_MsgRemovePendingResponse) ProtoMethods() *protoiface.Met } } -var ( - md_MsgUpdateParams protoreflect.MessageDescriptor - fd_MsgUpdateParams_sender protoreflect.FieldDescriptor - fd_MsgUpdateParams_params protoreflect.FieldDescriptor -) - -func init() { - file_strangelove_ventures_poa_v1_tx_proto_init() - md_MsgUpdateParams = File_strangelove_ventures_poa_v1_tx_proto.Messages().ByName("MsgUpdateParams") - fd_MsgUpdateParams_sender = md_MsgUpdateParams.Fields().ByName("sender") - fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) - -type fastReflection_MsgUpdateParams MsgUpdateParams - -func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(x) -} - -func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} - -type fastReflection_MsgUpdateParams_messageType struct{} - -func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(nil) -} -func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} -func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParams) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParams)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgUpdateParams_sender, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_MsgUpdateParams_params, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateParams.sender": - return x.Sender != "" - case "strangelove_ventures.poa.v1.MsgUpdateParams.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateParams.sender": - x.Sender = "" - case "strangelove_ventures.poa.v1.MsgUpdateParams.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateParams.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "strangelove_ventures.poa.v1.MsgUpdateParams.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParams does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateParams.sender": - x.Sender = value.Interface().(string) - case "strangelove_ventures.poa.v1.MsgUpdateParams.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateParams.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "strangelove_ventures.poa.v1.MsgUpdateParams.sender": - panic(fmt.Errorf("field sender of message strangelove_ventures.poa.v1.MsgUpdateParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateParams.sender": - return protoreflect.ValueOfString("") - case "strangelove_ventures.poa.v1.MsgUpdateParams.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParams does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.MsgUpdateParams", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParams) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParams) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParams) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - 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] = 0x12 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire 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++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", 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.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUpdateParamsResponse protoreflect.MessageDescriptor -) - -func init() { - file_strangelove_ventures_poa_v1_tx_proto_init() - md_MsgUpdateParamsResponse = File_strangelove_ventures_poa_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) - -type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse - -func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(x) -} - -func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} - -type fastReflection_MsgUpdateParamsResponse_messageType struct{} - -func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(nil) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUpdateParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.MsgUpdateParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUpdateParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUpdateParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUpdateParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire 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++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_MsgUpdateStakingParams protoreflect.MessageDescriptor fd_MsgUpdateStakingParams_sender protoreflect.FieldDescriptor @@ -3517,7 +2662,7 @@ func (x *MsgUpdateStakingParams) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateStakingParams) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[8] + mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4012,7 +3157,7 @@ func (x *MsgUpdateStakingParamsResponse) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateStakingParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[9] + mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4380,7 +3525,7 @@ func (x *MsgCreateValidator) ProtoReflect() protoreflect.Message { } func (x *MsgCreateValidator) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[10] + mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5153,7 +4298,7 @@ func (x *MsgCreateValidatorResponse) ProtoReflect() protoreflect.Message { } func (x *MsgCreateValidatorResponse) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[11] + mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5733,81 +4878,6 @@ func (*MsgRemovePendingResponse) Descriptor() ([]byte, []int) { return file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP(), []int{5} } -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sender is the address of the admin account with permission to update. - // ex: governance, multisig/DAO, or standard account found in Params. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // module parameters (all must be supplied). - Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *MsgUpdateParams) Reset() { - *x = MsgUpdateParams{} - if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParams) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgUpdateParams) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *MsgUpdateParams) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -type MsgUpdateParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateParamsResponse) Reset() { - *x = MsgUpdateParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParamsResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP(), []int{7} -} - // MsgUpdateStakingParams is the Msg/UpdateStakingParams request type. type MsgUpdateStakingParams struct { state protoimpl.MessageState @@ -5824,7 +4894,7 @@ type MsgUpdateStakingParams struct { func (x *MsgUpdateStakingParams) Reset() { *x = MsgUpdateStakingParams{} if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[8] + mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5838,7 +4908,7 @@ func (*MsgUpdateStakingParams) ProtoMessage() {} // Deprecated: Use MsgUpdateStakingParams.ProtoReflect.Descriptor instead. func (*MsgUpdateStakingParams) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP(), []int{8} + return file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgUpdateStakingParams) GetSender() string { @@ -5866,7 +4936,7 @@ type MsgUpdateStakingParamsResponse struct { func (x *MsgUpdateStakingParamsResponse) Reset() { *x = MsgUpdateStakingParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[9] + mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5880,7 +4950,7 @@ func (*MsgUpdateStakingParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateStakingParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateStakingParamsResponse) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP(), []int{9} + return file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP(), []int{7} } // cosmos-sdk/proto/staking/v1beta1/tx.proto @@ -5906,7 +4976,7 @@ type MsgCreateValidator struct { func (x *MsgCreateValidator) Reset() { *x = MsgCreateValidator{} if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[10] + mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5920,7 +4990,7 @@ func (*MsgCreateValidator) ProtoMessage() {} // Deprecated: Use MsgCreateValidator.ProtoReflect.Descriptor instead. func (*MsgCreateValidator) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP(), []int{10} + return file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgCreateValidator) GetDescription() *Description { @@ -5976,7 +5046,7 @@ type MsgCreateValidatorResponse struct { func (x *MsgCreateValidatorResponse) Reset() { *x = MsgCreateValidatorResponse{} if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[11] + mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5990,7 +5060,7 @@ func (*MsgCreateValidatorResponse) ProtoMessage() {} // Deprecated: Use MsgCreateValidatorResponse.ProtoReflect.Descriptor instead. func (*MsgCreateValidatorResponse) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP(), []int{11} + return file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP(), []int{9} } var File_strangelove_ventures_poa_v1_tx_proto protoreflect.FileDescriptor @@ -6058,134 +5128,115 @@ var file_strangelove_ventures_poa_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x61, 0x2f, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x22, 0x1a, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xab, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 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, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x41, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, - 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x23, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x13, 0x70, 0x6f, 0x61, 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, 0xc0, 0x01, 0x0a, 0x16, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 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, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, - 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, - 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, - 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, - 0x1a, 0x70, 0x6f, 0x61, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc2, 0x04, - 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x55, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, - 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x0a, 0x63, - 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2c, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, - 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, - 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x73, 0x42, 0x09, 0xc8, - 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x13, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x6c, 0x66, - 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, - 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x6c, 0x66, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x1a, 0x18, 0x01, 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, 0x10, 0x64, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x46, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x06, 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, 0x18, 0xca, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, - 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x3a, 0x39, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, - 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x70, 0x6f, 0x61, 0x2f, - 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x32, 0xe3, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x7b, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x2e, 0x73, 0x74, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x37, 0x2e, 0x73, + 0xc0, 0x01, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 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, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, - 0x72, 0x12, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, - 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x1a, 0x30, 0x2e, 0x73, 0x74, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, - 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, - 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x2f, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, - 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x1a, 0x37, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, - 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x75, 0x0a, 0x0d, 0x52, 0x65, - 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x2e, 0x73, 0x74, - 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, - 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x1a, 0x35, 0x2e, 0x73, 0x74, 0x72, - 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, - 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x2c, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, - 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, - 0x34, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, - 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 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, 0x87, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x33, 0x2e, - 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, - 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x6b, 0x69, + 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, + 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x2a, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x1a, 0x70, 0x6f, 0x61, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x1a, 0x3b, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, + 0x6d, 0x73, 0x22, 0x20, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc2, 0x04, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x55, 0x0a, 0x0b, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, + 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, + 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x57, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, + 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x61, 0x74, 0x65, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, + 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x60, 0x0a, 0x13, 0x6d, + 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, + 0x1f, 0x15, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, + 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x49, 0x6e, 0x74, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x11, 0x6d, 0x69, 0x6e, 0x53, + 0x65, 0x6c, 0x66, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x47, 0x0a, + 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1a, 0x18, 0x01, 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, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x46, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, + 0x18, 0x06, 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, 0x18, 0xca, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x2e, + 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x3a, 0x39, + 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x11, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x8a, 0xe7, + 0xb0, 0x2a, 0x16, 0x70, 0x6f, 0x61, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x1c, 0x0a, 0x1a, 0x4d, 0x73, 0x67, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xef, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, + 0x7b, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x2f, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, - 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, - 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x73, - 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x2d, 0x76, 0x65, - 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, - 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, - 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x61, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, - 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x50, 0x6f, 0x61, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, + 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x1a, 0x37, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, + 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x08, + 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x12, 0x28, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, + 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, + 0x65, 0x72, 0x1a, 0x30, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, + 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7b, 0x0a, 0x0f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x2f, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, + 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, + 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x1a, 0x37, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, + 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, + 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x75, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x12, 0x2d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, + 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x1a, 0x35, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, + 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x13, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x33, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, + 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x3b, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, + 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x74, 0x61, + 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1f, 0x63, 0x6f, + 0x6d, 0x2e, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, + 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, + 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x49, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, + 0x2d, 0x76, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x73, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x5f, 0x76, 0x65, + 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2f, 0x70, 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, + 0x61, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x53, 0x50, 0x58, 0xaa, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, + 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2e, + 0x50, 0x6f, 0x61, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, + 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x26, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x26, 0x53, 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, - 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x5c, 0x50, 0x6f, 0x61, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x53, 0x74, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, 0x65, 0x73, 0x3a, - 0x3a, 0x50, 0x6f, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x53, + 0x74, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x6c, 0x6f, 0x76, 0x65, 0x56, 0x65, 0x6e, 0x74, 0x75, 0x72, + 0x65, 0x73, 0x3a, 0x3a, 0x50, 0x6f, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -6200,7 +5251,7 @@ func file_strangelove_ventures_poa_v1_tx_proto_rawDescGZIP() []byte { return file_strangelove_ventures_poa_v1_tx_proto_rawDescData } -var file_strangelove_ventures_poa_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_strangelove_ventures_poa_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_strangelove_ventures_poa_v1_tx_proto_goTypes = []interface{}{ (*MsgSetPower)(nil), // 0: strangelove_ventures.poa.v1.MsgSetPower (*MsgSetPowerResponse)(nil), // 1: strangelove_ventures.poa.v1.MsgSetPowerResponse @@ -6208,41 +5259,35 @@ var file_strangelove_ventures_poa_v1_tx_proto_goTypes = []interface{}{ (*MsgRemoveValidatorResponse)(nil), // 3: strangelove_ventures.poa.v1.MsgRemoveValidatorResponse (*MsgRemovePending)(nil), // 4: strangelove_ventures.poa.v1.MsgRemovePending (*MsgRemovePendingResponse)(nil), // 5: strangelove_ventures.poa.v1.MsgRemovePendingResponse - (*MsgUpdateParams)(nil), // 6: strangelove_ventures.poa.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 7: strangelove_ventures.poa.v1.MsgUpdateParamsResponse - (*MsgUpdateStakingParams)(nil), // 8: strangelove_ventures.poa.v1.MsgUpdateStakingParams - (*MsgUpdateStakingParamsResponse)(nil), // 9: strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse - (*MsgCreateValidator)(nil), // 10: strangelove_ventures.poa.v1.MsgCreateValidator - (*MsgCreateValidatorResponse)(nil), // 11: strangelove_ventures.poa.v1.MsgCreateValidatorResponse - (*Params)(nil), // 12: strangelove_ventures.poa.v1.Params - (*StakingParams)(nil), // 13: strangelove_ventures.poa.v1.StakingParams - (*Description)(nil), // 14: strangelove_ventures.poa.v1.Description - (*CommissionRates)(nil), // 15: strangelove_ventures.poa.v1.CommissionRates - (*anypb.Any)(nil), // 16: google.protobuf.Any + (*MsgUpdateStakingParams)(nil), // 6: strangelove_ventures.poa.v1.MsgUpdateStakingParams + (*MsgUpdateStakingParamsResponse)(nil), // 7: strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse + (*MsgCreateValidator)(nil), // 8: strangelove_ventures.poa.v1.MsgCreateValidator + (*MsgCreateValidatorResponse)(nil), // 9: strangelove_ventures.poa.v1.MsgCreateValidatorResponse + (*StakingParams)(nil), // 10: strangelove_ventures.poa.v1.StakingParams + (*Description)(nil), // 11: strangelove_ventures.poa.v1.Description + (*CommissionRates)(nil), // 12: strangelove_ventures.poa.v1.CommissionRates + (*anypb.Any)(nil), // 13: google.protobuf.Any } var file_strangelove_ventures_poa_v1_tx_proto_depIdxs = []int32{ - 12, // 0: strangelove_ventures.poa.v1.MsgUpdateParams.params:type_name -> strangelove_ventures.poa.v1.Params - 13, // 1: strangelove_ventures.poa.v1.MsgUpdateStakingParams.params:type_name -> strangelove_ventures.poa.v1.StakingParams - 14, // 2: strangelove_ventures.poa.v1.MsgCreateValidator.description:type_name -> strangelove_ventures.poa.v1.Description - 15, // 3: strangelove_ventures.poa.v1.MsgCreateValidator.commission:type_name -> strangelove_ventures.poa.v1.CommissionRates - 16, // 4: strangelove_ventures.poa.v1.MsgCreateValidator.pubkey:type_name -> google.protobuf.Any - 10, // 5: strangelove_ventures.poa.v1.Msg.CreateValidator:input_type -> strangelove_ventures.poa.v1.MsgCreateValidator - 0, // 6: strangelove_ventures.poa.v1.Msg.SetPower:input_type -> strangelove_ventures.poa.v1.MsgSetPower - 2, // 7: strangelove_ventures.poa.v1.Msg.RemoveValidator:input_type -> strangelove_ventures.poa.v1.MsgRemoveValidator - 4, // 8: strangelove_ventures.poa.v1.Msg.RemovePending:input_type -> strangelove_ventures.poa.v1.MsgRemovePending - 6, // 9: strangelove_ventures.poa.v1.Msg.UpdateParams:input_type -> strangelove_ventures.poa.v1.MsgUpdateParams - 8, // 10: strangelove_ventures.poa.v1.Msg.UpdateStakingParams:input_type -> strangelove_ventures.poa.v1.MsgUpdateStakingParams - 11, // 11: strangelove_ventures.poa.v1.Msg.CreateValidator:output_type -> strangelove_ventures.poa.v1.MsgCreateValidatorResponse - 1, // 12: strangelove_ventures.poa.v1.Msg.SetPower:output_type -> strangelove_ventures.poa.v1.MsgSetPowerResponse - 3, // 13: strangelove_ventures.poa.v1.Msg.RemoveValidator:output_type -> strangelove_ventures.poa.v1.MsgRemoveValidatorResponse - 5, // 14: strangelove_ventures.poa.v1.Msg.RemovePending:output_type -> strangelove_ventures.poa.v1.MsgRemovePendingResponse - 7, // 15: strangelove_ventures.poa.v1.Msg.UpdateParams:output_type -> strangelove_ventures.poa.v1.MsgUpdateParamsResponse - 9, // 16: strangelove_ventures.poa.v1.Msg.UpdateStakingParams:output_type -> strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse - 11, // [11:17] is the sub-list for method output_type - 5, // [5:11] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 10, // 0: strangelove_ventures.poa.v1.MsgUpdateStakingParams.params:type_name -> strangelove_ventures.poa.v1.StakingParams + 11, // 1: strangelove_ventures.poa.v1.MsgCreateValidator.description:type_name -> strangelove_ventures.poa.v1.Description + 12, // 2: strangelove_ventures.poa.v1.MsgCreateValidator.commission:type_name -> strangelove_ventures.poa.v1.CommissionRates + 13, // 3: strangelove_ventures.poa.v1.MsgCreateValidator.pubkey:type_name -> google.protobuf.Any + 8, // 4: strangelove_ventures.poa.v1.Msg.CreateValidator:input_type -> strangelove_ventures.poa.v1.MsgCreateValidator + 0, // 5: strangelove_ventures.poa.v1.Msg.SetPower:input_type -> strangelove_ventures.poa.v1.MsgSetPower + 2, // 6: strangelove_ventures.poa.v1.Msg.RemoveValidator:input_type -> strangelove_ventures.poa.v1.MsgRemoveValidator + 4, // 7: strangelove_ventures.poa.v1.Msg.RemovePending:input_type -> strangelove_ventures.poa.v1.MsgRemovePending + 6, // 8: strangelove_ventures.poa.v1.Msg.UpdateStakingParams:input_type -> strangelove_ventures.poa.v1.MsgUpdateStakingParams + 9, // 9: strangelove_ventures.poa.v1.Msg.CreateValidator:output_type -> strangelove_ventures.poa.v1.MsgCreateValidatorResponse + 1, // 10: strangelove_ventures.poa.v1.Msg.SetPower:output_type -> strangelove_ventures.poa.v1.MsgSetPowerResponse + 3, // 11: strangelove_ventures.poa.v1.Msg.RemoveValidator:output_type -> strangelove_ventures.poa.v1.MsgRemoveValidatorResponse + 5, // 12: strangelove_ventures.poa.v1.Msg.RemovePending:output_type -> strangelove_ventures.poa.v1.MsgRemovePendingResponse + 7, // 13: strangelove_ventures.poa.v1.Msg.UpdateStakingParams:output_type -> strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_strangelove_ventures_poa_v1_tx_proto_init() } @@ -6326,30 +5371,6 @@ func file_strangelove_ventures_poa_v1_tx_proto_init() { } } file_strangelove_ventures_poa_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_strangelove_ventures_poa_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_strangelove_ventures_poa_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateStakingParams); i { case 0: return &v.state @@ -6361,7 +5382,7 @@ func file_strangelove_ventures_poa_v1_tx_proto_init() { return nil } } - file_strangelove_ventures_poa_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_strangelove_ventures_poa_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateStakingParamsResponse); i { case 0: return &v.state @@ -6373,7 +5394,7 @@ func file_strangelove_ventures_poa_v1_tx_proto_init() { return nil } } - file_strangelove_ventures_poa_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_strangelove_ventures_poa_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCreateValidator); i { case 0: return &v.state @@ -6385,7 +5406,7 @@ func file_strangelove_ventures_poa_v1_tx_proto_init() { return nil } } - file_strangelove_ventures_poa_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_strangelove_ventures_poa_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCreateValidatorResponse); i { case 0: return &v.state @@ -6404,7 +5425,7 @@ func file_strangelove_ventures_poa_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_strangelove_ventures_poa_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/v1/tx_grpc.pb.go b/api/v1/tx_grpc.pb.go index d1e5c2f..0aa9b37 100644 --- a/api/v1/tx_grpc.pb.go +++ b/api/v1/tx_grpc.pb.go @@ -23,7 +23,6 @@ const ( Msg_SetPower_FullMethodName = "/strangelove_ventures.poa.v1.Msg/SetPower" Msg_RemoveValidator_FullMethodName = "/strangelove_ventures.poa.v1.Msg/RemoveValidator" Msg_RemovePending_FullMethodName = "/strangelove_ventures.poa.v1.Msg/RemovePending" - Msg_UpdateParams_FullMethodName = "/strangelove_ventures.poa.v1.Msg/UpdateParams" Msg_UpdateStakingParams_FullMethodName = "/strangelove_ventures.poa.v1.Msg/UpdateStakingParams" ) @@ -39,8 +38,6 @@ type MsgClient interface { RemoveValidator(ctx context.Context, in *MsgRemoveValidator, opts ...grpc.CallOption) (*MsgRemoveValidatorResponse, error) // RemovePending removes a pending validator from the queue. RemovePending(ctx context.Context, in *MsgRemovePending, opts ...grpc.CallOption) (*MsgRemovePendingResponse, error) - // UpdateParams updates the module parameters. - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // UpdateStakingParams updates the module parameters. UpdateStakingParams(ctx context.Context, in *MsgUpdateStakingParams, opts ...grpc.CallOption) (*MsgUpdateStakingParamsResponse, error) } @@ -89,15 +86,6 @@ func (c *msgClient) RemovePending(ctx context.Context, in *MsgRemovePending, opt return out, nil } -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) UpdateStakingParams(ctx context.Context, in *MsgUpdateStakingParams, opts ...grpc.CallOption) (*MsgUpdateStakingParamsResponse, error) { out := new(MsgUpdateStakingParamsResponse) err := c.cc.Invoke(ctx, Msg_UpdateStakingParams_FullMethodName, in, out, opts...) @@ -119,8 +107,6 @@ type MsgServer interface { RemoveValidator(context.Context, *MsgRemoveValidator) (*MsgRemoveValidatorResponse, error) // RemovePending removes a pending validator from the queue. RemovePending(context.Context, *MsgRemovePending) (*MsgRemovePendingResponse, error) - // UpdateParams updates the module parameters. - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // UpdateStakingParams updates the module parameters. UpdateStakingParams(context.Context, *MsgUpdateStakingParams) (*MsgUpdateStakingParamsResponse, error) mustEmbedUnimplementedMsgServer() @@ -142,9 +128,6 @@ func (UnimplementedMsgServer) RemoveValidator(context.Context, *MsgRemoveValidat func (UnimplementedMsgServer) RemovePending(context.Context, *MsgRemovePending) (*MsgRemovePendingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemovePending not implemented") } -func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} func (UnimplementedMsgServer) UpdateStakingParams(context.Context, *MsgUpdateStakingParams) (*MsgUpdateStakingParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateStakingParams not implemented") } @@ -233,24 +216,6 @@ func _Msg_RemovePending_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateParams_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_UpdateStakingParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateStakingParams) if err := dec(in); err != nil { @@ -292,10 +257,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "RemovePending", Handler: _Msg_RemovePending_Handler, }, - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, { MethodName: "UpdateStakingParams", Handler: _Msg_UpdateStakingParams_Handler, diff --git a/client/cli/tx.go b/client/cli/tx.go index e765b5c..1013523 100644 --- a/client/cli/tx.go +++ b/client/cli/tx.go @@ -42,7 +42,6 @@ func NewTxCmd(ac address.Codec) *cobra.Command { NewSetPowerCmd(ac), NewRemovePendingCmd(), NewRemoveValidatorCmd(), - NewUpdateParamsCmd(), NewUpdateStakingParamsCmd(), ) @@ -159,53 +158,6 @@ func NewRemovePendingCmd() *cobra.Command { return cmd } -func NewUpdateParamsCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "update-params [admin1,admin2,admin3,...] [allow-validator-self-exit-bool]", - Short: "update the PoA module params", - Args: cobra.ExactArgs(2), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - if err != nil { - return err - } - - admins := strings.Split(args[0], ",") - for _, admin := range admins { - _, err = sdk.AccAddressFromBech32(admin) - if err != nil { - return fmt.Errorf("AccAddressFromBech32 failed: %w", err) - } - } - - allowGracefulExit, err := strconv.ParseBool(args[1]) - if err != nil { - return fmt.Errorf("strconv.ParseBool failed: %w", err) - } - - p, err := poa.NewParams(admins, allowGracefulExit) - if err != nil { - return fmt.Errorf("NewParams failed: %w", err) - } - - msg := &poa.MsgUpdateParams{ - Sender: clientCtx.GetFromAddress().String(), - Params: p, - } - - if err := msg.Params.Validate(); err != nil { - return fmt.Errorf("msg.Params.Validate failed: %w", err) - } - - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - flags.AddTxFlagsToCmd(cmd) - - return cmd -} - func NewUpdateStakingParamsCmd() *cobra.Command { cmd := &cobra.Command{ Use: "update-staking-params [unbondingTime] [maxVals] [maxEntries] [historicalEntries] [bondDenom] [minCommissionRate]", diff --git a/codec.go b/codec.go index 512869b..dd5c3b9 100644 --- a/codec.go +++ b/codec.go @@ -13,7 +13,6 @@ import ( func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgSetPower{}, "poa/MsgSetPower") legacy.RegisterAminoMsg(cdc, &MsgCreateValidator{}, "poa/MsgCreateValidator") - legacy.RegisterAminoMsg(cdc, &MsgUpdateParams{}, "poa/MsgUpdateParams") legacy.RegisterAminoMsg(cdc, &MsgRemoveValidator{}, "poa/MsgRemoveValidator") legacy.RegisterAminoMsg(cdc, &MsgUpdateStakingParams{}, "poa/MsgUpdateStakingParams") } @@ -23,7 +22,6 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSetPower{}, &MsgCreateValidator{}, - &MsgUpdateParams{}, &MsgRemoveValidator{}, &MsgUpdateStakingParams{}, ) diff --git a/codec_test.go b/codec_test.go index f32d21a..b3fd270 100644 --- a/codec_test.go +++ b/codec_test.go @@ -19,11 +19,10 @@ func TestCodecRegisterInterfaces(t *testing.T) { impls := registry.ListImplementations(sdk.MsgInterfaceProtoName) - require.Len(t, impls, 6) + require.Len(t, impls, 5) require.ElementsMatch(t, []string{ prefix + "MsgSetPower", prefix + "MsgCreateValidator", - prefix + "MsgUpdateParams", prefix + "MsgRemoveValidator", prefix + "MsgRemovePending", prefix + "MsgUpdateStakingParams", diff --git a/e2e/Makefile b/e2e/Makefile index bb1c9ee..1f0dfc1 100644 --- a/e2e/Makefile +++ b/e2e/Makefile @@ -8,7 +8,4 @@ ictest-val-add: go clean -testcache && go test -race -v -run TestPOAAddValidator . ictest-val-remove: - go clean -testcache && go test -race -v -run TestPOARemoval . - -ictest-gov: - go clean -testcache && go test -race -v -run TestPOAGovernance . \ No newline at end of file + go clean -testcache && go test -race -v -run TestPOARemoval . \ No newline at end of file diff --git a/e2e/go.mod b/e2e/go.mod index b2e14e2..2a4666e 100644 --- a/e2e/go.mod +++ b/e2e/go.mod @@ -35,7 +35,7 @@ require ( cosmossdk.io/api v0.7.5 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core v0.12.0 // indirect - cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/depinject v1.0.0 // indirect cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/log v1.3.1 // indirect cosmossdk.io/store v1.1.0 // indirect @@ -233,23 +233,23 @@ require ( go.opentelemetry.io/otel/trace v1.22.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect - golang.org/x/crypto v0.23.0 // indirect + golang.org/x/crypto v0.25.0 // indirect golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect golang.org/x/mod v0.17.0 // indirect - golang.org/x/net v0.25.0 // indirect + golang.org/x/net v0.27.0 // indirect golang.org/x/oauth2 v0.20.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/term v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.20.0 // indirect + golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect google.golang.org/api v0.162.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect google.golang.org/grpc v1.65.0 // indirect - google.golang.org/protobuf v1.34.1 // indirect + google.golang.org/protobuf v1.34.2 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/e2e/go.sum b/e2e/go.sum index e5dea34..37c1e74 100644 --- a/e2e/go.sum +++ b/e2e/go.sum @@ -770,8 +770,8 @@ cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= -cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= -cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/depinject v1.0.0 h1:dQaTu6+O6askNXO06+jyeUAnF2/ssKwrrszP9t5q050= +cosmossdk.io/depinject v1.0.0/go.mod h1:zxK/h3HgHoA/eJVtiSsoaRaRA2D5U4cJ5thIG4ssbB8= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= @@ -1935,8 +1935,8 @@ golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45 golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2084,8 +2084,8 @@ golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2259,8 +2259,8 @@ golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2275,8 +2275,8 @@ golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2297,8 +2297,8 @@ golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2384,8 +2384,8 @@ golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2656,8 +2656,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 h1:SbSDUWW1PAO24TNpLdeheoYPd7kllICcLU52x6eD4kQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -2732,8 +2732,8 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/e2e/helpers/action_builders.go b/e2e/helpers/action_builders.go index 2db639e..8707cab 100644 --- a/e2e/helpers/action_builders.go +++ b/e2e/helpers/action_builders.go @@ -44,9 +44,12 @@ func ExecuteExec(ctx context.Context, chain *cosmos.CosmosChain, cmd []string, i // If the codec can not properly unmarshal, then it may be a standard json Unmarshal request. // This is required since we are ExecuteExec'ing an interface{} instead of some concrete type. - err = chain.GetCodec().UnmarshalInterface(stdout, &i) - if err != nil && !strings.Contains(err.Error(), "illegal wireType") { - fmt.Println("chain.GetCodec.UnmarshalInterface", err) + cdc := chain.GetCodec() + if cdc != nil { + err = cdc.UnmarshalInterface(stdout, &i) + if err != nil && !strings.Contains(err.Error(), "illegal wireType") { + fmt.Println("chain.GetCodec.UnmarshalInterface", err) + } } } @@ -65,8 +68,17 @@ func ExecuteTransaction(ctx context.Context, chain *cosmos.CosmosChain, cmd []st } var res sdk.TxResponse - if err := chain.GetCodec().UnmarshalJSON(stdout, &res); err != nil { - return sdk.TxResponse{}, err + + cdc := chain.GetCodec() + + if cdc != nil { + if err := cdc.UnmarshalJSON(stdout, &res); err != nil { + // return sdk.TxResponse{}, fmt.Errorf("failed to cdc unmarshal tx response: %s", err) + fmt.Println("cdc.UnmarshalJSON err", err, "using json Unmarshal instead") + json.Unmarshal(stdout, &res) + } + } else { + json.Unmarshal(stdout, &res) } return res, err diff --git a/e2e/helpers/poa.go b/e2e/helpers/poa.go index 1d575e6..2e0b5d0 100644 --- a/e2e/helpers/poa.go +++ b/e2e/helpers/poa.go @@ -82,12 +82,6 @@ func SubmitGovernanceProposalForValidatorChanges(t *testing.T, ctx context.Conte return txProp.ProposalID } -func GetPOAParams(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain) poa.Params { - var res poa.ParamsResponse - ExecuteQuery(ctx, chain, []string{"query", "poa", "params"}, &res) - return res.Params -} - func GetPOAConsensusPower(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, valoperAddr string) int64 { var res POAConsensusPower ExecuteQuery(ctx, chain, []string{"query", "poa", "consensus-power", valoperAddr}, &res) @@ -105,23 +99,6 @@ func GetPOAPending(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain) return res } -func POAUpdateParams(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, admins []string, gracefulExit bool) (sdk.TxResponse, error) { - // admin1,admin2,admin3 - adminList := "" - for _, admin := range admins { - adminList += admin + "," - } - adminList = adminList[:len(adminList)-1] - - gracefulParam := "true" - if !gracefulExit { - gracefulParam = "false" - } - - cmd := TxCommandBuilder(ctx, chain, []string{"tx", "poa", "update-params", adminList, gracefulParam}, user.KeyName()) - return ExecuteTransaction(ctx, chain, cmd) -} - func POAUpdateStakingParams(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, user ibc.Wallet, sp stakingtypes.Params) (sdk.TxResponse, error) { command := []string{"tx", "poa", "update-staking-params", sp.UnbondingTime.String(), diff --git a/e2e/poa_gov_test.go b/e2e/poa_gov_test.go deleted file mode 100644 index 2fd0aa0..0000000 --- a/e2e/poa_gov_test.go +++ /dev/null @@ -1,161 +0,0 @@ -package e2e - -import ( - "context" - "fmt" - "testing" - - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/strangelove-ventures/interchaintest/v8" - "github.com/strangelove-ventures/interchaintest/v8/chain/cosmos" - "github.com/strangelove-ventures/interchaintest/v8/ibc" - "github.com/strangelove-ventures/poa" - "github.com/strangelove-ventures/poa/e2e/helpers" - "github.com/stretchr/testify/require" - - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" -) - -var ( - GovModuleAddress = "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn" - RandAcc = "cosmos1qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqnrql8a" -) - -func TestPOAGovernance(t *testing.T) { - if testing.Short() { - t.Skip("skipping in short mode") - } - - // setup base chain - chains := interchaintest.CreateChainWithConfig(t, numVals, numNodes, "poa", "", POACfg) - chain := chains[0].(*cosmos.CosmosChain) - - enableBlockDB := false - ctx, _, _, _ := interchaintest.BuildInitialChain(t, chains, enableBlockDB) - - // setup accounts - acc0, err := interchaintest.GetAndFundTestUserWithMnemonic(ctx, "acc0", accMnemonic, userFunds, chain) - if err != nil { - t.Fatal(err) - } - - users := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), userFunds, chain) - incorrectUser := users[0] - - // get validator operator addresses - validators := helpers.GetValidatorsOperatingAddresses(t, ctx, chain) - require.Equal(t, len(validators), numVals) - assertSignatures(t, ctx, chain, len(validators)) - assertConsensus(t, ctx, chain, len(validators)) - - // === Test Cases === - testUpdatePOAParams(t, ctx, chain, acc0, incorrectUser) - testGovernance(t, ctx, chain, acc0, validators) -} - -func testGovernance(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, acc0 ibc.Wallet, validators []string) { - t.Log("\n===== TEST GOVERNANCE =====") - - t.Run("success: gov proposal update params", func(t *testing.T) { - updatedParams := []cosmos.ProtoMessage{ - &poa.MsgUpdateParams{ - Sender: GovModuleAddress, - Params: poa.Params{ - Admins: []string{acc0.FormattedAddress(), GovModuleAddress, RandAcc}, - }, - }, - } - - propId := helpers.SubmitParamChangeProp(t, ctx, chain, acc0, updatedParams, GovModuleAddress, 25) - helpers.ValidatorVote(t, ctx, chain, propId, cosmos.ProposalVoteYes, 30) - - require.Len(t, helpers.GetPOAParams(t, ctx, chain).Admins, 3, "Admins should be 3") - }) - - t.Run("success: gov proposal validator change", func(t *testing.T) { - // ibc.ChainConfig key: app_state.poa.params.admins must contain the governance address. - powerAmt := uint64(1_234_567) - propID := helpers.SubmitGovernanceProposalForValidatorChanges(t, ctx, chain, acc0, validators[0], powerAmt, true, GovModuleAddress) - helpers.ValidatorVote(t, ctx, chain, propID, cosmos.ProposalVoteYes, 25) - - // validate the validator[0] was set to powerAmt - val := helpers.GetValidators(t, ctx, chain).Validators[0] - require.Equal(t, val.Tokens, "1234567") - p := helpers.GetPOAConsensusPower(t, ctx, chain, val.OperatorAddress) - require.EqualValues(t, powerAmt/1_000_000, p, "Validator[0] should have 1 consensus power") - }) -} - -func testUpdatePOAParams(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, acc0, incorrectUser ibc.Wallet) { - var tx sdk.TxResponse - var err error - - t.Log("\n===== TEST UPDATE POA PARAMS =====") - - t.Run("fail: update-params message from a non authorized user", func(t *testing.T) { - tx, err = helpers.POAUpdateParams(t, ctx, chain, incorrectUser, []string{incorrectUser.FormattedAddress()}, true) - if err != nil { - t.Fatal(err) - } - txRes, err := chain.GetTransaction(tx.TxHash) - require.NoError(t, err) - fmt.Printf("%+v", txRes) - require.Contains(t, txRes.RawLog, poa.ErrNotAnAuthority.Error()) - }) - - t.Run("fail: update staking params from a non authorized user", func(t *testing.T) { - tx, err = helpers.POAUpdateStakingParams(t, ctx, chain, incorrectUser, stakingtypes.DefaultParams()) - if err != nil { - t.Fatal(err) - } - txRes, err := chain.GetTransaction(tx.TxHash) - require.NoError(t, err) - fmt.Printf("%+v", txRes) - require.EqualValues(t, txRes.Code, 3) - - sp := helpers.GetStakingParams(t, ctx, chain) - fmt.Printf("%+v", sp) - }) - - t.Run("success: update staking params from an authorized user.", func(t *testing.T) { - stakingparams := stakingtypes.DefaultParams() - tx, err = helpers.POAUpdateStakingParams(t, ctx, chain, acc0, stakingtypes.Params{ - UnbondingTime: stakingparams.UnbondingTime, - MaxValidators: 10, - MaxEntries: stakingparams.MaxEntries, - HistoricalEntries: stakingparams.HistoricalEntries, - BondDenom: stakingparams.BondDenom, - MinCommissionRate: stakingparams.MinCommissionRate, - }) - if err != nil { - t.Fatal(err) - } - - txRes, err := chain.GetTransaction(tx.TxHash) - require.NoError(t, err) - fmt.Printf("%+v", txRes) - require.EqualValues(t, txRes.Code, 0) - - sp := helpers.GetStakingParams(t, ctx, chain) - fmt.Printf("%+v", sp) - require.EqualValues(t, sp.MaxValidators, 10) - }) - - t.Run("success: update-params message from an authorized user with cli.", func(t *testing.T) { - newAdmins := []string{acc0.FormattedAddress(), GovModuleAddress, RandAcc, incorrectUser.FormattedAddress()} - tx, err = helpers.POAUpdateParams(t, ctx, chain, acc0, newAdmins, true) - if err != nil { - t.Fatal(err) - } - txRes, err := chain.GetTransaction(tx.TxHash) - require.NoError(t, err) - fmt.Printf("%+v", txRes) - require.EqualValues(t, txRes.Code, 0) - - p := helpers.GetPOAParams(t, ctx, chain) - for _, admin := range newAdmins { - require.Contains(t, p.Admins, admin) - } - }) - -} diff --git a/e2e/poa_test.go b/e2e/poa_test.go index dda35ab..dd52b49 100644 --- a/e2e/poa_test.go +++ b/e2e/poa_test.go @@ -2,6 +2,7 @@ package e2e import ( "context" + "os" "testing" sdk "github.com/cosmos/cosmos-sdk/types" @@ -18,7 +19,6 @@ func TestPOABase(t *testing.T) { t.Skip("skipping in short mode") } - // setup base chain chains := interchaintest.CreateChainWithConfig(t, numVals, numNodes, "poa", "", POACfg) chain := chains[0].(*cosmos.CosmosChain) @@ -35,6 +35,8 @@ func TestPOABase(t *testing.T) { t.Fatal(err) } + require.NoError(t, os.Setenv("POA_BYPASS_ADMIN_CHECK_FOR_SIMULATION_TESTING_ONLY", "false")) + users := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), userFunds, chain) incorrectUser := users[0] @@ -74,7 +76,6 @@ func testStakingDisabled(t *testing.T, ctx context.Context, chain *cosmos.Cosmos require.NoError(t, err) require.Contains(t, res.RawLog, poa.ErrStakingActionNotAllowed.Error()) } - func testWithdrawDelegatorRewardsDisabled(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, validators []string, acc0, acc1 ibc.Wallet) { t.Log("\n===== TEST WITHDRAW DELEGATOR REWARDS DISABLED =====") @@ -100,16 +101,16 @@ func testWithdrawDelegatorRewardsDisabled(t *testing.T, ctx context.Context, cha require.Contains(t, res.RawLog, poa.ErrWithdrawDelegatorRewardsNotAllowed.Error()) } -func testRemovePending(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, acc0 ibc.Wallet) { +func testRemovePending(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, admin ibc.Wallet) { t.Log("\n===== TEST PENDING =====") - _, err := helpers.POACreatePendingValidator(t, ctx, chain, acc0, "pl3Q8OQwtC7G2dSqRqsUrO5VZul7l40I+MKUcejqRsg=", "testval", "0.10", "0.25", "0.05") + _, err := helpers.POACreatePendingValidator(t, ctx, chain, admin, "pl3Q8OQwtC7G2dSqRqsUrO5VZul7l40I+MKUcejqRsg=", "testval", "0.10", "0.25", "0.05") require.NoError(t, err) pv := helpers.GetPOAPending(t, ctx, chain).Pending require.Equal(t, 1, len(pv)) - _, err = helpers.POARemovePending(t, ctx, chain, acc0, pv[0].OperatorAddress) + _, err = helpers.POARemovePending(t, ctx, chain, admin, pv[0].OperatorAddress) require.NoError(t, err) // validate it was removed @@ -122,8 +123,9 @@ func testPowerErrors(t *testing.T, ctx context.Context, chain *cosmos.CosmosChai var err error t.Run("fail: set-power message from a non authorized user", func(t *testing.T) { - // runtime error: index out of range [1] with length 1 [recovered] - res, _ = helpers.POASetPower(t, ctx, chain, incorrectUser, validators[0], 1_000_000) + res, _ = helpers.POASetPower(t, ctx, chain, incorrectUser, validators[0], 2_000_000, "--unsafe=true") + require.NoError(t, err) + res, err := chain.GetTransaction(res.TxHash) require.NoError(t, err) require.Contains(t, res.RawLog, poa.ErrNotAnAuthority.Error()) diff --git a/e2e/setup.go b/e2e/setup.go index e094c68..94355e2 100644 --- a/e2e/setup.go +++ b/e2e/setup.go @@ -2,6 +2,7 @@ package e2e import ( "context" + "fmt" "testing" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" @@ -24,13 +25,6 @@ var ( } defaultGenesis = []cosmos.GenesisKV{ - { - Key: "app_state.poa.params.admins", - Value: []string{ - "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn", // gov - "cosmos1hj5fveer5cjtn4wd6wstzugjfdxzl0xpxvjjvr", // testing account - }, - }, { Key: "app_state.gov.params.voting_period", Value: VotingPeriod, @@ -65,6 +59,9 @@ var ( CoinType: "118", GasPrices: "0" + Denom, TrustingPeriod: "330h", + Env: []string{ + fmt.Sprintf("POA_ADMIN_ADDRESS=%s", "cosmos1hj5fveer5cjtn4wd6wstzugjfdxzl0xpxvjjvr"), // acc0 / admin + }, } ) diff --git a/errors.go b/errors.go index 50f7103..4238e29 100644 --- a/errors.go +++ b/errors.go @@ -8,8 +8,6 @@ var ( ErrStakingActionNotAllowed = sdkerrors.Register(ModuleName, 1, "staking actions are not allowed on this chain") ErrPowerBelowMinimum = sdkerrors.Register(ModuleName, 2, "power must be above 1_000_000") ErrNotAnAuthority = sdkerrors.Register(ModuleName, 3, "not an authority") - ErrUnsafePower = sdkerrors.Register(ModuleName, 4, "unsafe: msg.Power is >=30% of total power, set unsafe=true to override") - ErrMustProvideAtLeastOneAddress = sdkerrors.Register(ModuleName, 5, "must provide at least one address") - ErrValidatorSelfRemoval = sdkerrors.Register(ModuleName, 6, "validator is not allowed to remove themselves") - ErrWithdrawDelegatorRewardsNotAllowed = sdkerrors.Register(ModuleName, 7, "withdraw delegator rewards is not allowed on this chain") + ErrUnsafePower = sdkerrors.Register(ModuleName, 4, "unsafe: msg.Power is >30%% of total power, set unsafe=true to override") + ErrWithdrawDelegatorRewardsNotAllowed = sdkerrors.Register(ModuleName, 5, "withdraw delegator rewards is not allowed on this chain") ) diff --git a/genesis.go b/genesis.go index 6d65cd1..735c4fa 100644 --- a/genesis.go +++ b/genesis.go @@ -2,12 +2,10 @@ package poa // NewGenesisState creates a new genesis state with default values. func NewGenesisState() *GenesisState { - return &GenesisState{ - Params: DefaultParams(), - } + return &GenesisState{} } // Validate performs basic genesis state validation returning an error upon any func (gs *GenesisState) Validate() error { - return gs.Params.Validate() + return nil } diff --git a/genesis.pb.go b/genesis.pb.go index 4a6dcd7..3eda7b9 100644 --- a/genesis.pb.go +++ b/genesis.pb.go @@ -26,8 +26,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the poa module's genesis state. type GenesisState struct { - // Params defines all the parameters of the module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + Vals []Validator `protobuf:"bytes,2,rep,name=vals,proto3" json:"vals"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -63,11 +62,11 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetParams() Params { +func (m *GenesisState) GetVals() []Validator { if m != nil { - return m.Params + return m.Vals } - return Params{} + return nil } // PowerCache is a cached block or absolute change in power for ibc-go validations. @@ -125,7 +124,7 @@ func init() { } var fileDescriptor_d9ebd7913aa01cfd = []byte{ - // 268 bytes of a gzipped FileDescriptorProto + // 273 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x2c, 0x2e, 0x29, 0x4a, 0xcc, 0x4b, 0x4f, 0xcd, 0xc9, 0x2f, 0x4b, 0x8d, 0x2f, 0x4b, 0xcd, 0x2b, 0x29, 0x2d, 0x4a, 0x2d, 0xd6, 0x2f, 0xc8, 0x4f, 0xd4, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, @@ -133,16 +132,17 @@ var fileDescriptor_d9ebd7913aa01cfd = []byte{ 0x50, 0x4a, 0x24, 0x3d, 0x3f, 0x3d, 0x1f, 0xac, 0x4e, 0x1f, 0xc4, 0x82, 0x68, 0x91, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x50, 0x21, 0x6d, 0x7c, 0x16, 0x96, 0x25, 0xe6, 0x64, 0xa6, 0x24, 0x96, 0xe4, 0x17, 0x41, 0x15, 0x6b, 0xe0, 0x53, 0x5c, 0x90, 0x58, 0x94, 0x98, 0x0b, - 0x75, 0x9c, 0x94, 0x0a, 0x3e, 0x95, 0x25, 0x15, 0x10, 0x55, 0x4a, 0x81, 0x5c, 0x3c, 0xee, 0x10, - 0x3f, 0x05, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0x39, 0x72, 0xb1, 0x41, 0x4c, 0x91, 0x60, 0x54, 0x60, - 0xd4, 0xe0, 0x36, 0x52, 0xd6, 0xc3, 0xe3, 0x47, 0xbd, 0x00, 0xb0, 0x52, 0x27, 0x96, 0x13, 0xf7, - 0xe4, 0x19, 0x82, 0xa0, 0x1a, 0x95, 0xcc, 0xb9, 0xb8, 0x02, 0xf2, 0xcb, 0x53, 0x8b, 0x9c, 0x13, - 0x93, 0x33, 0x52, 0x85, 0x44, 0xb8, 0x58, 0x0b, 0x40, 0x3c, 0xb0, 0x79, 0x2c, 0x41, 0x10, 0x8e, - 0x95, 0x70, 0xd7, 0xf3, 0x0d, 0x5a, 0x7c, 0x20, 0xc7, 0x20, 0x94, 0x3a, 0xd9, 0x9e, 0x78, 0x24, - 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, - 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x72, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, - 0x72, 0x7e, 0xae, 0x3e, 0x92, 0x7b, 0x74, 0x91, 0xbd, 0x95, 0xc4, 0x06, 0xf6, 0x91, 0x31, 0x20, - 0x00, 0x00, 0xff, 0xff, 0x8d, 0x5f, 0xf5, 0xc4, 0xc1, 0x01, 0x00, 0x00, + 0x75, 0x9c, 0x94, 0x0a, 0x3e, 0x95, 0x25, 0x15, 0x10, 0x55, 0x4a, 0x01, 0x5c, 0x3c, 0xee, 0x10, + 0x3f, 0x05, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0x39, 0x70, 0xb1, 0x94, 0x25, 0xe6, 0x14, 0x4b, 0x30, + 0x29, 0x30, 0x6b, 0x70, 0x1b, 0xa9, 0xe9, 0xe1, 0xf1, 0xa1, 0x5e, 0x18, 0xcc, 0x6d, 0x4e, 0x2c, + 0x27, 0xee, 0xc9, 0x33, 0x04, 0x81, 0x75, 0x2a, 0x99, 0x73, 0x71, 0x05, 0xe4, 0x97, 0xa7, 0x16, + 0x39, 0x27, 0x26, 0x67, 0xa4, 0x0a, 0x89, 0x70, 0xb1, 0x16, 0x80, 0x78, 0x12, 0x8c, 0x0a, 0x8c, + 0x1a, 0x2c, 0x41, 0x10, 0x8e, 0x95, 0x70, 0xd7, 0xf3, 0x0d, 0x5a, 0x7c, 0x20, 0xb7, 0x20, 0x94, + 0x3a, 0xd9, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, + 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x72, 0x7a, 0x66, + 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0x92, 0x83, 0x74, 0x91, 0x7d, 0x95, 0xc4, + 0x06, 0xf6, 0x90, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x40, 0xb0, 0xf7, 0x94, 0xc0, 0x01, 0x00, + 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -165,16 +165,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Vals) > 0 { + for iNdEx := len(m.Vals) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Vals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -223,8 +227,12 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) + if len(m.Vals) > 0 { + for _, e := range m.Vals { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -275,9 +283,9 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Vals", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -304,7 +312,8 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Vals = append(m.Vals, Validator{}) + if err := m.Vals[len(m.Vals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/go.mod b/go.mod index abb1dc8..038f2f5 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( cosmossdk.io/api v0.7.5 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.0 - cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/depinject v1.0.0 cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.3.1 cosmossdk.io/math v1.3.0 @@ -35,7 +35,7 @@ require ( github.com/stretchr/testify v1.9.0 google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 google.golang.org/grpc v1.65.0 - google.golang.org/protobuf v1.34.1 + google.golang.org/protobuf v1.34.2 ) require ( @@ -150,15 +150,15 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.8 // indirect go.uber.org/multierr v1.10.0 // indirect - golang.org/x/crypto v0.23.0 // indirect + golang.org/x/crypto v0.25.0 // indirect golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 // indirect - golang.org/x/net v0.25.0 // indirect + golang.org/x/net v0.27.0 // indirect golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.20.0 // indirect - golang.org/x/term v0.20.0 // indirect - golang.org/x/text v0.15.0 // indirect + golang.org/x/sys v0.22.0 // indirect + golang.org/x/term v0.22.0 // indirect + golang.org/x/text v0.16.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/go.sum b/go.sum index d6e537b..c4e2169 100644 --- a/go.sum +++ b/go.sum @@ -760,8 +760,8 @@ cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= cosmossdk.io/core v0.11.0/go.mod h1:LaTtayWBSoacF5xNzoF8tmLhehqlA9z1SWiPuNC6X1w= -cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= -cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= +cosmossdk.io/depinject v1.0.0 h1:dQaTu6+O6askNXO06+jyeUAnF2/ssKwrrszP9t5q050= +cosmossdk.io/depinject v1.0.0/go.mod h1:zxK/h3HgHoA/eJVtiSsoaRaRA2D5U4cJ5thIG4ssbB8= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= @@ -1744,8 +1744,8 @@ golang.org/x/crypto v0.10.0/go.mod h1:o4eNf7Ede1fv+hwOwZsTHl9EsPFO6q6ZvYR8vYfY45 golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= -golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= -golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= +golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1893,8 +1893,8 @@ golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.13.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA= golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= -golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= -golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2065,8 +2065,8 @@ golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= -golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= +golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2081,8 +2081,8 @@ golang.org/x/term v0.9.0/go.mod h1:M6DEAAIenWoTxdKrOltXcmDY3rSplQUkrvaDU5FcQyo= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= -golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= -golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= +golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2103,8 +2103,8 @@ golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= -golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= +golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2190,8 +2190,8 @@ golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2456,8 +2456,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20230731190214-cbb8c96f2d6d/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20230803162519-f966b187b2e5/go.mod h1:zBEcrKX2ZOcEkHWxBPAIvYUWOKKMIhYcmNiUIu2ji3I= google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5 h1:SbSDUWW1PAO24TNpLdeheoYPd7kllICcLU52x6eD4kQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240709173604-40e1e62336c5/go.mod h1:Ue6ibwXGpU+dqIcODieyLOcgj7z8+IcskoNIgZxtrFY= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -2532,8 +2532,8 @@ google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= -google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/keeper/genesis.go b/keeper/genesis.go index 8b9e24b..9b6c205 100644 --- a/keeper/genesis.go +++ b/keeper/genesis.go @@ -9,7 +9,7 @@ import ( // InitGenesis initializes the module's state from a genesis state. func (k *Keeper) InitGenesis(ctx context.Context, data *poa.GenesisState) error { if err := k.PendingValidators.Set(ctx, poa.Validators{ - Validators: []poa.Validator{}, + Validators: data.Vals, }); err != nil { return err } @@ -20,13 +20,9 @@ func (k *Keeper) InitGenesis(ctx context.Context, data *poa.GenesisState) error return err } - if err := k.AbsoluteChangedInBlockPower.Set(ctx, poa.PowerCache{ + return k.AbsoluteChangedInBlockPower.Set(ctx, poa.PowerCache{ Power: 0, - }); err != nil { - return err - } - - return k.SetParams(ctx, data.Params) + }) } // InitStores sets the `AbsoluteChangedBlock` and `PreviousBlockPower` as a cache into the poa store. @@ -50,12 +46,12 @@ func (k *Keeper) InitCacheStores(ctx context.Context) error { // ExportGenesis exports the module's state to a genesis state. func (k *Keeper) ExportGenesis(ctx context.Context) *poa.GenesisState { - params, err := k.GetParams(ctx) + vals, err := k.PendingValidators.Get(ctx) if err != nil { panic(err) } return &poa.GenesisState{ - Params: params, + Vals: vals.Validators, } } diff --git a/keeper/genesis_test.go b/keeper/genesis_test.go index 1e2ecec..f3defd3 100644 --- a/keeper/genesis_test.go +++ b/keeper/genesis_test.go @@ -17,42 +17,13 @@ func TestInitGenesis(t *testing.T) { fixture := SetupTest(t, 2_000_000) require := require.New(t) - t.Run("default params", func(t *testing.T) { - data := &poa.GenesisState{ - Params: poa.DefaultParams(), - } + t.Run("default state", func(t *testing.T) { + data := &poa.GenesisState{} err := fixture.k.InitGenesis(fixture.ctx, data) require.NoError(err) - - params, err := fixture.k.GetParams(fixture.ctx) - require.NoError(err) - require.Equal(poa.DefaultParams(), params) - }) - - t.Run("custom params", func(t *testing.T) { - p, err := poa.NewParams([]string{fixture.addrs[0].String(), fixture.addrs[1].String()}, true) - require.NoError(err) - - data := &poa.GenesisState{ - Params: p, - } - err = fixture.k.InitGenesis(fixture.ctx, data) - require.NoError(err) - - params, err := fixture.k.GetParams(fixture.ctx) - require.NoError(err) - require.Equal(p, params) - }) - - t.Run("bad params", func(t *testing.T) { - _, err := poa.NewParams(nil, false) - require.Error(err) }) t.Run("pending validator export", func(t *testing.T) { - p, err := poa.NewParams([]string{fixture.addrs[0].String(), fixture.addrs[1].String()}, true) - require.NoError(err) - acc := GenAcc() valAddr := sdk.ValAddress(acc.addr) @@ -61,15 +32,16 @@ func TestInitGenesis(t *testing.T) { val.Tokens = sdkmath.NewInt(1_234_567) - err = fixture.k.InitGenesis(fixture.ctx, &poa.GenesisState{ - Params: p, - }) - require.NoError(err) + state := &poa.GenesisState{ + Vals: []poa.Validator{poa.ConvertStakingToPOA(val)}, + } - // load params - params, err := fixture.k.GetParams(fixture.ctx) + err = fixture.k.InitGenesis(fixture.ctx, state) require.NoError(err) - require.Equal(p, params) + exported := fixture.k.ExportGenesis(fixture.ctx) + + require.Len(state.Vals, len(exported.Vals)) + require.Equal(state.Vals[0].OperatorAddress, exported.Vals[0].OperatorAddress) }) } diff --git a/keeper/keeper.go b/keeper/keeper.go index c29d24a..80858fd 100644 --- a/keeper/keeper.go +++ b/keeper/keeper.go @@ -2,6 +2,8 @@ package keeper import ( "context" + "fmt" + "os" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -31,12 +33,13 @@ type Keeper struct { // state management Schema collections.Schema - Params collections.Item[poa.Params] PendingValidators collections.Item[poa.Validators] UpdatedValidatorsCache collections.KeySet[string] CachedBlockPower collections.Item[poa.PowerCache] AbsoluteChangedInBlockPower collections.Item[poa.PowerCache] + + authority string } // NewKeeper creates a new poa Keeper instance @@ -47,11 +50,17 @@ func NewKeeper( slk SlashingKeeper, bk BankKeeper, logger log.Logger, + adminAuthority string, ) Keeper { logger = logger.With(log.ModuleKey, "x/"+poa.ModuleName) sb := collections.NewSchemaBuilder(storeService) + if address := os.Getenv("POA_ADMIN_ADDRESS"); address != "" { + adminAuthority = address + logger.Info("admin authority override from environment variable `POA_ADMIN_ADDRESS`", "address", adminAuthority) + } + k := Keeper{ cdc: cdc, stakingKeeper: sk, @@ -60,12 +69,13 @@ func NewKeeper( logger: logger, // Stores - Params: collections.NewItem(sb, poa.ParamsKey, "params", codec.CollValue[poa.Params](cdc)), PendingValidators: collections.NewItem(sb, poa.PendingValidatorsKey, "pending", codec.CollValue[poa.Validators](cdc)), UpdatedValidatorsCache: collections.NewKeySet(sb, poa.UpdatedValidatorsCacheKey, "updated_validators", collections.StringKey), CachedBlockPower: collections.NewItem(sb, poa.CachedPreviousBlockPowerKey, "cached_block", codec.CollValue[poa.PowerCache](cdc)), AbsoluteChangedInBlockPower: collections.NewItem(sb, poa.AbsoluteChangedInBlockPowerKey, "absolute_changed_power", codec.CollValue[poa.PowerCache](cdc)), + + authority: adminAuthority, } schema, err := sb.Build() @@ -104,25 +114,22 @@ func (k *Keeper) SetTestAccountKeeper(ak AccountKeeper) { k.accountKeeper = ak } -// GetAdmins returns the module's administrators with delegation of power control. -func (k Keeper) GetAdmins(ctx context.Context) []string { - p, err := k.GetParams(ctx) - if err != nil { - return []string{} - } +func (k *Keeper) SetTestAuthority(addr string) { + k.authority = addr +} - return p.Admins +func (k Keeper) GetAdmin(ctx context.Context) string { + return k.authority } // IsAdmin checks if the given address is an admin. func (k Keeper) IsAdmin(ctx context.Context, fromAddr string) bool { - for _, auth := range k.GetAdmins(ctx) { - if auth == fromAddr { - return true - } + if os.Getenv("POA_BYPASS_ADMIN_CHECK_FOR_SIMULATION_TESTING_ONLY") == "not_for-production" { + fmt.Println("[!] POA: Bypassing admin check for simulation testing") // nolint:forbidigo + return true } - return false + return k.authority == fromAddr } // IsSenderValidator checks if the given sender address is the same address as the validator by bytes. diff --git a/keeper/keeper_test.go b/keeper/keeper_test.go index d26c6a4..7c4d1c2 100644 --- a/keeper/keeper_test.go +++ b/keeper/keeper_test.go @@ -2,6 +2,7 @@ package keeper_test import ( "fmt" + "os" "testing" "time" @@ -41,13 +42,16 @@ import ( poamodule "github.com/strangelove-ventures/poa/module" ) -var maccPerms = map[string][]string{ - authtypes.FeeCollectorName: nil, - stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, - stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, - minttypes.ModuleName: {authtypes.Minter}, - govtypes.ModuleName: {authtypes.Burner}, -} +var ( + authorityAddr = "cosmos15ky9du8a2wlstz6fpx3p4mqpjyrm5cgqjwl8sq" + maccPerms = map[string][]string{ + authtypes.FeeCollectorName: nil, + stakingtypes.BondedPoolName: {authtypes.Burner, authtypes.Staking}, + stakingtypes.NotBondedPoolName: {authtypes.Burner, authtypes.Staking}, + minttypes.ModuleName: {authtypes.Minter}, + govtypes.ModuleName: {authtypes.Burner}, + } +) type testFixture struct { suite.Suite @@ -64,8 +68,8 @@ type testFixture struct { bankkeeper bankkeeper.BaseKeeper mintkeeper mintkeeper.Keeper - addrs []sdk.AccAddress - govModAddr string + addrs []sdk.AccAddress + authorityAddr string } func SetupTest(t *testing.T, baseValShares int64) *testFixture { @@ -77,7 +81,7 @@ func SetupTest(t *testing.T, baseValShares int64) *testFixture { logger := log.NewTestLogger(t) encCfg := moduletestutil.MakeTestEncodingConfig() - f.govModAddr = authtypes.NewModuleAddress(govtypes.ModuleName).String() + f.authorityAddr = authorityAddr f.addrs = simtestutil.CreateIncrementalAccounts(3) key := storetypes.NewKVStoreKey(poa.ModuleName) @@ -90,7 +94,7 @@ func SetupTest(t *testing.T, baseValShares int64) *testFixture { registerBaseSDKModules(f, encCfg, storeService, logger, require) // Setup POA Keeper. - f.k = keeper.NewKeeper(encCfg.Codec, storeService, f.stakingKeeper, f.slashingKeeper, f.bankkeeper, logger) + f.k = keeper.NewKeeper(encCfg.Codec, storeService, f.stakingKeeper, f.slashingKeeper, f.bankkeeper, logger, authorityAddr) f.k.SetTestAccountKeeper(f.accountkeeper) f.msgServer = keeper.NewMsgServerImpl(f.k) f.queryServer = keeper.NewQueryServerImpl(f.k) @@ -111,6 +115,8 @@ func SetupTest(t *testing.T, baseValShares int64) *testFixture { f.createBaseStakingValidators(t, baseValShares) + os.Setenv("POA_BYPASS_ADMIN_CHECK_FOR_SIMULATION_TESTING_ONLY", "false") + return f } @@ -118,7 +124,6 @@ func (f *testFixture) InitPoAGenesis(t *testing.T) { t.Helper() genState := poa.NewGenesisState() - genState.Params.Admins = []string{f.addrs[0].String(), f.govModAddr} require.NoError(t, f.k.InitGenesis(f.ctx, genState)) } @@ -135,7 +140,7 @@ func registerBaseSDKModules( authtypes.ProtoBaseAccount, maccPerms, authcodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix, - f.govModAddr, + f.authorityAddr, ) // Bank Keeper. @@ -143,13 +148,13 @@ func registerBaseSDKModules( encCfg.Codec, storeService, f.accountkeeper, nil, - f.govModAddr, logger, + f.authorityAddr, logger, ) // Staking Keeper. f.stakingKeeper = stakingkeeper.NewKeeper( encCfg.Codec, storeService, - f.accountkeeper, f.bankkeeper, f.govModAddr, + f.accountkeeper, f.bankkeeper, f.authorityAddr, authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr), authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr), ) @@ -160,7 +165,7 @@ func registerBaseSDKModules( f.slashingKeeper = slashingkeeper.NewKeeper( encCfg.Codec, encCfg.Amino, storeService, f.stakingKeeper, - f.govModAddr, + f.authorityAddr, ) err = f.slashingKeeper.SetParams(f.ctx, slashingtypes.DefaultParams()) require.NoError(err) @@ -170,7 +175,7 @@ func registerBaseSDKModules( f.mintkeeper = mintkeeper.NewKeeper( encCfg.Codec, storeService, f.stakingKeeper, f.accountkeeper, f.bankkeeper, - authtypes.FeeCollectorName, f.govModAddr, + authtypes.FeeCollectorName, f.authorityAddr, ) } diff --git a/keeper/msg_server.go b/keeper/msg_server.go index e15496f..c0f9306 100644 --- a/keeper/msg_server.go +++ b/keeper/msg_server.go @@ -27,8 +27,8 @@ func NewMsgServerImpl(keeper Keeper) poa.MsgServer { } func (ms msgServer) SetPower(ctx context.Context, msg *poa.MsgSetPower) (*poa.MsgSetPowerResponse, error) { - if isAdmin := ms.k.IsAdmin(ctx, msg.Sender); !isAdmin { - return nil, errorsmod.Wrapf(poa.ErrNotAnAuthority, "sender %s is not an authority. allowed: %+v", msg.Sender, ms.k.GetAdmins(ctx)) + if !ms.k.IsAdmin(ctx, msg.Sender) { + return nil, errorsmod.Wrapf(poa.ErrNotAnAuthority, "sender %s is not an authority. allowed: %+v", msg.Sender, ms.k.GetAdmin(ctx)) } if err := msg.Validate(ms.k.GetValidatorAddressCodec()); err != nil { @@ -86,11 +86,6 @@ func (ms msgServer) SetPower(ctx context.Context, msg *poa.MsgSetPower) (*poa.Ms func (ms msgServer) RemoveValidator(ctx context.Context, msg *poa.MsgRemoveValidator) (*poa.MsgRemoveValidatorResponse, error) { // Sender is not an admin. Check if the sender is the validator and that validator exist. if !ms.k.IsAdmin(ctx, msg.Sender) { - params, err := ms.k.GetParams(ctx) - if err != nil { - return nil, err - } - // check if the sender is the validator being removed. hasPermission, err := ms.k.IsSenderValidator(ctx, msg.Sender, msg.ValidatorAddress) if err != nil { @@ -100,10 +95,6 @@ func (ms msgServer) RemoveValidator(ctx context.Context, msg *poa.MsgRemoveValid if !hasPermission { return nil, poa.ErrNotAnAuthority } - - if !params.AllowValidatorSelfExit { - return nil, poa.ErrValidatorSelfRemoval - } } vals, err := ms.k.stakingKeeper.GetAllValidators(ctx) @@ -154,18 +145,6 @@ func (ms msgServer) RemovePending(ctx context.Context, msg *poa.MsgRemovePending return &poa.MsgRemovePendingResponse{}, ms.k.RemovePendingValidator(ctx, msg.ValidatorAddress) } -func (ms msgServer) UpdateParams(ctx context.Context, msg *poa.MsgUpdateParams) (*poa.MsgUpdateParamsResponse, error) { - if ok := ms.k.IsAdmin(ctx, msg.Sender); !ok { - return nil, poa.ErrNotAnAuthority - } - - if err := msg.Params.Validate(); err != nil { - return nil, err - } - - return &poa.MsgUpdateParamsResponse{}, ms.k.SetParams(ctx, msg.Params) -} - // CreateValidator is from the x/staking module. // POA changes: // - MinSelfDelegation is force set to 1. diff --git a/keeper/msg_server_test.go b/keeper/msg_server_test.go index a588c77..5c7b9c5 100644 --- a/keeper/msg_server_test.go +++ b/keeper/msg_server_test.go @@ -13,62 +13,6 @@ import ( "github.com/strangelove-ventures/poa" ) -func TestUpdateParams(t *testing.T) { - f := SetupTest(t, 2_000_000) - require := require.New(t) - - testCases := []struct { - name string - request *poa.MsgUpdateParams - expectErrMsg string - }{ - { - name: "set invalid authority (not an address)", - request: &poa.MsgUpdateParams{ - Sender: "foo", - }, - expectErrMsg: "not an authority", - }, - { - name: "set invalid authority (not defined authority)", - request: &poa.MsgUpdateParams{ - Sender: f.addrs[1].String(), - }, - expectErrMsg: "not an authority", - }, - { - name: "set invalid admins", - request: &poa.MsgUpdateParams{ - Sender: f.govModAddr, - Params: poa.Params{}, - }, - expectErrMsg: poa.ErrMustProvideAtLeastOneAddress.Error(), - }, - { - name: "set valid params", - request: &poa.MsgUpdateParams{ - Sender: f.govModAddr, - Params: poa.Params{ - Admins: []string{f.addrs[0].String()}, - }, - }, - }, - } - - for _, tc := range testCases { - tc := tc - t.Run(tc.name, func(t *testing.T) { - _, err := f.msgServer.UpdateParams(f.ctx, tc.request) - if tc.expectErrMsg != "" { - require.Error(err) - require.ErrorContains(err, tc.expectErrMsg) - } else { - require.NoError(err) - } - }) - } -} - func TestUpdateStakingParams(t *testing.T) { f := SetupTest(t, 2_000_000) require := require.New(t) @@ -96,7 +40,7 @@ func TestUpdateStakingParams(t *testing.T) { { name: "set valid params", request: &poa.MsgUpdateStakingParams{ - Sender: f.govModAddr, + Sender: f.authorityAddr, Params: poa.DefaultStakingParams(), }, expectErrMsg: "", @@ -324,15 +268,6 @@ func TestRemoveValidator(t *testing.T) { }, expectErrMsg: "is not bonded", }, - { - name: "fail; try to remove validator as itself with self removal disabled", - request: &poa.MsgRemoveValidator{ - Sender: sdk.AccAddress(MustValAddressFromBech32(vals[1].OperatorAddress)).String(), - ValidatorAddress: vals[1].OperatorAddress, - }, - expectErrMsg: poa.ErrValidatorSelfRemoval.Error(), - isSelfRemovalAllowed: false, - }, { name: "success; remove validator as itself", request: &poa.MsgRemoveValidator{ @@ -355,17 +290,10 @@ func TestRemoveValidator(t *testing.T) { for _, tc := range testCases { tc := tc t.Run(tc.name, func(t *testing.T) { - // Update the params for self approval - currParams, _ := f.k.GetParams(f.ctx) - currParams.AllowValidatorSelfExit = tc.isSelfRemovalAllowed - - err = f.k.SetParams(f.ctx, currParams) - require.NoError(err) - _, err = f.msgServer.RemoveValidator(f.ctx, tc.request) if tc.expectErrMsg != "" { - require.Error(err) + require.Error(err, tc.expectErrMsg) require.ErrorContains(err, tc.expectErrMsg) } else { require.NoError(err) diff --git a/keeper/params.go b/keeper/params.go deleted file mode 100644 index 326655e..0000000 --- a/keeper/params.go +++ /dev/null @@ -1,26 +0,0 @@ -package keeper - -import ( - "context" - - "github.com/strangelove-ventures/poa" -) - -// SetParams sets the module parameters. -func (k Keeper) SetParams(ctx context.Context, p poa.Params) error { - if err := p.Validate(); err != nil { - return err - } - - return k.Params.Set(ctx, p) -} - -// GetParams returns the current module parameters. -func (k Keeper) GetParams(ctx context.Context) (poa.Params, error) { - p, err := k.Params.Get(ctx) - if err != nil { - return poa.DefaultParams(), err - } - - return p, nil -} diff --git a/keeper/query_server.go b/keeper/query_server.go index eda6e8e..332627f 100644 --- a/keeper/query_server.go +++ b/keeper/query_server.go @@ -48,13 +48,3 @@ func (qs queryServer) PendingValidators(ctx context.Context, _ *poa.QueryPending return &poa.PendingValidatorsResponse{Pending: pending.Validators}, nil } - -// Params returns the current module params. -func (qs queryServer) Params(ctx context.Context, msg *poa.QueryParamsRequest) (*poa.ParamsResponse, error) { - params, err := qs.k.GetParams(ctx) - if err != nil { - return nil, err - } - - return &poa.ParamsResponse{Params: params}, nil -} diff --git a/keeper/query_server_test.go b/keeper/query_server_test.go index 4c0b774..b5a5f73 100644 --- a/keeper/query_server_test.go +++ b/keeper/query_server_test.go @@ -49,60 +49,3 @@ func TestPendingValidatorsQuery(t *testing.T) { require.NotEqual(valAddr, val.OperatorAddress) } } - -func TestParamsQuery(t *testing.T) { - f := SetupTest(t, 1_000_000) - require := require.New(t) - - testCases := []struct { - name string - request *poa.MsgUpdateParams - expected poa.Params - }{ - { - name: "default", - request: &poa.MsgUpdateParams{ - Sender: f.addrs[0].String(), - Params: poa.DefaultParams(), - }, - expected: poa.DefaultParams(), - }, - { - name: "two admins", - request: &poa.MsgUpdateParams{ - Sender: f.govModAddr, - Params: poa.Params{ - Admins: []string{f.govModAddr, f.addrs[0].String()}, - }, - }, - expected: poa.Params{ - Admins: []string{f.govModAddr, f.addrs[0].String()}, - }, - }, - { - name: "duplicate admins", - request: &poa.MsgUpdateParams{ - Sender: f.govModAddr, - Params: poa.Params{ - Admins: []string{f.govModAddr, f.govModAddr}, - }, - }, - expected: poa.Params{ - Admins: []string{f.govModAddr, f.govModAddr}, - }, - }, - } - - for _, tc := range testCases { - tc := tc - t.Run(tc.name, func(t *testing.T) { - _, err := f.msgServer.UpdateParams(f.ctx, tc.request) - require.NoError(err) - - r, err := f.queryServer.Params(f.ctx, &poa.QueryParamsRequest{}) - require.NoError(err) - - require.EqualValues(tc.expected, r.Params) - }) - } -} diff --git a/module/depinject.go b/module/depinject.go index 6a2dc0b..00e4973 100644 --- a/module/depinject.go +++ b/module/depinject.go @@ -6,6 +6,8 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "cosmossdk.io/core/address" "cosmossdk.io/core/appmodule" @@ -38,6 +40,7 @@ type ModuleInputs struct { depinject.In Cdc codec.Codec + Config *modulev1.Module StoreService store.KVStoreService AddressCodec address.Codec @@ -55,7 +58,12 @@ type ModuleOutputs struct { } func ProvideModule(in ModuleInputs) ModuleOutputs { - k := keeper.NewKeeper(in.Cdc, in.StoreService, in.StakingKeeper, in.SlashingKeeper, in.BankKeeper, log.NewLogger(os.Stderr)) + authority := authtypes.NewModuleAddress(govtypes.ModuleName) + if in.Config.Authority != "" { + authority = authtypes.NewModuleAddress(in.Config.Authority) + } + + k := keeper.NewKeeper(in.Cdc, in.StoreService, in.StakingKeeper, in.SlashingKeeper, in.BankKeeper, log.NewLogger(os.Stderr), authority.String()) k.SetTestAccountKeeper(in.AccountKeeper) // for testing m := NewAppModule(in.Cdc, k) diff --git a/params.go b/params.go index 5f19568..f722389 100644 --- a/params.go +++ b/params.go @@ -1,35 +1,9 @@ package poa import ( - "encoding/json" - fmt "fmt" - - sdk "github.com/cosmos/cosmos-sdk/types" - authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) -// DefaultParams returns default module parameters. -func DefaultParams() Params { - govModuleAddress := authtypes.NewModuleAddress(govtypes.ModuleName).String() - - return Params{ - Admins: []string{govModuleAddress}, - AllowValidatorSelfExit: true, - } -} - -// NewParams returns a new POA Params. -func NewParams(admins []string, allowValSelfExit bool) (Params, error) { - p := Params{ - Admins: admins, - AllowValidatorSelfExit: allowValSelfExit, - } - - return p, p.Validate() -} - // DefaultParams returns the default x/staking parameters. func DefaultStakingParams() StakingParams { sp := stakingtypes.DefaultParams() @@ -43,37 +17,3 @@ func DefaultStakingParams() StakingParams { MinCommissionRate: sp.MinCommissionRate, } } - -// Stringer method for Params. -func (p Params) String() string { - bz, err := json.Marshal(p) - if err != nil { - panic(err) - } - - return string(bz) -} - -// Validate does the sanity check on the params. -func (p Params) Validate() error { - return validateAdmins(p.Admins) -} - -func validateAdmins(i interface{}) error { - admins, ok := i.([]string) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - - if len(admins) == 0 { - return ErrMustProvideAtLeastOneAddress - } - - for _, auth := range admins { - if _, err := sdk.AccAddressFromBech32(auth); err != nil { - return err - } - } - - return nil -} diff --git a/params.pb.go b/params.pb.go index c3dd587..23a20d5 100644 --- a/params.pb.go +++ b/params.pb.go @@ -30,60 +30,6 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// Params defines the parameters for the module. -type Params struct { - // Array of addresses that are allowed to control the chains validators power. - Admins []string `protobuf:"bytes,1,rep,name=admins,proto3" json:"admins,omitempty"` - // allow_validator_self_exit allows for a valdiator to remove themselves from the validator set. - AllowValidatorSelfExit bool `protobuf:"varint,2,opt,name=allow_validator_self_exit,json=allowValidatorSelfExit,proto3" json:"allow_validator_self_exit,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_b1333a19bedb70c3, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetAdmins() []string { - if m != nil { - return m.Admins - } - return nil -} - -func (m *Params) GetAllowValidatorSelfExit() bool { - if m != nil { - return m.AllowValidatorSelfExit - } - return false -} - // StakingParams defines the parameters for the x/staking module. type StakingParams struct { // unbonding_time is the time duration of unbonding. @@ -106,7 +52,7 @@ func (m *StakingParams) Reset() { *m = StakingParams{} } func (m *StakingParams) String() string { return proto.CompactTextString(m) } func (*StakingParams) ProtoMessage() {} func (*StakingParams) Descriptor() ([]byte, []int) { - return fileDescriptor_b1333a19bedb70c3, []int{1} + return fileDescriptor_b1333a19bedb70c3, []int{0} } func (m *StakingParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -171,7 +117,6 @@ func (m *StakingParams) GetBondDenom() string { } func init() { - proto.RegisterType((*Params)(nil), "strangelove_ventures.poa.v1.Params") proto.RegisterType((*StakingParams)(nil), "strangelove_ventures.poa.v1.StakingParams") } @@ -180,75 +125,39 @@ func init() { } var fileDescriptor_b1333a19bedb70c3 = []byte{ - // 535 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xb1, 0x6f, 0xd3, 0x40, - 0x14, 0xc6, 0x73, 0x14, 0x22, 0x7a, 0x55, 0x2a, 0xd5, 0xa0, 0xe2, 0xa4, 0xc2, 0x8e, 0x02, 0x48, - 0x51, 0xa5, 0xf8, 0x54, 0x98, 0x88, 0xc4, 0x12, 0xd2, 0x0d, 0x09, 0xe4, 0x56, 0x0c, 0x2c, 0xd6, - 0xc5, 0xbe, 0x38, 0xa7, 0xf8, 0xee, 0x45, 0xbe, 0x4b, 0x70, 0x77, 0x26, 0x26, 0xc6, 0x8e, 0x95, - 0x58, 0x18, 0x3b, 0xf0, 0x47, 0x74, 0xac, 0x98, 0x10, 0x43, 0x40, 0xc9, 0x50, 0x66, 0xfe, 0x02, - 0x64, 0x9f, 0x93, 0x76, 0xe8, 0x62, 0xf9, 0xbd, 0xf7, 0xbb, 0xbb, 0xef, 0xbb, 0xef, 0x70, 0x5b, - 0xe9, 0x94, 0xca, 0x98, 0x25, 0x30, 0x63, 0xc1, 0x8c, 0x49, 0x3d, 0x4d, 0x99, 0x22, 0x13, 0xa0, - 0x64, 0x76, 0x40, 0x26, 0x34, 0xa5, 0x42, 0x79, 0x93, 0x14, 0x34, 0x58, 0x7b, 0xb7, 0x91, 0xde, - 0x04, 0xa8, 0x37, 0x3b, 0x68, 0x3c, 0x8c, 0x21, 0x86, 0x82, 0x23, 0xf9, 0x9f, 0x59, 0xd2, 0xd8, - 0xa1, 0x82, 0x4b, 0x20, 0xc5, 0xb7, 0x6c, 0x39, 0x31, 0x40, 0x9c, 0x30, 0x52, 0x54, 0x83, 0xe9, - 0x90, 0x44, 0xd3, 0x94, 0x6a, 0x0e, 0xb2, 0x9c, 0xd7, 0x43, 0x50, 0x02, 0x54, 0x60, 0xf6, 0x32, - 0x85, 0x19, 0xb5, 0x34, 0xae, 0xbe, 0x2b, 0x04, 0x59, 0xbb, 0xb8, 0x4a, 0x23, 0xc1, 0xa5, 0xb2, - 0x51, 0x73, 0xa3, 0xbd, 0xe9, 0x97, 0x95, 0xf5, 0x12, 0xd7, 0x69, 0x92, 0xc0, 0xc7, 0x60, 0x46, - 0x13, 0x1e, 0x51, 0x0d, 0x69, 0xa0, 0x58, 0x32, 0x0c, 0x58, 0xc6, 0xb5, 0x7d, 0xa7, 0x89, 0xda, - 0xf7, 0xfd, 0xdd, 0x02, 0x78, 0xbf, 0x9a, 0x1f, 0xb1, 0x64, 0x78, 0x98, 0x71, 0xdd, 0x7d, 0x74, - 0x7a, 0xe6, 0x56, 0xfe, 0x9e, 0xb9, 0xe8, 0xf3, 0xd5, 0xf9, 0x3e, 0xce, 0xfd, 0x1b, 0xf3, 0xad, - 0xaf, 0x1b, 0xb8, 0x76, 0xa4, 0xe9, 0x98, 0xcb, 0xb8, 0x3c, 0xfd, 0x2d, 0xde, 0x9e, 0xca, 0x01, - 0xc8, 0x88, 0xcb, 0x38, 0xd0, 0x5c, 0x30, 0x1b, 0x35, 0x51, 0x7b, 0xeb, 0x79, 0xdd, 0x33, 0xde, - 0xbc, 0x95, 0x37, 0xaf, 0x5f, 0x7a, 0xeb, 0xd5, 0x2e, 0xe6, 0x6e, 0xe5, 0xf4, 0xb7, 0x8b, 0xbe, - 0x5d, 0x9d, 0xef, 0x23, 0xbf, 0xb6, 0x5e, 0x7f, 0xcc, 0x05, 0xb3, 0x9e, 0xe1, 0x6d, 0x41, 0xb3, - 0x6b, 0xd1, 0xaa, 0xd0, 0x5a, 0xf3, 0x6b, 0x82, 0x66, 0x6b, 0xa5, 0xca, 0x72, 0xf1, 0x56, 0x8e, - 0x31, 0xa9, 0x53, 0xce, 0x94, 0xbd, 0x51, 0x30, 0x58, 0xd0, 0xec, 0xd0, 0x74, 0xac, 0x0e, 0xb6, - 0x46, 0x5c, 0x69, 0x48, 0x79, 0x48, 0x93, 0x35, 0x77, 0xb7, 0xe0, 0x76, 0xae, 0x27, 0x2b, 0xfc, - 0x31, 0xc6, 0xb9, 0x8a, 0x20, 0x62, 0x12, 0x84, 0x7d, 0xaf, 0x89, 0xda, 0x9b, 0xfe, 0x66, 0xde, - 0xe9, 0xe7, 0x0d, 0xeb, 0x13, 0xc2, 0x0f, 0x04, 0x97, 0x41, 0x08, 0x42, 0x70, 0xa5, 0x38, 0xc8, - 0x20, 0xa5, 0x9a, 0xd9, 0xd5, 0x1c, 0xec, 0x1d, 0xe7, 0x8e, 0x7e, 0xcd, 0xdd, 0x3d, 0x13, 0x91, - 0x8a, 0xc6, 0x1e, 0x07, 0x22, 0xa8, 0x1e, 0x79, 0x6f, 0x58, 0x4c, 0xc3, 0x93, 0x3e, 0x0b, 0xff, - 0xcd, 0xdd, 0xc6, 0x09, 0x15, 0x49, 0xb7, 0x75, 0xcb, 0x3e, 0xad, 0x1f, 0xdf, 0x3b, 0xb8, 0xcc, - 0xb7, 0xcf, 0x42, 0x73, 0x31, 0x3b, 0x82, 0xcb, 0xd7, 0x6b, 0xce, 0xa7, 0x9a, 0x75, 0x9f, 0xae, - 0x42, 0x29, 0x4f, 0xea, 0xa8, 0x68, 0x4c, 0x32, 0xa2, 0x4c, 0x24, 0xc4, 0x64, 0xd2, 0x7b, 0x75, - 0xb1, 0x70, 0xd0, 0xe5, 0xc2, 0x41, 0x7f, 0x16, 0x0e, 0xfa, 0xb2, 0x74, 0x2a, 0x97, 0x4b, 0xa7, - 0xf2, 0x73, 0xe9, 0x54, 0x3e, 0x3c, 0x89, 0xb9, 0x1e, 0x4d, 0x07, 0x5e, 0x08, 0x82, 0xdc, 0x78, - 0xc1, 0x9d, 0x9b, 0x6f, 0x7d, 0x50, 0x2d, 0x22, 0x7b, 0xf1, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x8f, - 0xc6, 0xee, 0xa3, 0x0e, 0x03, 0x00, 0x00, + // 470 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0x73, 0x14, 0x2a, 0xf5, 0x2a, 0x57, 0x8a, 0x61, 0x70, 0x53, 0x61, 0x47, 0x01, 0xa4, + 0xa8, 0x52, 0x7c, 0x2a, 0x6c, 0x95, 0x58, 0x42, 0xd8, 0x90, 0x40, 0xa1, 0x62, 0x60, 0xb1, 0x5e, + 0xec, 0xc3, 0x39, 0xc5, 0x77, 0x2f, 0xf2, 0x9d, 0xad, 0x74, 0x67, 0x62, 0x62, 0x64, 0x44, 0x62, + 0x61, 0xec, 0xc0, 0x87, 0xe8, 0x58, 0x31, 0x21, 0x86, 0x80, 0x92, 0xa1, 0xcc, 0x7c, 0x02, 0x64, + 0x9f, 0x1b, 0x3a, 0x74, 0xb1, 0x7c, 0xff, 0xf7, 0xbb, 0xf7, 0x7f, 0xf7, 0xde, 0xa3, 0x7d, 0x6d, + 0x72, 0x50, 0x29, 0xcf, 0xb0, 0xe4, 0x51, 0xc9, 0x95, 0x29, 0x72, 0xae, 0xd9, 0x1c, 0x81, 0x95, + 0x47, 0x6c, 0x0e, 0x39, 0x48, 0x1d, 0xce, 0x73, 0x34, 0xe8, 0x1e, 0xdc, 0x44, 0x86, 0x73, 0x84, + 0xb0, 0x3c, 0xea, 0xdc, 0x4b, 0x31, 0xc5, 0x9a, 0x63, 0xd5, 0x9f, 0xbd, 0xd2, 0x69, 0x83, 0x14, + 0x0a, 0x59, 0xfd, 0x6d, 0x24, 0x3f, 0x45, 0x4c, 0x33, 0xce, 0xea, 0xd3, 0xa4, 0x78, 0xc7, 0x92, + 0x22, 0x07, 0x23, 0x50, 0x35, 0xf1, 0xfd, 0x18, 0xb5, 0x44, 0x1d, 0xd9, 0x5c, 0xf6, 0x60, 0x43, + 0xbd, 0x2f, 0x5b, 0xd4, 0x79, 0x6d, 0x60, 0x26, 0x54, 0xfa, 0xaa, 0x2e, 0xcc, 0x7d, 0x49, 0xf7, + 0x0a, 0x35, 0x41, 0x95, 0x08, 0x95, 0x46, 0x46, 0x48, 0xee, 0x91, 0x2e, 0xe9, 0xef, 0x3e, 0xde, + 0x0f, 0xad, 0x4b, 0x78, 0xe5, 0x12, 0x8e, 0x1a, 0x97, 0xa1, 0x73, 0xbe, 0x0c, 0x5a, 0x9f, 0x7e, + 0x05, 0xe4, 0xeb, 0xe5, 0xd9, 0x21, 0x19, 0x3b, 0x9b, 0xfb, 0x27, 0x42, 0x72, 0xf7, 0x11, 0xdd, + 0x93, 0xb0, 0x88, 0x4a, 0xc8, 0x44, 0x02, 0x06, 0x73, 0xed, 0xdd, 0xea, 0x92, 0xbe, 0x33, 0x76, + 0x24, 0x2c, 0xde, 0x6c, 0x44, 0x37, 0xa0, 0xbb, 0x15, 0xc6, 0x95, 0xc9, 0x05, 0xd7, 0xde, 0x56, + 0xcd, 0x50, 0x09, 0x8b, 0xe7, 0x56, 0x71, 0x07, 0xd4, 0x9d, 0x0a, 0x6d, 0x30, 0x17, 0x31, 0x64, + 0x1b, 0xee, 0x76, 0xcd, 0xb5, 0xff, 0x47, 0xae, 0xf0, 0xfb, 0x94, 0x56, 0x55, 0x44, 0x09, 0x57, + 0x28, 0xbd, 0x3b, 0x5d, 0xd2, 0xdf, 0x19, 0xef, 0x54, 0xca, 0xa8, 0x12, 0xdc, 0xf7, 0x84, 0xde, + 0x95, 0x42, 0x45, 0x31, 0x4a, 0x29, 0xb4, 0x16, 0xa8, 0xa2, 0x1c, 0x0c, 0xf7, 0xb6, 0x2b, 0x70, + 0x78, 0x52, 0xbd, 0xe8, 0xe7, 0x32, 0x38, 0xb0, 0xcd, 0xd2, 0xc9, 0x2c, 0x14, 0xc8, 0x24, 0x98, + 0x69, 0xf8, 0x82, 0xa7, 0x10, 0x9f, 0x8e, 0x78, 0xfc, 0x77, 0x19, 0x74, 0x4e, 0x41, 0x66, 0xc7, + 0xbd, 0x1b, 0xf2, 0xf4, 0xbe, 0x7f, 0x1b, 0xd0, 0xa6, 0xd3, 0x23, 0x1e, 0xdb, 0xc6, 0xb4, 0xa5, + 0x50, 0xcf, 0x36, 0xdc, 0x18, 0x0c, 0x3f, 0x7e, 0xf8, 0xe7, 0x73, 0x40, 0x3e, 0x5c, 0x9e, 0x1d, + 0x36, 0x4e, 0x03, 0x9d, 0xcc, 0xd8, 0x82, 0x69, 0x3b, 0x12, 0x66, 0x67, 0x32, 0x7c, 0x7a, 0xbe, + 0xf2, 0xc9, 0xc5, 0xca, 0x27, 0xbf, 0x57, 0x3e, 0xf9, 0xb8, 0xf6, 0x5b, 0x17, 0x6b, 0xbf, 0xf5, + 0x63, 0xed, 0xb7, 0xde, 0x3e, 0x48, 0x85, 0x99, 0x16, 0x93, 0x30, 0x46, 0xc9, 0xae, 0xed, 0xd2, + 0xe0, 0xfa, 0xd6, 0x4d, 0xb6, 0xeb, 0x91, 0x3d, 0xf9, 0x17, 0x00, 0x00, 0xff, 0xff, 0x13, 0x1a, + 0xfc, 0xf3, 0x98, 0x02, 0x00, 0x00, } -func (this *Params) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Params) - if !ok { - that2, ok := that.(Params) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Admins) != len(that1.Admins) { - return false - } - for i := range this.Admins { - if this.Admins[i] != that1.Admins[i] { - return false - } - } - if this.AllowValidatorSelfExit != that1.AllowValidatorSelfExit { - return false - } - return true -} func (this *StakingParams) Equal(that interface{}) bool { if that == nil { return this == nil @@ -288,48 +197,6 @@ func (this *StakingParams) Equal(that interface{}) bool { } return true } -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AllowValidatorSelfExit { - i-- - if m.AllowValidatorSelfExit { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.Admins) > 0 { - for iNdEx := len(m.Admins) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Admins[iNdEx]) - copy(dAtA[i:], m.Admins[iNdEx]) - i = encodeVarintParams(dAtA, i, uint64(len(m.Admins[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func (m *StakingParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -404,24 +271,6 @@ func encodeVarintParams(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Admins) > 0 { - for _, s := range m.Admins { - l = len(s) - n += 1 + l + sovParams(uint64(l)) - } - } - if m.AllowValidatorSelfExit { - n += 2 - } - return n -} - func (m *StakingParams) Size() (n int) { if m == nil { return 0 @@ -454,108 +303,6 @@ func sovParams(x uint64) (n int) { func sozParams(x uint64) (n int) { return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Admins", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - 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 ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Admins = append(m.Admins, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowValidatorSelfExit", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowValidatorSelfExit = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *StakingParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/proto/strangelove_ventures/poa/module/v1/module.proto b/proto/strangelove_ventures/poa/module/v1/module.proto index 84733d4..f5a7a87 100644 --- a/proto/strangelove_ventures/poa/module/v1/module.proto +++ b/proto/strangelove_ventures/poa/module/v1/module.proto @@ -11,7 +11,7 @@ message Module { go_import : "github.com/strangelove-ventures/poa" }; - // admins defines the custom module admins. + // authority defines the custom module authority. // if not set, defaults to the governance module. - repeated string admins = 1; + string authority = 1; } \ No newline at end of file diff --git a/proto/strangelove_ventures/poa/v1/genesis.proto b/proto/strangelove_ventures/poa/v1/genesis.proto index 81912f5..b826242 100644 --- a/proto/strangelove_ventures/poa/v1/genesis.proto +++ b/proto/strangelove_ventures/poa/v1/genesis.proto @@ -12,7 +12,10 @@ option go_package = "github.com/strangelove-ventures/poa"; // GenesisState defines the poa module's genesis state. message GenesisState { // Params defines all the parameters of the module. - Params params = 1 [ (gogoproto.nullable) = false ]; + // Params params = 1 [ (gogoproto.nullable) = false ]; + + + repeated Validator vals = 2 [ (gogoproto.nullable) = false ]; } // PowerCache is a cached block or absolute change in power for ibc-go validations. diff --git a/proto/strangelove_ventures/poa/v1/params.proto b/proto/strangelove_ventures/poa/v1/params.proto index da49019..538fbd4 100644 --- a/proto/strangelove_ventures/poa/v1/params.proto +++ b/proto/strangelove_ventures/poa/v1/params.proto @@ -9,17 +9,18 @@ import "cosmos_proto/cosmos.proto"; option go_package = "github.com/strangelove-ventures/poa"; // Params defines the parameters for the module. -message Params { - option (amino.name) = "poa/params"; - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; +// message Params { +// option (amino.name) = "poa/params"; +// option (gogoproto.equal) = true; +// option (gogoproto.goproto_stringer) = false; - // Array of addresses that are allowed to control the chains validators power. - repeated string admins = 1; +// // Array of addresses that are allowed to control the chains validators power. +// // deprecated: set with the authority in the keeper instead. This is just here for store compatibility. +// repeated string admins = 1; - // allow_validator_self_exit allows for a valdiator to remove themselves from the validator set. - bool allow_validator_self_exit = 2; -} +// // allow_validator_self_exit allows for a valdiator to remove themselves from the validator set. +// bool allow_validator_self_exit = 2; +// } // StakingParams defines the parameters for the x/staking module. message StakingParams { diff --git a/proto/strangelove_ventures/poa/v1/query.proto b/proto/strangelove_ventures/poa/v1/query.proto index efab7ab..50bff4c 100644 --- a/proto/strangelove_ventures/poa/v1/query.proto +++ b/proto/strangelove_ventures/poa/v1/query.proto @@ -10,10 +10,6 @@ option go_package = "github.com/strangelove-ventures/poa"; // Query defines the gRPC querier service. service Query { - // Params returns the current params of the module. - rpc Params(QueryParamsRequest) returns (ParamsResponse) { - option (google.api.http).get = "/poa/v1/params"; - } // PendingValidators returns currently pending validators of the module. rpc PendingValidators(QueryPendingValidatorsRequest) returns (PendingValidatorsResponse) { @@ -26,15 +22,6 @@ service Query { } } -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message ParamsResponse { - // params is the returned parameter from the module - Params params = 1 [ (gogoproto.nullable) = false ]; -} - // QueryPendingValidatorsRequest is the request type for the Query/PendingValidators RPC method. message QueryPendingValidatorsRequest {} diff --git a/proto/strangelove_ventures/poa/v1/tx.proto b/proto/strangelove_ventures/poa/v1/tx.proto index 61dc145..d16e1c5 100644 --- a/proto/strangelove_ventures/poa/v1/tx.proto +++ b/proto/strangelove_ventures/poa/v1/tx.proto @@ -28,9 +28,6 @@ service Msg { // RemovePending removes a pending validator from the queue. rpc RemovePending(MsgRemovePending) returns (MsgRemovePendingResponse); - // UpdateParams updates the module parameters. - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - // UpdateStakingParams updates the module parameters. rpc UpdateStakingParams(MsgUpdateStakingParams) returns (MsgUpdateStakingParamsResponse); } @@ -85,23 +82,6 @@ message MsgRemovePending { // MsgRemovePendingResponse is the response type for the Msg/RemovePending RPC method. message MsgRemovePendingResponse {} -// MsgUpdateParams is the Msg/UpdateParams request type. -message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "sender"; - option (amino.name) = "poa/MsgUpdateParams"; - - // sender is the address of the admin account with permission to update. - // ex: governance, multisig/DAO, or standard account found in Params. - string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - - // module parameters (all must be supplied). - Params params = 2 [ (gogoproto.nullable) = false ]; -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -message MsgUpdateParamsResponse {} - // MsgUpdateStakingParams is the Msg/UpdateStakingParams request type. message MsgUpdateStakingParams { option (cosmos.msg.v1.signer) = "sender"; diff --git a/query.pb.go b/query.pb.go index a194f5d..3b519ab 100644 --- a/query.pb.go +++ b/query.pb.go @@ -29,89 +29,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { -} - -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_676fcce3868e4c52, []int{0} -} -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) -} -func (m *QueryParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo - -// QueryParamsResponse is the response type for the Query/Params RPC method. -type ParamsResponse struct { - // params is the returned parameter from the module - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *ParamsResponse) Reset() { *m = ParamsResponse{} } -func (m *ParamsResponse) String() string { return proto.CompactTextString(m) } -func (*ParamsResponse) ProtoMessage() {} -func (*ParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_676fcce3868e4c52, []int{1} -} -func (m *ParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ParamsResponse.Merge(m, src) -} -func (m *ParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *ParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ParamsResponse proto.InternalMessageInfo - -func (m *ParamsResponse) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - // QueryPendingValidatorsRequest is the request type for the Query/PendingValidators RPC method. type QueryPendingValidatorsRequest struct { } @@ -120,7 +37,7 @@ func (m *QueryPendingValidatorsRequest) Reset() { *m = QueryPendingValid func (m *QueryPendingValidatorsRequest) String() string { return proto.CompactTextString(m) } func (*QueryPendingValidatorsRequest) ProtoMessage() {} func (*QueryPendingValidatorsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_676fcce3868e4c52, []int{2} + return fileDescriptor_676fcce3868e4c52, []int{0} } func (m *QueryPendingValidatorsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -159,7 +76,7 @@ func (m *PendingValidatorsResponse) Reset() { *m = PendingValidatorsResp func (m *PendingValidatorsResponse) String() string { return proto.CompactTextString(m) } func (*PendingValidatorsResponse) ProtoMessage() {} func (*PendingValidatorsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_676fcce3868e4c52, []int{3} + return fileDescriptor_676fcce3868e4c52, []int{1} } func (m *PendingValidatorsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -205,7 +122,7 @@ func (m *QueryConsensusPowerRequest) Reset() { *m = QueryConsensusPowerR func (m *QueryConsensusPowerRequest) String() string { return proto.CompactTextString(m) } func (*QueryConsensusPowerRequest) ProtoMessage() {} func (*QueryConsensusPowerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_676fcce3868e4c52, []int{4} + return fileDescriptor_676fcce3868e4c52, []int{2} } func (m *QueryConsensusPowerRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -251,7 +168,7 @@ func (m *QueryConsensusPowerResponse) Reset() { *m = QueryConsensusPower func (m *QueryConsensusPowerResponse) String() string { return proto.CompactTextString(m) } func (*QueryConsensusPowerResponse) ProtoMessage() {} func (*QueryConsensusPowerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_676fcce3868e4c52, []int{5} + return fileDescriptor_676fcce3868e4c52, []int{3} } func (m *QueryConsensusPowerResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -288,8 +205,6 @@ func (m *QueryConsensusPowerResponse) GetConsensusPower() int64 { } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "strangelove_ventures.poa.v1.QueryParamsRequest") - proto.RegisterType((*ParamsResponse)(nil), "strangelove_ventures.poa.v1.ParamsResponse") proto.RegisterType((*QueryPendingValidatorsRequest)(nil), "strangelove_ventures.poa.v1.QueryPendingValidatorsRequest") proto.RegisterType((*PendingValidatorsResponse)(nil), "strangelove_ventures.poa.v1.PendingValidatorsResponse") proto.RegisterType((*QueryConsensusPowerRequest)(nil), "strangelove_ventures.poa.v1.QueryConsensusPowerRequest") @@ -301,37 +216,33 @@ func init() { } var fileDescriptor_676fcce3868e4c52 = []byte{ - // 475 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0xc1, 0x6a, 0x14, 0x31, - 0x18, 0xc7, 0x37, 0xae, 0xae, 0x98, 0xc2, 0xda, 0x86, 0xa2, 0xed, 0xb4, 0xce, 0x96, 0x14, 0xec, - 0xc2, 0xe2, 0x84, 0xae, 0xa0, 0x22, 0x78, 0x68, 0x85, 0x82, 0xb7, 0xba, 0x82, 0x07, 0x2f, 0x4b, - 0x3a, 0x13, 0xc6, 0x81, 0x6d, 0x92, 0x26, 0x99, 0x11, 0x2f, 0x1e, 0x7c, 0x02, 0xc1, 0x57, 0xf0, - 0xe6, 0x8b, 0xf4, 0x58, 0xf0, 0xe2, 0x41, 0x44, 0x76, 0x7d, 0x10, 0x99, 0x64, 0x66, 0xec, 0xda, - 0xe9, 0xb8, 0xbd, 0x0d, 0xf9, 0xbe, 0xff, 0xff, 0xfb, 0xe5, 0xfb, 0x4f, 0xe0, 0x8e, 0x36, 0x8a, - 0xf2, 0x98, 0x4d, 0x44, 0xc6, 0xc6, 0x19, 0xe3, 0x26, 0x55, 0x4c, 0x13, 0x29, 0x28, 0xc9, 0x76, - 0xc9, 0x49, 0xca, 0xd4, 0xfb, 0x40, 0x2a, 0x61, 0x04, 0xda, 0xa8, 0x6b, 0x0c, 0xa4, 0xa0, 0x41, - 0xb6, 0xeb, 0xad, 0xc6, 0x22, 0x16, 0xb6, 0x8f, 0xe4, 0x5f, 0x4e, 0xe2, 0x6d, 0xc6, 0x42, 0xc4, - 0x13, 0x46, 0xa8, 0x4c, 0x08, 0xe5, 0x5c, 0x18, 0x6a, 0x12, 0xc1, 0x75, 0x51, 0xed, 0x37, 0x4d, - 0x96, 0x54, 0xd1, 0xe3, 0xb2, 0x73, 0xd0, 0xd4, 0x99, 0xd1, 0x49, 0x12, 0x51, 0x23, 0x94, 0x6b, - 0xc6, 0xab, 0x10, 0xbd, 0xcc, 0xb1, 0x0f, 0xad, 0xc3, 0x88, 0x9d, 0xa4, 0x4c, 0x1b, 0xfc, 0x0a, - 0x76, 0xcb, 0x03, 0x2d, 0x05, 0xd7, 0x0c, 0xed, 0xc1, 0x8e, 0x1b, 0xb2, 0x06, 0xb6, 0x40, 0x7f, - 0x69, 0xb8, 0x1d, 0x34, 0x5c, 0x30, 0x70, 0xe2, 0xfd, 0xeb, 0xa7, 0x3f, 0x7b, 0xad, 0x51, 0x21, - 0xc4, 0x3d, 0x78, 0xcf, 0x8d, 0x62, 0x3c, 0x4a, 0x78, 0xfc, 0xba, 0x24, 0xa9, 0xa6, 0x86, 0x70, - 0xbd, 0xa6, 0x56, 0x00, 0x1c, 0xc0, 0x9b, 0xd2, 0x15, 0xd7, 0xc0, 0x56, 0xbb, 0xbf, 0x34, 0xbc, - 0xdf, 0x48, 0x50, 0x39, 0x14, 0x10, 0xa5, 0x18, 0xbf, 0x80, 0x9e, 0xa5, 0x78, 0x9e, 0xbb, 0x72, - 0x9d, 0xea, 0x43, 0xf1, 0x8e, 0xa9, 0x02, 0x01, 0x0d, 0xe0, 0x4a, 0xb5, 0xa1, 0x31, 0x8d, 0x22, - 0xc5, 0xb4, 0xbb, 0xf1, 0xad, 0xd1, 0x72, 0x55, 0xd8, 0x73, 0xe7, 0xf8, 0x00, 0x6e, 0xd4, 0x5a, - 0x15, 0xc4, 0x3b, 0xf0, 0x76, 0x58, 0x56, 0xc6, 0x32, 0x2f, 0x59, 0xa7, 0xf6, 0xa8, 0x1b, 0xce, - 0x09, 0x86, 0x3f, 0xda, 0xf0, 0x86, 0x35, 0x42, 0x1f, 0x60, 0xc7, 0xad, 0x0e, 0x91, 0xc6, 0xdb, - 0x5d, 0x8c, 0xcc, 0x1b, 0x2c, 0x10, 0x48, 0x89, 0x86, 0xef, 0x7c, 0xfc, 0xf6, 0xfb, 0xf3, 0xb5, - 0x65, 0xd4, 0x9d, 0xff, 0x81, 0xd0, 0x57, 0x00, 0x57, 0x2e, 0x44, 0x80, 0x9e, 0x2e, 0xc0, 0x72, - 0x49, 0xa6, 0xde, 0xa3, 0x66, 0xac, 0xcb, 0xe2, 0xc6, 0xd8, 0x12, 0x6e, 0x22, 0xaf, 0x22, 0x74, - 0xad, 0xe3, 0xec, 0x2f, 0xd7, 0x17, 0x00, 0xbb, 0xf3, 0xbb, 0x47, 0x8f, 0xff, 0x8f, 0x5a, 0x1b, - 0xbc, 0xf7, 0xe4, 0xea, 0xc2, 0x82, 0xb4, 0x67, 0x49, 0xd7, 0xd1, 0xdd, 0x92, 0xf4, 0x9f, 0xd0, - 0xf7, 0x9f, 0x9d, 0x4e, 0x7d, 0x70, 0x36, 0xf5, 0xc1, 0xaf, 0xa9, 0x0f, 0x3e, 0xcd, 0xfc, 0xd6, - 0xd9, 0xcc, 0x6f, 0x7d, 0x9f, 0xf9, 0xad, 0x37, 0xdb, 0x71, 0x62, 0xde, 0xa6, 0x47, 0x41, 0x28, - 0x8e, 0xc9, 0xb9, 0xf1, 0x0f, 0xce, 0x3f, 0xda, 0xa3, 0x8e, 0x7d, 0xa8, 0x0f, 0xff, 0x04, 0x00, - 0x00, 0xff, 0xff, 0xf3, 0x3e, 0x02, 0x49, 0x7b, 0x04, 0x00, 0x00, + // 411 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x4f, 0xeb, 0xd3, 0x30, + 0x1c, 0xc6, 0x9b, 0xcd, 0x3f, 0x18, 0x61, 0xba, 0x20, 0xb8, 0x75, 0xb3, 0x1b, 0x15, 0xdc, 0x60, + 0xd8, 0xb2, 0x09, 0x2a, 0x82, 0x07, 0x27, 0x0c, 0xbc, 0xcd, 0x1e, 0x3c, 0x78, 0x29, 0x59, 0x1b, + 0x6a, 0x61, 0x4b, 0xb2, 0x24, 0xad, 0x78, 0xf5, 0x15, 0x08, 0xbe, 0x05, 0x6f, 0xbe, 0x91, 0x1d, + 0x07, 0x5e, 0x3c, 0x88, 0xc8, 0xe6, 0x0b, 0x91, 0xfe, 0x75, 0xd3, 0x5a, 0xf9, 0xdd, 0x4a, 0x9f, + 0xe7, 0xfb, 0xe4, 0xf3, 0x7d, 0x12, 0x38, 0x92, 0x4a, 0x60, 0x1a, 0x90, 0x35, 0x8b, 0x89, 0x1b, + 0x13, 0xaa, 0x22, 0x41, 0xa4, 0xcd, 0x19, 0xb6, 0xe3, 0xa9, 0xbd, 0x8d, 0x88, 0x78, 0x67, 0x71, + 0xc1, 0x14, 0x43, 0xbd, 0x2a, 0xa3, 0xc5, 0x19, 0xb6, 0xe2, 0xa9, 0x7e, 0x2b, 0x60, 0x01, 0x4b, + 0x7d, 0x76, 0xf2, 0x95, 0x8d, 0xe8, 0xfd, 0x80, 0xb1, 0x60, 0x4d, 0x6c, 0xcc, 0x43, 0x1b, 0x53, + 0xca, 0x14, 0x56, 0x21, 0xa3, 0x32, 0x57, 0xc7, 0x75, 0x27, 0x73, 0x2c, 0xf0, 0xa6, 0x70, 0x4e, + 0xea, 0x9c, 0x31, 0x5e, 0x87, 0x3e, 0x56, 0x4c, 0x64, 0x66, 0x73, 0x00, 0xef, 0xbc, 0x4c, 0xb0, + 0x97, 0x84, 0xfa, 0x21, 0x0d, 0x5e, 0x15, 0xb2, 0x74, 0xc8, 0x36, 0x22, 0x52, 0x99, 0x1e, 0xec, + 0x56, 0x68, 0x92, 0x33, 0x2a, 0x09, 0x5a, 0xc0, 0xab, 0x3c, 0x13, 0x3b, 0x60, 0xd8, 0x1c, 0x5f, + 0x9f, 0xdd, 0xb3, 0x6a, 0xf6, 0xb6, 0xca, 0x84, 0xf9, 0xa5, 0xdd, 0xf7, 0x81, 0xe6, 0x14, 0xc3, + 0xe6, 0x0b, 0xa8, 0xa7, 0x14, 0xcf, 0x93, 0x54, 0x2a, 0x23, 0xb9, 0x64, 0x6f, 0x89, 0xc8, 0x11, + 0xd0, 0x04, 0xb6, 0x4b, 0x6c, 0x17, 0xfb, 0xbe, 0x20, 0x52, 0x76, 0xc0, 0x10, 0x8c, 0xaf, 0x39, + 0x37, 0x4b, 0xe1, 0x59, 0xf6, 0xdf, 0x5c, 0xc0, 0x5e, 0x65, 0x54, 0x4e, 0x3c, 0x82, 0x37, 0xbc, + 0x42, 0x71, 0x79, 0x22, 0xa5, 0x49, 0x4d, 0xa7, 0xe5, 0x9d, 0x0d, 0xcc, 0xbe, 0x35, 0xe0, 0xe5, + 0x34, 0x08, 0x7d, 0x06, 0xb0, 0xfd, 0x57, 0x05, 0xe8, 0x49, 0xed, 0xa6, 0xb5, 0x9d, 0xea, 0x0f, + 0x6b, 0x67, 0xff, 0x59, 0xb7, 0x69, 0xbe, 0xff, 0xf2, 0xf3, 0x63, 0xa3, 0x8f, 0xf4, 0xf2, 0xde, + 0x33, 0xab, 0x1b, 0xff, 0xe6, 0xfa, 0x04, 0x60, 0xeb, 0x7c, 0x77, 0xf4, 0xe8, 0xff, 0xa8, 0x95, + 0xc5, 0xeb, 0x8f, 0x2f, 0x3e, 0x98, 0x93, 0x0e, 0x52, 0xd2, 0x2e, 0xba, 0x5d, 0x90, 0xfe, 0x51, + 0xfa, 0xfc, 0xe9, 0xee, 0x60, 0x80, 0xfd, 0xc1, 0x00, 0x3f, 0x0e, 0x06, 0xf8, 0x70, 0x34, 0xb4, + 0xfd, 0xd1, 0xd0, 0xbe, 0x1e, 0x0d, 0xed, 0xf5, 0xdd, 0x20, 0x54, 0x6f, 0xa2, 0x95, 0xe5, 0xb1, + 0x8d, 0x7d, 0x72, 0xfc, 0xfd, 0xd3, 0x97, 0xbc, 0xba, 0x92, 0xbe, 0xde, 0x07, 0xbf, 0x02, 0x00, + 0x00, 0xff, 0xff, 0x2c, 0xb8, 0x2b, 0x91, 0x90, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -346,8 +257,6 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Params returns the current params of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) // PendingValidators returns currently pending validators of the module. PendingValidators(ctx context.Context, in *QueryPendingValidatorsRequest, opts ...grpc.CallOption) (*PendingValidatorsResponse, error) // ConsensusPower returns the current consensus power of a validator. @@ -362,15 +271,6 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) { - out := new(ParamsResponse) - err := c.cc.Invoke(ctx, "/strangelove_ventures.poa.v1.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) PendingValidators(ctx context.Context, in *QueryPendingValidatorsRequest, opts ...grpc.CallOption) (*PendingValidatorsResponse, error) { out := new(PendingValidatorsResponse) err := c.cc.Invoke(ctx, "/strangelove_ventures.poa.v1.Query/PendingValidators", in, out, opts...) @@ -391,8 +291,6 @@ func (c *queryClient) ConsensusPower(ctx context.Context, in *QueryConsensusPowe // QueryServer is the server API for Query service. type QueryServer interface { - // Params returns the current params of the module. - Params(context.Context, *QueryParamsRequest) (*ParamsResponse, error) // PendingValidators returns currently pending validators of the module. PendingValidators(context.Context, *QueryPendingValidatorsRequest) (*PendingValidatorsResponse, error) // ConsensusPower returns the current consensus power of a validator. @@ -403,9 +301,6 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*ParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} func (*UnimplementedQueryServer) PendingValidators(ctx context.Context, req *QueryPendingValidatorsRequest) (*PendingValidatorsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PendingValidators not implemented") } @@ -417,24 +312,6 @@ func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/strangelove_ventures.poa.v1.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_PendingValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPendingValidatorsRequest) if err := dec(in); err != nil { @@ -475,10 +352,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "strangelove_ventures.poa.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, { MethodName: "PendingValidators", Handler: _Query_PendingValidators_Handler, @@ -492,62 +365,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Metadata: "strangelove_ventures/poa/v1/query.proto", } -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - func (m *QueryPendingValidatorsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -677,26 +494,6 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - func (m *QueryPendingValidatorsRequest) Size() (n int) { if m == nil { return 0 @@ -752,139 +549,6 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryPendingValidatorsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/query.pb.gw.go b/query.pb.gw.go index 90bc18b..de123ed 100644 --- a/query.pb.gw.go +++ b/query.pb.gw.go @@ -33,24 +33,6 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - func request_Query_PendingValidators_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPendingValidatorsRequest var metadata runtime.ServerMetadata @@ -111,29 +93,6 @@ func local_request_Query_ConsensusPower_0(ctx context.Context, marshaler runtime // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_PendingValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -221,26 +180,6 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_PendingValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -285,16 +224,12 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"poa", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_PendingValidators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"poa", "v1", "pending_validators"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_ConsensusPower_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"poa", "v1", "consensus_power"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( - forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_PendingValidators_0 = runtime.ForwardResponseMessage forward_Query_ConsensusPower_0 = runtime.ForwardResponseMessage diff --git a/simapp/app.go b/simapp/app.go index 0e1e0fc..5be830a 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -323,6 +323,7 @@ func NewSimApp( app.SlashingKeeper, app.BankKeeper, logger, + govModAddress, ) app.POAKeeper.SetTestAccountKeeper(app.AccountKeeper) diff --git a/simapp/test_node.sh b/simapp/test_node.sh index 0e4e66f..6b026f6 100644 --- a/simapp/test_node.sh +++ b/simapp/test_node.sh @@ -128,10 +128,6 @@ from_scratch () { # crisis update_test_genesis '.app_state["crisis"]["constant_fee"]={"denom": "stake","amount": "1000"}' - # x/POA - # allows gov & acc1 to perform actions on POA. - update_test_genesis '.app_state["poa"]["params"]["admins"]=["cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn","cosmos1hj5fveer5cjtn4wd6wstzugjfdxzl0xpxvjjvr"]' - # Allocate genesis accounts # stake should ONLY be as much as they gentx with. No more. BINARY genesis add-genesis-account $KEY 1000000000000stake,1000utest --keyring-backend $KEYRING diff --git a/simulation/genesis.go b/simulation/genesis.go index 2fe1fc4..fd0e1ab 100644 --- a/simulation/genesis.go +++ b/simulation/genesis.go @@ -3,58 +3,21 @@ package simulation import ( "encoding/json" "fmt" - "math/rand" - "sort" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/types/simulation" "github.com/strangelove-ventures/poa" ) -const ( - admins = "admins" - allowValSelfExit = "allow_validator_self_exit" -) - func RandomizedGenState(simState *module.SimulationState) { - var ( - adm []string - allowSelfExit bool - ) - - simState.AppParams.GetOrGenerate(admins, &adm, simState.Rand, func(r *rand.Rand) { - // Select a random number of admins from the simState accounts - adminSet := make(map[string]bool) - numAdmins := simulation.RandIntBetween(r, 1, len(simState.Accounts)) - for i := 0; i < numAdmins; i++ { - acc, _ := simulation.RandomAcc(r, simState.Accounts) - adminSet[acc.Address.String()] = true - } - - // Iteration order on map is non-deterministic - for k := range adminSet { - adm = append(adm, k) - } - - // Sort the admin list for determinism - sort.Strings(adm) - }) - - // Allow validator self exit is enabled 50% of the time - simState.AppParams.GetOrGenerate(allowValSelfExit, &allowSelfExit, simState.Rand, func(r *rand.Rand) { allowSelfExit = r.Intn(2) == 1 }) - poaGenesis := poa.GenesisState{ - Params: poa.Params{ - Admins: adm, - AllowValidatorSelfExit: allowSelfExit, - }, + Vals: []poa.Validator{}, } - bz, err := json.MarshalIndent(&poaGenesis.Params, "", " ") + bz, err := json.MarshalIndent(&poaGenesis, "", " ") if err != nil { panic(err) } - fmt.Printf("Selected randomly generated poa parameters:\n%s\n", bz) // nolint: forbidigo + fmt.Printf("Selected randomly generated poa genesis :\n%s\n", bz) // nolint: forbidigo simState.GenState[poa.ModuleName] = simState.Cdc.MustMarshalJSON(&poaGenesis) } diff --git a/simulation/operations.go b/simulation/operations.go index 418158b..552fb68 100644 --- a/simulation/operations.go +++ b/simulation/operations.go @@ -3,6 +3,7 @@ package simulation import ( "math" "math/rand" + "os" "sort" "github.com/pkg/errors" @@ -25,7 +26,6 @@ const ( OpWeightMsgPOASetPower = "op_weight_msg_poa_set_power" // nolint: gosec OpWeightMsgPOARemoveValidator = "op_weight_msg_poa_remove_validator" // nolint: gosec OpWeightMsgPOARemovePendingValidator = "op_weight_msg_poa_remove_pending_validator" // nolint: gosec - OpWeightMsgPOAUpdateParams = "op_weight_msg_poa_update_params" // nolint: gosec OpWeightMsgPOACreateValidator = "op_weight_msg_poa_create_validator" // nolint: gosec ) @@ -35,7 +35,6 @@ var ( OpWeightMsgPOASetPower: 100, OpWeightMsgPOARemoveValidator: 20, OpWeightMsgPOARemovePendingValidator: 100, - OpWeightMsgPOAUpdateParams: 85, OpWeightMsgPOACreateValidator: 100, } ) @@ -47,6 +46,8 @@ func WeightedOperations(appParams simtypes.AppParams, k keeper.Keeper) []simtypes.WeightedOperation { operations := make([]simtypes.WeightedOperation, 0) + os.Setenv("POA_BYPASS_ADMIN_CHECK_FOR_SIMULATION_TESTING_ONLY", "not_for-production") + // Iterating over a map is non-deterministic in Go. To simulate determinism, we sort the keys in a slice and iterate over them. keys := make([]string, 0, len(weights)) for k := range weights { @@ -72,8 +73,6 @@ func getWeightedOperation(op string, weight int, txGen client.TxConfig, k keeper return simulation.NewWeightedOperation(weight, SimulateMsgRemoveValidator(txGen, k)) case OpWeightMsgPOARemovePendingValidator: return simulation.NewWeightedOperation(weight, SimulateMsgRemovePendingValidator(txGen, k)) - case OpWeightMsgPOAUpdateParams: - return simulation.NewWeightedOperation(weight, SimulateMsgUpdateParams(txGen, k)) case OpWeightMsgPOACreateValidator: return simulation.NewWeightedOperation(weight, SimulateMsgCreateValidator(txGen, k)) default: @@ -112,7 +111,7 @@ func SimulateMsgCreateValidator(txGen client.TxConfig, k keeper.Keeper) simtypes // Generate a random self-delegation amount between 1 and balance amount := sdkmath.NewInt(r.Int63n(balance.Amount.Int64()-1) + 1) - if err != nil { + if amount.IsNegative() { return simtypes.NoOpMsg(poatypes.ModuleName, msgType, "unable to generate positive amount"), nil, err } @@ -125,44 +124,7 @@ func SimulateMsgCreateValidator(txGen client.TxConfig, k keeper.Keeper) simtypes return simtypes.NoOpMsg(poatypes.ModuleName, msgType, errors.WithMessage(err, "unable to create MsgCreateValidator").Error()), nil, err } - return genAndDeliverTxWithRandFees(r, app, ctx, txGen, simAccount, msg, k) - } -} - -func SimulateMsgUpdateParams(txGen client.TxConfig, k keeper.Keeper) simtypes.Operation { - return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, - ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - msgType := sdk.MsgTypeURL(&poatypes.MsgUpdateParams{}) - - params, err := k.GetParams(ctx) - if err != nil { - return simtypes.NoOpMsg(poatypes.ModuleName, msgType, "unable to get params"), nil, err - } - - admins := params.GetAdmins() - if len(admins) < 2 { - return simtypes.NoOpMsg(poatypes.ModuleName, msgType, "not enough admins found"), nil, nil - } - - // Remove a random admin from the list - idx := r.Intn(len(admins)) - admins[idx] = admins[len(admins)-1] - admins = admins[:len(admins)-1] - - adminAcc, err := selectRandomPOAAccount(r, admins, accs) - if err != nil { - return simtypes.NoOpMsg(poatypes.ModuleName, msgType, err.Error()), nil, err - } - - msg := poatypes.MsgUpdateParams{ - Sender: adminAcc.Address.String(), - Params: poatypes.Params{ - Admins: admins, - AllowValidatorSelfExit: r.Intn(2) == 1, - }, - } - - return genAndDeliverTxWithRandFees(r, app, ctx, txGen, adminAcc, &msg, k) + return genAndDeliverTxWithNoFees(r, app, ctx, txGen, simAccount, msg, k) } } @@ -182,17 +144,15 @@ func SimulateMsgRemovePendingValidator(txGen client.TxConfig, k keeper.Keeper) s // Pick a random pending validator address valAddr := pending.Validators[r.Intn(len(pending.Validators))].OperatorAddress - adminAcc, err := selectRandomPOAAccount(r, k.GetAdmins(ctx), accs) - if err != nil { - return simtypes.NoOpMsg(poatypes.ModuleName, msgType, err.Error()), nil, err - } + admin := accs[0].Address.String() + k.SetTestAuthority(admin) msg := poatypes.MsgRemovePending{ - Sender: adminAcc.Address.String(), + Sender: admin, ValidatorAddress: valAddr, } - return genAndDeliverTxWithRandFees(r, app, ctx, txGen, adminAcc, &msg, k) + return genAndDeliverTxWithNoFees(r, app, ctx, txGen, accs[0], &msg, k) } } @@ -215,28 +175,28 @@ func SimulateMsgRemoveValidator(txGen client.TxConfig, k keeper.Keeper) simtypes // Select a random bonded validator to remove validator := validators[r.Intn(len(validators))] - adminAcc, err := selectRandomPOAAccount(r, k.GetAdmins(ctx), accs) - if err != nil { - return simtypes.NoOpMsg(poatypes.ModuleName, msgType, err.Error()), nil, err - } - power := validator.GetConsensusPower(k.GetStakingKeeper().PowerReduction(ctx)) if power == 0 { return simtypes.NoOpMsg(poatypes.ModuleName, msgType, "validator has no power"), nil, nil } + admin := accs[0].Address.String() + k.SetTestAuthority(admin) + msg := poatypes.MsgRemoveValidator{ - Sender: adminAcc.Address.String(), + Sender: admin, ValidatorAddress: validator.OperatorAddress, } - return genAndDeliverTxWithRandFees(r, app, ctx, txGen, adminAcc, &msg, k) + return genAndDeliverTxWithNoFees(r, app, ctx, txGen, accs[0], &msg, k) } } func SimulateMsgSetPower(txGen client.TxConfig, k keeper.Keeper) simtypes.Operation { return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + k.SetTestAuthority(accs[0].Address.String()) + msgType := sdk.MsgTypeURL(&poatypes.MsgSetPower{}) validators, err := k.GetStakingKeeper().GetAllValidators(ctx) @@ -259,20 +219,18 @@ func SimulateMsgSetPower(txGen client.TxConfig, k keeper.Keeper) simtypes.Operat return simtypes.NoOpMsg(poatypes.ModuleName, msgType, errStr), nil, nil } - adminAcc, err := selectRandomPOAAccount(r, k.GetAdmins(ctx), accs) - if err != nil { - return simtypes.NoOpMsg(poatypes.ModuleName, msgType, err.Error()), nil, err - } + admin := accs[0].Address.String() + k.SetTestAuthority(admin) // Generate random transaction fees msg := poatypes.MsgSetPower{ - Sender: adminAcc.Address.String(), + Sender: admin, ValidatorAddress: validator.OperatorAddress, Power: newPower, Unsafe: false, // We only cover the case where the power is <= 30% of the total power } - return genAndDeliverTxWithRandFees(r, app, ctx, txGen, adminAcc, &msg, k) + return genAndDeliverTxWithNoFees(r, app, ctx, txGen, accs[0], &msg, k) } } @@ -338,31 +296,6 @@ func getNewPower(r *rand.Rand, k keeper.Keeper, ctx sdk.Context, validator staki return newPowerTokens.Uint64(), "", false } -func selectRandomPOAAccount(r *rand.Rand, admins []string, accs []simtypes.Account) (simtypes.Account, error) { - randomAdminAddr, err := getRandomPOAAdmin(r, admins) - if err != nil { - return simtypes.Account{}, err - } - - acc, found := simtypes.FindAccount(accs, sdk.MustAccAddressFromBech32(randomAdminAddr)) - if !found { - return simtypes.Account{}, errors.New("admin not found in simulator accounts") - } - - return acc, nil -} - -func getRandomPOAAdmin(r *rand.Rand, admins []string) (string, error) { - if len(admins) == 0 { - return "", errors.New("no admins found") - } - - idx := r.Intn(len(admins)) - admin := admins[idx] - - return admin, nil -} - func generateRandomDescription(r *rand.Rand) poatypes.Description { return poatypes.Description{ Moniker: simtypes.RandStringOfLength(r, 10), @@ -404,6 +337,6 @@ func newOperationInput(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, txGe } } -func genAndDeliverTxWithRandFees(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, txGen client.TxConfig, simAccount simtypes.Account, msg sdk.Msg, k keeper.Keeper) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { - return simulation.GenAndDeliverTxWithRandFees(newOperationInput(r, app, ctx, txGen, simAccount, msg, k)) +func genAndDeliverTxWithNoFees(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, txGen client.TxConfig, simAccount simtypes.Account, msg sdk.Msg, k keeper.Keeper) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + return simulation.GenAndDeliverTx(newOperationInput(r, app, ctx, txGen, simAccount, msg, k), sdk.NewCoins()) } diff --git a/tx.pb.go b/tx.pb.go index 05b7a04..f3b1b8b 100644 --- a/tx.pb.go +++ b/tx.pb.go @@ -264,100 +264,6 @@ func (m *MsgRemovePendingResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRemovePendingResponse proto.InternalMessageInfo -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { - // sender is the address of the admin account with permission to update. - // ex: governance, multisig/DAO, or standard account found in Params. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // module parameters (all must be supplied). - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` -} - -func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } -func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParams) ProtoMessage() {} -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_9035304c91ee78c4, []int{6} -} -func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParams.Merge(m, src) -} -func (m *MsgUpdateParams) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo - -func (m *MsgUpdateParams) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *MsgUpdateParams) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -type MsgUpdateParamsResponse struct { -} - -func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } -func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParamsResponse) ProtoMessage() {} -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9035304c91ee78c4, []int{7} -} -func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) -} -func (m *MsgUpdateParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo - // MsgUpdateStakingParams is the Msg/UpdateStakingParams request type. type MsgUpdateStakingParams struct { // sender is the address of the admin account with permission to update. @@ -371,7 +277,7 @@ func (m *MsgUpdateStakingParams) Reset() { *m = MsgUpdateStakingParams{} func (m *MsgUpdateStakingParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateStakingParams) ProtoMessage() {} func (*MsgUpdateStakingParams) Descriptor() ([]byte, []int) { - return fileDescriptor_9035304c91ee78c4, []int{8} + return fileDescriptor_9035304c91ee78c4, []int{6} } func (m *MsgUpdateStakingParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -423,7 +329,7 @@ func (m *MsgUpdateStakingParamsResponse) Reset() { *m = MsgUpdateStaking func (m *MsgUpdateStakingParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateStakingParamsResponse) ProtoMessage() {} func (*MsgUpdateStakingParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9035304c91ee78c4, []int{9} + return fileDescriptor_9035304c91ee78c4, []int{7} } func (m *MsgUpdateStakingParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -470,7 +376,7 @@ func (m *MsgCreateValidator) Reset() { *m = MsgCreateValidator{} } func (m *MsgCreateValidator) String() string { return proto.CompactTextString(m) } func (*MsgCreateValidator) ProtoMessage() {} func (*MsgCreateValidator) Descriptor() ([]byte, []int) { - return fileDescriptor_9035304c91ee78c4, []int{10} + return fileDescriptor_9035304c91ee78c4, []int{8} } func (m *MsgCreateValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -507,7 +413,7 @@ func (m *MsgCreateValidatorResponse) Reset() { *m = MsgCreateValidatorRe func (m *MsgCreateValidatorResponse) String() string { return proto.CompactTextString(m) } func (*MsgCreateValidatorResponse) ProtoMessage() {} func (*MsgCreateValidatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9035304c91ee78c4, []int{11} + return fileDescriptor_9035304c91ee78c4, []int{9} } func (m *MsgCreateValidatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -543,8 +449,6 @@ func init() { proto.RegisterType((*MsgRemoveValidatorResponse)(nil), "strangelove_ventures.poa.v1.MsgRemoveValidatorResponse") proto.RegisterType((*MsgRemovePending)(nil), "strangelove_ventures.poa.v1.MsgRemovePending") proto.RegisterType((*MsgRemovePendingResponse)(nil), "strangelove_ventures.poa.v1.MsgRemovePendingResponse") - proto.RegisterType((*MsgUpdateParams)(nil), "strangelove_ventures.poa.v1.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "strangelove_ventures.poa.v1.MsgUpdateParamsResponse") proto.RegisterType((*MsgUpdateStakingParams)(nil), "strangelove_ventures.poa.v1.MsgUpdateStakingParams") proto.RegisterType((*MsgUpdateStakingParamsResponse)(nil), "strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse") proto.RegisterType((*MsgCreateValidator)(nil), "strangelove_ventures.poa.v1.MsgCreateValidator") @@ -556,65 +460,62 @@ func init() { } var fileDescriptor_9035304c91ee78c4 = []byte{ - // 920 bytes of a gzipped FileDescriptorProto + // 868 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcf, 0x6f, 0xe3, 0x44, - 0x14, 0x8e, 0x69, 0x1a, 0xed, 0x4e, 0x41, 0x6d, 0xdd, 0x6c, 0xd7, 0x6b, 0xc0, 0x09, 0x29, 0x12, - 0x51, 0x68, 0xec, 0xa6, 0x0b, 0x42, 0x04, 0x71, 0x68, 0x76, 0xf9, 0xb1, 0x42, 0x41, 0x91, 0xa3, - 0x5d, 0x24, 0x2e, 0x61, 0x12, 0x4f, 0x66, 0xad, 0xc6, 0x33, 0x96, 0x67, 0x12, 0x88, 0xf6, 0x82, - 0xb8, 0x80, 0x38, 0xf1, 0x27, 0xec, 0x11, 0x89, 0x4b, 0x0f, 0xbd, 0x70, 0x40, 0x42, 0x9c, 0x56, - 0x9c, 0x56, 0x3d, 0x21, 0x24, 0x56, 0xa8, 0x39, 0x94, 0x3f, 0x03, 0xd9, 0x1e, 0x7b, 0x1d, 0x37, - 0x3f, 0xda, 0x5e, 0xf6, 0x52, 0x75, 0xde, 0x7c, 0xef, 0x7b, 0xdf, 0xe7, 0x99, 0xf7, 0x26, 0xe0, - 0x4d, 0xc6, 0x3d, 0x48, 0x30, 0x1a, 0xd0, 0x11, 0xea, 0x8c, 0x10, 0xe1, 0x43, 0x0f, 0x31, 0xc3, - 0xa5, 0xd0, 0x18, 0xd5, 0x0c, 0xfe, 0x8d, 0xee, 0x7a, 0x94, 0x53, 0xf9, 0xd5, 0x59, 0x28, 0xdd, - 0xa5, 0x50, 0x1f, 0xd5, 0x54, 0xad, 0x47, 0x99, 0x43, 0x99, 0xd1, 0x85, 0x0c, 0x19, 0xa3, 0x5a, - 0x17, 0x71, 0x58, 0x33, 0x7a, 0xd4, 0x26, 0x61, 0xb2, 0xfa, 0xf6, 0xa2, 0x12, 0x23, 0x38, 0xb0, - 0x2d, 0xc8, 0xa9, 0x27, 0xc0, 0xe5, 0x45, 0x60, 0x17, 0x7a, 0xd0, 0x61, 0x02, 0x79, 0x2b, 0x2c, - 0xdb, 0x09, 0x56, 0x46, 0xb8, 0x88, 0xb6, 0x30, 0xa5, 0x78, 0x80, 0x8c, 0x60, 0xd5, 0x1d, 0xf6, - 0x0d, 0x48, 0xc6, 0x62, 0x2b, 0x8f, 0x29, 0xa6, 0x61, 0x8a, 0xff, 0x9f, 0x88, 0xde, 0x14, 0x16, - 0x1c, 0x86, 0xfd, 0x3a, 0x0e, 0xc3, 0x62, 0x63, 0x13, 0x3a, 0x36, 0xa1, 0x46, 0xf0, 0x37, 0x0c, - 0x95, 0xfe, 0x91, 0xc0, 0x5a, 0x93, 0xe1, 0x36, 0xe2, 0x2d, 0xfa, 0x35, 0xf2, 0xe4, 0x3d, 0x90, - 0x63, 0x88, 0x58, 0xc8, 0x53, 0xa4, 0xa2, 0x54, 0xbe, 0xde, 0x50, 0x4e, 0x8e, 0xab, 0x79, 0x21, - 0xe7, 0xc0, 0xb2, 0x3c, 0xc4, 0x58, 0x9b, 0x7b, 0x36, 0xc1, 0xa6, 0xc0, 0xc9, 0x1f, 0x81, 0xcd, - 0xd8, 0x76, 0x07, 0x86, 0x10, 0xe5, 0xa5, 0x25, 0xc9, 0x1b, 0x71, 0x8a, 0x88, 0xcb, 0x79, 0xb0, - 0xea, 0xfa, 0x0a, 0x94, 0x95, 0xa2, 0x54, 0xce, 0x9a, 0xe1, 0x42, 0xde, 0x06, 0xb9, 0x21, 0x61, - 0xb0, 0x8f, 0x94, 0x6c, 0x51, 0x2a, 0x5f, 0x33, 0xc5, 0xaa, 0xfe, 0xd6, 0x0f, 0x8f, 0x0b, 0x99, - 0xff, 0x1e, 0x17, 0x32, 0xdf, 0x9d, 0x1d, 0x55, 0x84, 0x92, 0x1f, 0xcf, 0x8e, 0x2a, 0xeb, 0xfe, - 0xb7, 0x4d, 0xf8, 0x29, 0xdd, 0x00, 0x5b, 0x89, 0xa5, 0x89, 0x98, 0x4b, 0x09, 0x43, 0xa5, 0xdf, - 0x24, 0x20, 0x37, 0x19, 0x36, 0x91, 0x43, 0x47, 0xe8, 0x41, 0xa4, 0xe5, 0x85, 0xb9, 0xaf, 0xeb, - 0x73, 0xfc, 0x6c, 0x0b, 0x3f, 0x29, 0xa1, 0xa5, 0xd7, 0x80, 0x7a, 0x3e, 0x1a, 0xbb, 0xfb, 0x55, - 0x02, 0x1b, 0xf1, 0x76, 0x0b, 0x11, 0xcb, 0x26, 0xf8, 0xc5, 0x79, 0xdb, 0x9d, 0xe3, 0x2d, 0x3f, - 0xe5, 0x4d, 0xc8, 0x2c, 0xa9, 0x40, 0x49, 0xc7, 0x62, 0x5f, 0xbf, 0x48, 0x60, 0xbd, 0xc9, 0xf0, - 0x7d, 0xd7, 0x82, 0x1c, 0xb5, 0x82, 0xf6, 0xb9, 0x82, 0xad, 0x03, 0x90, 0x0b, 0x5b, 0x2f, 0xf0, - 0xb2, 0xb6, 0xbf, 0xa3, 0x2f, 0x98, 0x07, 0x7a, 0x58, 0xa6, 0x91, 0x7d, 0xf2, 0xac, 0x90, 0x31, - 0x45, 0x62, 0x7d, 0x27, 0x65, 0x65, 0x4b, 0x58, 0x49, 0x2a, 0x2b, 0xdd, 0x02, 0x37, 0x53, 0xa1, - 0xd8, 0xc8, 0xef, 0x12, 0xd8, 0x8e, 0xf7, 0xda, 0x1c, 0x1e, 0xda, 0x04, 0x5f, 0xd9, 0xcf, 0xa7, - 0x29, 0x3f, 0x95, 0x85, 0x7e, 0xa6, 0xaa, 0xa5, 0x6c, 0x55, 0x52, 0xb6, 0xd4, 0x29, 0x5b, 0x53, - 0x99, 0xa5, 0x22, 0xd0, 0x66, 0xef, 0xc4, 0x26, 0xff, 0xc8, 0x06, 0x3d, 0x76, 0xc7, 0x43, 0x90, - 0x27, 0x7a, 0xec, 0x3e, 0x58, 0xb3, 0x10, 0xeb, 0x79, 0xb6, 0xcb, 0x6d, 0x4a, 0x02, 0x97, 0x6b, - 0xfb, 0xe5, 0x85, 0x9a, 0xef, 0x3e, 0xc7, 0x37, 0xae, 0xfb, 0x8a, 0x7f, 0x3e, 0x3b, 0xaa, 0x48, - 0x66, 0x92, 0x47, 0xfe, 0x02, 0x80, 0x1e, 0x75, 0x1c, 0x9b, 0x31, 0x9f, 0x35, 0xfc, 0x12, 0xbb, - 0x0b, 0x59, 0xef, 0xc4, 0x70, 0x13, 0x72, 0xc4, 0x92, 0xcc, 0x09, 0x2a, 0xf9, 0x2b, 0xb0, 0xe5, - 0xd8, 0xa4, 0xc3, 0xd0, 0xa0, 0xdf, 0xb1, 0xd0, 0x00, 0x61, 0x18, 0xe8, 0x5e, 0x09, 0x4e, 0x67, - 0xcf, 0xcf, 0xf9, 0xfb, 0x59, 0xe1, 0x46, 0x78, 0x42, 0xcc, 0x3a, 0xd4, 0x6d, 0x6a, 0x38, 0x90, - 0x3f, 0xd4, 0xef, 0x11, 0x7e, 0x72, 0x5c, 0x05, 0xe2, 0xe8, 0xee, 0x11, 0x1e, 0x52, 0x6f, 0x3a, - 0x36, 0x69, 0xa3, 0x41, 0xff, 0x6e, 0x4c, 0x25, 0x7f, 0x02, 0x36, 0x05, 0x71, 0xa2, 0xcf, 0xb2, - 0x01, 0xbf, 0x3a, 0xef, 0xf4, 0x15, 0xc9, 0xdc, 0x88, 0x93, 0xa2, 0x19, 0xfa, 0xf9, 0xac, 0x86, - 0x5d, 0x0d, 0x88, 0xde, 0x38, 0x39, 0xae, 0xbe, 0x2e, 0x88, 0x1e, 0xa4, 0x3a, 0x74, 0xee, 0x4c, - 0xfe, 0x18, 0xe4, 0xdc, 0x61, 0xf7, 0x10, 0x8d, 0x95, 0x5c, 0xf0, 0x3d, 0xf3, 0x7a, 0xf8, 0x14, - 0xe9, 0xd1, 0x53, 0xa4, 0x1f, 0x90, 0x71, 0x43, 0xf9, 0xf3, 0xb9, 0xc6, 0x9e, 0x37, 0x76, 0x39, - 0xd5, 0x5b, 0xc3, 0xee, 0x67, 0x68, 0x6c, 0x8a, 0xec, 0xfa, 0xfb, 0xc9, 0x09, 0x70, 0x5e, 0x62, - 0x72, 0xd0, 0xa5, 0x6e, 0x8b, 0x18, 0x74, 0xa9, 0x68, 0x74, 0xc5, 0xf6, 0x27, 0xab, 0x60, 0xa5, - 0xc9, 0xb0, 0xfc, 0x08, 0xac, 0xa7, 0xaf, 0x99, 0xb1, 0xf0, 0xec, 0xcf, 0x73, 0xaa, 0xef, 0x5d, - 0x32, 0x21, 0x12, 0x21, 0xf7, 0xc1, 0xb5, 0xf8, 0xf9, 0x2c, 0x2f, 0x23, 0x89, 0x90, 0xea, 0xde, - 0x45, 0x91, 0x71, 0x9d, 0x47, 0x60, 0x3d, 0xfd, 0x5e, 0x2d, 0x35, 0x99, 0x4a, 0x58, 0x6e, 0x72, - 0xce, 0x93, 0x22, 0x0f, 0xc1, 0x2b, 0xd3, 0xcf, 0x49, 0xf5, 0x62, 0x4c, 0x02, 0xae, 0xbe, 0x7b, - 0x29, 0x78, 0x5c, 0xd6, 0x03, 0x2f, 0x4f, 0x4d, 0xfb, 0xdd, 0x65, 0x34, 0x49, 0xb4, 0xfa, 0xce, - 0x65, 0xd0, 0x71, 0xcd, 0xef, 0x25, 0xb0, 0x35, 0x6b, 0x32, 0xdf, 0xbe, 0x18, 0xdb, 0x54, 0x92, - 0xfa, 0xc1, 0x15, 0x92, 0x22, 0x25, 0xea, 0xea, 0xb7, 0xfe, 0xc8, 0x68, 0x7c, 0xf8, 0xe4, 0x54, - 0x93, 0x9e, 0x9e, 0x6a, 0xd2, 0xbf, 0xa7, 0x9a, 0xf4, 0xd3, 0x44, 0xcb, 0x3c, 0x9d, 0x68, 0x99, - 0xbf, 0x26, 0x5a, 0xe6, 0xcb, 0x1d, 0x6c, 0xf3, 0x87, 0xc3, 0xae, 0xde, 0xa3, 0x8e, 0x91, 0xa8, - 0x53, 0x4d, 0xfe, 0xd4, 0xec, 0xe6, 0x82, 0x6e, 0xbd, 0xfd, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xfb, 0x9f, 0x59, 0x73, 0x1d, 0x0b, 0x00, 0x00, + 0x14, 0x8e, 0x69, 0x1a, 0xed, 0x4e, 0x84, 0xda, 0xb8, 0xd9, 0x62, 0x0c, 0x38, 0x21, 0x20, 0x11, + 0x85, 0x8d, 0xdd, 0x74, 0x85, 0x10, 0x41, 0x1c, 0x36, 0xbb, 0xfc, 0x58, 0xa1, 0xa0, 0xc8, 0xd1, + 0x2e, 0x12, 0x97, 0x30, 0x89, 0x27, 0xb3, 0x56, 0xe3, 0x19, 0xcb, 0x33, 0x09, 0x44, 0x7b, 0x41, + 0x5c, 0x40, 0x9c, 0xf8, 0x13, 0xf6, 0xc8, 0xb1, 0x87, 0x5e, 0x38, 0x20, 0x21, 0x4e, 0x15, 0xa7, + 0xaa, 0x27, 0x84, 0x44, 0x85, 0xda, 0x43, 0xb9, 0xf1, 0x2f, 0xac, 0x6c, 0x8f, 0x5d, 0xd7, 0xcd, + 0x8f, 0xb6, 0x97, 0x5e, 0xa2, 0xcc, 0x9b, 0xf7, 0x7d, 0xef, 0xfb, 0x66, 0xde, 0xbc, 0x04, 0xbc, + 0xcd, 0xb8, 0x07, 0x09, 0x46, 0x23, 0x3a, 0x41, 0xbd, 0x09, 0x22, 0x7c, 0xec, 0x21, 0x66, 0xb8, + 0x14, 0x1a, 0x93, 0x86, 0xc1, 0xbf, 0xd5, 0x5d, 0x8f, 0x72, 0x2a, 0xbf, 0x36, 0x2b, 0x4b, 0x77, + 0x29, 0xd4, 0x27, 0x0d, 0x55, 0x1b, 0x50, 0xe6, 0x50, 0x66, 0xf4, 0x21, 0x43, 0xc6, 0xa4, 0xd1, + 0x47, 0x1c, 0x36, 0x8c, 0x01, 0xb5, 0x49, 0x08, 0x56, 0xdf, 0x5d, 0x54, 0x62, 0x02, 0x47, 0xb6, + 0x05, 0x39, 0xf5, 0x44, 0x72, 0x75, 0x51, 0xb2, 0x0b, 0x3d, 0xe8, 0x30, 0x91, 0xf9, 0x6a, 0x58, + 0xb6, 0x17, 0xac, 0x8c, 0x70, 0x11, 0x6d, 0x61, 0x4a, 0xf1, 0x08, 0x19, 0xc1, 0xaa, 0x3f, 0x1e, + 0x1a, 0x90, 0x4c, 0xc5, 0x56, 0x11, 0x53, 0x4c, 0x43, 0x88, 0xff, 0x4d, 0x44, 0x5f, 0x11, 0x16, + 0x1c, 0x86, 0xfd, 0x3a, 0x0e, 0xc3, 0x62, 0xa3, 0x00, 0x1d, 0x9b, 0x50, 0x23, 0xf8, 0x0c, 0x43, + 0x95, 0x7f, 0x24, 0x90, 0x6f, 0x33, 0xdc, 0x45, 0xbc, 0x43, 0xbf, 0x41, 0x9e, 0xbc, 0x05, 0x72, + 0x0c, 0x11, 0x0b, 0x79, 0x8a, 0x54, 0x96, 0xaa, 0xb7, 0x5b, 0xca, 0xe1, 0x5e, 0xbd, 0x28, 0xe4, + 0xdc, 0xb7, 0x2c, 0x0f, 0x31, 0xd6, 0xe5, 0x9e, 0x4d, 0xb0, 0x29, 0xf2, 0xe4, 0x8f, 0x41, 0x21, + 0xb6, 0xdd, 0x83, 0x61, 0x8a, 0xf2, 0xd2, 0x12, 0xf0, 0x7a, 0x0c, 0x11, 0x71, 0xb9, 0x08, 0x56, + 0x5d, 0x5f, 0x81, 0xb2, 0x52, 0x96, 0xaa, 0x59, 0x33, 0x5c, 0xc8, 0x9b, 0x20, 0x37, 0x26, 0x0c, + 0x0e, 0x91, 0x92, 0x2d, 0x4b, 0xd5, 0x5b, 0xa6, 0x58, 0x35, 0xdf, 0xf9, 0xf1, 0x79, 0x29, 0xf3, + 0xdf, 0xf3, 0x52, 0xe6, 0xfb, 0xd3, 0xdd, 0x9a, 0x50, 0xf2, 0xd3, 0xe9, 0x6e, 0x6d, 0xcd, 0x3f, + 0xdb, 0x84, 0x9f, 0xca, 0x1d, 0xb0, 0x91, 0x58, 0x9a, 0x88, 0xb9, 0x94, 0x30, 0x54, 0xf9, 0x4d, + 0x02, 0x72, 0x9b, 0x61, 0x13, 0x39, 0x74, 0x82, 0x9e, 0x44, 0x5a, 0x6e, 0xcc, 0x7d, 0x53, 0x9f, + 0xe3, 0x67, 0x53, 0xf8, 0x49, 0x09, 0xad, 0xbc, 0x0e, 0xd4, 0x8b, 0xd1, 0xd8, 0xdd, 0xaf, 0x12, + 0x58, 0x8f, 0xb7, 0x3b, 0x88, 0x58, 0x36, 0xc1, 0x37, 0xe7, 0xed, 0xee, 0x1c, 0x6f, 0xc5, 0x73, + 0xde, 0x84, 0xcc, 0x8a, 0x0a, 0x94, 0x74, 0x2c, 0xf6, 0xf5, 0xbb, 0x04, 0x36, 0xdb, 0x0c, 0x3f, + 0x76, 0x2d, 0xc8, 0x51, 0x97, 0xc3, 0x1d, 0x9b, 0xe0, 0x4e, 0xf0, 0x8a, 0xae, 0xe1, 0xee, 0x33, + 0x90, 0x0b, 0x5f, 0x60, 0x60, 0x29, 0xbf, 0x5d, 0xd3, 0x17, 0x8c, 0x05, 0xfd, 0x5c, 0xb5, 0x56, + 0x76, 0xff, 0xa8, 0x94, 0x31, 0x05, 0xbe, 0x59, 0x4b, 0x19, 0x53, 0x85, 0xb1, 0x19, 0x3a, 0x2b, + 0x65, 0xa0, 0xcd, 0xde, 0x89, 0x4d, 0xfe, 0x91, 0x0d, 0x5a, 0xf3, 0x81, 0x87, 0x20, 0x4f, 0xb4, + 0xe6, 0x63, 0x90, 0xb7, 0x10, 0x1b, 0x78, 0xb6, 0xcb, 0x6d, 0x4a, 0x02, 0x97, 0xf9, 0xed, 0xea, + 0x42, 0xcd, 0x0f, 0xcf, 0xf2, 0x5b, 0xb7, 0x7d, 0xc5, 0xbf, 0x9c, 0xee, 0xd6, 0x24, 0x33, 0xc9, + 0x23, 0x7f, 0x09, 0xc0, 0x80, 0x3a, 0x8e, 0xcd, 0x98, 0xcf, 0x1a, 0x9e, 0xc4, 0xdd, 0x85, 0xac, + 0x0f, 0xe2, 0x74, 0x13, 0x72, 0xc4, 0x92, 0xcc, 0x09, 0x2a, 0xf9, 0x6b, 0xb0, 0xe1, 0xd8, 0xa4, + 0xc7, 0xd0, 0x68, 0xd8, 0xb3, 0xd0, 0x08, 0x61, 0x18, 0xe8, 0x5e, 0x09, 0x6e, 0x67, 0xcb, 0xc7, + 0xfc, 0x7d, 0x54, 0xba, 0x13, 0xde, 0x10, 0xb3, 0x76, 0x74, 0x9b, 0x1a, 0x0e, 0xe4, 0x4f, 0xf5, + 0x47, 0x84, 0x1f, 0xee, 0xd5, 0x81, 0xb8, 0xba, 0x47, 0x84, 0x87, 0xd4, 0x05, 0xc7, 0x26, 0x5d, + 0x34, 0x1a, 0x3e, 0x8c, 0xa9, 0xe4, 0x4f, 0x41, 0x41, 0x10, 0x27, 0xda, 0x33, 0x1b, 0xf0, 0xab, + 0xf3, 0x6e, 0x5f, 0x91, 0xcc, 0xf5, 0x18, 0x14, 0x8d, 0x9e, 0x2f, 0x66, 0xf5, 0xf9, 0x6a, 0x40, + 0xf4, 0xe6, 0xe1, 0x5e, 0xfd, 0x0d, 0x41, 0xf4, 0x24, 0xd5, 0xd8, 0x73, 0x47, 0xd9, 0x27, 0x20, + 0xe7, 0x8e, 0xfb, 0x3b, 0x68, 0xaa, 0xe4, 0x82, 0xf3, 0x2c, 0xea, 0xe1, 0x04, 0xd7, 0xa3, 0x09, + 0xae, 0xdf, 0x27, 0xd3, 0x96, 0xf2, 0xe7, 0x99, 0xc6, 0x81, 0x37, 0x75, 0x39, 0xd5, 0x3b, 0xe3, + 0xfe, 0xe7, 0x68, 0x6a, 0x0a, 0x74, 0xf3, 0x83, 0xe4, 0xc3, 0xb9, 0x28, 0x31, 0x39, 0x1f, 0x52, + 0xdd, 0x22, 0xe6, 0x43, 0x2a, 0x1a, 0xb5, 0xd8, 0xf6, 0xff, 0x59, 0xb0, 0xd2, 0x66, 0x58, 0x7e, + 0x06, 0xd6, 0xd2, 0x6d, 0x66, 0x2c, 0xbc, 0xfb, 0x8b, 0x9c, 0xea, 0xfb, 0x57, 0x04, 0x44, 0x22, + 0xe4, 0x21, 0xb8, 0x15, 0xff, 0xea, 0x54, 0x97, 0x91, 0x44, 0x99, 0xea, 0xd6, 0x65, 0x33, 0xe3, + 0x3a, 0xcf, 0xc0, 0x5a, 0x7a, 0xcc, 0x2f, 0x35, 0x99, 0x02, 0x2c, 0x37, 0x39, 0x67, 0x12, 0xcb, + 0x63, 0xf0, 0xf2, 0xf9, 0x29, 0x5c, 0xbf, 0x1c, 0x93, 0x48, 0x57, 0xdf, 0xbb, 0x52, 0x7a, 0x5c, + 0xf6, 0x07, 0x09, 0x6c, 0xcc, 0x9a, 0x92, 0xf7, 0x96, 0xd1, 0xcd, 0x00, 0xa9, 0x1f, 0x5e, 0x03, + 0x14, 0x29, 0x51, 0x57, 0xbf, 0xf3, 0x9f, 0x6f, 0xeb, 0xa3, 0xfd, 0x63, 0x4d, 0x3a, 0x38, 0xd6, + 0xa4, 0x7f, 0x8f, 0x35, 0xe9, 0xe7, 0x13, 0x2d, 0x73, 0x70, 0xa2, 0x65, 0xfe, 0x3a, 0xd1, 0x32, + 0x5f, 0xbd, 0x85, 0x6d, 0xfe, 0x74, 0xdc, 0xd7, 0x07, 0xd4, 0x31, 0x12, 0x75, 0xea, 0xc9, 0x7f, + 0x4b, 0xfd, 0x5c, 0xf0, 0x72, 0xee, 0xbd, 0x08, 0x00, 0x00, 0xff, 0xff, 0x89, 0x2b, 0x71, 0x78, + 0xe0, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -637,8 +538,6 @@ type MsgClient interface { RemoveValidator(ctx context.Context, in *MsgRemoveValidator, opts ...grpc.CallOption) (*MsgRemoveValidatorResponse, error) // RemovePending removes a pending validator from the queue. RemovePending(ctx context.Context, in *MsgRemovePending, opts ...grpc.CallOption) (*MsgRemovePendingResponse, error) - // UpdateParams updates the module parameters. - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // UpdateStakingParams updates the module parameters. UpdateStakingParams(ctx context.Context, in *MsgUpdateStakingParams, opts ...grpc.CallOption) (*MsgUpdateStakingParamsResponse, error) } @@ -687,15 +586,6 @@ func (c *msgClient) RemovePending(ctx context.Context, in *MsgRemovePending, opt return out, nil } -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/strangelove_ventures.poa.v1.Msg/UpdateParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *msgClient) UpdateStakingParams(ctx context.Context, in *MsgUpdateStakingParams, opts ...grpc.CallOption) (*MsgUpdateStakingParamsResponse, error) { out := new(MsgUpdateStakingParamsResponse) err := c.cc.Invoke(ctx, "/strangelove_ventures.poa.v1.Msg/UpdateStakingParams", in, out, opts...) @@ -715,8 +605,6 @@ type MsgServer interface { RemoveValidator(context.Context, *MsgRemoveValidator) (*MsgRemoveValidatorResponse, error) // RemovePending removes a pending validator from the queue. RemovePending(context.Context, *MsgRemovePending) (*MsgRemovePendingResponse, error) - // UpdateParams updates the module parameters. - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // UpdateStakingParams updates the module parameters. UpdateStakingParams(context.Context, *MsgUpdateStakingParams) (*MsgUpdateStakingParamsResponse, error) } @@ -737,9 +625,6 @@ func (*UnimplementedMsgServer) RemoveValidator(ctx context.Context, req *MsgRemo func (*UnimplementedMsgServer) RemovePending(ctx context.Context, req *MsgRemovePending) (*MsgRemovePendingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemovePending not implemented") } -func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} func (*UnimplementedMsgServer) UpdateStakingParams(ctx context.Context, req *MsgUpdateStakingParams) (*MsgUpdateStakingParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateStakingParams not implemented") } @@ -820,24 +705,6 @@ func _Msg_RemovePending_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/strangelove_ventures.poa.v1.Msg/UpdateParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - func _Msg_UpdateStakingParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgUpdateStakingParams) if err := dec(in); err != nil { @@ -876,10 +743,6 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "RemovePending", Handler: _Msg_RemovePending_Handler, }, - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, { MethodName: "UpdateStakingParams", Handler: _Msg_UpdateStakingParams_Handler, @@ -1084,69 +947,6 @@ func (m *MsgRemovePendingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Sender) > 0 { - i -= len(m.Sender) - copy(dAtA[i:], m.Sender) - i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *MsgUpdateStakingParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1407,30 +1207,6 @@ func (m *MsgRemovePendingResponse) Size() (n int) { return n } -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Sender) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *MsgUpdateStakingParams) Size() (n int) { if m == nil { return 0 @@ -2028,171 +1804,6 @@ func (m *MsgRemovePendingResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *MsgUpdateStakingParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0