From c2fe6165421ec61b6e88a138e0a37e9b594dfc7e Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Thu, 9 May 2024 12:13:39 -0500 Subject: [PATCH 1/2] wip --- ante/disable_staking.go | 77 +- api/v1/genesis.pulsar.go | 527 +------ api/v1/params.pulsar.go | 770 ++++------ api/v1/query.pulsar.go | 1361 +++-------------- api/v1/query_grpc.pb.go | 77 +- api/v1/tx.pulsar.go | 1212 ++------------- api/v1/tx_grpc.pb.go | 197 +-- genesis.pb.go | 181 +-- go.work.sum | 18 + keeper/genesis.go | 37 - keeper/keeper.go | 42 +- keeper/msg_server.go | 128 +- keeper/pending.go | 101 +- params.pb.go | 428 ++---- .../strangelove_ventures/poa/v1/genesis.proto | 8 - .../strangelove_ventures/poa/v1/params.proto | 37 +- proto/strangelove_ventures/poa/v1/query.proto | 35 +- proto/strangelove_ventures/poa/v1/tx.proto | 35 +- query.pb.go | 549 ++----- query.pb.gw.go | 111 +- simapp/app.go | 1 + tx.pb.go | 652 +------- 22 files changed, 1110 insertions(+), 5474 deletions(-) diff --git a/ante/disable_staking.go b/ante/disable_staking.go index f60fa54..f0c19c2 100644 --- a/ante/disable_staking.go +++ b/ante/disable_staking.go @@ -1,18 +1,26 @@ package poaante import ( + "context" + "fmt" + + sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/authz" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/strangelove-ventures/poa" + poakeeper "github.com/strangelove-ventures/poa/keeper" ) type MsgStakingFilterDecorator struct { + PoaKeeper poakeeper.Keeper } -func NewPOADisableStakingDecorator() MsgStakingFilterDecorator { - return MsgStakingFilterDecorator{} +func NewPOADisableStakingDecorator(pk poakeeper.Keeper) MsgStakingFilterDecorator { + return MsgStakingFilterDecorator{ + PoaKeeper: pk, + } } // AnteHandle performs an AnteHandler check that returns an error if the tx contains a message that is blocked. @@ -23,42 +31,83 @@ func (msfd MsgStakingFilterDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, sim return next(ctx, tx, simulate) } - if msfd.hasInvalidStakingMsg(tx.GetMsgs()) { - return ctx, poa.ErrStakingActionNotAllowed + if err := msfd.hasAdminOnlyStakingMessage(ctx, tx.GetMsgs()); err != nil { + // return ctx, poa.ErrStakingActionNotAllowed + return ctx, err } return next(ctx, tx, simulate) } -func (msfd MsgStakingFilterDecorator) hasInvalidStakingMsg(msgs []sdk.Msg) bool { +func (msfd MsgStakingFilterDecorator) hasAdminOnlyStakingMessage(ctx context.Context, msgs []sdk.Msg) error { + for _, msg := range msgs { // authz nested message check (recursive) if execMsg, ok := msg.(*authz.MsgExec); ok { msgs, err := execMsg.GetMessages() if err != nil { - return true + return nil } - if msfd.hasInvalidStakingMsg(msgs) { - return true + if err := msfd.hasAdminOnlyStakingMessage(ctx, msgs); err != nil { + return err } } - switch msg.(type) { - // POA wrapped messages - case *stakingtypes.MsgCreateValidator, *stakingtypes.MsgUpdateParams: - return true + switch m := msg.(type) { + // on MsgCreateValidator, mint 1 token to the validator on creation + case *stakingtypes.MsgCreateValidator: + if m.MinSelfDelegation != sdkmath.NewInt(1) { + return fmt.Errorf("min self delegation must be 1") + } + + bondDenom, err := msfd.PoaKeeper.GetStakingKeeper().BondDenom(ctx) + if err != nil { + return nil + } + + if m.Value.Amount.Equal(sdkmath.NewInt(1_000_000)) { + return fmt.Errorf("self delegation amount must be 1000000" + bondDenom) + } + + addr, err := sdk.AccAddressFromBech32(m.ValidatorAddress) + if err != nil { + return nil + } + + // verify they are allowed to create a validator + isPending, err := msfd.PoaKeeper.IsValidatorPending(ctx, addr) + if err != nil { + return err + } else if !isPending { + return fmt.Errorf("validator is not pending, can not create validator") + } + + // mint 1 full token to them + coin := sdk.NewCoins(sdk.NewCoin(bondDenom, sdkmath.NewInt(1_000_000))) + if err := msfd.PoaKeeper.GetBankKeeper().MintCoins(ctx, poa.ModuleName, coin); err != nil { + return err + } + + if err := msfd.PoaKeeper.GetBankKeeper().SendCoinsFromModuleToAccount(ctx, poa.ModuleName, addr, coin); err != nil { + return err + } + + return nil + + case *stakingtypes.MsgUpdateParams: + return nil // Blocked entirely when POA is enabled case *stakingtypes.MsgBeginRedelegate, *stakingtypes.MsgCancelUnbondingDelegation, *stakingtypes.MsgDelegate, *stakingtypes.MsgUndelegate: - return true + return nil } // stakingtypes.MsgEditValidator is the only allowed message. We do not need to check for it. } - return false + return nil } diff --git a/api/v1/genesis.pulsar.go b/api/v1/genesis.pulsar.go index 9ab715e..8f2e57e 100644 --- a/api/v1/genesis.pulsar.go +++ b/api/v1/genesis.pulsar.go @@ -4,7 +4,6 @@ package poav1 import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" @@ -449,410 +448,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } } -var ( - md_PowerCache protoreflect.MessageDescriptor - fd_PowerCache_power protoreflect.FieldDescriptor -) - -func init() { - file_strangelove_ventures_poa_v1_genesis_proto_init() - md_PowerCache = File_strangelove_ventures_poa_v1_genesis_proto.Messages().ByName("PowerCache") - fd_PowerCache_power = md_PowerCache.Fields().ByName("power") -} - -var _ protoreflect.Message = (*fastReflection_PowerCache)(nil) - -type fastReflection_PowerCache PowerCache - -func (x *PowerCache) ProtoReflect() protoreflect.Message { - return (*fastReflection_PowerCache)(x) -} - -func (x *PowerCache) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_genesis_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_PowerCache_messageType fastReflection_PowerCache_messageType -var _ protoreflect.MessageType = fastReflection_PowerCache_messageType{} - -type fastReflection_PowerCache_messageType struct{} - -func (x fastReflection_PowerCache_messageType) Zero() protoreflect.Message { - return (*fastReflection_PowerCache)(nil) -} -func (x fastReflection_PowerCache_messageType) New() protoreflect.Message { - return new(fastReflection_PowerCache) -} -func (x fastReflection_PowerCache_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PowerCache -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_PowerCache) Descriptor() protoreflect.MessageDescriptor { - return md_PowerCache -} - -// 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_PowerCache) Type() protoreflect.MessageType { - return _fastReflection_PowerCache_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_PowerCache) New() protoreflect.Message { - return new(fastReflection_PowerCache) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_PowerCache) Interface() protoreflect.ProtoMessage { - return (*PowerCache)(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_PowerCache) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Power != uint64(0) { - value := protoreflect.ValueOfUint64(x.Power) - if !f(fd_PowerCache_power, 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_PowerCache) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.PowerCache.power": - return x.Power != uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PowerCache")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PowerCache 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_PowerCache) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.PowerCache.power": - x.Power = uint64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PowerCache")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PowerCache 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_PowerCache) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "strangelove_ventures.poa.v1.PowerCache.power": - value := x.Power - return protoreflect.ValueOfUint64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PowerCache")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PowerCache 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_PowerCache) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.PowerCache.power": - x.Power = value.Uint() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PowerCache")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PowerCache 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_PowerCache) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.PowerCache.power": - panic(fmt.Errorf("field power of message strangelove_ventures.poa.v1.PowerCache is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PowerCache")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PowerCache 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_PowerCache) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.PowerCache.power": - return protoreflect.ValueOfUint64(uint64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PowerCache")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PowerCache 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_PowerCache) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.PowerCache", 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_PowerCache) 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_PowerCache) 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_PowerCache) 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_PowerCache) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PowerCache) - 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.Power != 0 { - n += 1 + runtime.Sov(uint64(x.Power)) - } - 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().(*PowerCache) - 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.Power != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Power)) - i-- - dAtA[i] = 0x8 - } - 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().(*PowerCache) - 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: PowerCache: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PowerCache: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) - } - x.Power = 0 - 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++ - x.Power |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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, - } -} - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -903,42 +498,6 @@ func (x *GenesisState) GetParams() *Params { return nil } -// PowerCache is a cached block or absolute change in power for ibc-go validations. -type PowerCache struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Power uint64 `protobuf:"varint,1,opt,name=power,proto3" json:"power,omitempty"` -} - -func (x *PowerCache) Reset() { - *x = PowerCache{} - if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_genesis_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PowerCache) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PowerCache) ProtoMessage() {} - -// Deprecated: Use PowerCache.ProtoReflect.Descriptor instead. -func (*PowerCache) Descriptor() ([]byte, []int) { - return file_strangelove_ventures_poa_v1_genesis_proto_rawDescGZIP(), []int{1} -} - -func (x *PowerCache) GetPower() uint64 { - if x != nil { - return x.Power - } - return 0 -} - var File_strangelove_ventures_poa_v1_genesis_proto protoreflect.FileDescriptor var file_strangelove_ventures_poa_v1_genesis_proto_rawDesc = []byte{ @@ -947,42 +506,37 @@ var file_strangelove_ventures_poa_v1_genesis_proto_rawDesc = []byte{ 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 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, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, - 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 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, 0x1a, 0x28, + 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 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, 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, + 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, 0x1a, 0x28, 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, 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, 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 ( @@ -997,14 +551,13 @@ func file_strangelove_ventures_poa_v1_genesis_proto_rawDescGZIP() []byte { return file_strangelove_ventures_poa_v1_genesis_proto_rawDescData } -var file_strangelove_ventures_poa_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_strangelove_ventures_poa_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) 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 + (*Params)(nil), // 1: strangelove_ventures.poa.v1.Params } 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 + 1, // 0: strangelove_ventures.poa.v1.GenesisState.params:type_name -> strangelove_ventures.poa.v1.Params 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 @@ -1033,18 +586,6 @@ func file_strangelove_ventures_poa_v1_genesis_proto_init() { return nil } } - file_strangelove_ventures_poa_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PowerCache); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1052,7 +593,7 @@ func file_strangelove_ventures_poa_v1_genesis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_strangelove_ventures_poa_v1_genesis_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, diff --git a/api/v1/params.pulsar.go b/api/v1/params.pulsar.go index 483161b..dd6b3c0 100644 --- a/api/v1/params.pulsar.go +++ b/api/v1/params.pulsar.go @@ -10,7 +10,7 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" + _ "google.golang.org/protobuf/types/known/durationpb" io "io" reflect "reflect" sync "sync" @@ -62,17 +62,68 @@ func (x *_Params_1_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_Params_2_list)(nil) + +type _Params_2_list struct { + list *[]*PendingValidator +} + +func (x *_Params_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PendingValidator) + (*x.list)[i] = concreteValue +} + +func (x *_Params_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*PendingValidator) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_2_list) AppendMutable() protoreflect.Value { + v := new(PendingValidator) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_2_list) NewElement() protoreflect.Value { + v := new(PendingValidator) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_2_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 + md_Params protoreflect.MessageDescriptor + fd_Params_admins protoreflect.FieldDescriptor + fd_Params_validator_whitelist 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") + fd_Params_validator_whitelist = md_Params.Fields().ByName("validator_whitelist") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -146,9 +197,9 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } - if x.AllowValidatorSelfExit != false { - value := protoreflect.ValueOfBool(x.AllowValidatorSelfExit) - if !f(fd_Params_allow_validator_self_exit, value) { + if len(x.ValidatorWhitelist) != 0 { + value := protoreflect.ValueOfList(&_Params_2_list{list: &x.ValidatorWhitelist}) + if !f(fd_Params_validator_whitelist, value) { return } } @@ -169,8 +220,8 @@ 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 + case "strangelove_ventures.poa.v1.Params.validator_whitelist": + return len(x.ValidatorWhitelist) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) @@ -189,8 +240,8 @@ 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 + case "strangelove_ventures.poa.v1.Params.validator_whitelist": + x.ValidatorWhitelist = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) @@ -213,9 +264,12 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro } 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) + case "strangelove_ventures.poa.v1.Params.validator_whitelist": + if len(x.ValidatorWhitelist) == 0 { + return protoreflect.ValueOfList(&_Params_2_list{}) + } + listValue := &_Params_2_list{list: &x.ValidatorWhitelist} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) @@ -240,8 +294,10 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto 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() + case "strangelove_ventures.poa.v1.Params.validator_whitelist": + lv := value.List() + clv := lv.(*_Params_2_list) + x.ValidatorWhitelist = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) @@ -268,8 +324,12 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore } 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")) + case "strangelove_ventures.poa.v1.Params.validator_whitelist": + if x.ValidatorWhitelist == nil { + x.ValidatorWhitelist = []*PendingValidator{} + } + value := &_Params_2_list{list: &x.ValidatorWhitelist} + return protoreflect.ValueOfList(value) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) @@ -286,8 +346,9 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor 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) + case "strangelove_ventures.poa.v1.Params.validator_whitelist": + list := []*PendingValidator{} + return protoreflect.ValueOfList(&_Params_2_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.Params")) @@ -363,8 +424,11 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.AllowValidatorSelfExit { - n += 2 + if len(x.ValidatorWhitelist) > 0 { + for _, e := range x.ValidatorWhitelist { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -395,15 +459,21 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.AllowValidatorSelfExit { - i-- - if x.AllowValidatorSelfExit { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(x.ValidatorWhitelist) > 0 { + for iNdEx := len(x.ValidatorWhitelist) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ValidatorWhitelist[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-- - dAtA[i] = 0x10 } if len(x.Admins) > 0 { for iNdEx := len(x.Admins) - 1; iNdEx >= 0; iNdEx-- { @@ -496,10 +566,10 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { 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) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorWhitelist", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -509,12 +579,26 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - x.AllowValidatorSelfExit = bool(v != 0) + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorWhitelist = append(x.ValidatorWhitelist, &PendingValidator{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ValidatorWhitelist[len(x.ValidatorWhitelist)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -551,35 +635,27 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } var ( - md_StakingParams protoreflect.MessageDescriptor - fd_StakingParams_unbonding_time protoreflect.FieldDescriptor - fd_StakingParams_max_validators protoreflect.FieldDescriptor - fd_StakingParams_max_entries protoreflect.FieldDescriptor - fd_StakingParams_historical_entries protoreflect.FieldDescriptor - fd_StakingParams_bond_denom protoreflect.FieldDescriptor - fd_StakingParams_min_commission_rate protoreflect.FieldDescriptor + md_PendingValidator protoreflect.MessageDescriptor + fd_PendingValidator_address protoreflect.FieldDescriptor + fd_PendingValidator_info protoreflect.FieldDescriptor ) func init() { file_strangelove_ventures_poa_v1_params_proto_init() - md_StakingParams = File_strangelove_ventures_poa_v1_params_proto.Messages().ByName("StakingParams") - fd_StakingParams_unbonding_time = md_StakingParams.Fields().ByName("unbonding_time") - fd_StakingParams_max_validators = md_StakingParams.Fields().ByName("max_validators") - fd_StakingParams_max_entries = md_StakingParams.Fields().ByName("max_entries") - fd_StakingParams_historical_entries = md_StakingParams.Fields().ByName("historical_entries") - fd_StakingParams_bond_denom = md_StakingParams.Fields().ByName("bond_denom") - fd_StakingParams_min_commission_rate = md_StakingParams.Fields().ByName("min_commission_rate") + md_PendingValidator = File_strangelove_ventures_poa_v1_params_proto.Messages().ByName("PendingValidator") + fd_PendingValidator_address = md_PendingValidator.Fields().ByName("address") + fd_PendingValidator_info = md_PendingValidator.Fields().ByName("info") } -var _ protoreflect.Message = (*fastReflection_StakingParams)(nil) +var _ protoreflect.Message = (*fastReflection_PendingValidator)(nil) -type fastReflection_StakingParams StakingParams +type fastReflection_PendingValidator PendingValidator -func (x *StakingParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_StakingParams)(x) +func (x *PendingValidator) ProtoReflect() protoreflect.Message { + return (*fastReflection_PendingValidator)(x) } -func (x *StakingParams) slowProtoReflect() protoreflect.Message { +func (x *PendingValidator) slowProtoReflect() protoreflect.Message { mi := &file_strangelove_ventures_poa_v1_params_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -591,43 +667,43 @@ func (x *StakingParams) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_StakingParams_messageType fastReflection_StakingParams_messageType -var _ protoreflect.MessageType = fastReflection_StakingParams_messageType{} +var _fastReflection_PendingValidator_messageType fastReflection_PendingValidator_messageType +var _ protoreflect.MessageType = fastReflection_PendingValidator_messageType{} -type fastReflection_StakingParams_messageType struct{} +type fastReflection_PendingValidator_messageType struct{} -func (x fastReflection_StakingParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_StakingParams)(nil) +func (x fastReflection_PendingValidator_messageType) Zero() protoreflect.Message { + return (*fastReflection_PendingValidator)(nil) } -func (x fastReflection_StakingParams_messageType) New() protoreflect.Message { - return new(fastReflection_StakingParams) +func (x fastReflection_PendingValidator_messageType) New() protoreflect.Message { + return new(fastReflection_PendingValidator) } -func (x fastReflection_StakingParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_StakingParams +func (x fastReflection_PendingValidator_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_PendingValidator } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_StakingParams) Descriptor() protoreflect.MessageDescriptor { - return md_StakingParams +func (x *fastReflection_PendingValidator) Descriptor() protoreflect.MessageDescriptor { + return md_PendingValidator } // 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_StakingParams) Type() protoreflect.MessageType { - return _fastReflection_StakingParams_messageType +func (x *fastReflection_PendingValidator) Type() protoreflect.MessageType { + return _fastReflection_PendingValidator_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_StakingParams) New() protoreflect.Message { - return new(fastReflection_StakingParams) +func (x *fastReflection_PendingValidator) New() protoreflect.Message { + return new(fastReflection_PendingValidator) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_StakingParams) Interface() protoreflect.ProtoMessage { - return (*StakingParams)(x) +func (x *fastReflection_PendingValidator) Interface() protoreflect.ProtoMessage { + return (*PendingValidator)(x) } // Range iterates over every populated field in an undefined order, @@ -635,40 +711,16 @@ func (x *fastReflection_StakingParams) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_StakingParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.UnbondingTime != nil { - value := protoreflect.ValueOfMessage(x.UnbondingTime.ProtoReflect()) - if !f(fd_StakingParams_unbonding_time, value) { +func (x *fastReflection_PendingValidator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Address) != 0 { + value := protoreflect.ValueOfBytes(x.Address) + if !f(fd_PendingValidator_address, value) { return } } - if x.MaxValidators != uint32(0) { - value := protoreflect.ValueOfUint32(x.MaxValidators) - if !f(fd_StakingParams_max_validators, value) { - return - } - } - if x.MaxEntries != uint32(0) { - value := protoreflect.ValueOfUint32(x.MaxEntries) - if !f(fd_StakingParams_max_entries, value) { - return - } - } - if x.HistoricalEntries != uint32(0) { - value := protoreflect.ValueOfUint32(x.HistoricalEntries) - if !f(fd_StakingParams_historical_entries, value) { - return - } - } - if x.BondDenom != "" { - value := protoreflect.ValueOfString(x.BondDenom) - if !f(fd_StakingParams_bond_denom, value) { - return - } - } - if x.MinCommissionRate != "" { - value := protoreflect.ValueOfString(x.MinCommissionRate) - if !f(fd_StakingParams_min_commission_rate, value) { + if x.Info != "" { + value := protoreflect.ValueOfString(x.Info) + if !f(fd_PendingValidator_info, value) { return } } @@ -685,25 +737,17 @@ func (x *fastReflection_StakingParams) Range(f func(protoreflect.FieldDescriptor // 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_StakingParams) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_PendingValidator) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "strangelove_ventures.poa.v1.StakingParams.unbonding_time": - return x.UnbondingTime != nil - case "strangelove_ventures.poa.v1.StakingParams.max_validators": - return x.MaxValidators != uint32(0) - case "strangelove_ventures.poa.v1.StakingParams.max_entries": - return x.MaxEntries != uint32(0) - case "strangelove_ventures.poa.v1.StakingParams.historical_entries": - return x.HistoricalEntries != uint32(0) - case "strangelove_ventures.poa.v1.StakingParams.bond_denom": - return x.BondDenom != "" - case "strangelove_ventures.poa.v1.StakingParams.min_commission_rate": - return x.MinCommissionRate != "" + case "strangelove_ventures.poa.v1.PendingValidator.address": + return len(x.Address) != 0 + case "strangelove_ventures.poa.v1.PendingValidator.info": + return x.Info != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.StakingParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidator")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.StakingParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidator does not contain field %s", fd.FullName())) } } @@ -713,25 +757,17 @@ func (x *fastReflection_StakingParams) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StakingParams) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_PendingValidator) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "strangelove_ventures.poa.v1.StakingParams.unbonding_time": - x.UnbondingTime = nil - case "strangelove_ventures.poa.v1.StakingParams.max_validators": - x.MaxValidators = uint32(0) - case "strangelove_ventures.poa.v1.StakingParams.max_entries": - x.MaxEntries = uint32(0) - case "strangelove_ventures.poa.v1.StakingParams.historical_entries": - x.HistoricalEntries = uint32(0) - case "strangelove_ventures.poa.v1.StakingParams.bond_denom": - x.BondDenom = "" - case "strangelove_ventures.poa.v1.StakingParams.min_commission_rate": - x.MinCommissionRate = "" + case "strangelove_ventures.poa.v1.PendingValidator.address": + x.Address = nil + case "strangelove_ventures.poa.v1.PendingValidator.info": + x.Info = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.StakingParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidator")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.StakingParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidator does not contain field %s", fd.FullName())) } } @@ -741,31 +777,19 @@ func (x *fastReflection_StakingParams) Clear(fd protoreflect.FieldDescriptor) { // 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_StakingParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_PendingValidator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "strangelove_ventures.poa.v1.StakingParams.unbonding_time": - value := x.UnbondingTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "strangelove_ventures.poa.v1.StakingParams.max_validators": - value := x.MaxValidators - return protoreflect.ValueOfUint32(value) - case "strangelove_ventures.poa.v1.StakingParams.max_entries": - value := x.MaxEntries - return protoreflect.ValueOfUint32(value) - case "strangelove_ventures.poa.v1.StakingParams.historical_entries": - value := x.HistoricalEntries - return protoreflect.ValueOfUint32(value) - case "strangelove_ventures.poa.v1.StakingParams.bond_denom": - value := x.BondDenom - return protoreflect.ValueOfString(value) - case "strangelove_ventures.poa.v1.StakingParams.min_commission_rate": - value := x.MinCommissionRate + case "strangelove_ventures.poa.v1.PendingValidator.address": + value := x.Address + return protoreflect.ValueOfBytes(value) + case "strangelove_ventures.poa.v1.PendingValidator.info": + value := x.Info return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.StakingParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidator")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.StakingParams does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidator does not contain field %s", descriptor.FullName())) } } @@ -779,25 +803,17 @@ func (x *fastReflection_StakingParams) Get(descriptor protoreflect.FieldDescript // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StakingParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_PendingValidator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "strangelove_ventures.poa.v1.StakingParams.unbonding_time": - x.UnbondingTime = value.Message().Interface().(*durationpb.Duration) - case "strangelove_ventures.poa.v1.StakingParams.max_validators": - x.MaxValidators = uint32(value.Uint()) - case "strangelove_ventures.poa.v1.StakingParams.max_entries": - x.MaxEntries = uint32(value.Uint()) - case "strangelove_ventures.poa.v1.StakingParams.historical_entries": - x.HistoricalEntries = uint32(value.Uint()) - case "strangelove_ventures.poa.v1.StakingParams.bond_denom": - x.BondDenom = value.Interface().(string) - case "strangelove_ventures.poa.v1.StakingParams.min_commission_rate": - x.MinCommissionRate = value.Interface().(string) + case "strangelove_ventures.poa.v1.PendingValidator.address": + x.Address = value.Bytes() + case "strangelove_ventures.poa.v1.PendingValidator.info": + x.Info = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.StakingParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidator")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.StakingParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidator does not contain field %s", fd.FullName())) } } @@ -811,64 +827,44 @@ func (x *fastReflection_StakingParams) Set(fd protoreflect.FieldDescriptor, valu // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StakingParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_PendingValidator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "strangelove_ventures.poa.v1.StakingParams.unbonding_time": - if x.UnbondingTime == nil { - x.UnbondingTime = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.UnbondingTime.ProtoReflect()) - case "strangelove_ventures.poa.v1.StakingParams.max_validators": - panic(fmt.Errorf("field max_validators of message strangelove_ventures.poa.v1.StakingParams is not mutable")) - case "strangelove_ventures.poa.v1.StakingParams.max_entries": - panic(fmt.Errorf("field max_entries of message strangelove_ventures.poa.v1.StakingParams is not mutable")) - case "strangelove_ventures.poa.v1.StakingParams.historical_entries": - panic(fmt.Errorf("field historical_entries of message strangelove_ventures.poa.v1.StakingParams is not mutable")) - case "strangelove_ventures.poa.v1.StakingParams.bond_denom": - panic(fmt.Errorf("field bond_denom of message strangelove_ventures.poa.v1.StakingParams is not mutable")) - case "strangelove_ventures.poa.v1.StakingParams.min_commission_rate": - panic(fmt.Errorf("field min_commission_rate of message strangelove_ventures.poa.v1.StakingParams is not mutable")) + case "strangelove_ventures.poa.v1.PendingValidator.address": + panic(fmt.Errorf("field address of message strangelove_ventures.poa.v1.PendingValidator is not mutable")) + case "strangelove_ventures.poa.v1.PendingValidator.info": + panic(fmt.Errorf("field info of message strangelove_ventures.poa.v1.PendingValidator is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.StakingParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidator")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.StakingParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidator 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_StakingParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_PendingValidator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "strangelove_ventures.poa.v1.StakingParams.unbonding_time": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "strangelove_ventures.poa.v1.StakingParams.max_validators": - return protoreflect.ValueOfUint32(uint32(0)) - case "strangelove_ventures.poa.v1.StakingParams.max_entries": - return protoreflect.ValueOfUint32(uint32(0)) - case "strangelove_ventures.poa.v1.StakingParams.historical_entries": - return protoreflect.ValueOfUint32(uint32(0)) - case "strangelove_ventures.poa.v1.StakingParams.bond_denom": - return protoreflect.ValueOfString("") - case "strangelove_ventures.poa.v1.StakingParams.min_commission_rate": + case "strangelove_ventures.poa.v1.PendingValidator.address": + return protoreflect.ValueOfBytes(nil) + case "strangelove_ventures.poa.v1.PendingValidator.info": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.StakingParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidator")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.StakingParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidator 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_StakingParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_PendingValidator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.StakingParams", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.PendingValidator", d.FullName())) } panic("unreachable") } @@ -876,7 +872,7 @@ func (x *fastReflection_StakingParams) WhichOneof(d protoreflect.OneofDescriptor // 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_StakingParams) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_PendingValidator) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -887,7 +883,7 @@ func (x *fastReflection_StakingParams) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StakingParams) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_PendingValidator) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -899,7 +895,7 @@ func (x *fastReflection_StakingParams) SetUnknown(fields protoreflect.RawFields) // 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_StakingParams) IsValid() bool { +func (x *fastReflection_PendingValidator) IsValid() bool { return x != nil } @@ -909,9 +905,9 @@ func (x *fastReflection_StakingParams) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_StakingParams) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_PendingValidator) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*StakingParams) + x := input.Message.Interface().(*PendingValidator) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -923,24 +919,11 @@ func (x *fastReflection_StakingParams) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.UnbondingTime != nil { - l = options.Size(x.UnbondingTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.MaxValidators != 0 { - n += 1 + runtime.Sov(uint64(x.MaxValidators)) - } - if x.MaxEntries != 0 { - n += 1 + runtime.Sov(uint64(x.MaxEntries)) - } - if x.HistoricalEntries != 0 { - n += 1 + runtime.Sov(uint64(x.HistoricalEntries)) - } - l = len(x.BondDenom) + l = len(x.Address) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.MinCommissionRate) + l = len(x.Info) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -954,7 +937,7 @@ func (x *fastReflection_StakingParams) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*StakingParams) + x := input.Message.Interface().(*PendingValidator) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -973,46 +956,17 @@ func (x *fastReflection_StakingParams) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.MinCommissionRate) > 0 { - i -= len(x.MinCommissionRate) - copy(dAtA[i:], x.MinCommissionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MinCommissionRate))) - i-- - dAtA[i] = 0x32 - } - if len(x.BondDenom) > 0 { - i -= len(x.BondDenom) - copy(dAtA[i:], x.BondDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BondDenom))) - i-- - dAtA[i] = 0x2a - } - if x.HistoricalEntries != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.HistoricalEntries)) + if len(x.Info) > 0 { + i -= len(x.Info) + copy(dAtA[i:], x.Info) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x12 } - if x.MaxEntries != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxEntries)) - i-- - dAtA[i] = 0x18 - } - if x.MaxValidators != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.MaxValidators)) - i-- - dAtA[i] = 0x10 - } - if x.UnbondingTime != nil { - encoded, err := options.Marshal(x.UnbondingTime) - 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))) + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) i-- dAtA[i] = 0xa } @@ -1027,7 +981,7 @@ func (x *fastReflection_StakingParams) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*StakingParams) + x := input.Message.Interface().(*PendingValidator) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1059,17 +1013,17 @@ func (x *fastReflection_StakingParams) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StakingParams: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PendingValidator: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StakingParams: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PendingValidator: 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 UnbondingTime", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -1079,88 +1033,29 @@ func (x *fastReflection_StakingParams) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen 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.UnbondingTime == nil { - x.UnbondingTime = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnbondingTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + x.Address = append(x.Address[:0], dAtA[iNdEx:postIndex]...) + if x.Address == nil { + x.Address = []byte{} } iNdEx = postIndex case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxValidators", wireType) - } - x.MaxValidators = 0 - 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++ - x.MaxValidators |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxEntries", wireType) - } - x.MaxEntries = 0 - 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++ - x.MaxEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) - } - x.HistoricalEntries = 0 - 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++ - x.HistoricalEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BondDenom", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1188,39 +1083,7 @@ func (x *fastReflection_StakingParams) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.BondDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinCommissionRate", 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.MinCommissionRate = string(dAtA[iNdEx:postIndex]) + x.Info = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1278,8 +1141,8 @@ 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"` + // Array of validator base wallet addresses which are whitelisted to be able to MsgCreateValidator. + ValidatorWhitelist []*PendingValidator `protobuf:"bytes,2,rep,name=validator_whitelist,json=validatorWhitelist,proto3" json:"validator_whitelist,omitempty"` } func (x *Params) Reset() { @@ -1309,37 +1172,25 @@ func (x *Params) GetAdmins() []string { return nil } -func (x *Params) GetAllowValidatorSelfExit() bool { +func (x *Params) GetValidatorWhitelist() []*PendingValidator { if x != nil { - return x.AllowValidatorSelfExit + return x.ValidatorWhitelist } - return false + return nil } -// StakingParams defines the parameters for the x/staking module. -type StakingParams struct { +type PendingValidator struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // unbonding_time is the time duration of unbonding. - UnbondingTime *durationpb.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3" json:"unbonding_time,omitempty"` - // max_validators is the maximum number of validators. - MaxValidators uint32 `protobuf:"varint,2,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty"` - // max_entries is the max entries for either unbonding delegation or - // redelegation (per pair/trio). - MaxEntries uint32 `protobuf:"varint,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"` - // historical_entries is the number of historical entries to persist. - HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty"` - // bond_denom defines the bondable coin denomination. - BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty"` - // min_commission_rate is the chain-wide minimum commission rate that a - // validator can charge their delegators - MinCommissionRate string `protobuf:"bytes,6,opt,name=min_commission_rate,json=minCommissionRate,proto3" json:"min_commission_rate,omitempty"` -} - -func (x *StakingParams) Reset() { - *x = StakingParams{} + // cosmos-sdk accountaddress + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` +} + +func (x *PendingValidator) Reset() { + *x = PendingValidator{} if protoimpl.UnsafeEnabled { mi := &file_strangelove_ventures_poa_v1_params_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1347,55 +1198,27 @@ func (x *StakingParams) Reset() { } } -func (x *StakingParams) String() string { +func (x *PendingValidator) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StakingParams) ProtoMessage() {} +func (*PendingValidator) ProtoMessage() {} -// Deprecated: Use StakingParams.ProtoReflect.Descriptor instead. -func (*StakingParams) Descriptor() ([]byte, []int) { +// Deprecated: Use PendingValidator.ProtoReflect.Descriptor instead. +func (*PendingValidator) Descriptor() ([]byte, []int) { return file_strangelove_ventures_poa_v1_params_proto_rawDescGZIP(), []int{1} } -func (x *StakingParams) GetUnbondingTime() *durationpb.Duration { +func (x *PendingValidator) GetAddress() []byte { if x != nil { - return x.UnbondingTime + return x.Address } return nil } -func (x *StakingParams) GetMaxValidators() uint32 { - if x != nil { - return x.MaxValidators - } - return 0 -} - -func (x *StakingParams) GetMaxEntries() uint32 { - if x != nil { - return x.MaxEntries - } - return 0 -} - -func (x *StakingParams) GetHistoricalEntries() uint32 { - if x != nil { - return x.HistoricalEntries - } - return 0 -} - -func (x *StakingParams) GetBondDenom() string { - if x != nil { - return x.BondDenom - } - return "" -} - -func (x *StakingParams) GetMinCommissionRate() string { +func (x *PendingValidator) GetInfo() string { if x != nil { - return x.MinCommissionRate + return x.Info } return "" } @@ -1413,58 +1236,38 @@ 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, 0x99, 0x01, 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, 0x5e, + 0x0a, 0x13, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x77, 0x68, 0x69, 0x74, + 0x65, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 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, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, + 0x67, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x12, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 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, 0x40, 0x0a, 0x10, 0x50, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 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 ( @@ -1481,12 +1284,11 @@ func file_strangelove_ventures_poa_v1_params_proto_rawDescGZIP() []byte { var file_strangelove_ventures_poa_v1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 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 + (*Params)(nil), // 0: strangelove_ventures.poa.v1.Params + (*PendingValidator)(nil), // 1: strangelove_ventures.poa.v1.PendingValidator } 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.Params.validator_whitelist:type_name -> strangelove_ventures.poa.v1.PendingValidator 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 @@ -1513,7 +1315,7 @@ func file_strangelove_ventures_poa_v1_params_proto_init() { } } file_strangelove_ventures_poa_v1_params_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StakingParams); i { + switch v := v.(*PendingValidator); i { case 0: return &v.state case 1: diff --git a/api/v1/query.pulsar.go b/api/v1/query.pulsar.go index acb5dab..327bc14 100644 --- a/api/v1/query.pulsar.go +++ b/api/v1/query.pulsar.go @@ -806,23 +806,23 @@ func (x *fastReflection_ParamsResponse) ProtoMethods() *protoiface.Methods { } var ( - md_QueryPendingValidatorsRequest protoreflect.MessageDescriptor + md_QueryWhitelistedValidatorsRequest protoreflect.MessageDescriptor ) func init() { file_strangelove_ventures_poa_v1_query_proto_init() - md_QueryPendingValidatorsRequest = File_strangelove_ventures_poa_v1_query_proto.Messages().ByName("QueryPendingValidatorsRequest") + md_QueryWhitelistedValidatorsRequest = File_strangelove_ventures_poa_v1_query_proto.Messages().ByName("QueryWhitelistedValidatorsRequest") } -var _ protoreflect.Message = (*fastReflection_QueryPendingValidatorsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryWhitelistedValidatorsRequest)(nil) -type fastReflection_QueryPendingValidatorsRequest QueryPendingValidatorsRequest +type fastReflection_QueryWhitelistedValidatorsRequest QueryWhitelistedValidatorsRequest -func (x *QueryPendingValidatorsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryPendingValidatorsRequest)(x) +func (x *QueryWhitelistedValidatorsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryWhitelistedValidatorsRequest)(x) } -func (x *QueryPendingValidatorsRequest) slowProtoReflect() protoreflect.Message { +func (x *QueryWhitelistedValidatorsRequest) slowProtoReflect() protoreflect.Message { mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -834,43 +834,43 @@ func (x *QueryPendingValidatorsRequest) slowProtoReflect() protoreflect.Message return mi.MessageOf(x) } -var _fastReflection_QueryPendingValidatorsRequest_messageType fastReflection_QueryPendingValidatorsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryPendingValidatorsRequest_messageType{} +var _fastReflection_QueryWhitelistedValidatorsRequest_messageType fastReflection_QueryWhitelistedValidatorsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryWhitelistedValidatorsRequest_messageType{} -type fastReflection_QueryPendingValidatorsRequest_messageType struct{} +type fastReflection_QueryWhitelistedValidatorsRequest_messageType struct{} -func (x fastReflection_QueryPendingValidatorsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryPendingValidatorsRequest)(nil) +func (x fastReflection_QueryWhitelistedValidatorsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryWhitelistedValidatorsRequest)(nil) } -func (x fastReflection_QueryPendingValidatorsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryPendingValidatorsRequest) +func (x fastReflection_QueryWhitelistedValidatorsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryWhitelistedValidatorsRequest) } -func (x fastReflection_QueryPendingValidatorsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingValidatorsRequest +func (x fastReflection_QueryWhitelistedValidatorsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryWhitelistedValidatorsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryPendingValidatorsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryPendingValidatorsRequest +func (x *fastReflection_QueryWhitelistedValidatorsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryWhitelistedValidatorsRequest } // 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_QueryPendingValidatorsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryPendingValidatorsRequest_messageType +func (x *fastReflection_QueryWhitelistedValidatorsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryWhitelistedValidatorsRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryPendingValidatorsRequest) New() protoreflect.Message { - return new(fastReflection_QueryPendingValidatorsRequest) +func (x *fastReflection_QueryWhitelistedValidatorsRequest) New() protoreflect.Message { + return new(fastReflection_QueryWhitelistedValidatorsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryPendingValidatorsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryPendingValidatorsRequest)(x) +func (x *fastReflection_QueryWhitelistedValidatorsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryWhitelistedValidatorsRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -878,7 +878,7 @@ func (x *fastReflection_QueryPendingValidatorsRequest) Interface() protoreflect. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryPendingValidatorsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -892,13 +892,13 @@ func (x *fastReflection_QueryPendingValidatorsRequest) Range(f func(protoreflect // 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_QueryPendingValidatorsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) 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.QueryPendingValidatorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryPendingValidatorsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest does not contain field %s", fd.FullName())) } } @@ -908,13 +908,13 @@ func (x *fastReflection_QueryPendingValidatorsRequest) Has(fd protoreflect.Field // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingValidatorsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) 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.QueryPendingValidatorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryPendingValidatorsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest does not contain field %s", fd.FullName())) } } @@ -924,13 +924,13 @@ func (x *fastReflection_QueryPendingValidatorsRequest) Clear(fd protoreflect.Fie // 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_QueryPendingValidatorsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) 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.QueryPendingValidatorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryPendingValidatorsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest does not contain field %s", descriptor.FullName())) } } @@ -944,13 +944,13 @@ func (x *fastReflection_QueryPendingValidatorsRequest) Get(descriptor protorefle // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingValidatorsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) 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.QueryPendingValidatorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryPendingValidatorsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest does not contain field %s", fd.FullName())) } } @@ -964,36 +964,36 @@ func (x *fastReflection_QueryPendingValidatorsRequest) Set(fd protoreflect.Field // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingValidatorsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) 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.QueryPendingValidatorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryPendingValidatorsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest 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_QueryPendingValidatorsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) 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.QueryPendingValidatorsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryPendingValidatorsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest 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_QueryPendingValidatorsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.QueryPendingValidatorsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest", d.FullName())) } panic("unreachable") } @@ -1001,7 +1001,7 @@ func (x *fastReflection_QueryPendingValidatorsRequest) WhichOneof(d protoreflect // 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_QueryPendingValidatorsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1012,7 +1012,7 @@ func (x *fastReflection_QueryPendingValidatorsRequest) GetUnknown() protoreflect // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryPendingValidatorsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1024,7 +1024,7 @@ func (x *fastReflection_QueryPendingValidatorsRequest) SetUnknown(fields protore // 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_QueryPendingValidatorsRequest) IsValid() bool { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) IsValid() bool { return x != nil } @@ -1034,9 +1034,9 @@ func (x *fastReflection_QueryPendingValidatorsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryPendingValidatorsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryWhitelistedValidatorsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryPendingValidatorsRequest) + x := input.Message.Interface().(*QueryWhitelistedValidatorsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1058,7 +1058,7 @@ func (x *fastReflection_QueryPendingValidatorsRequest) ProtoMethods() *protoifac } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingValidatorsRequest) + x := input.Message.Interface().(*QueryWhitelistedValidatorsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1088,7 +1088,7 @@ func (x *fastReflection_QueryPendingValidatorsRequest) ProtoMethods() *protoifac }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryPendingValidatorsRequest) + x := input.Message.Interface().(*QueryWhitelistedValidatorsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1120,10 +1120,10 @@ func (x *fastReflection_QueryPendingValidatorsRequest) ProtoMethods() *protoifac fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingValidatorsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWhitelistedValidatorsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryPendingValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWhitelistedValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1161,77 +1161,77 @@ func (x *fastReflection_QueryPendingValidatorsRequest) ProtoMethods() *protoifac } } -var _ protoreflect.List = (*_PendingValidatorsResponse_1_list)(nil) +var _ protoreflect.List = (*_WhitelistValidatorsResponse_1_list)(nil) -type _PendingValidatorsResponse_1_list struct { +type _WhitelistValidatorsResponse_1_list struct { list *[]*Validator } -func (x *_PendingValidatorsResponse_1_list) Len() int { +func (x *_WhitelistValidatorsResponse_1_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_PendingValidatorsResponse_1_list) Get(i int) protoreflect.Value { +func (x *_WhitelistValidatorsResponse_1_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_PendingValidatorsResponse_1_list) Set(i int, value protoreflect.Value) { +func (x *_WhitelistValidatorsResponse_1_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Validator) (*x.list)[i] = concreteValue } -func (x *_PendingValidatorsResponse_1_list) Append(value protoreflect.Value) { +func (x *_WhitelistValidatorsResponse_1_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Validator) *x.list = append(*x.list, concreteValue) } -func (x *_PendingValidatorsResponse_1_list) AppendMutable() protoreflect.Value { +func (x *_WhitelistValidatorsResponse_1_list) AppendMutable() protoreflect.Value { v := new(Validator) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_PendingValidatorsResponse_1_list) Truncate(n int) { +func (x *_WhitelistValidatorsResponse_1_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_PendingValidatorsResponse_1_list) NewElement() protoreflect.Value { +func (x *_WhitelistValidatorsResponse_1_list) NewElement() protoreflect.Value { v := new(Validator) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_PendingValidatorsResponse_1_list) IsValid() bool { +func (x *_WhitelistValidatorsResponse_1_list) IsValid() bool { return x.list != nil } var ( - md_PendingValidatorsResponse protoreflect.MessageDescriptor - fd_PendingValidatorsResponse_pending protoreflect.FieldDescriptor + md_WhitelistValidatorsResponse protoreflect.MessageDescriptor + fd_WhitelistValidatorsResponse_pending protoreflect.FieldDescriptor ) func init() { file_strangelove_ventures_poa_v1_query_proto_init() - md_PendingValidatorsResponse = File_strangelove_ventures_poa_v1_query_proto.Messages().ByName("PendingValidatorsResponse") - fd_PendingValidatorsResponse_pending = md_PendingValidatorsResponse.Fields().ByName("pending") + md_WhitelistValidatorsResponse = File_strangelove_ventures_poa_v1_query_proto.Messages().ByName("WhitelistValidatorsResponse") + fd_WhitelistValidatorsResponse_pending = md_WhitelistValidatorsResponse.Fields().ByName("pending") } -var _ protoreflect.Message = (*fastReflection_PendingValidatorsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_WhitelistValidatorsResponse)(nil) -type fastReflection_PendingValidatorsResponse PendingValidatorsResponse +type fastReflection_WhitelistValidatorsResponse WhitelistValidatorsResponse -func (x *PendingValidatorsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_PendingValidatorsResponse)(x) +func (x *WhitelistValidatorsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_WhitelistValidatorsResponse)(x) } -func (x *PendingValidatorsResponse) slowProtoReflect() protoreflect.Message { +func (x *WhitelistValidatorsResponse) slowProtoReflect() protoreflect.Message { mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1243,43 +1243,43 @@ func (x *PendingValidatorsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_PendingValidatorsResponse_messageType fastReflection_PendingValidatorsResponse_messageType -var _ protoreflect.MessageType = fastReflection_PendingValidatorsResponse_messageType{} +var _fastReflection_WhitelistValidatorsResponse_messageType fastReflection_WhitelistValidatorsResponse_messageType +var _ protoreflect.MessageType = fastReflection_WhitelistValidatorsResponse_messageType{} -type fastReflection_PendingValidatorsResponse_messageType struct{} +type fastReflection_WhitelistValidatorsResponse_messageType struct{} -func (x fastReflection_PendingValidatorsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_PendingValidatorsResponse)(nil) +func (x fastReflection_WhitelistValidatorsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_WhitelistValidatorsResponse)(nil) } -func (x fastReflection_PendingValidatorsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_PendingValidatorsResponse) +func (x fastReflection_WhitelistValidatorsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_WhitelistValidatorsResponse) } -func (x fastReflection_PendingValidatorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_PendingValidatorsResponse +func (x fastReflection_WhitelistValidatorsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_WhitelistValidatorsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_PendingValidatorsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_PendingValidatorsResponse +func (x *fastReflection_WhitelistValidatorsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_WhitelistValidatorsResponse } // 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_PendingValidatorsResponse) Type() protoreflect.MessageType { - return _fastReflection_PendingValidatorsResponse_messageType +func (x *fastReflection_WhitelistValidatorsResponse) Type() protoreflect.MessageType { + return _fastReflection_WhitelistValidatorsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_PendingValidatorsResponse) New() protoreflect.Message { - return new(fastReflection_PendingValidatorsResponse) +func (x *fastReflection_WhitelistValidatorsResponse) New() protoreflect.Message { + return new(fastReflection_WhitelistValidatorsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_PendingValidatorsResponse) Interface() protoreflect.ProtoMessage { - return (*PendingValidatorsResponse)(x) +func (x *fastReflection_WhitelistValidatorsResponse) Interface() protoreflect.ProtoMessage { + return (*WhitelistValidatorsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1287,10 +1287,10 @@ func (x *fastReflection_PendingValidatorsResponse) Interface() protoreflect.Prot // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_PendingValidatorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_WhitelistValidatorsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if len(x.Pending) != 0 { - value := protoreflect.ValueOfList(&_PendingValidatorsResponse_1_list{list: &x.Pending}) - if !f(fd_PendingValidatorsResponse_pending, value) { + value := protoreflect.ValueOfList(&_WhitelistValidatorsResponse_1_list{list: &x.Pending}) + if !f(fd_WhitelistValidatorsResponse_pending, value) { return } } @@ -1307,15 +1307,15 @@ func (x *fastReflection_PendingValidatorsResponse) Range(f func(protoreflect.Fie // 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_PendingValidatorsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_WhitelistValidatorsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "strangelove_ventures.poa.v1.PendingValidatorsResponse.pending": + case "strangelove_ventures.poa.v1.WhitelistValidatorsResponse.pending": return len(x.Pending) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidatorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.WhitelistValidatorsResponse")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidatorsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.WhitelistValidatorsResponse does not contain field %s", fd.FullName())) } } @@ -1325,15 +1325,15 @@ func (x *fastReflection_PendingValidatorsResponse) Has(fd protoreflect.FieldDesc // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PendingValidatorsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_WhitelistValidatorsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "strangelove_ventures.poa.v1.PendingValidatorsResponse.pending": + case "strangelove_ventures.poa.v1.WhitelistValidatorsResponse.pending": x.Pending = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidatorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.WhitelistValidatorsResponse")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidatorsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.WhitelistValidatorsResponse does not contain field %s", fd.FullName())) } } @@ -1343,19 +1343,19 @@ func (x *fastReflection_PendingValidatorsResponse) Clear(fd protoreflect.FieldDe // 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_PendingValidatorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_WhitelistValidatorsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "strangelove_ventures.poa.v1.PendingValidatorsResponse.pending": + case "strangelove_ventures.poa.v1.WhitelistValidatorsResponse.pending": if len(x.Pending) == 0 { - return protoreflect.ValueOfList(&_PendingValidatorsResponse_1_list{}) + return protoreflect.ValueOfList(&_WhitelistValidatorsResponse_1_list{}) } - listValue := &_PendingValidatorsResponse_1_list{list: &x.Pending} + listValue := &_WhitelistValidatorsResponse_1_list{list: &x.Pending} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidatorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.WhitelistValidatorsResponse")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidatorsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.WhitelistValidatorsResponse does not contain field %s", descriptor.FullName())) } } @@ -1369,17 +1369,17 @@ func (x *fastReflection_PendingValidatorsResponse) Get(descriptor protoreflect.F // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PendingValidatorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_WhitelistValidatorsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "strangelove_ventures.poa.v1.PendingValidatorsResponse.pending": + case "strangelove_ventures.poa.v1.WhitelistValidatorsResponse.pending": lv := value.List() - clv := lv.(*_PendingValidatorsResponse_1_list) + clv := lv.(*_WhitelistValidatorsResponse_1_list) x.Pending = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidatorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.WhitelistValidatorsResponse")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidatorsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.WhitelistValidatorsResponse does not contain field %s", fd.FullName())) } } @@ -1393,45 +1393,45 @@ func (x *fastReflection_PendingValidatorsResponse) Set(fd protoreflect.FieldDesc // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PendingValidatorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_WhitelistValidatorsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "strangelove_ventures.poa.v1.PendingValidatorsResponse.pending": + case "strangelove_ventures.poa.v1.WhitelistValidatorsResponse.pending": if x.Pending == nil { x.Pending = []*Validator{} } - value := &_PendingValidatorsResponse_1_list{list: &x.Pending} + value := &_WhitelistValidatorsResponse_1_list{list: &x.Pending} return protoreflect.ValueOfList(value) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidatorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.WhitelistValidatorsResponse")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidatorsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.WhitelistValidatorsResponse 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_PendingValidatorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_WhitelistValidatorsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "strangelove_ventures.poa.v1.PendingValidatorsResponse.pending": + case "strangelove_ventures.poa.v1.WhitelistValidatorsResponse.pending": list := []*Validator{} - return protoreflect.ValueOfList(&_PendingValidatorsResponse_1_list{list: &list}) + return protoreflect.ValueOfList(&_WhitelistValidatorsResponse_1_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.PendingValidatorsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.WhitelistValidatorsResponse")) } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.PendingValidatorsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message strangelove_ventures.poa.v1.WhitelistValidatorsResponse 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_PendingValidatorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_WhitelistValidatorsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.PendingValidatorsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.WhitelistValidatorsResponse", d.FullName())) } panic("unreachable") } @@ -1439,7 +1439,7 @@ func (x *fastReflection_PendingValidatorsResponse) WhichOneof(d protoreflect.One // 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_PendingValidatorsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_WhitelistValidatorsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1450,7 +1450,7 @@ func (x *fastReflection_PendingValidatorsResponse) GetUnknown() protoreflect.Raw // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_PendingValidatorsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_WhitelistValidatorsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1462,7 +1462,7 @@ func (x *fastReflection_PendingValidatorsResponse) SetUnknown(fields protoreflec // 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_PendingValidatorsResponse) IsValid() bool { +func (x *fastReflection_WhitelistValidatorsResponse) IsValid() bool { return x != nil } @@ -1472,9 +1472,9 @@ func (x *fastReflection_PendingValidatorsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_PendingValidatorsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_WhitelistValidatorsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*PendingValidatorsResponse) + x := input.Message.Interface().(*WhitelistValidatorsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1502,7 +1502,7 @@ func (x *fastReflection_PendingValidatorsResponse) ProtoMethods() *protoiface.Me } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*PendingValidatorsResponse) + x := input.Message.Interface().(*WhitelistValidatorsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1548,7 +1548,7 @@ func (x *fastReflection_PendingValidatorsResponse) ProtoMethods() *protoiface.Me }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*PendingValidatorsResponse) + x := input.Message.Interface().(*WhitelistValidatorsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1580,10 +1580,10 @@ func (x *fastReflection_PendingValidatorsResponse) ProtoMethods() *protoiface.Me fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PendingValidatorsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: WhitelistValidatorsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PendingValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: WhitelistValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1655,830 +1655,6 @@ func (x *fastReflection_PendingValidatorsResponse) ProtoMethods() *protoiface.Me } } -var ( - md_QueryConsensusPowerRequest protoreflect.MessageDescriptor - fd_QueryConsensusPowerRequest_validator_address protoreflect.FieldDescriptor -) - -func init() { - file_strangelove_ventures_poa_v1_query_proto_init() - md_QueryConsensusPowerRequest = File_strangelove_ventures_poa_v1_query_proto.Messages().ByName("QueryConsensusPowerRequest") - fd_QueryConsensusPowerRequest_validator_address = md_QueryConsensusPowerRequest.Fields().ByName("validator_address") -} - -var _ protoreflect.Message = (*fastReflection_QueryConsensusPowerRequest)(nil) - -type fastReflection_QueryConsensusPowerRequest QueryConsensusPowerRequest - -func (x *QueryConsensusPowerRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryConsensusPowerRequest)(x) -} - -func (x *QueryConsensusPowerRequest) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[4] - 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_QueryConsensusPowerRequest_messageType fastReflection_QueryConsensusPowerRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryConsensusPowerRequest_messageType{} - -type fastReflection_QueryConsensusPowerRequest_messageType struct{} - -func (x fastReflection_QueryConsensusPowerRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryConsensusPowerRequest)(nil) -} -func (x fastReflection_QueryConsensusPowerRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryConsensusPowerRequest) -} -func (x fastReflection_QueryConsensusPowerRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryConsensusPowerRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryConsensusPowerRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryConsensusPowerRequest -} - -// 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_QueryConsensusPowerRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryConsensusPowerRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryConsensusPowerRequest) New() protoreflect.Message { - return new(fastReflection_QueryConsensusPowerRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryConsensusPowerRequest) Interface() protoreflect.ProtoMessage { - return (*QueryConsensusPowerRequest)(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_QueryConsensusPowerRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_QueryConsensusPowerRequest_validator_address, 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_QueryConsensusPowerRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerRequest.validator_address": - return x.ValidatorAddress != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerRequest 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_QueryConsensusPowerRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerRequest.validator_address": - x.ValidatorAddress = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerRequest 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_QueryConsensusPowerRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerRequest.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerRequest 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_QueryConsensusPowerRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerRequest.validator_address": - x.ValidatorAddress = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerRequest 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_QueryConsensusPowerRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerRequest.validator_address": - panic(fmt.Errorf("field validator_address of message strangelove_ventures.poa.v1.QueryConsensusPowerRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerRequest 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_QueryConsensusPowerRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerRequest.validator_address": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerRequest")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerRequest 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_QueryConsensusPowerRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.QueryConsensusPowerRequest", 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_QueryConsensusPowerRequest) 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_QueryConsensusPowerRequest) 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_QueryConsensusPowerRequest) 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_QueryConsensusPowerRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryConsensusPowerRequest) - 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.ValidatorAddress) - if l > 0 { - 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().(*QueryConsensusPowerRequest) - 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 len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - 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().(*QueryConsensusPowerRequest) - 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: QueryConsensusPowerRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConsensusPowerRequest: 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 ValidatorAddress", 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - 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_QueryConsensusPowerResponse protoreflect.MessageDescriptor - fd_QueryConsensusPowerResponse_consensus_power protoreflect.FieldDescriptor -) - -func init() { - file_strangelove_ventures_poa_v1_query_proto_init() - md_QueryConsensusPowerResponse = File_strangelove_ventures_poa_v1_query_proto.Messages().ByName("QueryConsensusPowerResponse") - fd_QueryConsensusPowerResponse_consensus_power = md_QueryConsensusPowerResponse.Fields().ByName("consensus_power") -} - -var _ protoreflect.Message = (*fastReflection_QueryConsensusPowerResponse)(nil) - -type fastReflection_QueryConsensusPowerResponse QueryConsensusPowerResponse - -func (x *QueryConsensusPowerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryConsensusPowerResponse)(x) -} - -func (x *QueryConsensusPowerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[5] - 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_QueryConsensusPowerResponse_messageType fastReflection_QueryConsensusPowerResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryConsensusPowerResponse_messageType{} - -type fastReflection_QueryConsensusPowerResponse_messageType struct{} - -func (x fastReflection_QueryConsensusPowerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryConsensusPowerResponse)(nil) -} -func (x fastReflection_QueryConsensusPowerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryConsensusPowerResponse) -} -func (x fastReflection_QueryConsensusPowerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryConsensusPowerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryConsensusPowerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryConsensusPowerResponse -} - -// 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_QueryConsensusPowerResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryConsensusPowerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryConsensusPowerResponse) New() protoreflect.Message { - return new(fastReflection_QueryConsensusPowerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryConsensusPowerResponse) Interface() protoreflect.ProtoMessage { - return (*QueryConsensusPowerResponse)(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_QueryConsensusPowerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ConsensusPower != int64(0) { - value := protoreflect.ValueOfInt64(x.ConsensusPower) - if !f(fd_QueryConsensusPowerResponse_consensus_power, 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_QueryConsensusPowerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerResponse.consensus_power": - return x.ConsensusPower != int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerResponse 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_QueryConsensusPowerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerResponse.consensus_power": - x.ConsensusPower = int64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerResponse 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_QueryConsensusPowerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerResponse.consensus_power": - value := x.ConsensusPower - return protoreflect.ValueOfInt64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerResponse 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_QueryConsensusPowerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerResponse.consensus_power": - x.ConsensusPower = value.Int() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerResponse 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_QueryConsensusPowerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerResponse.consensus_power": - panic(fmt.Errorf("field consensus_power of message strangelove_ventures.poa.v1.QueryConsensusPowerResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerResponse 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_QueryConsensusPowerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.QueryConsensusPowerResponse.consensus_power": - return protoreflect.ValueOfInt64(int64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.QueryConsensusPowerResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.QueryConsensusPowerResponse 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_QueryConsensusPowerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.QueryConsensusPowerResponse", 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_QueryConsensusPowerResponse) 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_QueryConsensusPowerResponse) 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_QueryConsensusPowerResponse) 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_QueryConsensusPowerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryConsensusPowerResponse) - 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.ConsensusPower != 0 { - n += 1 + runtime.Sov(uint64(x.ConsensusPower)) - } - 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().(*QueryConsensusPowerResponse) - 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.ConsensusPower != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.ConsensusPower)) - i-- - dAtA[i] = 0x8 - } - 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().(*QueryConsensusPowerResponse) - 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: QueryConsensusPowerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryConsensusPowerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ConsensusPower", wireType) - } - x.ConsensusPower = 0 - 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++ - x.ConsensusPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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, - } -} - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -2556,15 +1732,15 @@ func (x *ParamsResponse) GetParams() *Params { return nil } -// QueryPendingValidatorsRequest is the request type for the Query/PendingValidators RPC method. -type QueryPendingValidatorsRequest struct { +// QueryWhitelistedValidatorsRequest is the request type for the Query/PendingValidators RPC method. +type QueryWhitelistedValidatorsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *QueryPendingValidatorsRequest) Reset() { - *x = QueryPendingValidatorsRequest{} +func (x *QueryWhitelistedValidatorsRequest) Reset() { + *x = QueryWhitelistedValidatorsRequest{} if protoimpl.UnsafeEnabled { mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2572,19 +1748,19 @@ func (x *QueryPendingValidatorsRequest) Reset() { } } -func (x *QueryPendingValidatorsRequest) String() string { +func (x *QueryWhitelistedValidatorsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryPendingValidatorsRequest) ProtoMessage() {} +func (*QueryWhitelistedValidatorsRequest) ProtoMessage() {} -// Deprecated: Use QueryPendingValidatorsRequest.ProtoReflect.Descriptor instead. -func (*QueryPendingValidatorsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryWhitelistedValidatorsRequest.ProtoReflect.Descriptor instead. +func (*QueryWhitelistedValidatorsRequest) Descriptor() ([]byte, []int) { return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{2} } // QueryPendingValidatorResponse is the response type for the Query/PendingValidators RPC method. -type PendingValidatorsResponse struct { +type WhitelistValidatorsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -2593,8 +1769,8 @@ type PendingValidatorsResponse struct { Pending []*Validator `protobuf:"bytes,1,rep,name=pending,proto3" json:"pending,omitempty"` } -func (x *PendingValidatorsResponse) Reset() { - *x = PendingValidatorsResponse{} +func (x *WhitelistValidatorsResponse) Reset() { + *x = WhitelistValidatorsResponse{} if protoimpl.UnsafeEnabled { mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2602,98 +1778,24 @@ func (x *PendingValidatorsResponse) Reset() { } } -func (x *PendingValidatorsResponse) String() string { +func (x *WhitelistValidatorsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*PendingValidatorsResponse) ProtoMessage() {} +func (*WhitelistValidatorsResponse) ProtoMessage() {} -// Deprecated: Use PendingValidatorsResponse.ProtoReflect.Descriptor instead. -func (*PendingValidatorsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use WhitelistValidatorsResponse.ProtoReflect.Descriptor instead. +func (*WhitelistValidatorsResponse) Descriptor() ([]byte, []int) { return file_strangelove_ventures_poa_v1_query_proto_rawDescGZIP(), []int{3} } -func (x *PendingValidatorsResponse) GetPending() []*Validator { +func (x *WhitelistValidatorsResponse) GetPending() []*Validator { if x != nil { return x.Pending } return nil } -// QueryConsensusPowerRequest is the request type for the Query/ConsensusPower RPC method. -type QueryConsensusPowerRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // validator_address is the address of the validator - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (x *QueryConsensusPowerRequest) Reset() { - *x = QueryConsensusPowerRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryConsensusPowerRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -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} -} - -func (x *QueryConsensusPowerRequest) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -// QueryConsensusPowerResponse is the response type for the Query/ConsensusPowerRequest RPC method. -type QueryConsensusPowerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // consensus_power is the returned consensus power from the BFT consensus mechanism - ConsensusPower int64 `protobuf:"varint,1,opt,name=consensus_power,json=consensusPower,proto3" json:"consensus_power,omitempty"` -} - -func (x *QueryConsensusPowerResponse) Reset() { - *x = QueryConsensusPowerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryConsensusPowerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -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} -} - -func (x *QueryConsensusPowerResponse) GetConsensusPower() int64 { - if x != nil { - return x.ConsensusPower - } - return 0 -} - var File_strangelove_ventures_poa_v1_query_proto protoreflect.FileDescriptor var file_strangelove_ventures_poa_v1_query_proto_rawDesc = []byte{ @@ -2716,72 +1818,53 @@ var file_strangelove_ventures_poa_v1_query_proto_rawDesc = []byte{ 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, - 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, - 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, + 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x23, 0x0a, 0x21, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 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, + 0x74, 0x22, 0x65, 0x0a, 0x1b, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 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, - 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, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, + 0x07, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x32, 0xbc, 0x02, 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, 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, 0xb2, 0x01, 0x0a, 0x13, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, + 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3e, 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, 0x57, 0x68, + 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x6f, 0x72, 0x73, 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, 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, 0x2e, 0x70, 0x6f, 0x61, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x70, + 0x6f, 0x61, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x77, 0x68, + 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 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, 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, + 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, - 0x3a, 0x3a, 0x50, 0x6f, 0x61, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 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,28 +1879,24 @@ 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 + (*QueryParamsRequest)(nil), // 0: strangelove_ventures.poa.v1.QueryParamsRequest + (*ParamsResponse)(nil), // 1: strangelove_ventures.poa.v1.ParamsResponse + (*QueryWhitelistedValidatorsRequest)(nil), // 2: strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest + (*WhitelistValidatorsResponse)(nil), // 3: strangelove_ventures.poa.v1.WhitelistValidatorsResponse + (*Params)(nil), // 4: strangelove_ventures.poa.v1.Params + (*Validator)(nil), // 5: 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 + 4, // 0: strangelove_ventures.poa.v1.ParamsResponse.params:type_name -> strangelove_ventures.poa.v1.Params + 5, // 1: strangelove_ventures.poa.v1.WhitelistValidatorsResponse.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, // 3: strangelove_ventures.poa.v1.Query.WhitelistValidators:input_type -> strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest + 1, // 4: strangelove_ventures.poa.v1.Query.Params:output_type -> strangelove_ventures.poa.v1.ParamsResponse + 3, // 5: strangelove_ventures.poa.v1.Query.WhitelistValidators:output_type -> strangelove_ventures.poa.v1.WhitelistValidatorsResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] 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 @@ -2856,7 +1935,7 @@ func file_strangelove_ventures_poa_v1_query_proto_init() { } } file_strangelove_ventures_poa_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryPendingValidatorsRequest); i { + switch v := v.(*QueryWhitelistedValidatorsRequest); i { case 0: return &v.state case 1: @@ -2868,31 +1947,7 @@ func file_strangelove_ventures_poa_v1_query_proto_init() { } } file_strangelove_ventures_poa_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PendingValidatorsResponse); 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[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryConsensusPowerRequest); 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[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryConsensusPowerResponse); i { + switch v := v.(*WhitelistValidatorsResponse); i { case 0: return &v.state case 1: @@ -2910,7 +1965,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..390812b 100644 --- a/api/v1/query_grpc.pb.go +++ b/api/v1/query_grpc.pb.go @@ -19,9 +19,8 @@ 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" + Query_Params_FullMethodName = "/strangelove_ventures.poa.v1.Query/Params" + Query_WhitelistValidators_FullMethodName = "/strangelove_ventures.poa.v1.Query/WhitelistValidators" ) // QueryClient is the client API for Query service. @@ -30,10 +29,9 @@ const ( 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. - ConsensusPower(ctx context.Context, in *QueryConsensusPowerRequest, opts ...grpc.CallOption) (*QueryConsensusPowerResponse, error) + // PendingValidators returns currently pending whitelist of validators of the module. + // These accounts have not yet created their validator, they just are allowed to do so once the team sends them the initial token. + WhitelistValidators(ctx context.Context, in *QueryWhitelistedValidatorsRequest, opts ...grpc.CallOption) (*WhitelistValidatorsResponse, error) } type queryClient struct { @@ -53,18 +51,9 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . 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...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ConsensusPower(ctx context.Context, in *QueryConsensusPowerRequest, opts ...grpc.CallOption) (*QueryConsensusPowerResponse, error) { - out := new(QueryConsensusPowerResponse) - err := c.cc.Invoke(ctx, Query_ConsensusPower_FullMethodName, in, out, opts...) +func (c *queryClient) WhitelistValidators(ctx context.Context, in *QueryWhitelistedValidatorsRequest, opts ...grpc.CallOption) (*WhitelistValidatorsResponse, error) { + out := new(WhitelistValidatorsResponse) + err := c.cc.Invoke(ctx, Query_WhitelistValidators_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -77,10 +66,9 @@ func (c *queryClient) ConsensusPower(ctx context.Context, in *QueryConsensusPowe 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. - ConsensusPower(context.Context, *QueryConsensusPowerRequest) (*QueryConsensusPowerResponse, error) + // PendingValidators returns currently pending whitelist of validators of the module. + // These accounts have not yet created their validator, they just are allowed to do so once the team sends them the initial token. + WhitelistValidators(context.Context, *QueryWhitelistedValidatorsRequest) (*WhitelistValidatorsResponse, error) mustEmbedUnimplementedQueryServer() } @@ -91,11 +79,8 @@ 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") -} -func (UnimplementedQueryServer) ConsensusPower(context.Context, *QueryConsensusPowerRequest) (*QueryConsensusPowerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ConsensusPower not implemented") +func (UnimplementedQueryServer) WhitelistValidators(context.Context, *QueryWhitelistedValidatorsRequest) (*WhitelistValidatorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WhitelistValidators not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} @@ -128,38 +113,20 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf 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 { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).PendingValidators(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_PendingValidators_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PendingValidators(ctx, req.(*QueryPendingValidatorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ConsensusPower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryConsensusPowerRequest) +func _Query_WhitelistValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWhitelistedValidatorsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).ConsensusPower(ctx, in) + return srv.(QueryServer).WhitelistValidators(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Query_ConsensusPower_FullMethodName, + FullMethod: Query_WhitelistValidators_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ConsensusPower(ctx, req.(*QueryConsensusPowerRequest)) + return srv.(QueryServer).WhitelistValidators(ctx, req.(*QueryWhitelistedValidatorsRequest)) } return interceptor(ctx, in, info, handler) } @@ -176,12 +143,8 @@ var Query_ServiceDesc = grpc.ServiceDesc{ Handler: _Query_Params_Handler, }, { - MethodName: "PendingValidators", - Handler: _Query_PendingValidators_Handler, - }, - { - MethodName: "ConsensusPower", - Handler: _Query_ConsensusPower_Handler, + MethodName: "WhitelistValidators", + Handler: _Query_WhitelistValidators_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/v1/tx.pulsar.go b/api/v1/tx.pulsar.go index c53ed39..f1c2597 100644 --- a/api/v1/tx.pulsar.go +++ b/api/v1/tx.pulsar.go @@ -3495,861 +3495,6 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } -var ( - md_MsgUpdateStakingParams protoreflect.MessageDescriptor - fd_MsgUpdateStakingParams_sender protoreflect.FieldDescriptor - fd_MsgUpdateStakingParams_params protoreflect.FieldDescriptor -) - -func init() { - file_strangelove_ventures_poa_v1_tx_proto_init() - md_MsgUpdateStakingParams = File_strangelove_ventures_poa_v1_tx_proto.Messages().ByName("MsgUpdateStakingParams") - fd_MsgUpdateStakingParams_sender = md_MsgUpdateStakingParams.Fields().ByName("sender") - fd_MsgUpdateStakingParams_params = md_MsgUpdateStakingParams.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateStakingParams)(nil) - -type fastReflection_MsgUpdateStakingParams MsgUpdateStakingParams - -func (x *MsgUpdateStakingParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateStakingParams)(x) -} - -func (x *MsgUpdateStakingParams) slowProtoReflect() protoreflect.Message { - 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 { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateStakingParams_messageType fastReflection_MsgUpdateStakingParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateStakingParams_messageType{} - -type fastReflection_MsgUpdateStakingParams_messageType struct{} - -func (x fastReflection_MsgUpdateStakingParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateStakingParams)(nil) -} -func (x fastReflection_MsgUpdateStakingParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateStakingParams) -} -func (x fastReflection_MsgUpdateStakingParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateStakingParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateStakingParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateStakingParams -} - -// 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_MsgUpdateStakingParams) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateStakingParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateStakingParams) New() protoreflect.Message { - return new(fastReflection_MsgUpdateStakingParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateStakingParams) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateStakingParams)(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_MsgUpdateStakingParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgUpdateStakingParams_sender, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_MsgUpdateStakingParams_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_MsgUpdateStakingParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.sender": - return x.Sender != "" - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateStakingParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParams 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_MsgUpdateStakingParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.sender": - x.Sender = "" - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateStakingParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParams 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_MsgUpdateStakingParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.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.MsgUpdateStakingParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParams 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_MsgUpdateStakingParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.sender": - x.Sender = value.Interface().(string) - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.params": - x.Params = value.Message().Interface().(*StakingParams) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateStakingParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParams 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_MsgUpdateStakingParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.params": - if x.Params == nil { - x.Params = new(StakingParams) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.sender": - panic(fmt.Errorf("field sender of message strangelove_ventures.poa.v1.MsgUpdateStakingParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateStakingParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParams 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_MsgUpdateStakingParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.sender": - return protoreflect.ValueOfString("") - case "strangelove_ventures.poa.v1.MsgUpdateStakingParams.params": - m := new(StakingParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: strangelove_ventures.poa.v1.MsgUpdateStakingParams")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParams 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_MsgUpdateStakingParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.MsgUpdateStakingParams", 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_MsgUpdateStakingParams) 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_MsgUpdateStakingParams) 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_MsgUpdateStakingParams) 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_MsgUpdateStakingParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateStakingParams) - 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().(*MsgUpdateStakingParams) - 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().(*MsgUpdateStakingParams) - 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: MsgUpdateStakingParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateStakingParams: 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 = &StakingParams{} - } - 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_MsgUpdateStakingParamsResponse protoreflect.MessageDescriptor -) - -func init() { - file_strangelove_ventures_poa_v1_tx_proto_init() - md_MsgUpdateStakingParamsResponse = File_strangelove_ventures_poa_v1_tx_proto.Messages().ByName("MsgUpdateStakingParamsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateStakingParamsResponse)(nil) - -type fastReflection_MsgUpdateStakingParamsResponse MsgUpdateStakingParamsResponse - -func (x *MsgUpdateStakingParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateStakingParamsResponse)(x) -} - -func (x *MsgUpdateStakingParamsResponse) slowProtoReflect() protoreflect.Message { - 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 { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateStakingParamsResponse_messageType fastReflection_MsgUpdateStakingParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateStakingParamsResponse_messageType{} - -type fastReflection_MsgUpdateStakingParamsResponse_messageType struct{} - -func (x fastReflection_MsgUpdateStakingParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateStakingParamsResponse)(nil) -} -func (x fastReflection_MsgUpdateStakingParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateStakingParamsResponse) -} -func (x fastReflection_MsgUpdateStakingParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateStakingParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateStakingParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateStakingParamsResponse -} - -// 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_MsgUpdateStakingParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateStakingParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateStakingParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateStakingParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateStakingParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateStakingParamsResponse)(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_MsgUpdateStakingParamsResponse) 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_MsgUpdateStakingParamsResponse) 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.MsgUpdateStakingParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse 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_MsgUpdateStakingParamsResponse) 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.MsgUpdateStakingParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse 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_MsgUpdateStakingParamsResponse) 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.MsgUpdateStakingParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse 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_MsgUpdateStakingParamsResponse) 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.MsgUpdateStakingParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse 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_MsgUpdateStakingParamsResponse) 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.MsgUpdateStakingParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse 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_MsgUpdateStakingParamsResponse) 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.MsgUpdateStakingParamsResponse")) - } - panic(fmt.Errorf("message strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse 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_MsgUpdateStakingParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in strangelove_ventures.poa.v1.MsgUpdateStakingParamsResponse", 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_MsgUpdateStakingParamsResponse) 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_MsgUpdateStakingParamsResponse) 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_MsgUpdateStakingParamsResponse) 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_MsgUpdateStakingParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateStakingParamsResponse) - 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().(*MsgUpdateStakingParamsResponse) - 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().(*MsgUpdateStakingParamsResponse) - 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: MsgUpdateStakingParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateStakingParamsResponse: 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_MsgCreateValidator protoreflect.MessageDescriptor fd_MsgCreateValidator_description protoreflect.FieldDescriptor @@ -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 { @@ -5808,81 +4953,6 @@ 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 - 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"` - // x/staking module parameters (all must be supplied). - Params *StakingParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *MsgUpdateStakingParams) Reset() { - *x = MsgUpdateStakingParams{} - if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateStakingParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -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} -} - -func (x *MsgUpdateStakingParams) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *MsgUpdateStakingParams) GetParams() *StakingParams { - if x != nil { - return x.Params - } - return nil -} - -// MsgUpdateStakingParamsResponse defines the response structure for executing a -// MsgUpdateStakingParams message. -type MsgUpdateStakingParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateStakingParamsResponse) Reset() { - *x = MsgUpdateStakingParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_strangelove_ventures_poa_v1_tx_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateStakingParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -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} -} - // cosmos-sdk/proto/staking/v1beta1/tx.proto // MsgCreateValidator defines a SDK message for creating a new validator. type MsgCreateValidator struct { @@ -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 @@ -6070,122 +5140,70 @@ var file_strangelove_ventures_poa_v1_tx_proto_rawDesc = []byte{ 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, - 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, + 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, 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, + 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, 0x80, 0x01, 0x0a, 0x03, + 0x4d, 0x73, 0x67, 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, 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, - 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, 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, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 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, 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,49 +5218,35 @@ 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 - (*MsgRemoveValidator)(nil), // 2: strangelove_ventures.poa.v1.MsgRemoveValidator - (*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 + (*MsgSetPower)(nil), // 0: strangelove_ventures.poa.v1.MsgSetPower + (*MsgSetPowerResponse)(nil), // 1: strangelove_ventures.poa.v1.MsgSetPowerResponse + (*MsgRemoveValidator)(nil), // 2: strangelove_ventures.poa.v1.MsgRemoveValidator + (*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 + (*MsgCreateValidator)(nil), // 8: strangelove_ventures.poa.v1.MsgCreateValidator + (*MsgCreateValidatorResponse)(nil), // 9: strangelove_ventures.poa.v1.MsgCreateValidatorResponse + (*Params)(nil), // 10: strangelove_ventures.poa.v1.Params + (*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.MsgUpdateParams.params:type_name -> strangelove_ventures.poa.v1.Params + 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 + 6, // 4: strangelove_ventures.poa.v1.Msg.UpdateParams:input_type -> strangelove_ventures.poa.v1.MsgUpdateParams + 7, // 5: strangelove_ventures.poa.v1.Msg.UpdateParams:output_type -> strangelove_ventures.poa.v1.MsgUpdateParamsResponse + 5, // [5:6] is the sub-list for method output_type + 4, // [4:5] 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() } @@ -6350,30 +5354,6 @@ func file_strangelove_ventures_poa_v1_tx_proto_init() { } } 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 - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_strangelove_ventures_poa_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateStakingParamsResponse); 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[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgCreateValidator); i { case 0: return &v.state @@ -6385,7 +5365,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 +5384,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..8982c21 100644 --- a/api/v1/tx_grpc.pb.go +++ b/api/v1/tx_grpc.pb.go @@ -19,30 +19,15 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_CreateValidator_FullMethodName = "/strangelove_ventures.poa.v1.Msg/CreateValidator" - 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" + Msg_UpdateParams_FullMethodName = "/strangelove_ventures.poa.v1.Msg/UpdateParams" ) // MsgClient is the client API for Msg service. // // 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 MsgClient interface { - // CreateValidator is a wrapper method around the SDK's x/staking MsgCreateValidator. - CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error) - // SetPower sets the new power of a validator and accepts new validators into the set. - SetPower(ctx context.Context, in *MsgSetPower, opts ...grpc.CallOption) (*MsgSetPowerResponse, error) - // RemoveValidator removes a validator from the active set and unbonds their delegations. - 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) } type msgClient struct { @@ -53,42 +38,6 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { return &msgClient{cc} } -func (c *msgClient) CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error) { - out := new(MsgCreateValidatorResponse) - err := c.cc.Invoke(ctx, Msg_CreateValidator_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SetPower(ctx context.Context, in *MsgSetPower, opts ...grpc.CallOption) (*MsgSetPowerResponse, error) { - out := new(MsgSetPowerResponse) - err := c.cc.Invoke(ctx, Msg_SetPower_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RemoveValidator(ctx context.Context, in *MsgRemoveValidator, opts ...grpc.CallOption) (*MsgRemoveValidatorResponse, error) { - out := new(MsgRemoveValidatorResponse) - err := c.cc.Invoke(ctx, Msg_RemoveValidator_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RemovePending(ctx context.Context, in *MsgRemovePending, opts ...grpc.CallOption) (*MsgRemovePendingResponse, error) { - out := new(MsgRemovePendingResponse) - err := c.cc.Invoke(ctx, Msg_RemovePending_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - 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...) @@ -98,31 +47,12 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts 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...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility type MsgServer interface { - // CreateValidator is a wrapper method around the SDK's x/staking MsgCreateValidator. - CreateValidator(context.Context, *MsgCreateValidator) (*MsgCreateValidatorResponse, error) - // SetPower sets the new power of a validator and accepts new validators into the set. - SetPower(context.Context, *MsgSetPower) (*MsgSetPowerResponse, error) - // RemoveValidator removes a validator from the active set and unbonds their delegations. - 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() } @@ -130,24 +60,9 @@ type MsgServer interface { type UnimplementedMsgServer struct { } -func (UnimplementedMsgServer) CreateValidator(context.Context, *MsgCreateValidator) (*MsgCreateValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateValidator not implemented") -} -func (UnimplementedMsgServer) SetPower(context.Context, *MsgSetPower) (*MsgSetPowerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetPower not implemented") -} -func (UnimplementedMsgServer) RemoveValidator(context.Context, *MsgRemoveValidator) (*MsgRemoveValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveValidator not implemented") -} -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") -} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -161,78 +76,6 @@ func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { s.RegisterService(&Msg_ServiceDesc, srv) } -func _Msg_CreateValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateValidator) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_CreateValidator_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateValidator(ctx, req.(*MsgCreateValidator)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SetPower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSetPower) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetPower(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_SetPower_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetPower(ctx, req.(*MsgSetPower)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RemoveValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRemoveValidator) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RemoveValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_RemoveValidator_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RemoveValidator(ctx, req.(*MsgRemoveValidator)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RemovePending_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRemovePending) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RemovePending(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_RemovePending_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RemovePending(ctx, req.(*MsgRemovePending)) - } - 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 { @@ -251,24 +94,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in 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 { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateStakingParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_UpdateStakingParams_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateStakingParams(ctx, req.(*MsgUpdateStakingParams)) - } - return interceptor(ctx, in, info, handler) -} - // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -276,30 +101,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ ServiceName: "strangelove_ventures.poa.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "CreateValidator", - Handler: _Msg_CreateValidator_Handler, - }, - { - MethodName: "SetPower", - Handler: _Msg_SetPower_Handler, - }, - { - MethodName: "RemoveValidator", - Handler: _Msg_RemoveValidator_Handler, - }, - { - MethodName: "RemovePending", - Handler: _Msg_RemovePending_Handler, - }, { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, - { - MethodName: "UpdateStakingParams", - Handler: _Msg_UpdateStakingParams_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "strangelove_ventures/poa/v1/tx.proto", diff --git a/genesis.pb.go b/genesis.pb.go index 4a6dcd7..6d66ceb 100644 --- a/genesis.pb.go +++ b/genesis.pb.go @@ -5,7 +5,6 @@ package poa import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -70,54 +69,8 @@ func (m *GenesisState) GetParams() Params { return Params{} } -// PowerCache is a cached block or absolute change in power for ibc-go validations. -type PowerCache struct { - Power uint64 `protobuf:"varint,1,opt,name=power,proto3" json:"power,omitempty"` -} - -func (m *PowerCache) Reset() { *m = PowerCache{} } -func (m *PowerCache) String() string { return proto.CompactTextString(m) } -func (*PowerCache) ProtoMessage() {} -func (*PowerCache) Descriptor() ([]byte, []int) { - return fileDescriptor_d9ebd7913aa01cfd, []int{1} -} -func (m *PowerCache) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PowerCache) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PowerCache.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 *PowerCache) XXX_Merge(src proto.Message) { - xxx_messageInfo_PowerCache.Merge(m, src) -} -func (m *PowerCache) XXX_Size() int { - return m.Size() -} -func (m *PowerCache) XXX_DiscardUnknown() { - xxx_messageInfo_PowerCache.DiscardUnknown(m) -} - -var xxx_messageInfo_PowerCache proto.InternalMessageInfo - -func (m *PowerCache) GetPower() uint64 { - if m != nil { - return m.Power - } - return 0 -} - func init() { proto.RegisterType((*GenesisState)(nil), "strangelove_ventures.poa.v1.GenesisState") - proto.RegisterType((*PowerCache)(nil), "strangelove_ventures.poa.v1.PowerCache") } func init() { @@ -125,24 +78,21 @@ func init() { } var fileDescriptor_d9ebd7913aa01cfd = []byte{ - // 268 bytes of a gzipped FileDescriptorProto + // 220 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, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0xc6, 0xa6, 0x54, 0xaf, 0x20, 0x3f, 0x51, 0xaf, 0xcc, - 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, + 0x50, 0x4a, 0x24, 0x3d, 0x3f, 0x3d, 0x1f, 0xac, 0x4e, 0x1f, 0xc4, 0x82, 0x68, 0x91, 0xd2, 0xc6, + 0x67, 0x7a, 0x59, 0x62, 0x4e, 0x66, 0x4a, 0x62, 0x49, 0x7e, 0x11, 0x54, 0xb1, 0x06, 0x3e, 0xc5, + 0x05, 0x89, 0x45, 0x89, 0xb9, 0x50, 0x97, 0x48, 0xa9, 0xe0, 0x53, 0x59, 0x52, 0x01, 0x51, 0xa5, + 0x14, 0xc8, 0xc5, 0xe3, 0x0e, 0xf1, 0x40, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x23, 0x17, 0x1b, + 0xc4, 0x14, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x65, 0x3d, 0x3c, 0x1e, 0xd2, 0x0b, 0x00, + 0x2b, 0x75, 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0xd1, 0xc9, 0xf6, 0xc4, 0x23, 0x39, + 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, + 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x94, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, + 0xf3, 0x73, 0xf5, 0x91, 0x8c, 0xd5, 0x45, 0x76, 0x5d, 0x12, 0x1b, 0xd8, 0x61, 0xc6, 0x80, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x61, 0x39, 0x18, 0x53, 0x75, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -178,34 +128,6 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *PowerCache) 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 *PowerCache) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PowerCache) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Power != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Power)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -228,18 +150,6 @@ func (m *GenesisState) Size() (n int) { return n } -func (m *PowerCache) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Power != 0 { - n += 1 + sovGenesis(uint64(m.Power)) - } - return n -} - func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -329,75 +239,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } -func (m *PowerCache) 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 ErrIntOverflowGenesis - } - 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: PowerCache: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PowerCache: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Power", wireType) - } - m.Power = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Power |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/go.work.sum b/go.work.sum index 700d280..b0e47fc 100644 --- a/go.work.sum +++ b/go.work.sum @@ -385,6 +385,7 @@ cloud.google.com/go/workflows v1.12.4/go.mod h1:yQ7HUqOkdJK4duVtMeBCAOPiN1ZF1E9p cosmossdk.io/api v0.7.0/go.mod h1:kJFAEMLN57y0viszHDPLMmieF0471o5QAwwApa+270M= cosmossdk.io/api v0.7.1/go.mod h1:ure9edhcROIHsngavM6mBLilMGFnfjhV/AaYhEMUkdo= cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/api v0.7.3/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= cosmossdk.io/log v1.2.0/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= @@ -672,9 +673,11 @@ github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8 github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI= github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= +github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= github.com/cosmos/cosmos-sdk v0.50.0-rc.0.0.20230913151713-376c3ea7fd0c/go.mod h1:A4EWz1NvP6QHQf0y9+BpnB/0ruFrONnru+vEWwIX4DY= github.com/cosmos/cosmos-sdk v0.50.1/go.mod h1:fsLSPGstCwn6MMsFDMAQWGJj8E4sYsN9Gnu1bGE5imA= github.com/cosmos/gogoproto v1.4.3/go.mod h1:0hLIG5TR7IvV1fme1HCFKjfzW9X2x0Mo+RooWXCnOWU= +github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= github.com/cosmos/iavl v1.0.0-rc.1/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/iavl v1.1.1/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= @@ -1032,12 +1035,14 @@ github.com/hashicorp/consul/sdk v0.14.1 h1:ZiwE2bKb+zro68sWzZ1SgHF3kRMBZ94TwOCFR github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/go-bexpr v0.1.10 h1:9kuI5PFotCboP3dkDYFr/wi0gg0QVbSNz5oFRpxn4uE= github.com/hashicorp/go-bexpr v0.1.10/go.mod h1:oxlubA2vC/gFVfX1A6JGp7ls7uCDlfJn732ehYYg+g0= +github.com/hashicorp/go-getter v1.7.3/go.mod h1:W7TalhMmbPmsSMdNjD0ZskARur/9GJ17cfHTRtXV744= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.2.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-metrics v0.5.1/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-metrics v0.5.2/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.5 h1:i9R9JSrqIz0QVLz3sz+i3YJdT7TTSLcfLLzJi9aZTuI= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= @@ -1275,6 +1280,7 @@ github.com/linxGnu/grocksdb v1.7.16/go.mod h1:JkS7pl5qWpGpuVb3bPqTz8nC12X3YtPZT+ github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= github.com/linxGnu/grocksdb v1.8.4/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= github.com/linxGnu/grocksdb v1.8.6/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= @@ -1460,6 +1466,7 @@ github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQm github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/petermattis/goid v0.0.0-20221215004737-a150e88a970d/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/phpdave11/gofpdf v1.4.2 h1:KPKiIbfwbvC/wOncwhrpRdXVj2CZTCFlw4wnoyjtHfQ= @@ -1529,6 +1536,7 @@ github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+L github.com/prometheus/client_model v0.2.1-0.20210607210712-147c58e9608a/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= @@ -1539,6 +1547,7 @@ github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/protolambda/bls12-381-util v0.0.0-20220416220906-d8552aa452c7 h1:cZC+usqsYgHtlBaGulVnZ1hfKAi8iWtujBnRLQE698c= github.com/protolambda/bls12-381-util v0.0.0-20220416220906-d8552aa452c7/go.mod h1:IToEjHuttnUzwZI5KBSM/LOOW3qLbbrHOEfp3SbECGY= github.com/quasilyte/go-ruleguard v0.4.0 h1:DyM6r+TKL+xbKB4Nm7Afd1IQh9kEUKQs2pboWGKtvQo= @@ -1851,6 +1860,7 @@ golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N0 golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= +golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= @@ -1872,17 +1882,21 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20170207211851-4464e7848382/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5 h1:ObuXPmIgI4ZMyQLIz48cJYgSyWdjUXc2SZAdyJMwEAU= golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1904,12 +1918,14 @@ golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808/go.mod h1:KG1lNk5ZFNssSZLrpVb4sMXKMpGwGXOxSG3rnu2gZQQ= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1953,6 +1969,7 @@ google.golang.org/genproto v0.0.0-20231212172506-995d672761c0/go.mod h1:l/k7rMz0 google.golang.org/genproto v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:+Rvu7ElI+aLzyDQhpHMFMMltsD6m7nqpuWDd2CwJw3k= google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:mqHbVIp48Muh7Ywss/AD6I5kNVKZMmAa/QEW58Gxp2s= google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:RdyHbowztCGQySiCvQPgWQWgWhGnouTdCflKoDBt32U= google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= @@ -1965,6 +1982,7 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240116215550-a9fa1716bcac/go. google.golang.org/genproto/googleapis/api v0.0.0-20240122161410-6c6643bf1457/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= google.golang.org/genproto/googleapis/api v0.0.0-20240125205218-1f4bbc51befe/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= +google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014/go.mod h1:rbHMSEDyoYX62nRVLOCc4Qt1HbsdytAYoVwgjiOhF3I= google.golang.org/genproto/googleapis/api v0.0.0-20240213162025-012b6fc9bca9/go.mod h1:PVreiBMirk8ypES6aw9d4p6iiBNSIfZEBqr3UGoAi2E= google.golang.org/genproto/googleapis/bytestream v0.0.0-20231120223509-83a465c0220f h1:hL+1ptbhFoeL1HcROQ8OGXaqH0jYRRibgWQWco0/Ugc= google.golang.org/genproto/googleapis/bytestream v0.0.0-20231120223509-83a465c0220f/go.mod h1:iIgEblxoG4klcXsG0d9cpoxJ4xndv6+1FkDROCHhPRI= diff --git a/keeper/genesis.go b/keeper/genesis.go index 8b9e24b..4e344b9 100644 --- a/keeper/genesis.go +++ b/keeper/genesis.go @@ -8,46 +8,9 @@ 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{}, - }); err != nil { - return err - } - - if err := k.CachedBlockPower.Set(ctx, poa.PowerCache{ - Power: 0, - }); err != nil { - return err - } - - if err := 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. -func (k *Keeper) InitCacheStores(ctx context.Context) error { - currValPower, err := k.GetStakingKeeper().GetLastTotalPower(ctx) - if err != nil { - return err - } - - // Set the current block (last power) as a H-1 cache. - if err := k.SetCachedBlockPower(ctx, currValPower.Uint64()); err != nil { - return err - } - - if err := k.SetAbsoluteChangedInBlockPower(ctx, 0); err != nil { - return err - } - - return nil -} - // ExportGenesis exports the module's state to a genesis state. func (k *Keeper) ExportGenesis(ctx context.Context) *poa.GenesisState { params, err := k.GetParams(ctx) diff --git a/keeper/keeper.go b/keeper/keeper.go index 636bcaa..fef9142 100644 --- a/keeper/keeper.go +++ b/keeper/keeper.go @@ -24,19 +24,19 @@ type Keeper struct { cdc codec.BinaryCodec stakingKeeper *stakingkeeper.Keeper - slashKeeper SlashingKeeper - bankKeeper BankKeeper + // slashKeeper SlashingKeeper + bankKeeper BankKeeper + + // addressCodec address.Codec logger log.Logger // state management - Schema collections.Schema - Params collections.Item[poa.Params] - PendingValidators collections.Item[poa.Validators] - UpdatedValidatorsCache collections.KeySet[string] + Schema collections.Schema + Params collections.Item[poa.Params] - CachedBlockPower collections.Item[poa.PowerCache] - AbsoluteChangedInBlockPower collections.Item[poa.PowerCache] + // TODO: make this a map[valAddr -> string] where string is some note, contact info, etc + PendingValidators collections.Map[sdk.AccAddress, string] } // NewKeeper creates a new poa Keeper instance @@ -46,6 +46,7 @@ func NewKeeper( sk *stakingkeeper.Keeper, slk SlashingKeeper, bk BankKeeper, + // ac address.Codec, logger log.Logger, ) Keeper { logger = logger.With(log.ModuleKey, "x/"+poa.ModuleName) @@ -55,17 +56,14 @@ func NewKeeper( k := Keeper{ cdc: cdc, stakingKeeper: sk, - slashKeeper: slk, - bankKeeper: bk, - logger: logger, + // slashKeeper: slk, + bankKeeper: bk, + // addressCodec: ac, + 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)), + Params: collections.NewItem(sb, poa.ParamsKey, "params", codec.CollValue[poa.Params](cdc)), + PendingValidators: collections.NewMap[sdk.AccAddress, string](sb, poa.PendingValidatorsKey, "pending", sdk.AccAddressKey, collections.StringValue), } schema, err := sb.Build() @@ -87,10 +85,14 @@ func (k Keeper) GetValidatorAddressCodec() addresscodec.Codec { return k.stakingKeeper.ValidatorAddressCodec() } +// func (k Keeper) GetAccountAddressCodec() addresscodec.Codec { +// return k.addressCodec +// } + // GetSlashingKeeper returns the slashing keeper. -func (k Keeper) GetSlashingKeeper() SlashingKeeper { - return k.slashKeeper -} +// func (k Keeper) GetSlashingKeeper() SlashingKeeper { +// return k.slashKeeper +// } func (k Keeper) GetBankKeeper() BankKeeper { return k.bankKeeper diff --git a/keeper/msg_server.go b/keeper/msg_server.go index e15496f..d100789 100644 --- a/keeper/msg_server.go +++ b/keeper/msg_server.go @@ -4,13 +4,10 @@ import ( "context" "fmt" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" errorsmod "cosmossdk.io/errors" - sdkmath "cosmossdk.io/math" "github.com/strangelove-ventures/poa" ) @@ -86,11 +83,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 +92,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) @@ -151,128 +139,22 @@ func (ms msgServer) RemovePending(ctx context.Context, msg *poa.MsgRemovePending return nil, errorsmod.Wrapf(poa.ErrNotAnAuthority, "sender %s is not an authority", msg.Sender) } - 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. -// - Create hook logic removed (this is done after acceptance). -// - Valiadtor is added to the pending queue (AddPendingValidator). -func (ms msgServer) CreateValidator(ctx context.Context, msg *poa.MsgCreateValidator) (*poa.MsgCreateValidatorResponse, error) { valAddr, err := ms.k.GetValidatorAddressCodec().StringToBytes(msg.ValidatorAddress) if err != nil { return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid validator address: %s", err) } - if err := msg.Validate(ms.k.GetValidatorAddressCodec()); err != nil { - return nil, err - } - - minCommRate, err := ms.k.stakingKeeper.MinCommissionRate(ctx) - if err != nil { - return nil, err - } - - if msg.Commission.Rate.LT(minCommRate) { - return nil, errorsmod.Wrapf(stakingtypes.ErrCommissionLTMinRate, "cannot set validator commission to less than minimum rate of %s", minCommRate) - } - - // check to see if the pubkey or sender has been registered before - if _, err := ms.k.stakingKeeper.GetValidator(ctx, valAddr); err == nil { - return nil, stakingtypes.ErrValidatorOwnerExists - } - - pk, ok := msg.Pubkey.GetCachedValue().(cryptotypes.PubKey) - if !ok { - return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidType, "CreateValidator expecting cryptotypes.PubKey, got %T. developer note: make sure to impl codectypes.UnpackInterfacesMessage", pk) - } - - if _, err := ms.k.stakingKeeper.GetValidatorByConsAddr(ctx, sdk.GetConsAddress(pk)); err == nil { - return nil, stakingtypes.ErrValidatorPubKeyExists - } - - if _, err := msg.Description.EnsureLength(); err != nil { - return nil, err - } - - sdkCtx := sdk.UnwrapSDKContext(ctx) - cp := sdkCtx.ConsensusParams() - if cp.Validator != nil { - pkType := pk.Type() - hasKeyType := false - for _, keyType := range cp.Validator.PubKeyTypes { - if pkType == keyType { - hasKeyType = true - - break - } - } - if !hasKeyType { - return nil, errorsmod.Wrapf( - stakingtypes.ErrValidatorPubKeyTypeNotSupported, - "got: %s, expected: %s", pk.Type(), cp.Validator.PubKeyTypes, - ) - } - } - - validator, err := stakingtypes.NewValidator(msg.ValidatorAddress, pk, stakingtypes.Description{ - Moniker: msg.Description.Moniker, - Identity: msg.Description.Identity, - Website: msg.Description.Website, - SecurityContact: msg.Description.SecurityContact, - Details: msg.Description.Details, - }) - if err != nil { - return nil, err - } - - commission := stakingtypes.NewCommissionWithTime( - msg.Commission.Rate, msg.Commission.MaxRate, - msg.Commission.MaxChangeRate, sdkCtx.BlockHeader().Time, - ) - - validator, err = validator.SetInitialCommission(commission) - if err != nil { - return nil, err - } - - validator.MinSelfDelegation = sdkmath.NewInt(1) - - // appends the validator to a queue to wait for approval from an admin. - if err := ms.k.AddPendingValidator(ctx, validator, pk); err != nil { - return nil, err - } - - return &poa.MsgCreateValidatorResponse{}, ms.k.UpdateBondedPoolPower(ctx) + return &poa.MsgRemovePendingResponse{}, ms.k.RemovePendingValidator(ctx, valAddr) } -// UpdateStakingParams wraps the x/staking module's UpdateStakingParams method so that only POA admins can invoke it. -func (ms msgServer) UpdateStakingParams(ctx context.Context, msg *poa.MsgUpdateStakingParams) (*poa.MsgUpdateStakingParamsResponse, error) { +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 } - stakingParams := stakingtypes.Params{ - UnbondingTime: msg.Params.UnbondingTime, - MaxValidators: msg.Params.MaxValidators, - MaxEntries: msg.Params.MaxEntries, - HistoricalEntries: msg.Params.HistoricalEntries, - BondDenom: msg.Params.BondDenom, - MinCommissionRate: msg.Params.MinCommissionRate, + if err := msg.Params.Validate(); err != nil { + return nil, err } - return &poa.MsgUpdateStakingParamsResponse{}, ms.k.stakingKeeper.SetParams(ctx, stakingParams) + return &poa.MsgUpdateParamsResponse{}, ms.k.SetParams(ctx, msg.Params) } diff --git a/keeper/pending.go b/keeper/pending.go index 0fa712b..ffd73d5 100644 --- a/keeper/pending.go +++ b/keeper/pending.go @@ -3,94 +3,61 @@ package keeper import ( "context" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" - cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/strangelove-ventures/poa" ) -// DefaultPendingValidators returns an empty pending validators set -func DefaultPendingValidators() poa.Validators { - return poa.Validators{ - Validators: []poa.Validator{}, - } -} - // AddPendingValidator adds a validator to the pending set -func (k Keeper) AddPendingValidator(ctx context.Context, newVal stakingtypes.Validator, pubKey cryptotypes.PubKey) error { - pkAny, err := codectypes.NewAnyWithValue(pubKey) - if err != nil { - return err - } - - newVal.ConsensusPubkey = pkAny - poaVal := poa.ConvertStakingToPOA(newVal) - - vals, err := k.GetPendingValidators(ctx) - if err != nil { - return err - } - - vals.Validators = append(vals.Validators, poaVal) +func (k Keeper) AddPendingValidator(ctx context.Context, valAddr []byte, info string) error { + return k.PendingValidators.Set(ctx, valAddr, info) +} - return k.PendingValidators.Set(ctx, vals) +func (k Keeper) RemovePendingValidator(ctx context.Context, valAddr sdk.AccAddress) error { + return k.PendingValidators.Remove(ctx, valAddr) } -func (k Keeper) RemovePendingValidator(ctx context.Context, valOpAddr string) error { - pending, err := k.GetPendingValidators(ctx) +// GetPendingValidators +func (k Keeper) GetPendingValidators(ctx context.Context) ([]poa.PendingValidator, error) { + iter, err := k.PendingValidators.Iterate(ctx, nil) if err != nil { - return err + return nil, err } + defer iter.Close() - vals := pending.Validators + pendingValidators := make([]poa.PendingValidator, 0) - for i, val := range vals { - if val.OperatorAddress == valOpAddr { - vals = append(vals[:i], vals[i+1:]...) - pending.Validators = vals - break + for ; iter.Valid(); iter.Next() { + key, err := iter.Key() + if err != nil { + return nil, err } - } - return k.PendingValidators.Set(ctx, pending) -} + val, err := iter.Value() + if err != nil { + return nil, err + } -// GetPendingValidators -func (k Keeper) GetPendingValidators(ctx context.Context) (poa.Validators, error) { - pending, err := k.PendingValidators.Get(ctx) - if err != nil { - return DefaultPendingValidators(), err + pendingValidators = append(pendingValidators, poa.PendingValidator{ + Address: key, + Info: val, + }) } - return pending, nil + return pendingValidators, nil } -func (k Keeper) GetPendingValidator(ctx context.Context, operatorAddr string) (poa.Validator, error) { - pending, err := k.GetPendingValidators(ctx) +func (k Keeper) GetPendingValidator(ctx context.Context, addr sdk.AccAddress) (poa.PendingValidator, error) { + info, err := k.PendingValidators.Get(ctx, addr) if err != nil { - return poa.Validator{}, err - } - - for _, val := range pending.Validators { - if val.OperatorAddress == operatorAddr { - // required to unpack the pubKey properly - if err := val.UnpackInterfaces(k.cdc); err != nil { - return poa.Validator{}, err - } - - return val, nil - } + return poa.PendingValidator{}, err } - return poa.Validator{}, nil + return poa.PendingValidator{ + Address: addr, + Info: info, + }, nil } -func (k Keeper) IsValidatorPending(ctx context.Context, operatorAddr string) (bool, error) { - pending, err := k.GetPendingValidator(ctx, operatorAddr) - if err != nil { - return false, err - } - - return pending.OperatorAddress == operatorAddr, nil +func (k Keeper) IsValidatorPending(ctx context.Context, operator sdk.AccAddress) (bool, error) { + return k.PendingValidators.Has(ctx, operator) } diff --git a/params.pb.go b/params.pb.go index c3dd587..cfbb660 100644 --- a/params.pb.go +++ b/params.pb.go @@ -4,25 +4,21 @@ package poa import ( - cosmossdk_io_math "cosmossdk.io/math" fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" _ "google.golang.org/protobuf/types/known/durationpb" io "io" math "math" math_bits "math/bits" - time "time" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf -var _ = time.Kitchen // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -34,8 +30,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 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"` + // Array of validator base wallet addresses which are whitelisted to be able to MsgCreateValidator. + ValidatorWhitelist []*PendingValidator `protobuf:"bytes,2,rep,name=validator_whitelist,json=validatorWhitelist,proto3" json:"validator_whitelist,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -77,43 +73,31 @@ func (m *Params) GetAdmins() []string { return nil } -func (m *Params) GetAllowValidatorSelfExit() bool { +func (m *Params) GetValidatorWhitelist() []*PendingValidator { if m != nil { - return m.AllowValidatorSelfExit + return m.ValidatorWhitelist } - return false + return nil } -// StakingParams defines the parameters for the x/staking module. -type StakingParams struct { - // unbonding_time is the time duration of unbonding. - UnbondingTime time.Duration `protobuf:"bytes,1,opt,name=unbonding_time,json=unbondingTime,proto3,stdduration" json:"unbonding_time"` - // max_validators is the maximum number of validators. - MaxValidators uint32 `protobuf:"varint,2,opt,name=max_validators,json=maxValidators,proto3" json:"max_validators,omitempty"` - // max_entries is the max entries for either unbonding delegation or - // redelegation (per pair/trio). - MaxEntries uint32 `protobuf:"varint,3,opt,name=max_entries,json=maxEntries,proto3" json:"max_entries,omitempty"` - // historical_entries is the number of historical entries to persist. - HistoricalEntries uint32 `protobuf:"varint,4,opt,name=historical_entries,json=historicalEntries,proto3" json:"historical_entries,omitempty"` - // bond_denom defines the bondable coin denomination. - BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty"` - // min_commission_rate is the chain-wide minimum commission rate that a - // validator can charge their delegators - MinCommissionRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,6,opt,name=min_commission_rate,json=minCommissionRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_commission_rate" yaml:"min_commission_rate"` +type PendingValidator struct { + // cosmos-sdk accountaddress + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Info string `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` } -func (m *StakingParams) Reset() { *m = StakingParams{} } -func (m *StakingParams) String() string { return proto.CompactTextString(m) } -func (*StakingParams) ProtoMessage() {} -func (*StakingParams) Descriptor() ([]byte, []int) { +func (m *PendingValidator) Reset() { *m = PendingValidator{} } +func (m *PendingValidator) String() string { return proto.CompactTextString(m) } +func (*PendingValidator) ProtoMessage() {} +func (*PendingValidator) Descriptor() ([]byte, []int) { return fileDescriptor_b1333a19bedb70c3, []int{1} } -func (m *StakingParams) XXX_Unmarshal(b []byte) error { +func (m *PendingValidator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *StakingParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *PendingValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_StakingParams.Marshal(b, m, deterministic) + return xxx_messageInfo_PendingValidator.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -123,56 +107,35 @@ func (m *StakingParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } -func (m *StakingParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_StakingParams.Merge(m, src) +func (m *PendingValidator) XXX_Merge(src proto.Message) { + xxx_messageInfo_PendingValidator.Merge(m, src) } -func (m *StakingParams) XXX_Size() int { +func (m *PendingValidator) XXX_Size() int { return m.Size() } -func (m *StakingParams) XXX_DiscardUnknown() { - xxx_messageInfo_StakingParams.DiscardUnknown(m) -} - -var xxx_messageInfo_StakingParams proto.InternalMessageInfo - -func (m *StakingParams) GetUnbondingTime() time.Duration { - if m != nil { - return m.UnbondingTime - } - return 0 -} - -func (m *StakingParams) GetMaxValidators() uint32 { - if m != nil { - return m.MaxValidators - } - return 0 +func (m *PendingValidator) XXX_DiscardUnknown() { + xxx_messageInfo_PendingValidator.DiscardUnknown(m) } -func (m *StakingParams) GetMaxEntries() uint32 { - if m != nil { - return m.MaxEntries - } - return 0 -} +var xxx_messageInfo_PendingValidator proto.InternalMessageInfo -func (m *StakingParams) GetHistoricalEntries() uint32 { +func (m *PendingValidator) GetAddress() []byte { if m != nil { - return m.HistoricalEntries + return m.Address } - return 0 + return nil } -func (m *StakingParams) GetBondDenom() string { +func (m *PendingValidator) GetInfo() string { if m != nil { - return m.BondDenom + return m.Info } return "" } func init() { proto.RegisterType((*Params)(nil), "strangelove_ventures.poa.v1.Params") - proto.RegisterType((*StakingParams)(nil), "strangelove_ventures.poa.v1.StakingParams") + proto.RegisterType((*PendingValidator)(nil), "strangelove_ventures.poa.v1.PendingValidator") } func init() { @@ -180,41 +143,28 @@ 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, + // 331 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xc1, 0x4a, 0xc3, 0x40, + 0x10, 0x86, 0xb3, 0xad, 0x54, 0xba, 0x7a, 0xd0, 0x28, 0x1a, 0x2b, 0x6c, 0x4b, 0xbd, 0x04, 0xa1, + 0x59, 0xaa, 0x37, 0x41, 0x10, 0x9f, 0xa0, 0xe4, 0xa0, 0xe0, 0xc1, 0xb2, 0x6d, 0xb6, 0xdb, 0x85, + 0x64, 0x27, 0xec, 0x6e, 0xe2, 0x3b, 0x78, 0xf2, 0xa8, 0xb7, 0x3e, 0x82, 0x8f, 0xe1, 0xb1, 0x47, + 0x8f, 0xd2, 0x1e, 0xf4, 0x31, 0xa4, 0x49, 0x2b, 0x45, 0xc4, 0xcb, 0x32, 0xff, 0xce, 0xcc, 0xc7, + 0xcc, 0x3f, 0xd8, 0x37, 0x56, 0x33, 0x25, 0x78, 0x0c, 0x39, 0xef, 0xe7, 0x5c, 0xd9, 0x4c, 0x73, + 0x43, 0x53, 0x60, 0x34, 0xef, 0xd2, 0x94, 0x69, 0x96, 0x98, 0x20, 0xd5, 0x60, 0xc1, 0x3d, 0xfe, + 0xab, 0x32, 0x48, 0x81, 0x05, 0x79, 0xb7, 0xb1, 0x2f, 0x40, 0x40, 0x51, 0x47, 0x17, 0x51, 0xd9, + 0xd2, 0xd8, 0x65, 0x89, 0x54, 0x40, 0x8b, 0x77, 0xf9, 0x45, 0x04, 0x80, 0x88, 0x39, 0x2d, 0xd4, + 0x20, 0x1b, 0xd1, 0x28, 0xd3, 0xcc, 0x4a, 0x50, 0xcb, 0xfc, 0xd1, 0x10, 0x4c, 0x02, 0xa6, 0x5f, + 0xb2, 0x4a, 0x51, 0xa6, 0xda, 0x2f, 0x08, 0xd7, 0x7a, 0xc5, 0x44, 0xee, 0x01, 0xae, 0xb1, 0x28, + 0x91, 0xca, 0x78, 0xa8, 0x55, 0xf5, 0xeb, 0xe1, 0x52, 0xb9, 0xf7, 0x78, 0x2f, 0x67, 0xb1, 0x8c, + 0x98, 0x05, 0xdd, 0x7f, 0x18, 0x4b, 0xcb, 0x63, 0x69, 0xac, 0x57, 0x69, 0x55, 0xfd, 0xad, 0xb3, + 0x4e, 0xf0, 0xcf, 0x06, 0x41, 0x8f, 0xab, 0x48, 0x2a, 0x71, 0xb3, 0x6a, 0x0f, 0xdd, 0x1f, 0xd2, + 0xed, 0x0a, 0x74, 0x71, 0xf8, 0x3c, 0x69, 0x3a, 0x5f, 0x93, 0x26, 0x7a, 0xfc, 0x7c, 0x3d, 0xc5, + 0x0b, 0x97, 0x4a, 0x8b, 0xda, 0x57, 0x78, 0xe7, 0x37, 0xc0, 0xf5, 0xf0, 0x26, 0x8b, 0x22, 0xcd, + 0xcd, 0x62, 0x4a, 0xe4, 0x6f, 0x87, 0x2b, 0xe9, 0xba, 0x78, 0x43, 0xaa, 0x11, 0x78, 0x95, 0x16, + 0xf2, 0xeb, 0x61, 0x11, 0x5f, 0x5f, 0xbe, 0xcd, 0x08, 0x9a, 0xce, 0x08, 0xfa, 0x98, 0x11, 0xf4, + 0x34, 0x27, 0xce, 0x74, 0x4e, 0x9c, 0xf7, 0x39, 0x71, 0xee, 0x4e, 0x84, 0xb4, 0xe3, 0x6c, 0x10, + 0x0c, 0x21, 0xa1, 0x6b, 0x1b, 0x74, 0xd6, 0xaf, 0x35, 0xa8, 0x15, 0x1e, 0x9d, 0x7f, 0x07, 0x00, + 0x00, 0xff, 0xff, 0xd4, 0x7c, 0x5f, 0x08, 0xd0, 0x01, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -244,48 +194,14 @@ func (this *Params) Equal(that interface{}) bool { return false } } - if this.AllowValidatorSelfExit != that1.AllowValidatorSelfExit { + if len(this.ValidatorWhitelist) != len(that1.ValidatorWhitelist) { return false } - return true -} -func (this *StakingParams) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*StakingParams) - if !ok { - that2, ok := that.(StakingParams) - if ok { - that1 = &that2 - } else { + for i := range this.ValidatorWhitelist { + if !this.ValidatorWhitelist[i].Equal(that1.ValidatorWhitelist[i]) { return false } } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.UnbondingTime != that1.UnbondingTime { - return false - } - if this.MaxValidators != that1.MaxValidators { - return false - } - if this.MaxEntries != that1.MaxEntries { - return false - } - if this.HistoricalEntries != that1.HistoricalEntries { - return false - } - if this.BondDenom != that1.BondDenom { - return false - } - if !this.MinCommissionRate.Equal(that1.MinCommissionRate) { - return false - } return true } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -308,15 +224,19 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.AllowValidatorSelfExit { - i-- - if m.AllowValidatorSelfExit { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + if len(m.ValidatorWhitelist) > 0 { + for iNdEx := len(m.ValidatorWhitelist) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ValidatorWhitelist[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 } - i-- - dAtA[i] = 0x10 } if len(m.Admins) > 0 { for iNdEx := len(m.Admins) - 1; iNdEx >= 0; iNdEx-- { @@ -330,7 +250,7 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *StakingParams) Marshal() (dAtA []byte, err error) { +func (m *PendingValidator) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -340,56 +260,30 @@ func (m *StakingParams) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *StakingParams) MarshalTo(dAtA []byte) (int, error) { +func (m *PendingValidator) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *StakingParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *PendingValidator) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - { - size := m.MinCommissionRate.Size() - i -= size - if _, err := m.MinCommissionRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - if len(m.BondDenom) > 0 { - i -= len(m.BondDenom) - copy(dAtA[i:], m.BondDenom) - i = encodeVarintParams(dAtA, i, uint64(len(m.BondDenom))) - i-- - dAtA[i] = 0x2a - } - if m.HistoricalEntries != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.HistoricalEntries)) - i-- - dAtA[i] = 0x20 - } - if m.MaxEntries != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxEntries)) + if len(m.Info) > 0 { + i -= len(m.Info) + copy(dAtA[i:], m.Info) + i = encodeVarintParams(dAtA, i, uint64(len(m.Info))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x12 } - if m.MaxValidators != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxValidators)) + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintParams(dAtA, i, uint64(len(m.Address))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0xa } - n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.UnbondingTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingTime):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintParams(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -416,35 +310,29 @@ func (m *Params) Size() (n int) { n += 1 + l + sovParams(uint64(l)) } } - if m.AllowValidatorSelfExit { - n += 2 + if len(m.ValidatorWhitelist) > 0 { + for _, e := range m.ValidatorWhitelist { + l = e.Size() + n += 1 + l + sovParams(uint64(l)) + } } return n } -func (m *StakingParams) Size() (n int) { +func (m *PendingValidator) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.UnbondingTime) - n += 1 + l + sovParams(uint64(l)) - if m.MaxValidators != 0 { - n += 1 + sovParams(uint64(m.MaxValidators)) - } - if m.MaxEntries != 0 { - n += 1 + sovParams(uint64(m.MaxEntries)) - } - if m.HistoricalEntries != 0 { - n += 1 + sovParams(uint64(m.HistoricalEntries)) + l = len(m.Address) + if l > 0 { + n += 1 + l + sovParams(uint64(l)) } - l = len(m.BondDenom) + l = len(m.Info) if l > 0 { n += 1 + l + sovParams(uint64(l)) } - l = m.MinCommissionRate.Size() - n += 1 + l + sovParams(uint64(l)) return n } @@ -516,10 +404,10 @@ func (m *Params) Unmarshal(dAtA []byte) error { 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) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorWhitelist", wireType) } - var v int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams @@ -529,12 +417,26 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - m.AllowValidatorSelfExit = bool(v != 0) + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorWhitelist = append(m.ValidatorWhitelist, &PendingValidator{}) + if err := m.ValidatorWhitelist[len(m.ValidatorWhitelist)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) @@ -556,7 +458,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } -func (m *StakingParams) Unmarshal(dAtA []byte) error { +func (m *PendingValidator) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -579,17 +481,17 @@ func (m *StakingParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: StakingParams: wiretype end group for non-group") + return fmt.Errorf("proto: PendingValidator: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: StakingParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: PendingValidator: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UnbondingTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowParams @@ -599,85 +501,29 @@ func (m *StakingParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthParams } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthParams } if postIndex > l { return io.ErrUnexpectedEOF } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.UnbondingTime, dAtA[iNdEx:postIndex]); err != nil { - return err + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} } iNdEx = postIndex case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxValidators", wireType) - } - m.MaxValidators = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxValidators |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxEntries", wireType) - } - m.MaxEntries = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HistoricalEntries", wireType) - } - m.HistoricalEntries = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HistoricalEntries |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BondDenom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -705,41 +551,7 @@ func (m *StakingParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.BondDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinCommissionRate", 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 - } - if err := m.MinCommissionRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.Info = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/proto/strangelove_ventures/poa/v1/genesis.proto b/proto/strangelove_ventures/poa/v1/genesis.proto index 81912f5..614c480 100644 --- a/proto/strangelove_ventures/poa/v1/genesis.proto +++ b/proto/strangelove_ventures/poa/v1/genesis.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package strangelove_ventures.poa.v1; import "gogoproto/gogo.proto"; -import "amino/amino.proto"; import "strangelove_ventures/poa/v1/validator.proto"; import "strangelove_ventures/poa/v1/params.proto"; import "strangelove_ventures/poa/v1/tx.proto"; @@ -13,11 +12,4 @@ option go_package = "github.com/strangelove-ventures/poa"; message GenesisState { // Params defines all the parameters of the module. Params params = 1 [ (gogoproto.nullable) = false ]; -} - -// PowerCache is a cached block or absolute change in power for ibc-go validations. -message PowerCache { - option (amino.name) = "poa/PowerCache"; - - uint64 power = 1; } \ No newline at end of file diff --git a/proto/strangelove_ventures/poa/v1/params.proto b/proto/strangelove_ventures/poa/v1/params.proto index da49019..7702f0d 100644 --- a/proto/strangelove_ventures/poa/v1/params.proto +++ b/proto/strangelove_ventures/poa/v1/params.proto @@ -17,37 +17,12 @@ message Params { // Array of addresses that are allowed to control the chains validators power. 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; + // Array of validator base wallet addresses which are whitelisted to be able to MsgCreateValidator. + repeated PendingValidator validator_whitelist = 2; } -// StakingParams defines the parameters for the x/staking module. -message StakingParams { - option (amino.name) = "cosmos-sdk/x/staking/Params"; - option (gogoproto.equal) = true; - - // unbonding_time is the time duration of unbonding. - google.protobuf.Duration unbonding_time = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (gogoproto.stdduration) = true - ]; - // max_validators is the maximum number of validators. - uint32 max_validators = 2; - // max_entries is the max entries for either unbonding delegation or - // redelegation (per pair/trio). - uint32 max_entries = 3; - // historical_entries is the number of historical entries to persist. - uint32 historical_entries = 4; - // bond_denom defines the bondable coin denomination. - string bond_denom = 5; - // min_commission_rate is the chain-wide minimum commission rate that a - // validator can charge their delegators - string min_commission_rate = 6 [ - (gogoproto.moretags) = "yaml:\"min_commission_rate\"", - (gogoproto.customtype) = "cosmossdk.io/math.LegacyDec", - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true, - (cosmos_proto.scalar) = "cosmos.Dec" - ]; +message PendingValidator { + // cosmos-sdk accountaddress + bytes address = 1; + string info = 2; } \ No newline at end of file diff --git a/proto/strangelove_ventures/poa/v1/query.proto b/proto/strangelove_ventures/poa/v1/query.proto index efab7ab..f87f7df 100644 --- a/proto/strangelove_ventures/poa/v1/query.proto +++ b/proto/strangelove_ventures/poa/v1/query.proto @@ -14,15 +14,12 @@ service Query { 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) { - option (google.api.http).get = "/poa/v1/pending_validators"; - } - // ConsensusPower returns the current consensus power of a validator. - rpc ConsensusPower(QueryConsensusPowerRequest) - returns (QueryConsensusPowerResponse) { - option (google.api.http).get = "/poa/v1/consensus_power"; + + // PendingValidators returns currently pending whitelist of validators of the module. + // These accounts have not yet created their validator, they just are allowed to do so once the team sends them the initial token. + rpc WhitelistValidators(QueryWhitelistedValidatorsRequest) + returns (WhitelistValidatorsResponse) { + option (google.api.http).get = "/poa/v1/pending_whitelist"; } } @@ -35,23 +32,11 @@ message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } -// QueryPendingValidatorsRequest is the request type for the Query/PendingValidators RPC method. -message QueryPendingValidatorsRequest {} +// QueryWhitelistedValidatorsRequest is the request type for the Query/PendingValidators RPC method. +message QueryWhitelistedValidatorsRequest {} // QueryPendingValidatorResponse is the response type for the Query/PendingValidators RPC method. -message PendingValidatorsResponse { +message WhitelistValidatorsResponse { // Pending is the returned pending validators from the module repeated Validator pending = 1 [ (gogoproto.nullable) = false ]; -} - -// QueryConsensusPowerRequest is the request type for the Query/ConsensusPower RPC method. -message QueryConsensusPowerRequest { - // validator_address is the address of the validator - string validator_address = 1; -} - -// QueryConsensusPowerResponse is the response type for the Query/ConsensusPowerRequest RPC method. -message QueryConsensusPowerResponse { - // consensus_power is the returned consensus power from the BFT consensus mechanism - int64 consensus_power = 1; -} +} \ No newline at end of file diff --git a/proto/strangelove_ventures/poa/v1/tx.proto b/proto/strangelove_ventures/poa/v1/tx.proto index 61dc145..5efac0d 100644 --- a/proto/strangelove_ventures/poa/v1/tx.proto +++ b/proto/strangelove_ventures/poa/v1/tx.proto @@ -17,22 +17,22 @@ service Msg { option (cosmos.msg.v1.service) = true; // CreateValidator is a wrapper method around the SDK's x/staking MsgCreateValidator. - rpc CreateValidator(MsgCreateValidator) returns (MsgCreateValidatorResponse); + // rpc CreateValidator(MsgCreateValidator) returns (MsgCreateValidatorResponse); // SetPower sets the new power of a validator and accepts new validators into the set. - rpc SetPower(MsgSetPower) returns (MsgSetPowerResponse); + // rpc SetPower(MsgSetPower) returns (MsgSetPowerResponse); // RemoveValidator removes a validator from the active set and unbonds their delegations. - rpc RemoveValidator(MsgRemoveValidator) returns (MsgRemoveValidatorResponse); + // rpc RemoveValidator(MsgRemoveValidator) returns (MsgRemoveValidatorResponse); // RemovePending removes a pending validator from the queue. - rpc RemovePending(MsgRemovePending) returns (MsgRemovePendingResponse); + // 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); + // rpc UpdateStakingParams(MsgUpdateStakingParams) returns (MsgUpdateStakingParamsResponse); } // SetPower sets the new power of the validator and accepts new validators into the set. @@ -102,22 +102,23 @@ message MsgUpdateParams { // MsgUpdateParams message. message MsgUpdateParamsResponse {} +// TODO: Can this just be done easier? // MsgUpdateStakingParams is the Msg/UpdateStakingParams request type. -message MsgUpdateStakingParams { - option (cosmos.msg.v1.signer) = "sender"; - option (amino.name) = "poa/MsgUpdateStakingParams"; +// message MsgUpdateStakingParams { +// option (cosmos.msg.v1.signer) = "sender"; +// option (amino.name) = "poa/MsgUpdateStakingParams"; - // 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" ]; +// // 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" ]; - // x/staking module parameters (all must be supplied). - StakingParams params = 2 [ (gogoproto.nullable) = false ]; -} +// // x/staking module parameters (all must be supplied). +// StakingParams params = 2 [ (gogoproto.nullable) = false ]; +// } -// MsgUpdateStakingParamsResponse defines the response structure for executing a -// MsgUpdateStakingParams message. -message MsgUpdateStakingParamsResponse {} +// // MsgUpdateStakingParamsResponse defines the response structure for executing a +// // MsgUpdateStakingParams message. +// message MsgUpdateStakingParamsResponse {} // cosmos-sdk/proto/staking/v1beta1/tx.proto // MsgCreateValidator defines a SDK message for creating a new validator. diff --git a/query.pb.go b/query.pb.go index a194f5d..8071928 100644 --- a/query.pb.go +++ b/query.pb.go @@ -112,22 +112,22 @@ func (m *ParamsResponse) GetParams() Params { return Params{} } -// QueryPendingValidatorsRequest is the request type for the Query/PendingValidators RPC method. -type QueryPendingValidatorsRequest struct { +// QueryWhitelistedValidatorsRequest is the request type for the Query/PendingValidators RPC method. +type QueryWhitelistedValidatorsRequest struct { } -func (m *QueryPendingValidatorsRequest) Reset() { *m = QueryPendingValidatorsRequest{} } -func (m *QueryPendingValidatorsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryPendingValidatorsRequest) ProtoMessage() {} -func (*QueryPendingValidatorsRequest) Descriptor() ([]byte, []int) { +func (m *QueryWhitelistedValidatorsRequest) Reset() { *m = QueryWhitelistedValidatorsRequest{} } +func (m *QueryWhitelistedValidatorsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryWhitelistedValidatorsRequest) ProtoMessage() {} +func (*QueryWhitelistedValidatorsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_676fcce3868e4c52, []int{2} } -func (m *QueryPendingValidatorsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryWhitelistedValidatorsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryPendingValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryWhitelistedValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryPendingValidatorsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryWhitelistedValidatorsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -137,36 +137,36 @@ func (m *QueryPendingValidatorsRequest) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *QueryPendingValidatorsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryPendingValidatorsRequest.Merge(m, src) +func (m *QueryWhitelistedValidatorsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWhitelistedValidatorsRequest.Merge(m, src) } -func (m *QueryPendingValidatorsRequest) XXX_Size() int { +func (m *QueryWhitelistedValidatorsRequest) XXX_Size() int { return m.Size() } -func (m *QueryPendingValidatorsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryPendingValidatorsRequest.DiscardUnknown(m) +func (m *QueryWhitelistedValidatorsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWhitelistedValidatorsRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryPendingValidatorsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryWhitelistedValidatorsRequest proto.InternalMessageInfo // QueryPendingValidatorResponse is the response type for the Query/PendingValidators RPC method. -type PendingValidatorsResponse struct { +type WhitelistValidatorsResponse struct { // Pending is the returned pending validators from the module Pending []Validator `protobuf:"bytes,1,rep,name=pending,proto3" json:"pending"` } -func (m *PendingValidatorsResponse) Reset() { *m = PendingValidatorsResponse{} } -func (m *PendingValidatorsResponse) String() string { return proto.CompactTextString(m) } -func (*PendingValidatorsResponse) ProtoMessage() {} -func (*PendingValidatorsResponse) Descriptor() ([]byte, []int) { +func (m *WhitelistValidatorsResponse) Reset() { *m = WhitelistValidatorsResponse{} } +func (m *WhitelistValidatorsResponse) String() string { return proto.CompactTextString(m) } +func (*WhitelistValidatorsResponse) ProtoMessage() {} +func (*WhitelistValidatorsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_676fcce3868e4c52, []int{3} } -func (m *PendingValidatorsResponse) XXX_Unmarshal(b []byte) error { +func (m *WhitelistValidatorsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *PendingValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *WhitelistValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_PendingValidatorsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_WhitelistValidatorsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -176,124 +176,30 @@ func (m *PendingValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *PendingValidatorsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PendingValidatorsResponse.Merge(m, src) +func (m *WhitelistValidatorsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_WhitelistValidatorsResponse.Merge(m, src) } -func (m *PendingValidatorsResponse) XXX_Size() int { +func (m *WhitelistValidatorsResponse) XXX_Size() int { return m.Size() } -func (m *PendingValidatorsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PendingValidatorsResponse.DiscardUnknown(m) +func (m *WhitelistValidatorsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_WhitelistValidatorsResponse.DiscardUnknown(m) } -var xxx_messageInfo_PendingValidatorsResponse proto.InternalMessageInfo +var xxx_messageInfo_WhitelistValidatorsResponse proto.InternalMessageInfo -func (m *PendingValidatorsResponse) GetPending() []Validator { +func (m *WhitelistValidatorsResponse) GetPending() []Validator { if m != nil { return m.Pending } return nil } -// QueryConsensusPowerRequest is the request type for the Query/ConsensusPower RPC method. -type QueryConsensusPowerRequest struct { - // validator_address is the address of the validator - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` -} - -func (m *QueryConsensusPowerRequest) Reset() { *m = QueryConsensusPowerRequest{} } -func (m *QueryConsensusPowerRequest) String() string { return proto.CompactTextString(m) } -func (*QueryConsensusPowerRequest) ProtoMessage() {} -func (*QueryConsensusPowerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_676fcce3868e4c52, []int{4} -} -func (m *QueryConsensusPowerRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryConsensusPowerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryConsensusPowerRequest.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 *QueryConsensusPowerRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryConsensusPowerRequest.Merge(m, src) -} -func (m *QueryConsensusPowerRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryConsensusPowerRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryConsensusPowerRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryConsensusPowerRequest proto.InternalMessageInfo - -func (m *QueryConsensusPowerRequest) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -// QueryConsensusPowerResponse is the response type for the Query/ConsensusPowerRequest RPC method. -type QueryConsensusPowerResponse struct { - // consensus_power is the returned consensus power from the BFT consensus mechanism - ConsensusPower int64 `protobuf:"varint,1,opt,name=consensus_power,json=consensusPower,proto3" json:"consensus_power,omitempty"` -} - -func (m *QueryConsensusPowerResponse) Reset() { *m = QueryConsensusPowerResponse{} } -func (m *QueryConsensusPowerResponse) String() string { return proto.CompactTextString(m) } -func (*QueryConsensusPowerResponse) ProtoMessage() {} -func (*QueryConsensusPowerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_676fcce3868e4c52, []int{5} -} -func (m *QueryConsensusPowerResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryConsensusPowerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryConsensusPowerResponse.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 *QueryConsensusPowerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryConsensusPowerResponse.Merge(m, src) -} -func (m *QueryConsensusPowerResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryConsensusPowerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryConsensusPowerResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryConsensusPowerResponse proto.InternalMessageInfo - -func (m *QueryConsensusPowerResponse) GetConsensusPower() int64 { - if m != nil { - return m.ConsensusPower - } - return 0 -} - 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") - proto.RegisterType((*QueryConsensusPowerResponse)(nil), "strangelove_ventures.poa.v1.QueryConsensusPowerResponse") + proto.RegisterType((*QueryWhitelistedValidatorsRequest)(nil), "strangelove_ventures.poa.v1.QueryWhitelistedValidatorsRequest") + proto.RegisterType((*WhitelistValidatorsResponse)(nil), "strangelove_ventures.poa.v1.WhitelistValidatorsResponse") } func init() { @@ -301,37 +207,32 @@ 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, + // 386 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x4a, 0xeb, 0x40, + 0x18, 0xc5, 0x93, 0xde, 0x7b, 0x7b, 0x61, 0x0a, 0x45, 0xc6, 0x22, 0x35, 0x95, 0xd8, 0xa6, 0xa0, + 0x85, 0x62, 0x86, 0xd6, 0x8d, 0x1b, 0x05, 0xbb, 0x70, 0xad, 0x15, 0x14, 0xdc, 0x94, 0xa9, 0x1d, + 0xd2, 0x40, 0x3a, 0x5f, 0x9a, 0x4c, 0x22, 0x6e, 0x5c, 0xf8, 0x04, 0x82, 0x6f, 0xe2, 0xda, 0x07, + 0xe8, 0xb2, 0xe0, 0xc6, 0x95, 0x48, 0xeb, 0x83, 0x48, 0xf3, 0x8f, 0x8a, 0x65, 0x74, 0x17, 0xf2, + 0x9d, 0xf3, 0x9d, 0xdf, 0x9c, 0x19, 0xb4, 0xeb, 0x0b, 0x8f, 0x72, 0x8b, 0x39, 0x10, 0xb2, 0x5e, + 0xc8, 0xb8, 0x08, 0x3c, 0xe6, 0x13, 0x17, 0x28, 0x09, 0x5b, 0x64, 0x1c, 0x30, 0xef, 0xd6, 0x74, + 0x3d, 0x10, 0x80, 0x2b, 0xab, 0x84, 0xa6, 0x0b, 0xd4, 0x0c, 0x5b, 0x5a, 0xc9, 0x02, 0x0b, 0x22, + 0x1d, 0x59, 0x7c, 0xc5, 0x16, 0x6d, 0xcb, 0x02, 0xb0, 0x1c, 0x46, 0xa8, 0x6b, 0x13, 0xca, 0x39, + 0x08, 0x2a, 0x6c, 0xe0, 0x7e, 0x32, 0x6d, 0xc8, 0x92, 0x5d, 0xea, 0xd1, 0x51, 0xaa, 0x6c, 0xca, + 0x94, 0x21, 0x75, 0xec, 0x01, 0x15, 0xe0, 0xc5, 0x62, 0xa3, 0x84, 0xf0, 0xd9, 0x02, 0xfb, 0x34, + 0xda, 0xd0, 0x65, 0xe3, 0x80, 0xf9, 0xc2, 0x38, 0x47, 0xc5, 0xf4, 0x87, 0xef, 0x02, 0xf7, 0x19, + 0x3e, 0x46, 0xf9, 0x38, 0xa4, 0xac, 0x56, 0xd5, 0x46, 0xa1, 0x5d, 0x37, 0x25, 0x07, 0x34, 0x63, + 0x73, 0xe7, 0xef, 0xe4, 0x6d, 0x5b, 0xe9, 0x26, 0x46, 0xa3, 0x8e, 0x6a, 0x51, 0xd4, 0xe5, 0xd0, + 0x16, 0xcc, 0xb1, 0x7d, 0xc1, 0x06, 0x17, 0x29, 0x4d, 0x96, 0xcc, 0x50, 0x25, 0x9b, 0x2f, 0x4f, + 0x13, 0x8c, 0x13, 0xf4, 0xdf, 0x65, 0x7c, 0x60, 0x73, 0xab, 0xac, 0x56, 0xff, 0x34, 0x0a, 0xed, + 0x1d, 0x29, 0x47, 0xb6, 0x21, 0x41, 0x49, 0xcd, 0xed, 0xe7, 0x1c, 0xfa, 0x17, 0xc1, 0xe0, 0x3b, + 0x94, 0x8f, 0x69, 0x31, 0x91, 0xae, 0xfa, 0xde, 0x92, 0xd6, 0xfc, 0x45, 0x07, 0x29, 0xb9, 0xb1, + 0x71, 0xff, 0xf2, 0xf1, 0x98, 0x5b, 0xc3, 0xc5, 0xaf, 0x77, 0x86, 0x9f, 0x54, 0xb4, 0xbe, 0xe2, + 0xc4, 0xf8, 0xe8, 0x67, 0x1a, 0x59, 0x91, 0xda, 0x81, 0xd4, 0x2f, 0xe9, 0xd8, 0xa8, 0x45, 0xa4, + 0x15, 0xbc, 0x99, 0x91, 0xc6, 0xa5, 0xf5, 0x6e, 0x52, 0x53, 0xe7, 0x70, 0x32, 0xd3, 0xd5, 0xe9, + 0x4c, 0x57, 0xdf, 0x67, 0xba, 0xfa, 0x30, 0xd7, 0x95, 0xe9, 0x5c, 0x57, 0x5e, 0xe7, 0xba, 0x72, + 0x55, 0xb7, 0x6c, 0x31, 0x0c, 0xfa, 0xe6, 0x35, 0x8c, 0xc8, 0x12, 0xc0, 0xde, 0xf2, 0x3b, 0xec, + 0xe7, 0xa3, 0xb7, 0xb7, 0xff, 0x19, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x16, 0xe8, 0xd5, 0x4e, 0x03, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -348,10 +249,9 @@ const _ = grpc.SupportPackageIsVersion4 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. - ConsensusPower(ctx context.Context, in *QueryConsensusPowerRequest, opts ...grpc.CallOption) (*QueryConsensusPowerResponse, error) + // PendingValidators returns currently pending whitelist of validators of the module. + // These accounts have not yet created their validator, they just are allowed to do so once the team sends them the initial token. + WhitelistValidators(ctx context.Context, in *QueryWhitelistedValidatorsRequest, opts ...grpc.CallOption) (*WhitelistValidatorsResponse, error) } type queryClient struct { @@ -371,18 +271,9 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . 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...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ConsensusPower(ctx context.Context, in *QueryConsensusPowerRequest, opts ...grpc.CallOption) (*QueryConsensusPowerResponse, error) { - out := new(QueryConsensusPowerResponse) - err := c.cc.Invoke(ctx, "/strangelove_ventures.poa.v1.Query/ConsensusPower", in, out, opts...) +func (c *queryClient) WhitelistValidators(ctx context.Context, in *QueryWhitelistedValidatorsRequest, opts ...grpc.CallOption) (*WhitelistValidatorsResponse, error) { + out := new(WhitelistValidatorsResponse) + err := c.cc.Invoke(ctx, "/strangelove_ventures.poa.v1.Query/WhitelistValidators", in, out, opts...) if err != nil { return nil, err } @@ -393,10 +284,9 @@ func (c *queryClient) ConsensusPower(ctx context.Context, in *QueryConsensusPowe 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. - ConsensusPower(context.Context, *QueryConsensusPowerRequest) (*QueryConsensusPowerResponse, error) + // PendingValidators returns currently pending whitelist of validators of the module. + // These accounts have not yet created their validator, they just are allowed to do so once the team sends them the initial token. + WhitelistValidators(context.Context, *QueryWhitelistedValidatorsRequest) (*WhitelistValidatorsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -406,11 +296,8 @@ 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") -} -func (*UnimplementedQueryServer) ConsensusPower(ctx context.Context, req *QueryConsensusPowerRequest) (*QueryConsensusPowerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ConsensusPower not implemented") +func (*UnimplementedQueryServer) WhitelistValidators(ctx context.Context, req *QueryWhitelistedValidatorsRequest) (*WhitelistValidatorsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WhitelistValidators not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { @@ -435,38 +322,20 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf 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) +func _Query_WhitelistValidators_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWhitelistedValidatorsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).PendingValidators(ctx, in) + return srv.(QueryServer).WhitelistValidators(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/strangelove_ventures.poa.v1.Query/PendingValidators", + FullMethod: "/strangelove_ventures.poa.v1.Query/WhitelistValidators", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).PendingValidators(ctx, req.(*QueryPendingValidatorsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ConsensusPower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryConsensusPowerRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ConsensusPower(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/strangelove_ventures.poa.v1.Query/ConsensusPower", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ConsensusPower(ctx, req.(*QueryConsensusPowerRequest)) + return srv.(QueryServer).WhitelistValidators(ctx, req.(*QueryWhitelistedValidatorsRequest)) } return interceptor(ctx, in, info, handler) } @@ -480,12 +349,8 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_Params_Handler, }, { - MethodName: "PendingValidators", - Handler: _Query_PendingValidators_Handler, - }, - { - MethodName: "ConsensusPower", - Handler: _Query_ConsensusPower_Handler, + MethodName: "WhitelistValidators", + Handler: _Query_WhitelistValidators_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -548,7 +413,7 @@ func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryPendingValidatorsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryWhitelistedValidatorsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -558,12 +423,12 @@ func (m *QueryPendingValidatorsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryPendingValidatorsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryWhitelistedValidatorsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryPendingValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryWhitelistedValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -571,7 +436,7 @@ func (m *QueryPendingValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *PendingValidatorsResponse) Marshal() (dAtA []byte, err error) { +func (m *WhitelistValidatorsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -581,12 +446,12 @@ func (m *PendingValidatorsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PendingValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *WhitelistValidatorsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PendingValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *WhitelistValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -608,64 +473,6 @@ func (m *PendingValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *QueryConsensusPowerRequest) 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 *QueryConsensusPowerRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryConsensusPowerRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryConsensusPowerResponse) 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 *QueryConsensusPowerResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryConsensusPowerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ConsensusPower != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ConsensusPower)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -697,7 +504,7 @@ func (m *ParamsResponse) Size() (n int) { return n } -func (m *QueryPendingValidatorsRequest) Size() (n int) { +func (m *QueryWhitelistedValidatorsRequest) Size() (n int) { if m == nil { return 0 } @@ -706,7 +513,7 @@ func (m *QueryPendingValidatorsRequest) Size() (n int) { return n } -func (m *PendingValidatorsResponse) Size() (n int) { +func (m *WhitelistValidatorsResponse) Size() (n int) { if m == nil { return 0 } @@ -721,31 +528,6 @@ func (m *PendingValidatorsResponse) Size() (n int) { return n } -func (m *QueryConsensusPowerRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryConsensusPowerResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ConsensusPower != 0 { - n += 1 + sovQuery(uint64(m.ConsensusPower)) - } - return n -} - func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -885,7 +667,7 @@ func (m *ParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryPendingValidatorsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryWhitelistedValidatorsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -908,10 +690,10 @@ func (m *QueryPendingValidatorsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryPendingValidatorsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryWhitelistedValidatorsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryPendingValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryWhitelistedValidatorsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -935,7 +717,7 @@ func (m *QueryPendingValidatorsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *PendingValidatorsResponse) Unmarshal(dAtA []byte) error { +func (m *WhitelistValidatorsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -958,10 +740,10 @@ func (m *PendingValidatorsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: PendingValidatorsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: WhitelistValidatorsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: PendingValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: WhitelistValidatorsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1019,157 +801,6 @@ func (m *PendingValidatorsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryConsensusPowerRequest) 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: QueryConsensusPowerRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryConsensusPowerRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - 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 ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - 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 *QueryConsensusPowerResponse) 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: QueryConsensusPowerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryConsensusPowerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ConsensusPower", wireType) - } - m.ConsensusPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ConsensusPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - 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 skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/query.pb.gw.go b/query.pb.gw.go index 90bc18b..88c5677 100644 --- a/query.pb.gw.go +++ b/query.pb.gw.go @@ -51,56 +51,20 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } -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 +func request_Query_WhitelistValidators_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWhitelistedValidatorsRequest var metadata runtime.ServerMetadata - msg, err := client.PendingValidators(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.WhitelistValidators(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_PendingValidators_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryPendingValidatorsRequest +func local_request_Query_WhitelistValidators_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWhitelistedValidatorsRequest var metadata runtime.ServerMetadata - msg, err := server.PendingValidators(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_ConsensusPower_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_ConsensusPower_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryConsensusPowerRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ConsensusPower_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ConsensusPower(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ConsensusPower_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryConsensusPowerRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ConsensusPower_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ConsensusPower(ctx, &protoReq) + msg, err := server.WhitelistValidators(ctx, &protoReq) return msg, metadata, err } @@ -134,30 +98,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - 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() - 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_PendingValidators_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_PendingValidators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ConsensusPower_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_WhitelistValidators_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -168,7 +109,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ConsensusPower_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_WhitelistValidators_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 { @@ -176,7 +117,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ConsensusPower_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_WhitelistValidators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -241,27 +182,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - 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() - 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_PendingValidators_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_PendingValidators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ConsensusPower_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_WhitelistValidators_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) @@ -270,14 +191,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ConsensusPower_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_WhitelistValidators_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_ConsensusPower_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_WhitelistValidators_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -287,15 +208,11 @@ 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))) + pattern_Query_WhitelistValidators_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"poa", "v1", "pending_whitelist"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_PendingValidators_0 = runtime.ForwardResponseMessage - - forward_Query_ConsensusPower_0 = runtime.ForwardResponseMessage + forward_Query_WhitelistValidators_0 = runtime.ForwardResponseMessage ) diff --git a/simapp/app.go b/simapp/app.go index 152c5f6..7ab55c3 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -320,6 +320,7 @@ func NewSimApp( app.StakingKeeper, app.SlashingKeeper, app.BankKeeper, + // app.AccountKeeper.AddressCodec(), // TODO:? logger, ) diff --git a/tx.pb.go b/tx.pb.go index 05b7a04..cc7bfa1 100644 --- a/tx.pb.go +++ b/tx.pb.go @@ -358,100 +358,6 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { 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. - // ex: governance, multisig/DAO, or standard account found in Params. - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - // x/staking module parameters (all must be supplied). - Params StakingParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` -} - -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} -} -func (m *MsgUpdateStakingParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateStakingParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateStakingParams.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 *MsgUpdateStakingParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateStakingParams.Merge(m, src) -} -func (m *MsgUpdateStakingParams) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateStakingParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateStakingParams.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateStakingParams proto.InternalMessageInfo - -func (m *MsgUpdateStakingParams) GetSender() string { - if m != nil { - return m.Sender - } - return "" -} - -func (m *MsgUpdateStakingParams) GetParams() StakingParams { - if m != nil { - return m.Params - } - return StakingParams{} -} - -// MsgUpdateStakingParamsResponse defines the response structure for executing a -// MsgUpdateStakingParams message. -type MsgUpdateStakingParamsResponse struct { -} - -func (m *MsgUpdateStakingParamsResponse) Reset() { *m = MsgUpdateStakingParamsResponse{} } -func (m *MsgUpdateStakingParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateStakingParamsResponse) ProtoMessage() {} -func (*MsgUpdateStakingParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9035304c91ee78c4, []int{9} -} -func (m *MsgUpdateStakingParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateStakingParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateStakingParamsResponse.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 *MsgUpdateStakingParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateStakingParamsResponse.Merge(m, src) -} -func (m *MsgUpdateStakingParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateStakingParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateStakingParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateStakingParamsResponse proto.InternalMessageInfo - // cosmos-sdk/proto/staking/v1beta1/tx.proto // MsgCreateValidator defines a SDK message for creating a new validator. type MsgCreateValidator struct { @@ -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) @@ -545,8 +451,6 @@ func init() { 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") proto.RegisterType((*MsgCreateValidatorResponse)(nil), "strangelove_ventures.poa.v1.MsgCreateValidatorResponse") } @@ -556,65 +460,57 @@ func init() { } var fileDescriptor_9035304c91ee78c4 = []byte{ - // 920 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, + // 788 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x55, 0x31, 0x4f, 0x1b, 0x49, + 0x14, 0xf6, 0x1e, 0xc6, 0x3a, 0xc6, 0x27, 0x81, 0x17, 0x03, 0x8b, 0xef, 0xce, 0xe6, 0xcc, 0x49, + 0x67, 0x71, 0x78, 0x17, 0x93, 0x34, 0xb1, 0x94, 0x02, 0x43, 0x12, 0xa1, 0xc8, 0x91, 0xb5, 0x08, + 0x22, 0xa5, 0x71, 0xc6, 0xde, 0xf1, 0xb0, 0xc2, 0x3b, 0xb3, 0xda, 0x19, 0x3b, 0x71, 0x87, 0x52, + 0x45, 0xa9, 0xf2, 0x13, 0x28, 0x23, 0xa5, 0xa1, 0xa0, 0x49, 0x91, 0x26, 0x15, 0x4a, 0x85, 0xa8, + 0xa2, 0x48, 0x41, 0x11, 0x14, 0xe4, 0x67, 0x44, 0xbb, 0x3b, 0x5e, 0x96, 0x05, 0x3b, 0x4a, 0x1a, + 0x1a, 0xcb, 0xef, 0xcd, 0x7b, 0xdf, 0xfb, 0xbe, 0x79, 0x6f, 0xde, 0x82, 0x7f, 0x19, 0x77, 0x20, + 0xc1, 0xa8, 0x4d, 0xbb, 0xa8, 0xde, 0x45, 0x84, 0x77, 0x1c, 0xc4, 0x34, 0x9b, 0x42, 0xad, 0x5b, + 0xd2, 0xf8, 0x73, 0xd5, 0x76, 0x28, 0xa7, 0xf2, 0x9f, 0xd7, 0x45, 0xa9, 0x36, 0x85, 0x6a, 0xb7, + 0x94, 0xc9, 0x36, 0x29, 0xb3, 0x28, 0xd3, 0x1a, 0x90, 0x21, 0xad, 0x5b, 0x6a, 0x20, 0x0e, 0x4b, + 0x5a, 0x93, 0x9a, 0xc4, 0x4f, 0xce, 0xfc, 0x3f, 0xac, 0x44, 0x17, 0xb6, 0x4d, 0x03, 0x72, 0xea, + 0x88, 0xe0, 0xc2, 0xb0, 0x60, 0x1b, 0x3a, 0xd0, 0x62, 0x22, 0x72, 0xd6, 0x2f, 0x5b, 0xf7, 0x2c, + 0xcd, 0x37, 0xfa, 0x47, 0x98, 0x52, 0xdc, 0x46, 0x9a, 0x67, 0x35, 0x3a, 0x2d, 0x0d, 0x92, 0x9e, + 0x38, 0x4a, 0x63, 0x8a, 0xa9, 0x9f, 0xe2, 0xfe, 0x13, 0xde, 0x19, 0x21, 0xc1, 0x62, 0xd8, 0xad, + 0x63, 0x31, 0x2c, 0x0e, 0x52, 0xd0, 0x32, 0x09, 0xd5, 0xbc, 0x5f, 0xdf, 0x95, 0xff, 0x22, 0x81, + 0x64, 0x95, 0xe1, 0x0d, 0xc4, 0x6b, 0xf4, 0x19, 0x72, 0xe4, 0x25, 0x90, 0x60, 0x88, 0x18, 0xc8, + 0x51, 0xa4, 0x39, 0xa9, 0x30, 0x56, 0x51, 0x8e, 0x0f, 0x8a, 0x69, 0x41, 0x67, 0xc5, 0x30, 0x1c, + 0xc4, 0xd8, 0x06, 0x77, 0x4c, 0x82, 0x75, 0x11, 0x27, 0xdf, 0x03, 0xa9, 0x40, 0x76, 0x1d, 0xfa, + 0x21, 0xca, 0x6f, 0x3f, 0x48, 0x9e, 0x08, 0x52, 0x84, 0x5f, 0x4e, 0x83, 0x51, 0xdb, 0x65, 0xa0, + 0x8c, 0xcc, 0x49, 0x85, 0xb8, 0xee, 0x1b, 0xf2, 0x34, 0x48, 0x74, 0x08, 0x83, 0x2d, 0xa4, 0xc4, + 0xe7, 0xa4, 0xc2, 0xef, 0xba, 0xb0, 0xca, 0xff, 0xbd, 0xdc, 0xcb, 0xc5, 0xbe, 0xed, 0xe5, 0x62, + 0x2f, 0xce, 0xf7, 0x17, 0x04, 0x93, 0x57, 0xe7, 0xfb, 0x0b, 0xe3, 0xee, 0xdd, 0x86, 0xf4, 0xe4, + 0xa7, 0xc0, 0x64, 0xc8, 0xd4, 0x11, 0xb3, 0x29, 0x61, 0x28, 0xff, 0x5e, 0x02, 0x72, 0x95, 0x61, + 0x1d, 0x59, 0xb4, 0x8b, 0xb6, 0xfa, 0x5c, 0x6e, 0x4c, 0x7d, 0x59, 0x1d, 0xa0, 0x67, 0x5a, 0xe8, + 0x89, 0x10, 0xcd, 0xff, 0x05, 0x32, 0x57, 0xbd, 0x81, 0xba, 0x77, 0x12, 0x98, 0x08, 0x8e, 0x6b, + 0x88, 0x18, 0x26, 0xc1, 0x37, 0xa7, 0x6d, 0x71, 0x80, 0xb6, 0xf4, 0x25, 0x6d, 0x82, 0x66, 0x3e, + 0x03, 0x94, 0xa8, 0x2f, 0xd0, 0xf5, 0x56, 0x02, 0xe3, 0x55, 0x86, 0x37, 0x6d, 0x03, 0x72, 0x54, + 0xf3, 0x9e, 0xcf, 0x2f, 0xc8, 0x5a, 0x01, 0x09, 0xff, 0xe9, 0x79, 0x5a, 0x92, 0xcb, 0xf3, 0xea, + 0x90, 0x7d, 0xa0, 0xfa, 0x65, 0x2a, 0xf1, 0xc3, 0x93, 0x5c, 0x4c, 0x17, 0x89, 0xe5, 0xf9, 0x88, + 0x94, 0x49, 0x21, 0x25, 0xcc, 0x2c, 0x3f, 0x0b, 0x66, 0x22, 0xae, 0x40, 0xc8, 0x87, 0xb8, 0x37, + 0x7e, 0xab, 0x0e, 0x82, 0x3c, 0x34, 0x7e, 0x9b, 0x20, 0x69, 0x20, 0xd6, 0x74, 0x4c, 0x9b, 0x9b, + 0x94, 0x78, 0x82, 0x92, 0xcb, 0x85, 0xa1, 0xf4, 0xd6, 0x2e, 0xe2, 0x2b, 0x63, 0x2e, 0xc7, 0x37, + 0xe7, 0xfb, 0x0b, 0x92, 0x1e, 0xc6, 0x91, 0x1f, 0x03, 0xd0, 0xa4, 0x96, 0x65, 0x32, 0xe6, 0xa2, + 0xfa, 0xa2, 0x17, 0x87, 0xa2, 0xae, 0x06, 0xe1, 0x3a, 0xe4, 0x88, 0x85, 0x91, 0x43, 0x50, 0xf2, + 0x53, 0x30, 0x69, 0x99, 0xa4, 0xce, 0x50, 0xbb, 0x55, 0x37, 0x50, 0x1b, 0x61, 0xe8, 0xf1, 0x1e, + 0xf1, 0x1a, 0xb1, 0xe4, 0xe6, 0x7c, 0x3e, 0xc9, 0x4d, 0xf9, 0xcd, 0x60, 0xc6, 0x8e, 0x6a, 0x52, + 0xcd, 0x82, 0x7c, 0x5b, 0x5d, 0x27, 0xfc, 0xf8, 0xa0, 0x08, 0x44, 0x97, 0xd6, 0x09, 0xf7, 0xa1, + 0x53, 0x96, 0x49, 0x36, 0x50, 0xbb, 0xb5, 0x16, 0x40, 0xc9, 0x0f, 0x40, 0x4a, 0x00, 0x87, 0x46, + 0x30, 0xee, 0xe1, 0x67, 0x06, 0x35, 0x5a, 0x91, 0xf4, 0x89, 0x20, 0xa9, 0xbf, 0x5e, 0x1e, 0x5d, + 0x37, 0xcb, 0xa3, 0x1e, 0xd0, 0x3f, 0xc7, 0x07, 0xc5, 0xbf, 0x05, 0xd0, 0x56, 0x64, 0x78, 0x07, + 0xae, 0xab, 0xfb, 0x20, 0x61, 0x77, 0x1a, 0x3b, 0xa8, 0xa7, 0x24, 0xbc, 0xfb, 0x4c, 0xab, 0xfe, + 0x96, 0x56, 0xfb, 0x5b, 0x5a, 0x5d, 0x21, 0xbd, 0x8a, 0xf2, 0xf1, 0x82, 0x63, 0xd3, 0xe9, 0xd9, + 0x9c, 0xaa, 0xb5, 0x4e, 0xe3, 0x21, 0xea, 0xe9, 0x22, 0xbb, 0x7c, 0x27, 0xfc, 0x38, 0xae, 0x52, + 0x0c, 0xef, 0x80, 0xc8, 0xb4, 0x88, 0x1d, 0x10, 0xf1, 0xf6, 0x47, 0x6c, 0x79, 0x57, 0x02, 0x23, + 0x55, 0x86, 0x65, 0x07, 0xfc, 0x71, 0xe9, 0xbd, 0x0c, 0x6f, 0x7c, 0x64, 0x60, 0x33, 0xb7, 0x7f, + 0x26, 0xba, 0x5f, 0x3b, 0x33, 0xba, 0xeb, 0xf6, 0xb3, 0x72, 0xf7, 0xf0, 0x34, 0x2b, 0x1d, 0x9d, + 0x66, 0xa5, 0xaf, 0xa7, 0x59, 0xe9, 0xf5, 0x59, 0x36, 0x76, 0x74, 0x96, 0x8d, 0x7d, 0x3a, 0xcb, + 0xc6, 0x9e, 0xcc, 0x63, 0x93, 0x6f, 0x77, 0x1a, 0x6a, 0x93, 0x5a, 0x5a, 0xa8, 0x40, 0x31, 0xfc, + 0x89, 0x6c, 0x24, 0xbc, 0xab, 0xbc, 0xf5, 0x3d, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x62, 0x61, 0xa5, + 0xd5, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -629,18 +525,8 @@ 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 MsgClient interface { - // CreateValidator is a wrapper method around the SDK's x/staking MsgCreateValidator. - CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error) - // SetPower sets the new power of a validator and accepts new validators into the set. - SetPower(ctx context.Context, in *MsgSetPower, opts ...grpc.CallOption) (*MsgSetPowerResponse, error) - // RemoveValidator removes a validator from the active set and unbonds their delegations. - 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) } type msgClient struct { @@ -651,42 +537,6 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) CreateValidator(ctx context.Context, in *MsgCreateValidator, opts ...grpc.CallOption) (*MsgCreateValidatorResponse, error) { - out := new(MsgCreateValidatorResponse) - err := c.cc.Invoke(ctx, "/strangelove_ventures.poa.v1.Msg/CreateValidator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) SetPower(ctx context.Context, in *MsgSetPower, opts ...grpc.CallOption) (*MsgSetPowerResponse, error) { - out := new(MsgSetPowerResponse) - err := c.cc.Invoke(ctx, "/strangelove_ventures.poa.v1.Msg/SetPower", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RemoveValidator(ctx context.Context, in *MsgRemoveValidator, opts ...grpc.CallOption) (*MsgRemoveValidatorResponse, error) { - out := new(MsgRemoveValidatorResponse) - err := c.cc.Invoke(ctx, "/strangelove_ventures.poa.v1.Msg/RemoveValidator", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RemovePending(ctx context.Context, in *MsgRemovePending, opts ...grpc.CallOption) (*MsgRemovePendingResponse, error) { - out := new(MsgRemovePendingResponse) - err := c.cc.Invoke(ctx, "/strangelove_ventures.poa.v1.Msg/RemovePending", in, out, opts...) - if err != nil { - return nil, err - } - 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...) @@ -696,130 +546,24 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts 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...) - if err != nil { - return nil, err - } - return out, nil -} - // MsgServer is the server API for Msg service. type MsgServer interface { - // CreateValidator is a wrapper method around the SDK's x/staking MsgCreateValidator. - CreateValidator(context.Context, *MsgCreateValidator) (*MsgCreateValidatorResponse, error) - // SetPower sets the new power of a validator and accepts new validators into the set. - SetPower(context.Context, *MsgSetPower) (*MsgSetPowerResponse, error) - // RemoveValidator removes a validator from the active set and unbonds their delegations. - 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) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) CreateValidator(ctx context.Context, req *MsgCreateValidator) (*MsgCreateValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateValidator not implemented") -} -func (*UnimplementedMsgServer) SetPower(ctx context.Context, req *MsgSetPower) (*MsgSetPowerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetPower not implemented") -} -func (*UnimplementedMsgServer) RemoveValidator(ctx context.Context, req *MsgRemoveValidator) (*MsgRemoveValidatorResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RemoveValidator not implemented") -} -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") -} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -func _Msg_CreateValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgCreateValidator) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).CreateValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/strangelove_ventures.poa.v1.Msg/CreateValidator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).CreateValidator(ctx, req.(*MsgCreateValidator)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_SetPower_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSetPower) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SetPower(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/strangelove_ventures.poa.v1.Msg/SetPower", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SetPower(ctx, req.(*MsgSetPower)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RemoveValidator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRemoveValidator) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RemoveValidator(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/strangelove_ventures.poa.v1.Msg/RemoveValidator", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RemoveValidator(ctx, req.(*MsgRemoveValidator)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RemovePending_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRemovePending) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RemovePending(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/strangelove_ventures.poa.v1.Msg/RemovePending", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RemovePending(ctx, req.(*MsgRemovePending)) - } - 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 { @@ -838,52 +582,14 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in 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 { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateStakingParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/strangelove_ventures.poa.v1.Msg/UpdateStakingParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateStakingParams(ctx, req.(*MsgUpdateStakingParams)) - } - return interceptor(ctx, in, info, handler) -} - var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "strangelove_ventures.poa.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "CreateValidator", - Handler: _Msg_CreateValidator_Handler, - }, - { - MethodName: "SetPower", - Handler: _Msg_SetPower_Handler, - }, - { - MethodName: "RemoveValidator", - Handler: _Msg_RemoveValidator_Handler, - }, - { - MethodName: "RemovePending", - Handler: _Msg_RemovePending_Handler, - }, { MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, - { - MethodName: "UpdateStakingParams", - Handler: _Msg_UpdateStakingParams_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "strangelove_ventures/poa/v1/tx.proto", @@ -1147,69 +853,6 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgUpdateStakingParams) 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 *MsgUpdateStakingParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateStakingParams) 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 *MsgUpdateStakingParamsResponse) 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 *MsgUpdateStakingParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateStakingParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func (m *MsgCreateValidator) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1431,30 +1074,6 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } -func (m *MsgUpdateStakingParams) 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 *MsgUpdateStakingParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func (m *MsgCreateValidator) Size() (n int) { if m == nil { return 0 @@ -2193,171 +1812,6 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpdateStakingParams) 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: MsgUpdateStakingParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateStakingParams: 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 *MsgUpdateStakingParamsResponse) 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: MsgUpdateStakingParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateStakingParamsResponse: 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 *MsgCreateValidator) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 8cd39bbb9a12ed2afe60db75691f2c332b76f878 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Thu, 9 May 2024 12:35:03 -0500 Subject: [PATCH 2/2] moar --- .../{disable_staking.go => staking_filter.go} | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) rename ante/{disable_staking.go => staking_filter.go} (81%) diff --git a/ante/disable_staking.go b/ante/staking_filter.go similarity index 81% rename from ante/disable_staking.go rename to ante/staking_filter.go index f0c19c2..1d8d4f7 100644 --- a/ante/disable_staking.go +++ b/ante/staking_filter.go @@ -32,13 +32,14 @@ func (msfd MsgStakingFilterDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, sim } if err := msfd.hasAdminOnlyStakingMessage(ctx, tx.GetMsgs()); err != nil { - // return ctx, poa.ErrStakingActionNotAllowed - return ctx, err + return ctx, fmt.Errorf("ante error: %w", err) } return next(ctx, tx, simulate) } +// - Allow MsgCreateValidator if they are in the PendingValidator whitelist. Mint tokens for them here on create. +// - ? Removal handled via unbonding directly (admin & the validator themself only) func (msfd MsgStakingFilterDecorator) hasAdminOnlyStakingMessage(ctx context.Context, msgs []sdk.Msg) error { for _, msg := range msgs { @@ -96,14 +97,20 @@ func (msfd MsgStakingFilterDecorator) hasAdminOnlyStakingMessage(ctx context.Con return nil case *stakingtypes.MsgUpdateParams: + // TODO:control via the POA module or something? or just require updates as well tbh return nil - // Blocked entirely when POA is enabled - case *stakingtypes.MsgBeginRedelegate, - *stakingtypes.MsgCancelUnbondingDelegation, - *stakingtypes.MsgDelegate, - *stakingtypes.MsgUndelegate: + case *stakingtypes.MsgDelegate: + // m.DelegatorAddress return nil + case *stakingtypes.MsgUndelegate: + // m.ValidatorAddress + return nil + + case *stakingtypes.MsgBeginRedelegate: + return fmt.Errorf("redelegate is not allowed") + case *stakingtypes.MsgCancelUnbondingDelegation: + return fmt.Errorf("cancel unbonding is not allowed") } // stakingtypes.MsgEditValidator is the only allowed message. We do not need to check for it.