From 16e491d977eae9cfee8f656a3ab533f9e3a79dd0 Mon Sep 17 00:00:00 2001 From: Matee ullah Malik Date: Mon, 5 May 2025 15:41:09 +0500 Subject: [PATCH] fixes , clean up --- gen/lumera/action/types/action.pb.go | 686 ---- gen/lumera/action/types/action_state.pb.go | 100 - gen/lumera/action/types/action_type.pb.go | 77 - gen/lumera/action/types/codec.go | 26 - gen/lumera/action/types/metadata.pb.go | 1255 ------- gen/lumera/action/types/params.pb.go | 858 ----- gen/lumera/action/types/query.pb.go | 2954 ----------------- gen/lumera/action/types/query.pb.gw.go | 842 ----- gen/lumera/action/types/tx.pb.go | 2097 ------------ gen/lumera/supernode/types/evidence.pb.go | 604 ---- gen/lumera/supernode/types/genesis.pb.go | 324 -- .../supernode/types/ip_address_history.pb.go | 358 -- .../supernode/types/metrics_aggregate.pb.go | 488 --- gen/lumera/supernode/types/params.pb.go | 635 ---- gen/lumera/supernode/types/query.pb.go | 2267 ------------- gen/lumera/supernode/types/query.pb.gw.go | 557 ---- gen/lumera/supernode/types/super_node.pb.go | 686 ---- .../supernode/types/supernode_state.pb.go | 387 --- gen/lumera/supernode/types/tx.pb.go | 2852 ---------------- go.mod | 10 +- go.sum | 4 +- pkg/lumera/modules/action/action_mock.go | 2 +- pkg/lumera/modules/action/impl.go | 2 +- pkg/lumera/modules/action/interface.go | 2 +- pkg/lumera/modules/action_msg/impl.go | 23 +- pkg/lumera/modules/action_msg/interface.go | 1 - pkg/lumera/modules/supernode/impl.go | 2 +- pkg/lumera/modules/supernode/interface.go | 2 +- .../modules/supernode/supernode_mock.go | 2 +- pkg/testutil/lumera.go | 4 +- pkg/utils/utils.go | 13 +- sdk/adapters/lumera/adapter.go | 4 +- supernode/services/cascade/helper.go | 2 +- supernode/services/cascade/metadata.go | 2 +- supernode/services/cascade/register.go | 3 +- tests/system/e2e_cascade_test.go | 40 +- tests/system/go.mod | 4 +- tests/system/go.sum | 4 +- 38 files changed, 83 insertions(+), 18096 deletions(-) delete mode 100644 gen/lumera/action/types/action.pb.go delete mode 100644 gen/lumera/action/types/action_state.pb.go delete mode 100644 gen/lumera/action/types/action_type.pb.go delete mode 100644 gen/lumera/action/types/codec.go delete mode 100644 gen/lumera/action/types/metadata.pb.go delete mode 100644 gen/lumera/action/types/params.pb.go delete mode 100644 gen/lumera/action/types/query.pb.go delete mode 100644 gen/lumera/action/types/query.pb.gw.go delete mode 100644 gen/lumera/action/types/tx.pb.go delete mode 100644 gen/lumera/supernode/types/evidence.pb.go delete mode 100644 gen/lumera/supernode/types/genesis.pb.go delete mode 100644 gen/lumera/supernode/types/ip_address_history.pb.go delete mode 100644 gen/lumera/supernode/types/metrics_aggregate.pb.go delete mode 100644 gen/lumera/supernode/types/params.pb.go delete mode 100644 gen/lumera/supernode/types/query.pb.go delete mode 100644 gen/lumera/supernode/types/query.pb.gw.go delete mode 100644 gen/lumera/supernode/types/super_node.pb.go delete mode 100644 gen/lumera/supernode/types/supernode_state.pb.go delete mode 100644 gen/lumera/supernode/types/tx.pb.go diff --git a/gen/lumera/action/types/action.pb.go b/gen/lumera/action/types/action.pb.go deleted file mode 100644 index 43fd39b1..00000000 --- a/gen/lumera/action/types/action.pb.go +++ /dev/null @@ -1,686 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/action/action.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Action struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ActionID string `protobuf:"bytes,2,opt,name=actionID,proto3" json:"actionID,omitempty"` - ActionType ActionType `protobuf:"varint,3,opt,name=actionType,proto3,enum=lumera.action.ActionType" json:"actionType,omitempty"` - Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` - Price *github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,5,opt,name=price,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"price,omitempty"` - ExpirationTime int64 `protobuf:"varint,6,opt,name=expirationTime,proto3" json:"expirationTime,omitempty"` - State ActionState `protobuf:"varint,7,opt,name=state,proto3,enum=lumera.action.ActionState" json:"state,omitempty"` - BlockHeight int64 `protobuf:"varint,8,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` - SuperNodes []string `protobuf:"bytes,9,rep,name=superNodes,proto3" json:"superNodes,omitempty"` -} - -func (m *Action) Reset() { *m = Action{} } -func (m *Action) String() string { return proto.CompactTextString(m) } -func (*Action) ProtoMessage() {} -func (*Action) Descriptor() ([]byte, []int) { - return fileDescriptor_fb97c90726166d4c, []int{0} -} -func (m *Action) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Action) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Action.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 *Action) XXX_Merge(src proto.Message) { - xxx_messageInfo_Action.Merge(m, src) -} -func (m *Action) XXX_Size() int { - return m.Size() -} -func (m *Action) XXX_DiscardUnknown() { - xxx_messageInfo_Action.DiscardUnknown(m) -} - -var xxx_messageInfo_Action proto.InternalMessageInfo - -func (m *Action) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *Action) GetActionID() string { - if m != nil { - return m.ActionID - } - return "" -} - -func (m *Action) GetActionType() ActionType { - if m != nil { - return m.ActionType - } - return ActionTypeUnspecified -} - -func (m *Action) GetMetadata() []byte { - if m != nil { - return m.Metadata - } - return nil -} - -func (m *Action) GetExpirationTime() int64 { - if m != nil { - return m.ExpirationTime - } - return 0 -} - -func (m *Action) GetState() ActionState { - if m != nil { - return m.State - } - return ActionStateUnspecified -} - -func (m *Action) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *Action) GetSuperNodes() []string { - if m != nil { - return m.SuperNodes - } - return nil -} - -func init() { - proto.RegisterType((*Action)(nil), "lumera.action.Action") -} - -func init() { proto.RegisterFile("lumera/action/action.proto", fileDescriptor_fb97c90726166d4c) } - -var fileDescriptor_fb97c90726166d4c = []byte{ - // 418 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xb1, 0xae, 0xd3, 0x30, - 0x14, 0xad, 0x09, 0xed, 0x7b, 0x35, 0xf0, 0x06, 0xeb, 0x0d, 0x7e, 0x11, 0xa4, 0x81, 0x01, 0x22, - 0xa1, 0x26, 0xa8, 0x4c, 0x8c, 0x29, 0x0c, 0x54, 0x42, 0x08, 0xa5, 0x88, 0x81, 0xa5, 0x72, 0x13, - 0x2b, 0xb5, 0x9a, 0xd4, 0x91, 0xed, 0x4a, 0xed, 0x5f, 0xf0, 0x2b, 0x48, 0xfd, 0x08, 0xc6, 0xaa, - 0x13, 0x62, 0x40, 0xa8, 0xfd, 0x11, 0x14, 0xdb, 0xad, 0xd2, 0xa7, 0x4e, 0xf6, 0xbd, 0xe7, 0xdc, - 0xeb, 0x73, 0x8f, 0x2f, 0x74, 0x8b, 0x65, 0x49, 0x05, 0x89, 0x48, 0xaa, 0x18, 0x5f, 0xd8, 0x23, - 0xac, 0x04, 0x57, 0x1c, 0x3d, 0x31, 0x58, 0x68, 0x92, 0xee, 0x6d, 0xce, 0x73, 0xae, 0x91, 0xa8, - 0xbe, 0x19, 0x92, 0x7b, 0x97, 0x72, 0x59, 0x72, 0x39, 0x31, 0x80, 0x09, 0x2c, 0xf4, 0xf4, 0xbc, - 0x77, 0x49, 0x15, 0xc9, 0x88, 0x22, 0x16, 0xf5, 0x2f, 0xbd, 0x3c, 0x91, 0x8a, 0x28, 0x6a, 0x19, - 0xbd, 0x8b, 0x0c, 0xb5, 0xae, 0x2c, 0xe1, 0xc5, 0x4f, 0x07, 0x76, 0x62, 0x9d, 0x45, 0x03, 0x78, - 0x95, 0x0a, 0x4a, 0x14, 0x17, 0x18, 0xf8, 0x20, 0xe8, 0x0e, 0xf1, 0x6e, 0xd3, 0xbf, 0xb5, 0x72, - 0xe2, 0x2c, 0x13, 0x54, 0xca, 0xb1, 0x12, 0x6c, 0x91, 0x27, 0x47, 0x22, 0x72, 0xe1, 0xb5, 0xe9, - 0x39, 0xfa, 0x80, 0x1f, 0xd4, 0x45, 0xc9, 0x29, 0x46, 0xef, 0x20, 0x34, 0xf7, 0xaf, 0xeb, 0x8a, - 0x62, 0xc7, 0x07, 0xc1, 0xcd, 0xe0, 0x2e, 0x3c, 0x33, 0x24, 0x8c, 0x4f, 0x84, 0xa4, 0x41, 0xae, - 0xdb, 0x1e, 0x47, 0xc5, 0x0f, 0x7d, 0x10, 0x3c, 0x4e, 0x4e, 0x31, 0x8a, 0x61, 0xbb, 0x12, 0x2c, - 0xa5, 0xb8, 0xad, 0x45, 0xbe, 0xfe, 0xf3, 0xb7, 0xf7, 0x2a, 0x67, 0x6a, 0xb6, 0x9c, 0x86, 0x29, - 0x2f, 0xad, 0x7d, 0xf6, 0xe8, 0xcb, 0x6c, 0x1e, 0xd5, 0xd3, 0xca, 0xf0, 0x3d, 0x67, 0x8b, 0xc4, - 0x54, 0xa2, 0x97, 0xf0, 0x86, 0xae, 0x2a, 0x26, 0x88, 0x7e, 0x90, 0x95, 0x14, 0x77, 0x7c, 0x10, - 0x38, 0xc9, 0xbd, 0x2c, 0x7a, 0x03, 0xdb, 0xda, 0x4c, 0x7c, 0xa5, 0xc5, 0xbb, 0x17, 0xc5, 0x8f, - 0x6b, 0x46, 0x62, 0x88, 0xc8, 0x87, 0x8f, 0xa6, 0x05, 0x4f, 0xe7, 0x1f, 0x29, 0xcb, 0x67, 0x0a, - 0x5f, 0xeb, 0xb6, 0xcd, 0x14, 0x8a, 0x21, 0x94, 0xcb, 0x8a, 0x8a, 0xcf, 0x3c, 0xa3, 0x12, 0x77, - 0x7d, 0x27, 0xe8, 0x0e, 0x9f, 0xef, 0x36, 0xfd, 0x67, 0xd6, 0xe8, 0x6f, 0xa4, 0x60, 0x59, 0xed, - 0xed, 0xb9, 0xe3, 0x8d, 0xa2, 0xe1, 0xe8, 0xd7, 0xde, 0x03, 0xdb, 0xbd, 0x07, 0xfe, 0xed, 0x3d, - 0xf0, 0xe3, 0xe0, 0xb5, 0xb6, 0x07, 0xaf, 0xf5, 0xfb, 0xe0, 0xb5, 0xbe, 0x47, 0x0d, 0x23, 0x3e, - 0x69, 0xad, 0x5f, 0xea, 0x5f, 0x4e, 0x79, 0x11, 0xd9, 0x45, 0x58, 0x1d, 0x57, 0x41, 0xbb, 0x32, - 0xed, 0xe8, 0x2d, 0x78, 0xfb, 0x3f, 0x00, 0x00, 0xff, 0xff, 0x60, 0x2f, 0xcc, 0x74, 0xc4, 0x02, - 0x00, 0x00, -} - -func (m *Action) 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 *Action) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SuperNodes) > 0 { - for iNdEx := len(m.SuperNodes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SuperNodes[iNdEx]) - copy(dAtA[i:], m.SuperNodes[iNdEx]) - i = encodeVarintAction(dAtA, i, uint64(len(m.SuperNodes[iNdEx]))) - i-- - dAtA[i] = 0x4a - } - } - if m.BlockHeight != 0 { - i = encodeVarintAction(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x40 - } - if m.State != 0 { - i = encodeVarintAction(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x38 - } - if m.ExpirationTime != 0 { - i = encodeVarintAction(dAtA, i, uint64(m.ExpirationTime)) - i-- - dAtA[i] = 0x30 - } - if m.Price != nil { - { - size := m.Price.Size() - i -= size - if _, err := m.Price.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintAction(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintAction(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x22 - } - if m.ActionType != 0 { - i = encodeVarintAction(dAtA, i, uint64(m.ActionType)) - i-- - dAtA[i] = 0x18 - } - if len(m.ActionID) > 0 { - i -= len(m.ActionID) - copy(dAtA[i:], m.ActionID) - i = encodeVarintAction(dAtA, i, uint64(len(m.ActionID))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintAction(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAction(dAtA []byte, offset int, v uint64) int { - offset -= sovAction(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Action) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovAction(uint64(l)) - } - l = len(m.ActionID) - if l > 0 { - n += 1 + l + sovAction(uint64(l)) - } - if m.ActionType != 0 { - n += 1 + sovAction(uint64(m.ActionType)) - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovAction(uint64(l)) - } - if m.Price != nil { - l = m.Price.Size() - n += 1 + l + sovAction(uint64(l)) - } - if m.ExpirationTime != 0 { - n += 1 + sovAction(uint64(m.ExpirationTime)) - } - if m.State != 0 { - n += 1 + sovAction(uint64(m.State)) - } - if m.BlockHeight != 0 { - n += 1 + sovAction(uint64(m.BlockHeight)) - } - if len(m.SuperNodes) > 0 { - for _, s := range m.SuperNodes { - l = len(s) - n += 1 + l + sovAction(uint64(l)) - } - } - return n -} - -func sovAction(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAction(x uint64) (n int) { - return sovAction(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Action) 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 ErrIntOverflowAction - } - 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: Action: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Action: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAction - } - 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 ErrInvalidLengthAction - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAction - } - 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 ErrInvalidLengthAction - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActionID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionType", wireType) - } - m.ActionType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActionType |= ActionType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAction - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = append(m.Metadata[:0], dAtA[iNdEx:postIndex]...) - if m.Metadata == nil { - m.Metadata = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Price", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAction - } - 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 ErrInvalidLengthAction - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var v github_com_cosmos_cosmos_sdk_types.Coin - m.Price = &v - if err := m.Price.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTime", wireType) - } - m.ExpirationTime = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpirationTime |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= ActionState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAction - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuperNodes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAction - } - 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 ErrInvalidLengthAction - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAction - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SuperNodes = append(m.SuperNodes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAction(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAction - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAction(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAction - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAction - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAction - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAction - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAction = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAction = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAction = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/action/types/action_state.pb.go b/gen/lumera/action/types/action_state.pb.go deleted file mode 100644 index d77b71f3..00000000 --- a/gen/lumera/action/types/action_state.pb.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/action/action_state.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ActionState int32 - -const ( - ActionStateUnspecified ActionState = 0 - ActionStatePending ActionState = 1 - ActionStateProcessing ActionState = 2 - ActionStateDone ActionState = 3 - ActionStateApproved ActionState = 4 - ActionStateRejected ActionState = 5 - ActionStateFailed ActionState = 6 - ActionStateExpired ActionState = 7 -) - -var ActionState_name = map[int32]string{ - 0: "ACTION_STATE_UNSPECIFIED", - 1: "ACTION_STATE_PENDING", - 2: "ACTION_STATE_PROCESSING", - 3: "ACTION_STATE_DONE", - 4: "ACTION_STATE_APPROVED", - 5: "ACTION_STATE_REJECTED", - 6: "ACTION_STATE_FAILED", - 7: "ACTION_STATE_EXPIRED", -} - -var ActionState_value = map[string]int32{ - "ACTION_STATE_UNSPECIFIED": 0, - "ACTION_STATE_PENDING": 1, - "ACTION_STATE_PROCESSING": 2, - "ACTION_STATE_DONE": 3, - "ACTION_STATE_APPROVED": 4, - "ACTION_STATE_REJECTED": 5, - "ACTION_STATE_FAILED": 6, - "ACTION_STATE_EXPIRED": 7, -} - -func (x ActionState) String() string { - return proto.EnumName(ActionState_name, int32(x)) -} - -func (ActionState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_dbbc51526cb106aa, []int{0} -} - -func init() { - proto.RegisterEnum("lumera.action.ActionState", ActionState_name, ActionState_value) -} - -func init() { proto.RegisterFile("lumera/action/action_state.proto", fileDescriptor_dbbc51526cb106aa) } - -var fileDescriptor_dbbc51526cb106aa = []byte{ - // 391 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0xd2, 0x4f, 0x8f, 0x93, 0x40, - 0x18, 0x06, 0x70, 0xb0, 0x5a, 0xcd, 0x18, 0x23, 0xa5, 0xff, 0x74, 0x0e, 0x13, 0xce, 0x3d, 0x80, - 0xd1, 0xc4, 0x78, 0x45, 0x66, 0x6a, 0x30, 0x0d, 0x10, 0xa0, 0xc6, 0x78, 0x69, 0x28, 0x8c, 0x88, - 0x69, 0x19, 0x02, 0xd4, 0xd4, 0x6f, 0x60, 0x38, 0xf9, 0x05, 0x38, 0xed, 0x1e, 0xf6, 0xba, 0xdf, - 0x62, 0x8f, 0x3d, 0xee, 0x71, 0xd3, 0x7e, 0x91, 0x0d, 0xb4, 0x9b, 0x40, 0xba, 0xa7, 0x99, 0xe4, - 0x7d, 0x7e, 0x97, 0xf7, 0x7d, 0x80, 0xb4, 0xda, 0xac, 0x69, 0xea, 0x29, 0x9e, 0x9f, 0x47, 0x2c, - 0x3e, 0x3d, 0x8b, 0x2c, 0xf7, 0x72, 0x2a, 0x27, 0x29, 0xcb, 0x99, 0xf8, 0xea, 0x98, 0x90, 0x8f, - 0x23, 0x38, 0x08, 0x59, 0xc8, 0xea, 0x89, 0x52, 0xfd, 0x8e, 0xa1, 0xc9, 0x75, 0x07, 0xbc, 0x54, - 0xeb, 0x80, 0x53, 0x51, 0xf1, 0x13, 0x78, 0xa3, 0x6a, 0xae, 0x6e, 0x1a, 0x0b, 0xc7, 0x55, 0x5d, - 0xb2, 0x98, 0x1b, 0x8e, 0x45, 0x34, 0x7d, 0xaa, 0x13, 0x2c, 0x70, 0x10, 0x16, 0xa5, 0x34, 0x6a, - 0xc4, 0xe7, 0x71, 0x96, 0x50, 0x3f, 0xfa, 0x19, 0xd1, 0x40, 0x7c, 0x07, 0x06, 0x2d, 0x69, 0x11, - 0x03, 0xeb, 0xc6, 0x17, 0x81, 0x87, 0xa3, 0xa2, 0x94, 0xc4, 0x86, 0xb2, 0x68, 0x1c, 0x44, 0x71, - 0x28, 0x7e, 0x04, 0xe3, 0xb6, 0xb0, 0x4d, 0x8d, 0x38, 0x4e, 0x85, 0x9e, 0xc0, 0xb7, 0x45, 0x29, - 0x0d, 0x9b, 0x28, 0x65, 0x3e, 0xcd, 0xb2, 0xca, 0x4d, 0x40, 0xaf, 0xe5, 0xb0, 0x69, 0x10, 0xa1, - 0x03, 0xfb, 0x45, 0x29, 0xbd, 0x6e, 0x08, 0xcc, 0x62, 0x2a, 0xbe, 0x07, 0xc3, 0x56, 0x56, 0xb5, - 0x2c, 0xdb, 0xfc, 0x46, 0xb0, 0xf0, 0x14, 0x8e, 0x8b, 0x52, 0xea, 0x37, 0xf2, 0x6a, 0x92, 0xa4, - 0xec, 0x0f, 0x0d, 0xce, 0x8c, 0x4d, 0xbe, 0x12, 0xcd, 0x25, 0x58, 0x78, 0x76, 0x66, 0x6c, 0xfa, - 0x9b, 0xfa, 0x39, 0x0d, 0x44, 0x19, 0xf4, 0x5b, 0x66, 0xaa, 0xea, 0x33, 0x82, 0x85, 0x2e, 0x1c, - 0x16, 0xa5, 0xd4, 0x6b, 0x88, 0xa9, 0x17, 0xad, 0x1e, 0xd9, 0x16, 0xf9, 0x6e, 0xe9, 0x36, 0xc1, - 0xc2, 0xf3, 0xb3, 0x6d, 0x91, 0x6d, 0x12, 0xa5, 0x34, 0x80, 0x2f, 0xfe, 0x5d, 0x20, 0xee, 0xea, - 0x12, 0xf1, 0x9f, 0xf5, 0x9b, 0x3d, 0xe2, 0x77, 0x7b, 0xc4, 0xdf, 0xed, 0x11, 0xff, 0xff, 0x80, - 0xb8, 0xdd, 0x01, 0x71, 0xb7, 0x07, 0xc4, 0xfd, 0x50, 0xc2, 0x28, 0xff, 0xb5, 0x59, 0xca, 0x3e, - 0x5b, 0x2b, 0xb3, 0xfa, 0xfa, 0x56, 0x75, 0x65, 0x9f, 0xad, 0x94, 0x53, 0x5d, 0xb6, 0x0f, 0x85, - 0xc9, 0xff, 0x26, 0x34, 0x5b, 0x76, 0xeb, 0x16, 0x7c, 0xb8, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x37, - 0x89, 0xf2, 0x99, 0x4e, 0x02, 0x00, 0x00, -} diff --git a/gen/lumera/action/types/action_type.pb.go b/gen/lumera/action/types/action_type.pb.go deleted file mode 100644 index 4aad1f7b..00000000 --- a/gen/lumera/action/types/action_type.pb.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/action/action_type.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ActionType int32 - -const ( - ActionTypeUnspecified ActionType = 0 - ActionTypeSense ActionType = 1 - ActionTypeCascade ActionType = 2 -) - -var ActionType_name = map[int32]string{ - 0: "ACTION_TYPE_UNSPECIFIED", - 1: "ACTION_TYPE_SENSE", - 2: "ACTION_TYPE_CASCADE", -} - -var ActionType_value = map[string]int32{ - "ACTION_TYPE_UNSPECIFIED": 0, - "ACTION_TYPE_SENSE": 1, - "ACTION_TYPE_CASCADE": 2, -} - -func (x ActionType) String() string { - return proto.EnumName(ActionType_name, int32(x)) -} - -func (ActionType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_82e3132f597b0999, []int{0} -} - -func init() { - proto.RegisterEnum("lumera.action.ActionType", ActionType_name, ActionType_value) -} - -func init() { proto.RegisterFile("lumera/action/action_type.proto", fileDescriptor_82e3132f597b0999) } - -var fileDescriptor_82e3132f597b0999 = []byte{ - // 264 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcf, 0x29, 0xcd, 0x4d, - 0x2d, 0x4a, 0xd4, 0x4f, 0x4c, 0x2e, 0xc9, 0xcc, 0xcf, 0x83, 0x52, 0xf1, 0x25, 0x95, 0x05, 0xa9, - 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0xbc, 0x10, 0x05, 0x7a, 0x10, 0x19, 0x29, 0x91, 0xf4, - 0xfc, 0xf4, 0x7c, 0xb0, 0x8c, 0x3e, 0x88, 0x05, 0x51, 0xa4, 0xb5, 0x8a, 0x91, 0x8b, 0xcb, 0x11, - 0xac, 0x20, 0xa4, 0xb2, 0x20, 0x55, 0xc8, 0x8c, 0x4b, 0xdc, 0xd1, 0x39, 0xc4, 0xd3, 0xdf, 0x2f, - 0x3e, 0x24, 0x32, 0xc0, 0x35, 0x3e, 0xd4, 0x2f, 0x38, 0xc0, 0xd5, 0xd9, 0xd3, 0xcd, 0xd3, 0xd5, - 0x45, 0x80, 0x41, 0x4a, 0xb2, 0x6b, 0xae, 0x82, 0x28, 0x42, 0x71, 0x68, 0x5e, 0x71, 0x41, 0x6a, - 0x72, 0x66, 0x5a, 0x66, 0x6a, 0x8a, 0x90, 0x16, 0x97, 0x20, 0xb2, 0xbe, 0x60, 0x57, 0xbf, 0x60, - 0x57, 0x01, 0x46, 0x29, 0xe1, 0xae, 0xb9, 0x0a, 0xfc, 0x08, 0x1d, 0xc1, 0xa9, 0x79, 0xc5, 0xa9, - 0x42, 0x7a, 0x5c, 0xc2, 0xc8, 0x6a, 0x9d, 0x1d, 0x83, 0x9d, 0x1d, 0x5d, 0x5c, 0x05, 0x98, 0xa4, - 0x44, 0xbb, 0xe6, 0x2a, 0x08, 0x22, 0x54, 0x3b, 0x27, 0x16, 0x27, 0x27, 0xa6, 0xa4, 0x4a, 0x71, - 0x74, 0x2c, 0x96, 0x63, 0x58, 0xb1, 0x44, 0x8e, 0xd1, 0xc9, 0xf3, 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, 0xf4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, - 0xf5, 0x7d, 0xc0, 0xde, 0x0e, 0x00, 0x79, 0x2f, 0x39, 0x3f, 0x47, 0x1f, 0x1a, 0x4c, 0x15, 0xb0, - 0x80, 0x02, 0x85, 0x50, 0x71, 0x12, 0x1b, 0xd8, 0xfb, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x3d, 0x36, 0x2d, 0x5e, 0x46, 0x01, 0x00, 0x00, -} diff --git a/gen/lumera/action/types/codec.go b/gen/lumera/action/types/codec.go deleted file mode 100644 index 98e1bf63..00000000 --- a/gen/lumera/action/types/codec.go +++ /dev/null @@ -1,26 +0,0 @@ -package types - -import ( - cdctypes "github.com/cosmos/cosmos-sdk/codec/types" - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/msgservice" - // this line is used by starport scaffolding # 1 -) - -func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgRequestAction{}, - ) - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgFinalizeAction{}, - ) - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgApproveAction{}, - ) - // this line is used by starport scaffolding # 3 - - registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgUpdateParams{}, - ) - msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) -} diff --git a/gen/lumera/action/types/metadata.pb.go b/gen/lumera/action/types/metadata.pb.go deleted file mode 100644 index 0b9644e5..00000000 --- a/gen/lumera/action/types/metadata.pb.go +++ /dev/null @@ -1,1255 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/action/metadata.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// SenseMetadata contains information for Sense actions. -// This metadata is directly embedded in the Action.metadata field. -// For RequestAction: -// - Required: data_hash, dd_and_fingerprints_ic -// - Optional: collection_id, group_id -// -// Keeper will add: -// - dd_and_fingerprints_max (from module params) -// -// For FinalizeAction: -// - Required: dd_and_fingerprints_ids, signatures -type SenseMetadata struct { - // RequestAction required fields - DataHash string `protobuf:"bytes,1,opt,name=data_hash,proto3" json:"data_hash,omitempty"` - DdAndFingerprintsIc uint64 `protobuf:"varint,2,opt,name=dd_and_fingerprints_ic,proto3" json:"dd_and_fingerprints_ic,omitempty"` - // RequestAction optional fields - CollectionId string `protobuf:"bytes,3,opt,name=collection_id,proto3" json:"collection_id,omitempty"` - GroupId string `protobuf:"bytes,4,opt,name=group_id,proto3" json:"group_id,omitempty"` - // Added by Keeper - DdAndFingerprintsMax uint64 `protobuf:"varint,5,opt,name=dd_and_fingerprints_max,proto3" json:"dd_and_fingerprints_max,omitempty"` - // FinalizeAction fields - DdAndFingerprintsIds []string `protobuf:"bytes,6,rep,name=dd_and_fingerprints_ids,proto3" json:"dd_and_fingerprints_ids,omitempty"` - Signatures string `protobuf:"bytes,7,opt,name=signatures,proto3" json:"signatures,omitempty"` - // Implementation-specific field to track supernode submissions - SupernodeFingerprints map[string]string `protobuf:"bytes,8,rep,name=supernode_fingerprints,proto3" json:"supernode_fingerprints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *SenseMetadata) Reset() { *m = SenseMetadata{} } -func (m *SenseMetadata) String() string { return proto.CompactTextString(m) } -func (*SenseMetadata) ProtoMessage() {} -func (*SenseMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_81df3bd9a8bf3d73, []int{0} -} -func (m *SenseMetadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SenseMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SenseMetadata.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 *SenseMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_SenseMetadata.Merge(m, src) -} -func (m *SenseMetadata) XXX_Size() int { - return m.Size() -} -func (m *SenseMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_SenseMetadata.DiscardUnknown(m) -} - -var xxx_messageInfo_SenseMetadata proto.InternalMessageInfo - -func (m *SenseMetadata) GetDataHash() string { - if m != nil { - return m.DataHash - } - return "" -} - -func (m *SenseMetadata) GetDdAndFingerprintsIc() uint64 { - if m != nil { - return m.DdAndFingerprintsIc - } - return 0 -} - -func (m *SenseMetadata) GetCollectionId() string { - if m != nil { - return m.CollectionId - } - return "" -} - -func (m *SenseMetadata) GetGroupId() string { - if m != nil { - return m.GroupId - } - return "" -} - -func (m *SenseMetadata) GetDdAndFingerprintsMax() uint64 { - if m != nil { - return m.DdAndFingerprintsMax - } - return 0 -} - -func (m *SenseMetadata) GetDdAndFingerprintsIds() []string { - if m != nil { - return m.DdAndFingerprintsIds - } - return nil -} - -func (m *SenseMetadata) GetSignatures() string { - if m != nil { - return m.Signatures - } - return "" -} - -func (m *SenseMetadata) GetSupernodeFingerprints() map[string]string { - if m != nil { - return m.SupernodeFingerprints - } - return nil -} - -// CascadeMetadata contains information for Cascade actions. -// This metadata is directly embedded in the Action.metadata field. -// For RequestAction: -// - Required: data_hash, file_name, rq_ids_ic, signatures -// -// Keeper will add: -// - rq_ids_max (from module params) -// -// For FinalizeAction: -// - Required: rq_ids_ids, rq_ids_oti -type CascadeMetadata struct { - // RequestAction required fields - DataHash string `protobuf:"bytes,1,opt,name=data_hash,proto3" json:"data_hash,omitempty"` - FileName string `protobuf:"bytes,2,opt,name=file_name,proto3" json:"file_name,omitempty"` - RqIdsIc uint64 `protobuf:"varint,3,opt,name=rq_ids_ic,proto3" json:"rq_ids_ic,omitempty"` - // Added by Keeper - RqIdsMax uint64 `protobuf:"varint,4,opt,name=rq_ids_max,proto3" json:"rq_ids_max,omitempty"` - // FinalizeAction fields - RqIdsIds []string `protobuf:"bytes,5,rep,name=rq_ids_ids,proto3" json:"rq_ids_ids,omitempty"` - RqIdsOti []byte `protobuf:"bytes,6,opt,name=rq_ids_oti,proto3" json:"rq_ids_oti,omitempty"` - // RequestAction required field - Signatures string `protobuf:"bytes,7,opt,name=signatures,proto3" json:"signatures,omitempty"` -} - -func (m *CascadeMetadata) Reset() { *m = CascadeMetadata{} } -func (m *CascadeMetadata) String() string { return proto.CompactTextString(m) } -func (*CascadeMetadata) ProtoMessage() {} -func (*CascadeMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_81df3bd9a8bf3d73, []int{1} -} -func (m *CascadeMetadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CascadeMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CascadeMetadata.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 *CascadeMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_CascadeMetadata.Merge(m, src) -} -func (m *CascadeMetadata) XXX_Size() int { - return m.Size() -} -func (m *CascadeMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_CascadeMetadata.DiscardUnknown(m) -} - -var xxx_messageInfo_CascadeMetadata proto.InternalMessageInfo - -func (m *CascadeMetadata) GetDataHash() string { - if m != nil { - return m.DataHash - } - return "" -} - -func (m *CascadeMetadata) GetFileName() string { - if m != nil { - return m.FileName - } - return "" -} - -func (m *CascadeMetadata) GetRqIdsIc() uint64 { - if m != nil { - return m.RqIdsIc - } - return 0 -} - -func (m *CascadeMetadata) GetRqIdsMax() uint64 { - if m != nil { - return m.RqIdsMax - } - return 0 -} - -func (m *CascadeMetadata) GetRqIdsIds() []string { - if m != nil { - return m.RqIdsIds - } - return nil -} - -func (m *CascadeMetadata) GetRqIdsOti() []byte { - if m != nil { - return m.RqIdsOti - } - return nil -} - -func (m *CascadeMetadata) GetSignatures() string { - if m != nil { - return m.Signatures - } - return "" -} - -func init() { - proto.RegisterType((*SenseMetadata)(nil), "lumera.action.SenseMetadata") - proto.RegisterMapType((map[string]string)(nil), "lumera.action.SenseMetadata.SupernodeFingerprintsEntry") - proto.RegisterType((*CascadeMetadata)(nil), "lumera.action.CascadeMetadata") -} - -func init() { proto.RegisterFile("lumera/action/metadata.proto", fileDescriptor_81df3bd9a8bf3d73) } - -var fileDescriptor_81df3bd9a8bf3d73 = []byte{ - // 457 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xcf, 0x8b, 0xd4, 0x30, - 0x18, 0x9d, 0x6c, 0x67, 0xc6, 0x6d, 0x74, 0x50, 0xc2, 0xb2, 0x96, 0x32, 0x74, 0xcb, 0xb2, 0x87, - 0x9e, 0x5a, 0x50, 0xd0, 0xc5, 0xe3, 0x8a, 0xa2, 0xa0, 0x20, 0xdd, 0x9b, 0x97, 0x92, 0x6d, 0xb2, - 0x9d, 0x60, 0x9b, 0xd4, 0x24, 0x95, 0x9d, 0xff, 0xc2, 0x3f, 0x6b, 0x8f, 0x7b, 0xf4, 0x24, 0x32, - 0xf3, 0x3f, 0xe8, 0x55, 0x92, 0xce, 0x8f, 0x56, 0x2c, 0x7a, 0x4a, 0xbe, 0xf7, 0xde, 0xf7, 0x1a, - 0xbe, 0xd7, 0x0f, 0xce, 0xcb, 0xa6, 0xa2, 0x12, 0x27, 0x38, 0xd7, 0x4c, 0xf0, 0xa4, 0xa2, 0x1a, - 0x13, 0xac, 0x71, 0x5c, 0x4b, 0xa1, 0x05, 0x9a, 0xb5, 0x6c, 0xdc, 0xb2, 0xfe, 0x51, 0x21, 0x0a, - 0x61, 0x99, 0xc4, 0xdc, 0x5a, 0x91, 0x7f, 0xd2, 0xb7, 0x68, 0x8f, 0x4c, 0x2f, 0x6b, 0xda, 0x0a, - 0x4e, 0x7f, 0x3a, 0x70, 0x76, 0x49, 0xb9, 0xa2, 0xef, 0x37, 0xee, 0x68, 0x0e, 0x5d, 0x73, 0x66, - 0x0b, 0xac, 0x16, 0x1e, 0x08, 0x41, 0xe4, 0xa6, 0x7b, 0x00, 0x3d, 0x83, 0xc7, 0x84, 0x64, 0x98, - 0x93, 0xec, 0x9a, 0xf1, 0x82, 0xca, 0x5a, 0x32, 0xae, 0x55, 0xc6, 0x72, 0xef, 0x20, 0x04, 0xd1, - 0x38, 0x1d, 0x60, 0xd1, 0x19, 0x9c, 0xe5, 0xa2, 0x2c, 0x69, 0xfb, 0x00, 0x46, 0x3c, 0xc7, 0x3a, - 0xf7, 0x41, 0xe4, 0xc3, 0xc3, 0x42, 0x8a, 0xa6, 0x36, 0x82, 0xb1, 0x15, 0xec, 0x6a, 0x74, 0x0e, - 0x1f, 0xff, 0xcd, 0xbb, 0xc2, 0x37, 0xde, 0xc4, 0x7e, 0x7a, 0x88, 0x1e, 0xea, 0x64, 0x44, 0x79, - 0xd3, 0xd0, 0x89, 0xdc, 0x74, 0x88, 0x46, 0x01, 0x84, 0x8a, 0x15, 0x1c, 0xeb, 0x46, 0x52, 0xe5, - 0xdd, 0xb3, 0x2f, 0xea, 0x20, 0x48, 0xc0, 0x63, 0xd5, 0xd4, 0x54, 0x72, 0x41, 0x68, 0xaf, 0xdb, - 0x3b, 0x0c, 0x9d, 0xe8, 0xfe, 0x93, 0xe7, 0x71, 0x2f, 0xa4, 0xb8, 0x37, 0xe9, 0xf8, 0x72, 0xdb, - 0xfa, 0xba, 0xd3, 0xf9, 0x8a, 0x6b, 0xb9, 0x4c, 0x07, 0x6c, 0xfd, 0x37, 0xd0, 0x1f, 0xee, 0x42, - 0x8f, 0xa0, 0xf3, 0x89, 0x2e, 0x37, 0xa1, 0x99, 0x2b, 0x3a, 0x82, 0x93, 0x2f, 0xb8, 0x6c, 0xa8, - 0x4d, 0xc7, 0x4d, 0xdb, 0xe2, 0xc5, 0xc1, 0x39, 0x38, 0xfd, 0x05, 0xe0, 0xc3, 0x97, 0x58, 0xe5, - 0x98, 0xfc, 0x6f, 0xf4, 0x73, 0xe8, 0x5e, 0xb3, 0x92, 0x66, 0x1c, 0x57, 0x5b, 0xbf, 0x3d, 0x60, - 0x58, 0xf9, 0xd9, 0x0c, 0xcd, 0xfc, 0x0b, 0x8e, 0x0d, 0x64, 0x0f, 0x98, 0x41, 0x6e, 0x0a, 0x93, - 0xd7, 0xd8, 0xd2, 0x1d, 0x04, 0x9d, 0xed, 0x78, 0x93, 0xca, 0xc4, 0xa4, 0x72, 0x31, 0xbe, 0xfd, - 0x7e, 0x02, 0xd2, 0x0e, 0xde, 0x51, 0x09, 0xcd, 0xbc, 0x69, 0x08, 0xa2, 0x07, 0x7f, 0xa8, 0x84, - 0x66, 0xff, 0x0a, 0xed, 0xe2, 0xed, 0xed, 0x2a, 0x00, 0x77, 0xab, 0x00, 0xfc, 0x58, 0x05, 0xe0, - 0xeb, 0x3a, 0x18, 0xdd, 0xad, 0x83, 0xd1, 0xb7, 0x75, 0x30, 0xfa, 0x98, 0x14, 0x4c, 0x2f, 0x9a, - 0xab, 0x38, 0x17, 0x55, 0xf2, 0xce, 0x06, 0xf7, 0xc1, 0x2c, 0x49, 0x2e, 0xca, 0x64, 0xb3, 0x47, - 0x37, 0xdb, 0x4d, 0x32, 0x2b, 0xa4, 0xae, 0xa6, 0x76, 0x89, 0x9e, 0xfe, 0x0e, 0x00, 0x00, 0xff, - 0xff, 0xfd, 0xaf, 0x30, 0x4a, 0xaa, 0x03, 0x00, 0x00, -} - -func (m *SenseMetadata) 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 *SenseMetadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SenseMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SupernodeFingerprints) > 0 { - for k := range m.SupernodeFingerprints { - v := m.SupernodeFingerprints[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintMetadata(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintMetadata(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintMetadata(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x42 - } - } - if len(m.Signatures) > 0 { - i -= len(m.Signatures) - copy(dAtA[i:], m.Signatures) - i = encodeVarintMetadata(dAtA, i, uint64(len(m.Signatures))) - i-- - dAtA[i] = 0x3a - } - if len(m.DdAndFingerprintsIds) > 0 { - for iNdEx := len(m.DdAndFingerprintsIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DdAndFingerprintsIds[iNdEx]) - copy(dAtA[i:], m.DdAndFingerprintsIds[iNdEx]) - i = encodeVarintMetadata(dAtA, i, uint64(len(m.DdAndFingerprintsIds[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if m.DdAndFingerprintsMax != 0 { - i = encodeVarintMetadata(dAtA, i, uint64(m.DdAndFingerprintsMax)) - i-- - dAtA[i] = 0x28 - } - if len(m.GroupId) > 0 { - i -= len(m.GroupId) - copy(dAtA[i:], m.GroupId) - i = encodeVarintMetadata(dAtA, i, uint64(len(m.GroupId))) - i-- - dAtA[i] = 0x22 - } - if len(m.CollectionId) > 0 { - i -= len(m.CollectionId) - copy(dAtA[i:], m.CollectionId) - i = encodeVarintMetadata(dAtA, i, uint64(len(m.CollectionId))) - i-- - dAtA[i] = 0x1a - } - if m.DdAndFingerprintsIc != 0 { - i = encodeVarintMetadata(dAtA, i, uint64(m.DdAndFingerprintsIc)) - i-- - dAtA[i] = 0x10 - } - if len(m.DataHash) > 0 { - i -= len(m.DataHash) - copy(dAtA[i:], m.DataHash) - i = encodeVarintMetadata(dAtA, i, uint64(len(m.DataHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CascadeMetadata) 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 *CascadeMetadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CascadeMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signatures) > 0 { - i -= len(m.Signatures) - copy(dAtA[i:], m.Signatures) - i = encodeVarintMetadata(dAtA, i, uint64(len(m.Signatures))) - i-- - dAtA[i] = 0x3a - } - if len(m.RqIdsOti) > 0 { - i -= len(m.RqIdsOti) - copy(dAtA[i:], m.RqIdsOti) - i = encodeVarintMetadata(dAtA, i, uint64(len(m.RqIdsOti))) - i-- - dAtA[i] = 0x32 - } - if len(m.RqIdsIds) > 0 { - for iNdEx := len(m.RqIdsIds) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RqIdsIds[iNdEx]) - copy(dAtA[i:], m.RqIdsIds[iNdEx]) - i = encodeVarintMetadata(dAtA, i, uint64(len(m.RqIdsIds[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if m.RqIdsMax != 0 { - i = encodeVarintMetadata(dAtA, i, uint64(m.RqIdsMax)) - i-- - dAtA[i] = 0x20 - } - if m.RqIdsIc != 0 { - i = encodeVarintMetadata(dAtA, i, uint64(m.RqIdsIc)) - i-- - dAtA[i] = 0x18 - } - if len(m.FileName) > 0 { - i -= len(m.FileName) - copy(dAtA[i:], m.FileName) - i = encodeVarintMetadata(dAtA, i, uint64(len(m.FileName))) - i-- - dAtA[i] = 0x12 - } - if len(m.DataHash) > 0 { - i -= len(m.DataHash) - copy(dAtA[i:], m.DataHash) - i = encodeVarintMetadata(dAtA, i, uint64(len(m.DataHash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintMetadata(dAtA []byte, offset int, v uint64) int { - offset -= sovMetadata(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SenseMetadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DataHash) - if l > 0 { - n += 1 + l + sovMetadata(uint64(l)) - } - if m.DdAndFingerprintsIc != 0 { - n += 1 + sovMetadata(uint64(m.DdAndFingerprintsIc)) - } - l = len(m.CollectionId) - if l > 0 { - n += 1 + l + sovMetadata(uint64(l)) - } - l = len(m.GroupId) - if l > 0 { - n += 1 + l + sovMetadata(uint64(l)) - } - if m.DdAndFingerprintsMax != 0 { - n += 1 + sovMetadata(uint64(m.DdAndFingerprintsMax)) - } - if len(m.DdAndFingerprintsIds) > 0 { - for _, s := range m.DdAndFingerprintsIds { - l = len(s) - n += 1 + l + sovMetadata(uint64(l)) - } - } - l = len(m.Signatures) - if l > 0 { - n += 1 + l + sovMetadata(uint64(l)) - } - if len(m.SupernodeFingerprints) > 0 { - for k, v := range m.SupernodeFingerprints { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMetadata(uint64(len(k))) + 1 + len(v) + sovMetadata(uint64(len(v))) - n += mapEntrySize + 1 + sovMetadata(uint64(mapEntrySize)) - } - } - return n -} - -func (m *CascadeMetadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DataHash) - if l > 0 { - n += 1 + l + sovMetadata(uint64(l)) - } - l = len(m.FileName) - if l > 0 { - n += 1 + l + sovMetadata(uint64(l)) - } - if m.RqIdsIc != 0 { - n += 1 + sovMetadata(uint64(m.RqIdsIc)) - } - if m.RqIdsMax != 0 { - n += 1 + sovMetadata(uint64(m.RqIdsMax)) - } - if len(m.RqIdsIds) > 0 { - for _, s := range m.RqIdsIds { - l = len(s) - n += 1 + l + sovMetadata(uint64(l)) - } - } - l = len(m.RqIdsOti) - if l > 0 { - n += 1 + l + sovMetadata(uint64(l)) - } - l = len(m.Signatures) - if l > 0 { - n += 1 + l + sovMetadata(uint64(l)) - } - return n -} - -func sovMetadata(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetadata(x uint64) (n int) { - return sovMetadata(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SenseMetadata) 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 ErrIntOverflowMetadata - } - 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: SenseMetadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SenseMetadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - 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 ErrInvalidLengthMetadata - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetadata - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DdAndFingerprintsIc", wireType) - } - m.DdAndFingerprintsIc = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DdAndFingerprintsIc |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CollectionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - 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 ErrInvalidLengthMetadata - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetadata - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CollectionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - 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 ErrInvalidLengthMetadata - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetadata - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GroupId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DdAndFingerprintsMax", wireType) - } - m.DdAndFingerprintsMax = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DdAndFingerprintsMax |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DdAndFingerprintsIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - 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 ErrInvalidLengthMetadata - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetadata - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DdAndFingerprintsIds = append(m.DdAndFingerprintsIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - 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 ErrInvalidLengthMetadata - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetadata - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupernodeFingerprints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetadata - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetadata - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SupernodeFingerprints == nil { - m.SupernodeFingerprints = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMetadata - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthMetadata - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthMetadata - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthMetadata - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipMetadata(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetadata - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.SupernodeFingerprints[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetadata(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetadata - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CascadeMetadata) 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 ErrIntOverflowMetadata - } - 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: CascadeMetadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CascadeMetadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - 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 ErrInvalidLengthMetadata - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetadata - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - 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 ErrInvalidLengthMetadata - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetadata - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RqIdsIc", wireType) - } - m.RqIdsIc = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RqIdsIc |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RqIdsMax", wireType) - } - m.RqIdsMax = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RqIdsMax |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RqIdsIds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - 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 ErrInvalidLengthMetadata - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetadata - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RqIdsIds = append(m.RqIdsIds, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RqIdsOti", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMetadata - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMetadata - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RqIdsOti = append(m.RqIdsOti[:0], dAtA[iNdEx:postIndex]...) - if m.RqIdsOti == nil { - m.RqIdsOti = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetadata - } - 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 ErrInvalidLengthMetadata - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetadata - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetadata(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetadata - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetadata(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetadata - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetadata - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetadata - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetadata - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetadata - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetadata - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetadata = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetadata = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetadata = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/action/types/params.pb.go b/gen/lumera/action/types/params.pb.go deleted file mode 100644 index caa6fc90..00000000 --- a/gen/lumera/action/types/params.pb.go +++ /dev/null @@ -1,858 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/action/params.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - types "github.com/cosmos/cosmos-sdk/types" - _ "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. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Params defines the parameters for the module. -type Params struct { - // Fees - BaseActionFee types.Coin `protobuf:"bytes,1,opt,name=base_action_fee,json=baseActionFee,proto3" json:"base_action_fee"` - FeePerByte types.Coin `protobuf:"bytes,2,opt,name=fee_per_byte,json=feePerByte,proto3" json:"fee_per_byte"` - // Limits - MaxActionsPerBlock uint64 `protobuf:"varint,3,opt,name=max_actions_per_block,json=maxActionsPerBlock,proto3" json:"max_actions_per_block,omitempty"` - MinSuperNodes uint64 `protobuf:"varint,4,opt,name=min_super_nodes,json=minSuperNodes,proto3" json:"min_super_nodes,omitempty"` - MaxDdAndFingerprints uint64 `protobuf:"varint,5,opt,name=max_dd_and_fingerprints,json=maxDdAndFingerprints,proto3" json:"max_dd_and_fingerprints,omitempty"` - MaxRaptorQSymbols uint64 `protobuf:"varint,6,opt,name=max_raptor_q_symbols,json=maxRaptorQSymbols,proto3" json:"max_raptor_q_symbols,omitempty"` - // Time Constraints - ExpirationDuration time.Duration `protobuf:"bytes,7,opt,name=expiration_duration,json=expirationDuration,proto3,stdduration" json:"expiration_duration"` - MinProcessingTime time.Duration `protobuf:"bytes,8,opt,name=min_processing_time,json=minProcessingTime,proto3,stdduration" json:"min_processing_time"` - MaxProcessingTime time.Duration `protobuf:"bytes,9,opt,name=max_processing_time,json=maxProcessingTime,proto3,stdduration" json:"max_processing_time"` - // Reward Distribution - SuperNodeFeeShare string `protobuf:"bytes,10,opt,name=super_node_fee_share,json=superNodeFeeShare,proto3" json:"super_node_fee_share,omitempty"` - FoundationFeeShare string `protobuf:"bytes,11,opt,name=foundation_fee_share,json=foundationFeeShare,proto3" json:"foundation_fee_share,omitempty"` -} - -func (m *Params) Reset() { *m = Params{} } -func (m *Params) String() string { return proto.CompactTextString(m) } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_ca2bc6adab8bf575, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetBaseActionFee() types.Coin { - if m != nil { - return m.BaseActionFee - } - return types.Coin{} -} - -func (m *Params) GetFeePerByte() types.Coin { - if m != nil { - return m.FeePerByte - } - return types.Coin{} -} - -func (m *Params) GetMaxActionsPerBlock() uint64 { - if m != nil { - return m.MaxActionsPerBlock - } - return 0 -} - -func (m *Params) GetMinSuperNodes() uint64 { - if m != nil { - return m.MinSuperNodes - } - return 0 -} - -func (m *Params) GetMaxDdAndFingerprints() uint64 { - if m != nil { - return m.MaxDdAndFingerprints - } - return 0 -} - -func (m *Params) GetMaxRaptorQSymbols() uint64 { - if m != nil { - return m.MaxRaptorQSymbols - } - return 0 -} - -func (m *Params) GetExpirationDuration() time.Duration { - if m != nil { - return m.ExpirationDuration - } - return 0 -} - -func (m *Params) GetMinProcessingTime() time.Duration { - if m != nil { - return m.MinProcessingTime - } - return 0 -} - -func (m *Params) GetMaxProcessingTime() time.Duration { - if m != nil { - return m.MaxProcessingTime - } - return 0 -} - -func (m *Params) GetSuperNodeFeeShare() string { - if m != nil { - return m.SuperNodeFeeShare - } - return "" -} - -func (m *Params) GetFoundationFeeShare() string { - if m != nil { - return m.FoundationFeeShare - } - return "" -} - -func init() { - proto.RegisterType((*Params)(nil), "lumera.action.Params") -} - -func init() { proto.RegisterFile("lumera/action/params.proto", fileDescriptor_ca2bc6adab8bf575) } - -var fileDescriptor_ca2bc6adab8bf575 = []byte{ - // 581 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0x3f, 0x6f, 0xd4, 0x3c, - 0x18, 0xbf, 0xbc, 0x6f, 0x39, 0x5a, 0x97, 0x52, 0x9d, 0x7b, 0x88, 0xb4, 0x43, 0xae, 0x62, 0x40, - 0x15, 0x12, 0xb1, 0x0a, 0x62, 0x61, 0x81, 0x1e, 0xd5, 0x49, 0x48, 0x15, 0x3a, 0xee, 0x3a, 0xb1, - 0x58, 0x4e, 0xf2, 0x24, 0x35, 0x9c, 0xed, 0x60, 0x27, 0x28, 0x37, 0xf2, 0x0d, 0x18, 0x19, 0x19, - 0x19, 0x19, 0xf8, 0x10, 0x1d, 0x2b, 0x26, 0xa6, 0x82, 0xda, 0x01, 0xc4, 0xa7, 0x40, 0x8e, 0x13, - 0x8a, 0xaa, 0x4a, 0xc0, 0x12, 0xc5, 0xcf, 0xef, 0xcf, 0xf3, 0xd8, 0x3f, 0x1b, 0x6d, 0xcc, 0x4a, - 0x01, 0x9a, 0x11, 0x16, 0x17, 0x5c, 0x49, 0x92, 0x33, 0xcd, 0x84, 0x09, 0x73, 0xad, 0x0a, 0x85, - 0x57, 0x1c, 0x16, 0x3a, 0x6c, 0x63, 0x3d, 0x56, 0x46, 0x28, 0x43, 0x6b, 0x90, 0xb8, 0x85, 0x63, - 0x6e, 0x04, 0x6e, 0x45, 0x22, 0x66, 0x80, 0xbc, 0xda, 0x8e, 0xa0, 0x60, 0xdb, 0x24, 0x56, 0x5c, - 0x36, 0x78, 0x3f, 0x53, 0x99, 0x72, 0x3a, 0xfb, 0xd7, 0xaa, 0x32, 0xa5, 0xb2, 0x19, 0x90, 0x7a, - 0x15, 0x95, 0x29, 0x49, 0x4a, 0xcd, 0x6c, 0xab, 0x06, 0xef, 0x31, 0xc1, 0xa5, 0x22, 0xf5, 0xd7, - 0x95, 0x6e, 0xbc, 0xee, 0xa2, 0xee, 0xb8, 0x9e, 0x11, 0xef, 0xa1, 0x55, 0xdb, 0x8e, 0xba, 0xe9, - 0x68, 0x0a, 0xe0, 0x7b, 0x9b, 0xde, 0xd6, 0xf2, 0x9d, 0xf5, 0xb0, 0x99, 0xcd, 0xc2, 0x61, 0x33, - 0x4d, 0xf8, 0x48, 0x71, 0x39, 0x5c, 0x3a, 0x3c, 0x1e, 0x74, 0xde, 0x7f, 0xfb, 0x70, 0xcb, 0x9b, - 0xac, 0x58, 0x74, 0xa7, 0xd6, 0x8e, 0x00, 0xf0, 0x08, 0x5d, 0x49, 0x01, 0x68, 0x0e, 0x9a, 0x46, - 0xf3, 0x02, 0xfc, 0xff, 0xfe, 0xc1, 0x0a, 0xa5, 0x00, 0x63, 0xd0, 0xc3, 0x79, 0x01, 0x78, 0x1b, - 0x5d, 0x13, 0xac, 0x6a, 0x86, 0x32, 0xce, 0x6f, 0xa6, 0xe2, 0x17, 0xfe, 0xff, 0x9b, 0xde, 0xd6, - 0xc2, 0x04, 0x0b, 0x56, 0xb9, 0xa6, 0xc6, 0x2a, 0x2c, 0x82, 0x6f, 0xa2, 0x55, 0xc1, 0x25, 0x35, - 0xa5, 0x25, 0x4b, 0x95, 0x80, 0xf1, 0x17, 0x6a, 0xf2, 0x8a, 0xe0, 0x72, 0x6a, 0xab, 0x4f, 0x6c, - 0x11, 0xdf, 0x43, 0xd7, 0xad, 0x75, 0x92, 0x50, 0x26, 0x13, 0x9a, 0x72, 0x99, 0x81, 0xce, 0x35, - 0x97, 0x85, 0xf1, 0x2f, 0xd5, 0xfc, 0xbe, 0x60, 0xd5, 0x6e, 0xb2, 0x23, 0x93, 0xd1, 0x6f, 0x18, - 0x26, 0xc8, 0xd6, 0xa9, 0x66, 0x79, 0xa1, 0x34, 0x7d, 0x49, 0xcd, 0x5c, 0x44, 0x6a, 0x66, 0xfc, - 0x6e, 0xad, 0xe9, 0x09, 0x56, 0x4d, 0x6a, 0xe8, 0xe9, 0xd4, 0x01, 0x78, 0x1f, 0xad, 0x41, 0x95, - 0x73, 0x17, 0x05, 0x6d, 0x33, 0xf1, 0x2f, 0x37, 0x27, 0xe2, 0x42, 0x0b, 0xdb, 0xd0, 0xc2, 0xdd, - 0x86, 0x30, 0x5c, 0xb4, 0x27, 0xf2, 0xf6, 0xcb, 0xc0, 0x9b, 0xe0, 0x33, 0x7d, 0x8b, 0xe2, 0x29, - 0x5a, 0xb3, 0xbb, 0xcc, 0xb5, 0x8a, 0xc1, 0x18, 0x2e, 0x33, 0x5a, 0x70, 0x01, 0xfe, 0xe2, 0xdf, - 0xbb, 0xf6, 0x04, 0x97, 0xe3, 0x5f, 0xf2, 0x7d, 0x2e, 0x00, 0x3f, 0x47, 0x6b, 0x76, 0x6f, 0xe7, - 0x4d, 0x97, 0xfe, 0x64, 0x3a, 0xb0, 0xa6, 0x3f, 0x8e, 0x07, 0x17, 0xa9, 0x9b, 0x5e, 0xac, 0x3a, - 0xd7, 0xeb, 0x01, 0xea, 0x9f, 0x45, 0x64, 0xaf, 0x1b, 0x35, 0x07, 0x4c, 0x83, 0x8f, 0x36, 0xbd, - 0xad, 0xa5, 0xe1, 0xd5, 0x4f, 0x1f, 0x6f, 0xa3, 0xe6, 0xb2, 0xec, 0x42, 0x3c, 0xe9, 0x99, 0x36, - 0xb8, 0x11, 0xc0, 0xd4, 0x12, 0xf1, 0x43, 0xd4, 0x4f, 0x55, 0x29, 0x13, 0xd6, 0xde, 0xd7, 0xc6, - 0x60, 0xf9, 0x42, 0x03, 0x7c, 0xc6, 0x6d, 0x1d, 0xee, 0x2f, 0x7c, 0x7f, 0x37, 0xf0, 0x86, 0x8f, - 0x0f, 0x4f, 0x02, 0xef, 0xe8, 0x24, 0xf0, 0xbe, 0x9e, 0x04, 0xde, 0x9b, 0xd3, 0xa0, 0x73, 0x74, - 0x1a, 0x74, 0x3e, 0x9f, 0x06, 0x9d, 0x67, 0x24, 0xe3, 0xc5, 0x41, 0x19, 0x85, 0xb1, 0x12, 0x64, - 0xaf, 0x7e, 0xbb, 0x63, 0xbb, 0xf5, 0x58, 0xcd, 0x48, 0xf3, 0xcc, 0xab, 0xf6, 0xa1, 0x17, 0xf3, - 0x1c, 0x4c, 0xd4, 0xad, 0x8f, 0xe6, 0xee, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x68, 0x4b, 0x4a, - 0xd7, 0x06, 0x04, 0x00, 0x00, -} - -func (this *Params) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Params) - if !ok { - that2, ok := that.(Params) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.BaseActionFee.Equal(&that1.BaseActionFee) { - return false - } - if !this.FeePerByte.Equal(&that1.FeePerByte) { - return false - } - if this.MaxActionsPerBlock != that1.MaxActionsPerBlock { - return false - } - if this.MinSuperNodes != that1.MinSuperNodes { - return false - } - if this.MaxDdAndFingerprints != that1.MaxDdAndFingerprints { - return false - } - if this.MaxRaptorQSymbols != that1.MaxRaptorQSymbols { - return false - } - if this.ExpirationDuration != that1.ExpirationDuration { - return false - } - if this.MinProcessingTime != that1.MinProcessingTime { - return false - } - if this.MaxProcessingTime != that1.MaxProcessingTime { - return false - } - if this.SuperNodeFeeShare != that1.SuperNodeFeeShare { - return false - } - if this.FoundationFeeShare != that1.FoundationFeeShare { - return false - } - return true -} -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FoundationFeeShare) > 0 { - i -= len(m.FoundationFeeShare) - copy(dAtA[i:], m.FoundationFeeShare) - i = encodeVarintParams(dAtA, i, uint64(len(m.FoundationFeeShare))) - i-- - dAtA[i] = 0x5a - } - if len(m.SuperNodeFeeShare) > 0 { - i -= len(m.SuperNodeFeeShare) - copy(dAtA[i:], m.SuperNodeFeeShare) - i = encodeVarintParams(dAtA, i, uint64(len(m.SuperNodeFeeShare))) - i-- - dAtA[i] = 0x52 - } - n1, err1 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.MaxProcessingTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxProcessingTime):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintParams(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x4a - n2, err2 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.MinProcessingTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MinProcessingTime):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintParams(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x42 - n3, err3 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.ExpirationDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.ExpirationDuration):]) - if err3 != nil { - return 0, err3 - } - i -= n3 - i = encodeVarintParams(dAtA, i, uint64(n3)) - i-- - dAtA[i] = 0x3a - if m.MaxRaptorQSymbols != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxRaptorQSymbols)) - i-- - dAtA[i] = 0x30 - } - if m.MaxDdAndFingerprints != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxDdAndFingerprints)) - i-- - dAtA[i] = 0x28 - } - if m.MinSuperNodes != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MinSuperNodes)) - i-- - dAtA[i] = 0x20 - } - if m.MaxActionsPerBlock != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MaxActionsPerBlock)) - i-- - dAtA[i] = 0x18 - } - { - size, err := m.FeePerByte.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.BaseActionFee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintParams(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.BaseActionFee.Size() - n += 1 + l + sovParams(uint64(l)) - l = m.FeePerByte.Size() - n += 1 + l + sovParams(uint64(l)) - if m.MaxActionsPerBlock != 0 { - n += 1 + sovParams(uint64(m.MaxActionsPerBlock)) - } - if m.MinSuperNodes != 0 { - n += 1 + sovParams(uint64(m.MinSuperNodes)) - } - if m.MaxDdAndFingerprints != 0 { - n += 1 + sovParams(uint64(m.MaxDdAndFingerprints)) - } - if m.MaxRaptorQSymbols != 0 { - n += 1 + sovParams(uint64(m.MaxRaptorQSymbols)) - } - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.ExpirationDuration) - n += 1 + l + sovParams(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MinProcessingTime) - n += 1 + l + sovParams(uint64(l)) - l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.MaxProcessingTime) - n += 1 + l + sovParams(uint64(l)) - l = len(m.SuperNodeFeeShare) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - l = len(m.FoundationFeeShare) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BaseActionFee", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BaseActionFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePerByte", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.FeePerByte.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxActionsPerBlock", wireType) - } - m.MaxActionsPerBlock = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxActionsPerBlock |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinSuperNodes", wireType) - } - m.MinSuperNodes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinSuperNodes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxDdAndFingerprints", wireType) - } - m.MaxDdAndFingerprints = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxDdAndFingerprints |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxRaptorQSymbols", wireType) - } - m.MaxRaptorQSymbols = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MaxRaptorQSymbols |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpirationDuration", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.ExpirationDuration, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MinProcessingTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.MinProcessingTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxProcessingTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.MaxProcessingTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuperNodeFeeShare", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SuperNodeFeeShare = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FoundationFeeShare", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FoundationFeeShare = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipParams(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthParams - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupParams - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthParams - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/action/types/query.pb.go b/gen/lumera/action/types/query.pb.go deleted file mode 100644 index a1c6237b..00000000 --- a/gen/lumera/action/types/query.pb.go +++ /dev/null @@ -1,2954 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/action/query.proto - -package types - -import ( - context "context" - fmt "fmt" - query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { -} - -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{0} -} -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) -} -func (m *QueryParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params holds all the parameters of this module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{1} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -// Request type for GetAction -type QueryGetActionRequest struct { - ActionID string `protobuf:"bytes,1,opt,name=actionID,proto3" json:"actionID,omitempty"` -} - -func (m *QueryGetActionRequest) Reset() { *m = QueryGetActionRequest{} } -func (m *QueryGetActionRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetActionRequest) ProtoMessage() {} -func (*QueryGetActionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{2} -} -func (m *QueryGetActionRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetActionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetActionRequest.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 *QueryGetActionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetActionRequest.Merge(m, src) -} -func (m *QueryGetActionRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetActionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetActionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetActionRequest proto.InternalMessageInfo - -func (m *QueryGetActionRequest) GetActionID() string { - if m != nil { - return m.ActionID - } - return "" -} - -// Response type for GetAction -type QueryGetActionResponse struct { - Action *Action `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"` -} - -func (m *QueryGetActionResponse) Reset() { *m = QueryGetActionResponse{} } -func (m *QueryGetActionResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetActionResponse) ProtoMessage() {} -func (*QueryGetActionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{3} -} -func (m *QueryGetActionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetActionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetActionResponse.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 *QueryGetActionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetActionResponse.Merge(m, src) -} -func (m *QueryGetActionResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetActionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetActionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetActionResponse proto.InternalMessageInfo - -func (m *QueryGetActionResponse) GetAction() *Action { - if m != nil { - return m.Action - } - return nil -} - -type QueryGetActionFeeRequest struct { - DataSize string `protobuf:"bytes,1,opt,name=dataSize,proto3" json:"dataSize,omitempty"` -} - -func (m *QueryGetActionFeeRequest) Reset() { *m = QueryGetActionFeeRequest{} } -func (m *QueryGetActionFeeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetActionFeeRequest) ProtoMessage() {} -func (*QueryGetActionFeeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{4} -} -func (m *QueryGetActionFeeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetActionFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetActionFeeRequest.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 *QueryGetActionFeeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetActionFeeRequest.Merge(m, src) -} -func (m *QueryGetActionFeeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetActionFeeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetActionFeeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetActionFeeRequest proto.InternalMessageInfo - -func (m *QueryGetActionFeeRequest) GetDataSize() string { - if m != nil { - return m.DataSize - } - return "" -} - -type QueryGetActionFeeResponse struct { - Amount string `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (m *QueryGetActionFeeResponse) Reset() { *m = QueryGetActionFeeResponse{} } -func (m *QueryGetActionFeeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetActionFeeResponse) ProtoMessage() {} -func (*QueryGetActionFeeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{5} -} -func (m *QueryGetActionFeeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetActionFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetActionFeeResponse.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 *QueryGetActionFeeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetActionFeeResponse.Merge(m, src) -} -func (m *QueryGetActionFeeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetActionFeeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetActionFeeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetActionFeeResponse proto.InternalMessageInfo - -func (m *QueryGetActionFeeResponse) GetAmount() string { - if m != nil { - return m.Amount - } - return "" -} - -// List actions with optional type and state filters -type QueryListActionsRequest struct { - ActionType ActionType `protobuf:"varint,1,opt,name=actionType,proto3,enum=lumera.action.ActionType" json:"actionType,omitempty"` - ActionState ActionState `protobuf:"varint,2,opt,name=actionState,proto3,enum=lumera.action.ActionState" json:"actionState,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryListActionsRequest) Reset() { *m = QueryListActionsRequest{} } -func (m *QueryListActionsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryListActionsRequest) ProtoMessage() {} -func (*QueryListActionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{6} -} -func (m *QueryListActionsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryListActionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryListActionsRequest.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 *QueryListActionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryListActionsRequest.Merge(m, src) -} -func (m *QueryListActionsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryListActionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryListActionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryListActionsRequest proto.InternalMessageInfo - -func (m *QueryListActionsRequest) GetActionType() ActionType { - if m != nil { - return m.ActionType - } - return ActionTypeUnspecified -} - -func (m *QueryListActionsRequest) GetActionState() ActionState { - if m != nil { - return m.ActionState - } - return ActionStateUnspecified -} - -func (m *QueryListActionsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryListActionsResponse struct { - Actions []*Action `protobuf:"bytes,1,rep,name=actions,proto3" json:"actions,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` - Total uint64 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` -} - -func (m *QueryListActionsResponse) Reset() { *m = QueryListActionsResponse{} } -func (m *QueryListActionsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryListActionsResponse) ProtoMessage() {} -func (*QueryListActionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{7} -} -func (m *QueryListActionsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryListActionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryListActionsResponse.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 *QueryListActionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryListActionsResponse.Merge(m, src) -} -func (m *QueryListActionsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryListActionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryListActionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryListActionsResponse proto.InternalMessageInfo - -func (m *QueryListActionsResponse) GetActions() []*Action { - if m != nil { - return m.Actions - } - return nil -} - -func (m *QueryListActionsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -func (m *QueryListActionsResponse) GetTotal() uint64 { - if m != nil { - return m.Total - } - return 0 -} - -// List actions for a specific supernode -type QueryListActionsBySuperNodeRequest struct { - SuperNodeAddress string `protobuf:"bytes,1,opt,name=superNodeAddress,proto3" json:"superNodeAddress,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryListActionsBySuperNodeRequest) Reset() { *m = QueryListActionsBySuperNodeRequest{} } -func (m *QueryListActionsBySuperNodeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryListActionsBySuperNodeRequest) ProtoMessage() {} -func (*QueryListActionsBySuperNodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{8} -} -func (m *QueryListActionsBySuperNodeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryListActionsBySuperNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryListActionsBySuperNodeRequest.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 *QueryListActionsBySuperNodeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryListActionsBySuperNodeRequest.Merge(m, src) -} -func (m *QueryListActionsBySuperNodeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryListActionsBySuperNodeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryListActionsBySuperNodeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryListActionsBySuperNodeRequest proto.InternalMessageInfo - -func (m *QueryListActionsBySuperNodeRequest) GetSuperNodeAddress() string { - if m != nil { - return m.SuperNodeAddress - } - return "" -} - -func (m *QueryListActionsBySuperNodeRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// List actions by block height -type QueryListActionsByBlockHeightRequest struct { - BlockHeight int64 `protobuf:"varint,1,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryListActionsByBlockHeightRequest) Reset() { *m = QueryListActionsByBlockHeightRequest{} } -func (m *QueryListActionsByBlockHeightRequest) String() string { return proto.CompactTextString(m) } -func (*QueryListActionsByBlockHeightRequest) ProtoMessage() {} -func (*QueryListActionsByBlockHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{9} -} -func (m *QueryListActionsByBlockHeightRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryListActionsByBlockHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryListActionsByBlockHeightRequest.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 *QueryListActionsByBlockHeightRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryListActionsByBlockHeightRequest.Merge(m, src) -} -func (m *QueryListActionsByBlockHeightRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryListActionsByBlockHeightRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryListActionsByBlockHeightRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryListActionsByBlockHeightRequest proto.InternalMessageInfo - -func (m *QueryListActionsByBlockHeightRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *QueryListActionsByBlockHeightRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// List expired actions -type QueryListExpiredActionsRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryListExpiredActionsRequest) Reset() { *m = QueryListExpiredActionsRequest{} } -func (m *QueryListExpiredActionsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryListExpiredActionsRequest) ProtoMessage() {} -func (*QueryListExpiredActionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{10} -} -func (m *QueryListExpiredActionsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryListExpiredActionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryListExpiredActionsRequest.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 *QueryListExpiredActionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryListExpiredActionsRequest.Merge(m, src) -} -func (m *QueryListExpiredActionsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryListExpiredActionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryListExpiredActionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryListExpiredActionsRequest proto.InternalMessageInfo - -func (m *QueryListExpiredActionsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// Query actions by metadata field -type QueryActionByMetadataRequest struct { - ActionType ActionType `protobuf:"varint,1,opt,name=actionType,proto3,enum=lumera.action.ActionType" json:"actionType,omitempty"` - MetadataQuery string `protobuf:"bytes,2,opt,name=metadataQuery,proto3" json:"metadataQuery,omitempty"` - Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryActionByMetadataRequest) Reset() { *m = QueryActionByMetadataRequest{} } -func (m *QueryActionByMetadataRequest) String() string { return proto.CompactTextString(m) } -func (*QueryActionByMetadataRequest) ProtoMessage() {} -func (*QueryActionByMetadataRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_55b16f9ed8860b40, []int{11} -} -func (m *QueryActionByMetadataRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryActionByMetadataRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryActionByMetadataRequest.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 *QueryActionByMetadataRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryActionByMetadataRequest.Merge(m, src) -} -func (m *QueryActionByMetadataRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryActionByMetadataRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryActionByMetadataRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryActionByMetadataRequest proto.InternalMessageInfo - -func (m *QueryActionByMetadataRequest) GetActionType() ActionType { - if m != nil { - return m.ActionType - } - return ActionTypeUnspecified -} - -func (m *QueryActionByMetadataRequest) GetMetadataQuery() string { - if m != nil { - return m.MetadataQuery - } - return "" -} - -func (m *QueryActionByMetadataRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "lumera.action.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "lumera.action.QueryParamsResponse") - proto.RegisterType((*QueryGetActionRequest)(nil), "lumera.action.QueryGetActionRequest") - proto.RegisterType((*QueryGetActionResponse)(nil), "lumera.action.QueryGetActionResponse") - proto.RegisterType((*QueryGetActionFeeRequest)(nil), "lumera.action.QueryGetActionFeeRequest") - proto.RegisterType((*QueryGetActionFeeResponse)(nil), "lumera.action.QueryGetActionFeeResponse") - proto.RegisterType((*QueryListActionsRequest)(nil), "lumera.action.QueryListActionsRequest") - proto.RegisterType((*QueryListActionsResponse)(nil), "lumera.action.QueryListActionsResponse") - proto.RegisterType((*QueryListActionsBySuperNodeRequest)(nil), "lumera.action.QueryListActionsBySuperNodeRequest") - proto.RegisterType((*QueryListActionsByBlockHeightRequest)(nil), "lumera.action.QueryListActionsByBlockHeightRequest") - proto.RegisterType((*QueryListExpiredActionsRequest)(nil), "lumera.action.QueryListExpiredActionsRequest") - proto.RegisterType((*QueryActionByMetadataRequest)(nil), "lumera.action.QueryActionByMetadataRequest") -} - -func init() { proto.RegisterFile("lumera/action/query.proto", fileDescriptor_55b16f9ed8860b40) } - -var fileDescriptor_55b16f9ed8860b40 = []byte{ - // 935 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x96, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xc7, 0x33, 0x09, 0x35, 0xe4, 0x85, 0x22, 0x78, 0xa4, 0xc1, 0x59, 0x55, 0x6e, 0x58, 0x85, - 0xa4, 0x0a, 0xed, 0x8e, 0x62, 0x43, 0x69, 0x01, 0x81, 0x6a, 0x41, 0xd3, 0x56, 0x01, 0xc2, 0x86, - 0x13, 0x17, 0x6b, 0x6c, 0x0f, 0x9b, 0x15, 0xb6, 0x67, 0xeb, 0x1d, 0xa3, 0x9a, 0xc8, 0x17, 0xfe, - 0x82, 0x0a, 0x84, 0xc4, 0x99, 0x53, 0x85, 0x84, 0xc4, 0x7f, 0x41, 0x04, 0x97, 0x4a, 0x5c, 0x10, - 0x07, 0x84, 0x12, 0x24, 0xfe, 0x0d, 0xb4, 0x33, 0xb3, 0xce, 0xee, 0x7a, 0xfd, 0xa3, 0x51, 0x2e, - 0xf1, 0xce, 0xcc, 0xf7, 0xbd, 0xf7, 0x99, 0xd9, 0x37, 0xdf, 0x2c, 0xac, 0xb6, 0x7a, 0x6d, 0xde, - 0x65, 0x94, 0x35, 0xa4, 0x2f, 0x3a, 0xf4, 0x41, 0x8f, 0x77, 0xfb, 0x4e, 0xd0, 0x15, 0x52, 0xe0, - 0x45, 0xbd, 0xe4, 0xe8, 0x25, 0xeb, 0x25, 0xd6, 0xf6, 0x3b, 0x82, 0xaa, 0xbf, 0x5a, 0x61, 0x2d, - 0x7b, 0xc2, 0x13, 0xea, 0x91, 0x46, 0x4f, 0x66, 0xf6, 0xb2, 0x27, 0x84, 0xd7, 0xe2, 0x94, 0x05, - 0x3e, 0x65, 0x9d, 0x8e, 0x90, 0x2c, 0x8a, 0x0f, 0xcd, 0xea, 0x56, 0x43, 0x84, 0x6d, 0x11, 0xd2, - 0x3a, 0x0b, 0xb9, 0x2e, 0x47, 0xbf, 0xda, 0xae, 0x73, 0xc9, 0xb6, 0x69, 0xc0, 0x3c, 0xbf, 0xa3, - 0xc4, 0x46, 0x6b, 0xa5, 0xe1, 0x02, 0xd6, 0x65, 0xed, 0x38, 0xcf, 0x95, 0xf4, 0x9a, 0xfe, 0xa9, - 0xc9, 0x7e, 0xc0, 0x8d, 0x60, 0x2d, 0x57, 0x10, 0x4a, 0x26, 0x79, 0x7e, 0x7a, 0xfd, 0xa3, 0xd7, - 0xec, 0x65, 0xc0, 0x4f, 0x23, 0xb8, 0x3d, 0x55, 0xd3, 0xe5, 0x0f, 0x7a, 0x3c, 0x94, 0xf6, 0x27, - 0xf0, 0x72, 0x6a, 0x36, 0x0c, 0x44, 0x27, 0xe4, 0x78, 0x13, 0x0a, 0x9a, 0xad, 0x48, 0xd6, 0xc8, - 0xd5, 0xa5, 0xf2, 0x25, 0x27, 0x75, 0x74, 0x8e, 0x96, 0x57, 0x17, 0x8f, 0xfe, 0xbe, 0x32, 0xf7, - 0xf8, 0xbf, 0x5f, 0xb6, 0x88, 0x6b, 0xf4, 0x76, 0x05, 0x2e, 0xa9, 0x84, 0x3b, 0x5c, 0xde, 0x56, - 0x5a, 0x53, 0x09, 0x2d, 0x78, 0x4e, 0x07, 0xdf, 0xfb, 0x40, 0x25, 0x5d, 0x74, 0x87, 0x63, 0x7b, - 0x07, 0x56, 0xb2, 0x41, 0x06, 0xe4, 0x3a, 0x14, 0xb4, 0x6a, 0x0c, 0x88, 0x91, 0x1b, 0x91, 0x7d, - 0x03, 0x8a, 0xe9, 0x44, 0x77, 0x38, 0x4f, 0x00, 0x34, 0x99, 0x64, 0xfb, 0xfe, 0xd7, 0x3c, 0x06, - 0x88, 0xc7, 0x76, 0x05, 0x56, 0x73, 0xe2, 0x0c, 0xc3, 0x0a, 0x14, 0x58, 0x5b, 0xf4, 0x3a, 0xd2, - 0x84, 0x99, 0x91, 0xfd, 0x17, 0x81, 0x57, 0x54, 0xd4, 0xae, 0x1f, 0x9a, 0xb0, 0xf8, 0x5c, 0xf1, - 0x16, 0x80, 0x46, 0xfa, 0xac, 0x1f, 0xe8, 0x72, 0x2f, 0x94, 0x57, 0x73, 0xd9, 0x23, 0x81, 0x9b, - 0x10, 0xe3, 0xbb, 0xb0, 0xa4, 0x47, 0xfb, 0xd1, 0x9b, 0x2d, 0xce, 0xab, 0x58, 0x2b, 0x37, 0x56, - 0x29, 0xdc, 0xa4, 0x1c, 0xef, 0x00, 0x9c, 0x76, 0x5d, 0x71, 0x41, 0x1d, 0xda, 0x86, 0xa3, 0x5b, - 0xd4, 0x89, 0x5a, 0xd4, 0xd1, 0x37, 0xc2, 0xb4, 0xa8, 0xb3, 0xc7, 0xbc, 0xf8, 0x84, 0xdc, 0x44, - 0xa4, 0xfd, 0x13, 0x31, 0x47, 0x99, 0xda, 0x9c, 0x39, 0x11, 0x0a, 0xcf, 0xea, 0x9a, 0x51, 0x7f, - 0x2c, 0x8c, 0x7f, 0x2d, 0xb1, 0x0a, 0x77, 0x52, 0x54, 0xf3, 0x8a, 0x6a, 0x73, 0x2a, 0x95, 0xae, - 0x96, 0xc4, 0xc2, 0x65, 0xb8, 0x20, 0x85, 0x64, 0x2d, 0xb5, 0xb3, 0x67, 0x5c, 0x3d, 0xb0, 0x7f, - 0x20, 0x60, 0x67, 0x61, 0xab, 0xfd, 0xfd, 0x5e, 0xc0, 0xbb, 0x1f, 0x8b, 0xe6, 0xb0, 0x03, 0xb6, - 0xe0, 0xc5, 0x30, 0x9e, 0xbb, 0xdd, 0x6c, 0x76, 0x79, 0x18, 0x9a, 0x57, 0x3a, 0x32, 0x9f, 0x39, - 0xc7, 0xf9, 0x33, 0x9f, 0xe3, 0x23, 0x02, 0xeb, 0xa3, 0x68, 0xd5, 0x96, 0x68, 0x7c, 0x79, 0x97, - 0xfb, 0xde, 0x81, 0x8c, 0xe1, 0xd6, 0x60, 0xa9, 0x7e, 0x3a, 0xab, 0xb8, 0x16, 0xdc, 0xe4, 0xd4, - 0xb9, 0x21, 0x1d, 0x40, 0x69, 0x48, 0xf4, 0xe1, 0xc3, 0xc0, 0xef, 0xf2, 0x66, 0xa6, 0x7b, 0xd3, - 0x95, 0xc8, 0x99, 0x2b, 0xfd, 0x4a, 0xe0, 0xb2, 0x2a, 0xa5, 0xf3, 0x57, 0xfb, 0x1f, 0x71, 0xc9, - 0xa2, 0x4b, 0x77, 0x0e, 0xd7, 0x64, 0x1d, 0x2e, 0xb6, 0x4d, 0x36, 0x55, 0x42, 0x1d, 0xc8, 0xa2, - 0x9b, 0x9e, 0x3c, 0xaf, 0xeb, 0x50, 0xfe, 0x1d, 0xe0, 0x82, 0xce, 0x38, 0x80, 0x82, 0x76, 0x3f, - 0x7c, 0x35, 0x03, 0x3a, 0x6a, 0xaf, 0x96, 0x3d, 0x49, 0xa2, 0xdb, 0xdb, 0xbe, 0xf6, 0xcd, 0x1f, - 0xff, 0x7e, 0x37, 0xbf, 0x81, 0xeb, 0x74, 0x57, 0x69, 0xf7, 0x22, 0xbb, 0x6e, 0x88, 0x16, 0xcd, - 0xfb, 0x5f, 0x81, 0xdf, 0x13, 0x58, 0x1c, 0xba, 0x14, 0xae, 0xe7, 0xe5, 0xcf, 0x5a, 0xaf, 0xf5, - 0xda, 0x14, 0x95, 0x01, 0x79, 0x47, 0x81, 0xbc, 0x89, 0x95, 0xc9, 0x20, 0x1e, 0x97, 0x35, 0xf3, - 0x78, 0x18, 0x3b, 0xf8, 0x00, 0x7f, 0x24, 0xf0, 0x7c, 0xd2, 0x3d, 0x71, 0x73, 0x62, 0xd1, 0x53, - 0x5f, 0xb6, 0xae, 0x4e, 0x17, 0x1a, 0xc0, 0xf7, 0x15, 0xe0, 0x2d, 0x7c, 0x6b, 0x56, 0xc0, 0xda, - 0x17, 0x9c, 0xd3, 0xc3, 0xd8, 0xe5, 0x07, 0xf8, 0x2d, 0x81, 0xa5, 0xc4, 0x3d, 0xc4, 0x8d, 0xbc, - 0xd2, 0xa3, 0x6e, 0x6e, 0x6d, 0x4e, 0xd5, 0x19, 0xc2, 0xb2, 0x22, 0xbc, 0x86, 0x5b, 0x93, 0x09, - 0x5b, 0x7e, 0x18, 0x23, 0x86, 0x78, 0x44, 0x60, 0x25, 0xdf, 0xb7, 0x70, 0x7b, 0x4a, 0xdd, 0x51, - 0x8f, 0x9b, 0x1d, 0xd5, 0x55, 0xa8, 0xbb, 0x78, 0x7f, 0x76, 0xd4, 0x5a, 0xbd, 0x5f, 0x53, 0x46, - 0xd9, 0x11, 0x4d, 0x4e, 0x0f, 0xb3, 0x9e, 0x39, 0xc0, 0xdf, 0x08, 0x14, 0xc7, 0xf9, 0x1c, 0x56, - 0xa6, 0x6e, 0x66, 0xd4, 0x15, 0x67, 0xdf, 0xce, 0x9e, 0xda, 0xce, 0x7d, 0xbc, 0xfb, 0x74, 0xdb, - 0x51, 0xfe, 0x5a, 0x3b, 0x50, 0x35, 0xe9, 0x61, 0xc2, 0x6d, 0x07, 0xf8, 0x98, 0x00, 0x8e, 0x5a, - 0x24, 0x5e, 0x1f, 0x47, 0x94, 0x6b, 0xa5, 0xb3, 0x6f, 0xe0, 0x6d, 0xb5, 0x81, 0x37, 0xb0, 0x3c, - 0xc3, 0x06, 0xb8, 0x2e, 0x35, 0x6c, 0xa1, 0x9f, 0x89, 0xf9, 0xea, 0xca, 0xfa, 0x2c, 0xbe, 0x9e, - 0x57, 0x7e, 0x8c, 0x1b, 0xcf, 0xce, 0xfa, 0x9e, 0x62, 0xbd, 0x89, 0x37, 0x26, 0xb3, 0x2a, 0x6b, - 0x8d, 0xaf, 0x62, 0xbd, 0x5f, 0x8b, 0xad, 0xb9, 0x7a, 0xef, 0xe8, 0xb8, 0x44, 0x9e, 0x1c, 0x97, - 0xc8, 0x3f, 0xc7, 0x25, 0xf2, 0xe8, 0xa4, 0x34, 0xf7, 0xe4, 0xa4, 0x34, 0xf7, 0xe7, 0x49, 0x69, - 0xee, 0x73, 0xea, 0xf9, 0xf2, 0xa0, 0x57, 0x77, 0x1a, 0xa2, 0x3d, 0x26, 0xf7, 0xc3, 0x38, 0x7b, - 0xf4, 0x65, 0x1c, 0xd6, 0x0b, 0xea, 0xeb, 0xb6, 0xf2, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x69, - 0x89, 0xff, 0x40, 0xf7, 0x0b, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Parameters queries the parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // GetAction queries a single action by ID. - GetAction(ctx context.Context, in *QueryGetActionRequest, opts ...grpc.CallOption) (*QueryGetActionResponse, error) - // Queries a list of GetActionFee items. - GetActionFee(ctx context.Context, in *QueryGetActionFeeRequest, opts ...grpc.CallOption) (*QueryGetActionFeeResponse, error) - // List actions with optional type and state filters. - ListActions(ctx context.Context, in *QueryListActionsRequest, opts ...grpc.CallOption) (*QueryListActionsResponse, error) - // List actions for a specific supernode. - ListActionsBySuperNode(ctx context.Context, in *QueryListActionsBySuperNodeRequest, opts ...grpc.CallOption) (*QueryListActionsResponse, error) - // List actions created at a specific block height. - ListActionsByBlockHeight(ctx context.Context, in *QueryListActionsByBlockHeightRequest, opts ...grpc.CallOption) (*QueryListActionsResponse, error) - // List expired actions. - ListExpiredActions(ctx context.Context, in *QueryListExpiredActionsRequest, opts ...grpc.CallOption) (*QueryListActionsResponse, error) - // Query actions based on metadata. - QueryActionByMetadata(ctx context.Context, in *QueryActionByMetadataRequest, opts ...grpc.CallOption) (*QueryListActionsResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GetAction(ctx context.Context, in *QueryGetActionRequest, opts ...grpc.CallOption) (*QueryGetActionResponse, error) { - out := new(QueryGetActionResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Query/GetAction", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GetActionFee(ctx context.Context, in *QueryGetActionFeeRequest, opts ...grpc.CallOption) (*QueryGetActionFeeResponse, error) { - out := new(QueryGetActionFeeResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Query/GetActionFee", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ListActions(ctx context.Context, in *QueryListActionsRequest, opts ...grpc.CallOption) (*QueryListActionsResponse, error) { - out := new(QueryListActionsResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Query/ListActions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ListActionsBySuperNode(ctx context.Context, in *QueryListActionsBySuperNodeRequest, opts ...grpc.CallOption) (*QueryListActionsResponse, error) { - out := new(QueryListActionsResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Query/ListActionsBySuperNode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ListActionsByBlockHeight(ctx context.Context, in *QueryListActionsByBlockHeightRequest, opts ...grpc.CallOption) (*QueryListActionsResponse, error) { - out := new(QueryListActionsResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Query/ListActionsByBlockHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ListExpiredActions(ctx context.Context, in *QueryListExpiredActionsRequest, opts ...grpc.CallOption) (*QueryListActionsResponse, error) { - out := new(QueryListActionsResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Query/ListExpiredActions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) QueryActionByMetadata(ctx context.Context, in *QueryActionByMetadataRequest, opts ...grpc.CallOption) (*QueryListActionsResponse, error) { - out := new(QueryListActionsResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Query/QueryActionByMetadata", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Parameters queries the parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // GetAction queries a single action by ID. - GetAction(context.Context, *QueryGetActionRequest) (*QueryGetActionResponse, error) - // Queries a list of GetActionFee items. - GetActionFee(context.Context, *QueryGetActionFeeRequest) (*QueryGetActionFeeResponse, error) - // List actions with optional type and state filters. - ListActions(context.Context, *QueryListActionsRequest) (*QueryListActionsResponse, error) - // List actions for a specific supernode. - ListActionsBySuperNode(context.Context, *QueryListActionsBySuperNodeRequest) (*QueryListActionsResponse, error) - // List actions created at a specific block height. - ListActionsByBlockHeight(context.Context, *QueryListActionsByBlockHeightRequest) (*QueryListActionsResponse, error) - // List expired actions. - ListExpiredActions(context.Context, *QueryListExpiredActionsRequest) (*QueryListActionsResponse, error) - // Query actions based on metadata. - QueryActionByMetadata(context.Context, *QueryActionByMetadataRequest) (*QueryListActionsResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (*UnimplementedQueryServer) GetAction(ctx context.Context, req *QueryGetActionRequest) (*QueryGetActionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAction not implemented") -} -func (*UnimplementedQueryServer) GetActionFee(ctx context.Context, req *QueryGetActionFeeRequest) (*QueryGetActionFeeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetActionFee not implemented") -} -func (*UnimplementedQueryServer) ListActions(ctx context.Context, req *QueryListActionsRequest) (*QueryListActionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListActions not implemented") -} -func (*UnimplementedQueryServer) ListActionsBySuperNode(ctx context.Context, req *QueryListActionsBySuperNodeRequest) (*QueryListActionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListActionsBySuperNode not implemented") -} -func (*UnimplementedQueryServer) ListActionsByBlockHeight(ctx context.Context, req *QueryListActionsByBlockHeightRequest) (*QueryListActionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListActionsByBlockHeight not implemented") -} -func (*UnimplementedQueryServer) ListExpiredActions(ctx context.Context, req *QueryListExpiredActionsRequest) (*QueryListActionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListExpiredActions not implemented") -} -func (*UnimplementedQueryServer) QueryActionByMetadata(ctx context.Context, req *QueryActionByMetadataRequest) (*QueryListActionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method QueryActionByMetadata not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GetAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetActionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetAction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Query/GetAction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetAction(ctx, req.(*QueryGetActionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GetActionFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetActionFeeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetActionFee(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Query/GetActionFee", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetActionFee(ctx, req.(*QueryGetActionFeeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ListActions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryListActionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ListActions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Query/ListActions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ListActions(ctx, req.(*QueryListActionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ListActionsBySuperNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryListActionsBySuperNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ListActionsBySuperNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Query/ListActionsBySuperNode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ListActionsBySuperNode(ctx, req.(*QueryListActionsBySuperNodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ListActionsByBlockHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryListActionsByBlockHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ListActionsByBlockHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Query/ListActionsByBlockHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ListActionsByBlockHeight(ctx, req.(*QueryListActionsByBlockHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ListExpiredActions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryListExpiredActionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ListExpiredActions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Query/ListExpiredActions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ListExpiredActions(ctx, req.(*QueryListExpiredActionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_QueryActionByMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryActionByMetadataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).QueryActionByMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Query/QueryActionByMetadata", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).QueryActionByMetadata(ctx, req.(*QueryActionByMetadataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var Query_serviceDesc = _Query_serviceDesc -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "lumera.action.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "GetAction", - Handler: _Query_GetAction_Handler, - }, - { - MethodName: "GetActionFee", - Handler: _Query_GetActionFee_Handler, - }, - { - MethodName: "ListActions", - Handler: _Query_ListActions_Handler, - }, - { - MethodName: "ListActionsBySuperNode", - Handler: _Query_ListActionsBySuperNode_Handler, - }, - { - MethodName: "ListActionsByBlockHeight", - Handler: _Query_ListActionsByBlockHeight_Handler, - }, - { - MethodName: "ListExpiredActions", - Handler: _Query_ListExpiredActions_Handler, - }, - { - MethodName: "QueryActionByMetadata", - Handler: _Query_QueryActionByMetadata_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "lumera/action/query.proto", -} - -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryGetActionRequest) 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 *QueryGetActionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetActionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ActionID) > 0 { - i -= len(m.ActionID) - copy(dAtA[i:], m.ActionID) - i = encodeVarintQuery(dAtA, i, uint64(len(m.ActionID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetActionResponse) 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 *QueryGetActionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetActionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Action != nil { - { - size, err := m.Action.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetActionFeeRequest) 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 *QueryGetActionFeeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetActionFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DataSize) > 0 { - i -= len(m.DataSize) - copy(dAtA[i:], m.DataSize) - i = encodeVarintQuery(dAtA, i, uint64(len(m.DataSize))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetActionFeeResponse) 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 *QueryGetActionFeeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetActionFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Amount))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryListActionsRequest) 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 *QueryListActionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryListActionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.ActionState != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ActionState)) - i-- - dAtA[i] = 0x10 - } - if m.ActionType != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ActionType)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryListActionsResponse) 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 *QueryListActionsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryListActionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Total != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Total)) - i-- - dAtA[i] = 0x18 - } - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Actions) > 0 { - for iNdEx := len(m.Actions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Actions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryListActionsBySuperNodeRequest) 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 *QueryListActionsBySuperNodeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryListActionsBySuperNodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.SuperNodeAddress) > 0 { - i -= len(m.SuperNodeAddress) - copy(dAtA[i:], m.SuperNodeAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SuperNodeAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryListActionsByBlockHeightRequest) 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 *QueryListActionsByBlockHeightRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryListActionsByBlockHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.BlockHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryListExpiredActionsRequest) 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 *QueryListExpiredActionsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryListExpiredActionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryActionByMetadataRequest) 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 *QueryActionByMetadataRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryActionByMetadataRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.MetadataQuery) > 0 { - i -= len(m.MetadataQuery) - copy(dAtA[i:], m.MetadataQuery) - i = encodeVarintQuery(dAtA, i, uint64(len(m.MetadataQuery))) - i-- - dAtA[i] = 0x12 - } - if m.ActionType != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ActionType)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryGetActionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ActionID) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetActionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Action != nil { - l = m.Action.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetActionFeeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DataSize) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetActionFeeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Amount) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryListActionsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionType != 0 { - n += 1 + sovQuery(uint64(m.ActionType)) - } - if m.ActionState != 0 { - n += 1 + sovQuery(uint64(m.ActionState)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryListActionsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Actions) > 0 { - for _, e := range m.Actions { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.Total != 0 { - n += 1 + sovQuery(uint64(m.Total)) - } - return n -} - -func (m *QueryListActionsBySuperNodeRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SuperNodeAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryListActionsByBlockHeightRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovQuery(uint64(m.BlockHeight)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryListExpiredActionsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryActionByMetadataRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ActionType != 0 { - n += 1 + sovQuery(uint64(m.ActionType)) - } - l = len(m.MetadataQuery) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetActionRequest) 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: QueryGetActionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetActionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionID", 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.ActionID = 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 *QueryGetActionResponse) 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: QueryGetActionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetActionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Action == nil { - m.Action = &Action{} - } - if err := m.Action.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetActionFeeRequest) 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: QueryGetActionFeeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetActionFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataSize", 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.DataSize = 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 *QueryGetActionFeeResponse) 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: QueryGetActionFeeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetActionFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", 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.Amount = 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 *QueryListActionsRequest) 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: QueryListActionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryListActionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionType", wireType) - } - m.ActionType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActionType |= ActionType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionState", wireType) - } - m.ActionState = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActionState |= ActionState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryListActionsResponse) 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: QueryListActionsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryListActionsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Actions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Actions = append(m.Actions, &Action{}) - if err := m.Actions[len(m.Actions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - m.Total = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Total |= uint64(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 (m *QueryListActionsBySuperNodeRequest) 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: QueryListActionsBySuperNodeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryListActionsBySuperNodeRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SuperNodeAddress", 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.SuperNodeAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryListActionsByBlockHeightRequest) 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: QueryListActionsByBlockHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryListActionsByBlockHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryListExpiredActionsRequest) 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: QueryListExpiredActionsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryListExpiredActionsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryActionByMetadataRequest) 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: QueryActionByMetadataRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryActionByMetadataRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionType", wireType) - } - m.ActionType = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ActionType |= ActionType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetadataQuery", 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.MetadataQuery = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/action/types/query.pb.gw.go b/gen/lumera/action/types/query.pb.gw.go deleted file mode 100644 index 225b5bfe..00000000 --- a/gen/lumera/action/types/query.pb.gw.go +++ /dev/null @@ -1,842 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: lumera/action/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_GetAction_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetActionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["actionID"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "actionID") - } - - protoReq.ActionID, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "actionID", err) - } - - msg, err := client.GetAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_GetAction_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetActionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["actionID"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "actionID") - } - - protoReq.ActionID, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "actionID", err) - } - - msg, err := server.GetAction(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_GetActionFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetActionFeeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["dataSize"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "dataSize") - } - - protoReq.DataSize, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "dataSize", err) - } - - msg, err := client.GetActionFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_GetActionFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetActionFeeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["dataSize"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "dataSize") - } - - protoReq.DataSize, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "dataSize", err) - } - - msg, err := server.GetActionFee(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_ListActions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_ListActions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListActionsRequest - 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_ListActions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListActions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ListActions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListActionsRequest - 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_ListActions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListActions(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_ListActionsBySuperNode_0 = &utilities.DoubleArray{Encoding: map[string]int{"superNodeAddress": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_ListActionsBySuperNode_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListActionsBySuperNodeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["superNodeAddress"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "superNodeAddress") - } - - protoReq.SuperNodeAddress, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "superNodeAddress", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ListActionsBySuperNode_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListActionsBySuperNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ListActionsBySuperNode_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListActionsBySuperNodeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["superNodeAddress"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "superNodeAddress") - } - - protoReq.SuperNodeAddress, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "superNodeAddress", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ListActionsBySuperNode_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListActionsBySuperNode(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_ListActionsByBlockHeight_0 = &utilities.DoubleArray{Encoding: map[string]int{"blockHeight": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_ListActionsByBlockHeight_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListActionsByBlockHeightRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["blockHeight"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "blockHeight") - } - - protoReq.BlockHeight, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "blockHeight", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ListActionsByBlockHeight_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListActionsByBlockHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ListActionsByBlockHeight_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListActionsByBlockHeightRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["blockHeight"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "blockHeight") - } - - protoReq.BlockHeight, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "blockHeight", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ListActionsByBlockHeight_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListActionsByBlockHeight(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_ListExpiredActions_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_ListExpiredActions_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListExpiredActionsRequest - 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_ListExpiredActions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListExpiredActions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ListExpiredActions_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListExpiredActionsRequest - 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_ListExpiredActions_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListExpiredActions(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_QueryActionByMetadata_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_QueryActionByMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryActionByMetadataRequest - 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_QueryActionByMetadata_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.QueryActionByMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_QueryActionByMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryActionByMetadataRequest - 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_QueryActionByMetadata_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.QueryActionByMetadata(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_GetAction_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_GetAction_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_GetAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_GetActionFee_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_GetActionFee_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_GetActionFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ListActions_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_ListActions_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_ListActions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ListActionsBySuperNode_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_ListActionsBySuperNode_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_ListActionsBySuperNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ListActionsByBlockHeight_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_ListActionsByBlockHeight_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_ListActionsByBlockHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ListExpiredActions_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_ListExpiredActions_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_ListExpiredActions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_QueryActionByMetadata_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_QueryActionByMetadata_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_QueryActionByMetadata_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_GetAction_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_GetAction_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_GetAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_GetActionFee_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_GetActionFee_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_GetActionFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ListActions_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_ListActions_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_ListActions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ListActionsBySuperNode_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_ListActionsBySuperNode_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_ListActionsBySuperNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ListActionsByBlockHeight_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_ListActionsByBlockHeight_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_ListActionsByBlockHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ListExpiredActions_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_ListExpiredActions_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_ListExpiredActions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_QueryActionByMetadata_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_QueryActionByMetadata_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_QueryActionByMetadata_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"LumeraProtocol", "lumera", "action", "params"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_GetAction_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"LumeraProtocol", "lumera", "action", "get_action", "actionID"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_GetActionFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"LumeraProtocol", "lumera", "action", "get_action_fee", "dataSize"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ListActions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"LumeraProtocol", "lumera", "action", "list_actions"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ListActionsBySuperNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"LumeraProtocol", "lumera", "action", "list_actions_by_supernode", "superNodeAddress"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ListActionsByBlockHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"LumeraProtocol", "lumera", "action", "list_actions_by_block_height", "blockHeight"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ListExpiredActions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"LumeraProtocol", "lumera", "action", "list_expired_actions"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_QueryActionByMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"LumeraProtocol", "lumera", "action", "query_action_by_metadata"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Params_0 = runtime.ForwardResponseMessage - - forward_Query_GetAction_0 = runtime.ForwardResponseMessage - - forward_Query_GetActionFee_0 = runtime.ForwardResponseMessage - - forward_Query_ListActions_0 = runtime.ForwardResponseMessage - - forward_Query_ListActionsBySuperNode_0 = runtime.ForwardResponseMessage - - forward_Query_ListActionsByBlockHeight_0 = runtime.ForwardResponseMessage - - forward_Query_ListExpiredActions_0 = runtime.ForwardResponseMessage - - forward_Query_QueryActionByMetadata_0 = runtime.ForwardResponseMessage -) diff --git a/gen/lumera/action/types/tx.pb.go b/gen/lumera/action/types/tx.pb.go deleted file mode 100644 index 2d66269e..00000000 --- a/gen/lumera/action/types/tx.pb.go +++ /dev/null @@ -1,2097 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/action/tx.proto - -package types - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // NOTE: All parameters must be supplied. - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` -} - -func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } -func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParams) ProtoMessage() {} -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_aed2fc0b455a3b3d, []int{0} -} -func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParams.Merge(m, src) -} -func (m *MsgUpdateParams) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo - -func (m *MsgUpdateParams) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgUpdateParams) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -type MsgUpdateParamsResponse struct { -} - -func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } -func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParamsResponse) ProtoMessage() {} -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_aed2fc0b455a3b3d, []int{1} -} -func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) -} -func (m *MsgUpdateParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo - -type MsgRequestAction struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ActionType string `protobuf:"bytes,2,opt,name=actionType,proto3" json:"actionType,omitempty"` - Metadata string `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - Price string `protobuf:"bytes,4,opt,name=price,proto3" json:"price,omitempty"` - ExpirationTime string `protobuf:"bytes,5,opt,name=expirationTime,proto3" json:"expirationTime,omitempty"` -} - -func (m *MsgRequestAction) Reset() { *m = MsgRequestAction{} } -func (m *MsgRequestAction) String() string { return proto.CompactTextString(m) } -func (*MsgRequestAction) ProtoMessage() {} -func (*MsgRequestAction) Descriptor() ([]byte, []int) { - return fileDescriptor_aed2fc0b455a3b3d, []int{2} -} -func (m *MsgRequestAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRequestAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRequestAction.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 *MsgRequestAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRequestAction.Merge(m, src) -} -func (m *MsgRequestAction) XXX_Size() int { - return m.Size() -} -func (m *MsgRequestAction) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRequestAction.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRequestAction proto.InternalMessageInfo - -func (m *MsgRequestAction) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgRequestAction) GetActionType() string { - if m != nil { - return m.ActionType - } - return "" -} - -func (m *MsgRequestAction) GetMetadata() string { - if m != nil { - return m.Metadata - } - return "" -} - -func (m *MsgRequestAction) GetPrice() string { - if m != nil { - return m.Price - } - return "" -} - -func (m *MsgRequestAction) GetExpirationTime() string { - if m != nil { - return m.ExpirationTime - } - return "" -} - -type MsgRequestActionResponse struct { - ActionId string `protobuf:"bytes,1,opt,name=actionId,proto3" json:"actionId,omitempty"` - Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` -} - -func (m *MsgRequestActionResponse) Reset() { *m = MsgRequestActionResponse{} } -func (m *MsgRequestActionResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRequestActionResponse) ProtoMessage() {} -func (*MsgRequestActionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_aed2fc0b455a3b3d, []int{3} -} -func (m *MsgRequestActionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRequestActionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRequestActionResponse.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 *MsgRequestActionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRequestActionResponse.Merge(m, src) -} -func (m *MsgRequestActionResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRequestActionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRequestActionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRequestActionResponse proto.InternalMessageInfo - -func (m *MsgRequestActionResponse) GetActionId() string { - if m != nil { - return m.ActionId - } - return "" -} - -func (m *MsgRequestActionResponse) GetStatus() string { - if m != nil { - return m.Status - } - return "" -} - -type MsgFinalizeAction struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ActionId string `protobuf:"bytes,2,opt,name=actionId,proto3" json:"actionId,omitempty"` - ActionType string `protobuf:"bytes,3,opt,name=actionType,proto3" json:"actionType,omitempty"` - Metadata string `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` -} - -func (m *MsgFinalizeAction) Reset() { *m = MsgFinalizeAction{} } -func (m *MsgFinalizeAction) String() string { return proto.CompactTextString(m) } -func (*MsgFinalizeAction) ProtoMessage() {} -func (*MsgFinalizeAction) Descriptor() ([]byte, []int) { - return fileDescriptor_aed2fc0b455a3b3d, []int{4} -} -func (m *MsgFinalizeAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgFinalizeAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgFinalizeAction.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 *MsgFinalizeAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgFinalizeAction.Merge(m, src) -} -func (m *MsgFinalizeAction) XXX_Size() int { - return m.Size() -} -func (m *MsgFinalizeAction) XXX_DiscardUnknown() { - xxx_messageInfo_MsgFinalizeAction.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgFinalizeAction proto.InternalMessageInfo - -func (m *MsgFinalizeAction) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgFinalizeAction) GetActionId() string { - if m != nil { - return m.ActionId - } - return "" -} - -func (m *MsgFinalizeAction) GetActionType() string { - if m != nil { - return m.ActionType - } - return "" -} - -func (m *MsgFinalizeAction) GetMetadata() string { - if m != nil { - return m.Metadata - } - return "" -} - -type MsgFinalizeActionResponse struct { -} - -func (m *MsgFinalizeActionResponse) Reset() { *m = MsgFinalizeActionResponse{} } -func (m *MsgFinalizeActionResponse) String() string { return proto.CompactTextString(m) } -func (*MsgFinalizeActionResponse) ProtoMessage() {} -func (*MsgFinalizeActionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_aed2fc0b455a3b3d, []int{5} -} -func (m *MsgFinalizeActionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgFinalizeActionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgFinalizeActionResponse.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 *MsgFinalizeActionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgFinalizeActionResponse.Merge(m, src) -} -func (m *MsgFinalizeActionResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgFinalizeActionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgFinalizeActionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgFinalizeActionResponse proto.InternalMessageInfo - -type MsgApproveAction struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ActionId string `protobuf:"bytes,2,opt,name=actionId,proto3" json:"actionId,omitempty"` -} - -func (m *MsgApproveAction) Reset() { *m = MsgApproveAction{} } -func (m *MsgApproveAction) String() string { return proto.CompactTextString(m) } -func (*MsgApproveAction) ProtoMessage() {} -func (*MsgApproveAction) Descriptor() ([]byte, []int) { - return fileDescriptor_aed2fc0b455a3b3d, []int{6} -} -func (m *MsgApproveAction) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgApproveAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgApproveAction.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 *MsgApproveAction) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgApproveAction.Merge(m, src) -} -func (m *MsgApproveAction) XXX_Size() int { - return m.Size() -} -func (m *MsgApproveAction) XXX_DiscardUnknown() { - xxx_messageInfo_MsgApproveAction.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgApproveAction proto.InternalMessageInfo - -func (m *MsgApproveAction) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgApproveAction) GetActionId() string { - if m != nil { - return m.ActionId - } - return "" -} - -type MsgApproveActionResponse struct { -} - -func (m *MsgApproveActionResponse) Reset() { *m = MsgApproveActionResponse{} } -func (m *MsgApproveActionResponse) String() string { return proto.CompactTextString(m) } -func (*MsgApproveActionResponse) ProtoMessage() {} -func (*MsgApproveActionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_aed2fc0b455a3b3d, []int{7} -} -func (m *MsgApproveActionResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgApproveActionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgApproveActionResponse.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 *MsgApproveActionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgApproveActionResponse.Merge(m, src) -} -func (m *MsgApproveActionResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgApproveActionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgApproveActionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgApproveActionResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgUpdateParams)(nil), "lumera.action.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "lumera.action.MsgUpdateParamsResponse") - proto.RegisterType((*MsgRequestAction)(nil), "lumera.action.MsgRequestAction") - proto.RegisterType((*MsgRequestActionResponse)(nil), "lumera.action.MsgRequestActionResponse") - proto.RegisterType((*MsgFinalizeAction)(nil), "lumera.action.MsgFinalizeAction") - proto.RegisterType((*MsgFinalizeActionResponse)(nil), "lumera.action.MsgFinalizeActionResponse") - proto.RegisterType((*MsgApproveAction)(nil), "lumera.action.MsgApproveAction") - proto.RegisterType((*MsgApproveActionResponse)(nil), "lumera.action.MsgApproveActionResponse") -} - -func init() { proto.RegisterFile("lumera/action/tx.proto", fileDescriptor_aed2fc0b455a3b3d) } - -var fileDescriptor_aed2fc0b455a3b3d = []byte{ - // 583 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x4f, 0x6b, 0x13, 0x41, - 0x14, 0xc0, 0xb3, 0x49, 0x13, 0xcd, 0xd8, 0x56, 0xbb, 0xc4, 0x76, 0xb3, 0xc2, 0x26, 0xe4, 0x50, - 0x43, 0xc0, 0x2c, 0x46, 0x10, 0xe9, 0x2d, 0x39, 0x08, 0x05, 0x23, 0x65, 0xd5, 0x82, 0x22, 0xc8, - 0x74, 0x33, 0x6c, 0x17, 0xb2, 0x99, 0x75, 0x66, 0x52, 0x12, 0x4f, 0xe2, 0xd1, 0x93, 0xe0, 0x97, - 0xf0, 0x98, 0x43, 0xc1, 0xaf, 0xd0, 0x63, 0xf1, 0xe4, 0x49, 0x24, 0x39, 0xe4, 0x2b, 0x78, 0x94, - 0x9d, 0x99, 0xa4, 0x99, 0x49, 0x68, 0x0e, 0xbd, 0x24, 0xfb, 0xfe, 0xff, 0xde, 0x7b, 0x33, 0x03, - 0x76, 0xbb, 0xfd, 0x08, 0x11, 0xe8, 0x42, 0x9f, 0x85, 0xb8, 0xe7, 0xb2, 0x41, 0x3d, 0x26, 0x98, - 0x61, 0x73, 0x4b, 0xe8, 0xeb, 0x42, 0x6f, 0xef, 0xc0, 0x28, 0xec, 0x61, 0x97, 0xff, 0x0a, 0x0f, - 0x7b, 0xcf, 0xc7, 0x34, 0xc2, 0xd4, 0x8d, 0x68, 0xe0, 0x9e, 0x3d, 0x4e, 0xfe, 0xa4, 0xa1, 0x28, - 0x0c, 0x1f, 0xb8, 0xe4, 0x0a, 0x41, 0x9a, 0x0a, 0x01, 0x0e, 0xb0, 0xd0, 0x27, 0x5f, 0x52, 0x6b, - 0xab, 0x0c, 0x31, 0x24, 0x30, 0x92, 0x11, 0x95, 0x9f, 0x06, 0xb8, 0xdb, 0xa6, 0xc1, 0x9b, 0xb8, - 0x03, 0x19, 0x3a, 0xe2, 0x16, 0xf3, 0x29, 0xc8, 0xc3, 0x3e, 0x3b, 0xc5, 0x24, 0x64, 0x43, 0xcb, - 0x28, 0x1b, 0xd5, 0x7c, 0xcb, 0xfa, 0x75, 0xfe, 0xa8, 0x20, 0x4b, 0x35, 0x3b, 0x1d, 0x82, 0x28, - 0x7d, 0xc5, 0x48, 0xd8, 0x0b, 0xbc, 0x2b, 0x57, 0xf3, 0x19, 0xc8, 0x89, 0xdc, 0x56, 0xba, 0x6c, - 0x54, 0xef, 0x34, 0xee, 0xd7, 0x95, 0x26, 0xeb, 0x22, 0x7d, 0x2b, 0x7f, 0xf1, 0xa7, 0x94, 0xfa, - 0x31, 0x1d, 0xd5, 0x0c, 0x4f, 0xfa, 0x1f, 0x34, 0xbe, 0x4c, 0x47, 0xb5, 0xab, 0x4c, 0x5f, 0xa7, - 0xa3, 0x5a, 0x49, 0x42, 0x0f, 0x66, 0xd8, 0x1a, 0x65, 0xa5, 0x08, 0xf6, 0x34, 0x95, 0x87, 0x68, - 0x8c, 0x7b, 0x14, 0x55, 0xce, 0x0d, 0x70, 0xaf, 0x4d, 0x03, 0x0f, 0x7d, 0xec, 0x23, 0xca, 0x9a, - 0x3c, 0xde, 0xb4, 0xc0, 0x2d, 0x9f, 0x20, 0xc8, 0x30, 0x11, 0x3d, 0x79, 0x33, 0xd1, 0x74, 0x00, - 0x10, 0x35, 0x5e, 0x0f, 0x63, 0xc4, 0xd9, 0xf3, 0xde, 0x82, 0xc6, 0xb4, 0xc1, 0xed, 0x08, 0x31, - 0xd8, 0x81, 0x0c, 0x5a, 0x19, 0x6e, 0x9d, 0xcb, 0x66, 0x01, 0x64, 0x63, 0x12, 0xfa, 0xc8, 0xda, - 0xe0, 0x06, 0x21, 0x98, 0xfb, 0x60, 0x1b, 0x0d, 0xe2, 0x90, 0x40, 0x9e, 0x23, 0x8c, 0x90, 0x95, - 0xe5, 0x66, 0x4d, 0x7b, 0xb0, 0x99, 0xf4, 0x3d, 0xe3, 0xa8, 0xbc, 0x04, 0x96, 0x4e, 0x3d, 0x6b, - 0x29, 0x61, 0x10, 0x44, 0x87, 0x1d, 0x89, 0x3f, 0x97, 0xcd, 0x5d, 0x90, 0xa3, 0x0c, 0xb2, 0x3e, - 0x95, 0xec, 0x52, 0xaa, 0x7c, 0x37, 0xc0, 0x4e, 0x9b, 0x06, 0xcf, 0xc3, 0x1e, 0xec, 0x86, 0x9f, - 0xd0, 0xda, 0x39, 0x2c, 0xd6, 0x48, 0x6b, 0x35, 0xd4, 0x19, 0x65, 0xae, 0x9d, 0xd1, 0x86, 0x3a, - 0x23, 0xad, 0xcb, 0x07, 0xa0, 0xb8, 0x04, 0x35, 0xdf, 0xdc, 0x31, 0x5f, 0x5c, 0x33, 0x8e, 0x09, - 0x3e, 0xbb, 0x11, 0xb0, 0x56, 0xd4, 0xe6, 0xa3, 0x55, 0xf2, 0xce, 0x6a, 0x36, 0xfe, 0xa5, 0x41, - 0xa6, 0x4d, 0x03, 0xf3, 0x18, 0x6c, 0x2a, 0xd7, 0xc0, 0xd1, 0x8e, 0xaf, 0x76, 0xda, 0xec, 0xfd, - 0xeb, 0xed, 0xf3, 0xd5, 0xbd, 0x05, 0x5b, 0xea, 0x49, 0x2c, 0x2d, 0x07, 0x2a, 0x0e, 0xf6, 0xc3, - 0x35, 0x0e, 0xf3, 0xd4, 0xef, 0xc1, 0xb6, 0xb6, 0xdd, 0xf2, 0x72, 0xa8, 0xea, 0x61, 0x57, 0xd7, - 0x79, 0x2c, 0x82, 0xab, 0x9b, 0x58, 0x01, 0xae, 0x38, 0xac, 0x02, 0x5f, 0x39, 0x73, 0x3b, 0xfb, - 0x39, 0xb9, 0xff, 0xad, 0xc3, 0x8b, 0xb1, 0x63, 0x5c, 0x8e, 0x1d, 0xe3, 0xef, 0xd8, 0x31, 0xbe, - 0x4d, 0x9c, 0xd4, 0xe5, 0xc4, 0x49, 0xfd, 0x9e, 0x38, 0xa9, 0x77, 0x6e, 0x10, 0xb2, 0xd3, 0xfe, - 0x49, 0xdd, 0xc7, 0x91, 0xfb, 0x82, 0xe7, 0x3c, 0x4a, 0xde, 0x2b, 0x1f, 0x77, 0x5d, 0xfd, 0x61, - 0x60, 0xc3, 0x18, 0xd1, 0x93, 0x1c, 0x7f, 0xcf, 0x9e, 0xfc, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x5d, - 0x72, 0x28, 0x35, 0x71, 0x05, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// 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 { - // UpdateParams defines a (governance) operation for updating the module - // parameters. The authority defaults to the x/gov module account. - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - RequestAction(ctx context.Context, in *MsgRequestAction, opts ...grpc.CallOption) (*MsgRequestActionResponse, error) - FinalizeAction(ctx context.Context, in *MsgFinalizeAction, opts ...grpc.CallOption) (*MsgFinalizeActionResponse, error) - ApproveAction(ctx context.Context, in *MsgApproveAction, opts ...grpc.CallOption) (*MsgApproveActionResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Msg/UpdateParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RequestAction(ctx context.Context, in *MsgRequestAction, opts ...grpc.CallOption) (*MsgRequestActionResponse, error) { - out := new(MsgRequestActionResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Msg/RequestAction", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) FinalizeAction(ctx context.Context, in *MsgFinalizeAction, opts ...grpc.CallOption) (*MsgFinalizeActionResponse, error) { - out := new(MsgFinalizeActionResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Msg/FinalizeAction", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) ApproveAction(ctx context.Context, in *MsgApproveAction, opts ...grpc.CallOption) (*MsgApproveActionResponse, error) { - out := new(MsgApproveActionResponse) - err := c.cc.Invoke(ctx, "/lumera.action.Msg/ApproveAction", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // UpdateParams defines a (governance) operation for updating the module - // parameters. The authority defaults to the x/gov module account. - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - RequestAction(context.Context, *MsgRequestAction) (*MsgRequestActionResponse, error) - FinalizeAction(context.Context, *MsgFinalizeAction) (*MsgFinalizeActionResponse, error) - ApproveAction(context.Context, *MsgApproveAction) (*MsgApproveActionResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} -func (*UnimplementedMsgServer) RequestAction(ctx context.Context, req *MsgRequestAction) (*MsgRequestActionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestAction not implemented") -} -func (*UnimplementedMsgServer) FinalizeAction(ctx context.Context, req *MsgFinalizeAction) (*MsgFinalizeActionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FinalizeAction not implemented") -} -func (*UnimplementedMsgServer) ApproveAction(ctx context.Context, req *MsgApproveAction) (*MsgApproveActionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ApproveAction not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Msg/UpdateParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RequestAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRequestAction) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RequestAction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Msg/RequestAction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RequestAction(ctx, req.(*MsgRequestAction)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_FinalizeAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgFinalizeAction) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).FinalizeAction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Msg/FinalizeAction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).FinalizeAction(ctx, req.(*MsgFinalizeAction)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_ApproveAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgApproveAction) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).ApproveAction(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.action.Msg/ApproveAction", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ApproveAction(ctx, req.(*MsgApproveAction)) - } - return interceptor(ctx, in, info, handler) -} - -var Msg_serviceDesc = _Msg_serviceDesc -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "lumera.action.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - { - MethodName: "RequestAction", - Handler: _Msg_RequestAction_Handler, - }, - { - MethodName: "FinalizeAction", - Handler: _Msg_FinalizeAction_Handler, - }, - { - MethodName: "ApproveAction", - Handler: _Msg_ApproveAction_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "lumera/action/tx.proto", -} - -func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgRequestAction) 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 *MsgRequestAction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRequestAction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ExpirationTime) > 0 { - i -= len(m.ExpirationTime) - copy(dAtA[i:], m.ExpirationTime) - i = encodeVarintTx(dAtA, i, uint64(len(m.ExpirationTime))) - i-- - dAtA[i] = 0x2a - } - if len(m.Price) > 0 { - i -= len(m.Price) - copy(dAtA[i:], m.Price) - i = encodeVarintTx(dAtA, i, uint64(len(m.Price))) - i-- - dAtA[i] = 0x22 - } - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x1a - } - if len(m.ActionType) > 0 { - i -= len(m.ActionType) - copy(dAtA[i:], m.ActionType) - i = encodeVarintTx(dAtA, i, uint64(len(m.ActionType))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRequestActionResponse) 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 *MsgRequestActionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRequestActionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Status) > 0 { - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintTx(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - } - if len(m.ActionId) > 0 { - i -= len(m.ActionId) - copy(dAtA[i:], m.ActionId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ActionId))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgFinalizeAction) 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 *MsgFinalizeAction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgFinalizeAction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintTx(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x22 - } - if len(m.ActionType) > 0 { - i -= len(m.ActionType) - copy(dAtA[i:], m.ActionType) - i = encodeVarintTx(dAtA, i, uint64(len(m.ActionType))) - i-- - dAtA[i] = 0x1a - } - if len(m.ActionId) > 0 { - i -= len(m.ActionId) - copy(dAtA[i:], m.ActionId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ActionId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgFinalizeActionResponse) 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 *MsgFinalizeActionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgFinalizeActionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgApproveAction) 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 *MsgApproveAction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgApproveAction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ActionId) > 0 { - i -= len(m.ActionId) - copy(dAtA[i:], m.ActionId) - i = encodeVarintTx(dAtA, i, uint64(len(m.ActionId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgApproveActionResponse) 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 *MsgApproveActionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgApproveActionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgRequestAction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ActionType) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Price) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ExpirationTime) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRequestActionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ActionId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Status) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgFinalizeAction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ActionId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ActionType) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgFinalizeActionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgApproveAction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ActionId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgApproveActionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRequestAction) 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: MsgRequestAction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestAction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionType", 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.ActionType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Price", 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.Price = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpirationTime", 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.ExpirationTime = string(dAtA[iNdEx:postIndex]) - 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 *MsgRequestActionResponse) 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: MsgRequestActionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRequestActionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionId", 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.ActionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", 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.Status = string(dAtA[iNdEx:postIndex]) - 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 *MsgFinalizeAction) 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: MsgFinalizeAction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgFinalizeAction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionId", 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.ActionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionType", 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.ActionType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata = string(dAtA[iNdEx:postIndex]) - 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 *MsgFinalizeActionResponse) 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: MsgFinalizeActionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgFinalizeActionResponse: 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 *MsgApproveAction) 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: MsgApproveAction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgApproveAction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionId", 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.ActionId = string(dAtA[iNdEx:postIndex]) - 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 *MsgApproveActionResponse) 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: MsgApproveActionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgApproveActionResponse: 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 skipTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/supernode/types/evidence.pb.go b/gen/lumera/supernode/types/evidence.pb.go deleted file mode 100644 index ef22832f..00000000 --- a/gen/lumera/supernode/types/evidence.pb.go +++ /dev/null @@ -1,604 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/supernode/evidence.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type Evidence struct { - ReporterAddress string `protobuf:"bytes,1,opt,name=reporter_address,json=reporterAddress,proto3" json:"reporter_address,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - ActionId string `protobuf:"bytes,3,opt,name=action_id,json=actionId,proto3" json:"action_id,omitempty"` - EvidenceType string `protobuf:"bytes,4,opt,name=evidence_type,json=evidenceType,proto3" json:"evidence_type,omitempty"` - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - Severity uint64 `protobuf:"varint,6,opt,name=severity,proto3" json:"severity,omitempty"` - Height int32 `protobuf:"varint,7,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *Evidence) Reset() { *m = Evidence{} } -func (m *Evidence) String() string { return proto.CompactTextString(m) } -func (*Evidence) ProtoMessage() {} -func (*Evidence) Descriptor() ([]byte, []int) { - return fileDescriptor_b3480002ba3fa7a4, []int{0} -} -func (m *Evidence) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Evidence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Evidence.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 *Evidence) XXX_Merge(src proto.Message) { - xxx_messageInfo_Evidence.Merge(m, src) -} -func (m *Evidence) XXX_Size() int { - return m.Size() -} -func (m *Evidence) XXX_DiscardUnknown() { - xxx_messageInfo_Evidence.DiscardUnknown(m) -} - -var xxx_messageInfo_Evidence proto.InternalMessageInfo - -func (m *Evidence) GetReporterAddress() string { - if m != nil { - return m.ReporterAddress - } - return "" -} - -func (m *Evidence) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *Evidence) GetActionId() string { - if m != nil { - return m.ActionId - } - return "" -} - -func (m *Evidence) GetEvidenceType() string { - if m != nil { - return m.EvidenceType - } - return "" -} - -func (m *Evidence) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Evidence) GetSeverity() uint64 { - if m != nil { - return m.Severity - } - return 0 -} - -func (m *Evidence) GetHeight() int32 { - if m != nil { - return m.Height - } - return 0 -} - -func init() { - proto.RegisterType((*Evidence)(nil), "lumera.supernode.Evidence") -} - -func init() { proto.RegisterFile("lumera/supernode/evidence.proto", fileDescriptor_b3480002ba3fa7a4) } - -var fileDescriptor_b3480002ba3fa7a4 = []byte{ - // 364 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x91, 0xc1, 0x4e, 0xf2, 0x40, - 0x14, 0x85, 0x29, 0x3f, 0xf0, 0xc3, 0xa8, 0x11, 0x27, 0xc4, 0x54, 0x8c, 0xa5, 0xea, 0x86, 0x0d, - 0x34, 0xd1, 0x27, 0x10, 0xe3, 0xc2, 0x84, 0x18, 0x53, 0x8d, 0x0b, 0x37, 0x4d, 0xe9, 0x5c, 0xcb, - 0x24, 0x6d, 0xa7, 0x99, 0x99, 0x36, 0xf2, 0x16, 0x3e, 0x0c, 0x89, 0xaf, 0xe0, 0x92, 0xb0, 0x72, - 0x69, 0xe0, 0x45, 0x4c, 0xdb, 0x29, 0xa2, 0xbb, 0x9e, 0x33, 0xdf, 0x3d, 0xb7, 0xb9, 0x07, 0xf5, - 0x82, 0x24, 0x04, 0xee, 0x5a, 0x22, 0x89, 0x81, 0x47, 0x8c, 0x80, 0x05, 0x29, 0x25, 0x10, 0x79, - 0x30, 0x8c, 0x39, 0x93, 0x0c, 0xb7, 0x0b, 0x60, 0xb8, 0x01, 0xba, 0x47, 0x1e, 0x13, 0x21, 0x13, - 0x4e, 0xfe, 0x6e, 0x15, 0xa2, 0x80, 0xbb, 0x3d, 0x9f, 0x31, 0x3f, 0x00, 0x2b, 0x57, 0x93, 0xe4, - 0xc5, 0x92, 0x34, 0x04, 0x21, 0xdd, 0x30, 0x56, 0x40, 0xc7, 0x67, 0x3e, 0x2b, 0x06, 0xb3, 0xaf, - 0xc2, 0x3d, 0x7b, 0xaf, 0xa2, 0xe6, 0x8d, 0x5a, 0x8b, 0xaf, 0x51, 0x9b, 0x43, 0xcc, 0xb8, 0x04, - 0xee, 0xb8, 0x84, 0x70, 0x10, 0x42, 0xd7, 0x4c, 0xad, 0xdf, 0x1a, 0xe9, 0xcb, 0xf9, 0xa0, 0xa3, - 0xf6, 0x5d, 0x15, 0x2f, 0x0f, 0x92, 0xd3, 0xc8, 0xb7, 0xf7, 0xcb, 0x09, 0x65, 0xe3, 0x3b, 0x74, - 0x90, 0xba, 0x01, 0x25, 0xae, 0x64, 0x3f, 0x29, 0xd5, 0x3c, 0xe5, 0x74, 0x39, 0x1f, 0x9c, 0xa8, - 0x94, 0xa7, 0x92, 0xf9, 0x1d, 0xd7, 0x4e, 0xff, 0xf8, 0xf8, 0x18, 0xb5, 0x5c, 0x4f, 0x52, 0x16, - 0x39, 0x94, 0xe8, 0xff, 0xb2, 0x1c, 0xbb, 0x59, 0x18, 0xb7, 0x04, 0x9f, 0xa3, 0xbd, 0xf2, 0x68, - 0x8e, 0x9c, 0xc5, 0xa0, 0xd7, 0x72, 0x60, 0xb7, 0x34, 0x1f, 0x67, 0x31, 0x60, 0x13, 0xed, 0x10, - 0x10, 0x1e, 0xa7, 0x71, 0x36, 0xa5, 0xd7, 0x73, 0x64, 0xdb, 0xc2, 0x5d, 0xd4, 0x14, 0x90, 0x02, - 0xa7, 0x72, 0xa6, 0x37, 0x4c, 0xad, 0x5f, 0xb3, 0x37, 0x1a, 0x1f, 0xa2, 0xc6, 0x14, 0xa8, 0x3f, - 0x95, 0xfa, 0x7f, 0x53, 0xeb, 0xd7, 0x6d, 0xa5, 0x46, 0xe3, 0x8f, 0x95, 0xa1, 0x2d, 0x56, 0x86, - 0xf6, 0xb5, 0x32, 0xb4, 0xb7, 0xb5, 0x51, 0x59, 0xac, 0x8d, 0xca, 0xe7, 0xda, 0xa8, 0x3c, 0x5f, - 0xf8, 0x54, 0x4e, 0x93, 0xc9, 0xd0, 0x63, 0xa1, 0x35, 0xce, 0x2b, 0xbc, 0xcf, 0x6e, 0xed, 0xb1, - 0xc0, 0x52, 0x95, 0xbf, 0x6e, 0x95, 0x9e, 0xfd, 0xb6, 0x98, 0x34, 0xf2, 0x3a, 0x2e, 0xbf, 0x03, - 0x00, 0x00, 0xff, 0xff, 0x6d, 0xc8, 0x21, 0x95, 0x15, 0x02, 0x00, 0x00, -} - -func (m *Evidence) 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 *Evidence) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Evidence) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintEvidence(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x38 - } - if m.Severity != 0 { - i = encodeVarintEvidence(dAtA, i, uint64(m.Severity)) - i-- - dAtA[i] = 0x30 - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintEvidence(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x2a - } - if len(m.EvidenceType) > 0 { - i -= len(m.EvidenceType) - copy(dAtA[i:], m.EvidenceType) - i = encodeVarintEvidence(dAtA, i, uint64(len(m.EvidenceType))) - i-- - dAtA[i] = 0x22 - } - if len(m.ActionId) > 0 { - i -= len(m.ActionId) - copy(dAtA[i:], m.ActionId) - i = encodeVarintEvidence(dAtA, i, uint64(len(m.ActionId))) - i-- - dAtA[i] = 0x1a - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintEvidence(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.ReporterAddress) > 0 { - i -= len(m.ReporterAddress) - copy(dAtA[i:], m.ReporterAddress) - i = encodeVarintEvidence(dAtA, i, uint64(len(m.ReporterAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintEvidence(dAtA []byte, offset int, v uint64) int { - offset -= sovEvidence(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Evidence) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ReporterAddress) - if l > 0 { - n += 1 + l + sovEvidence(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovEvidence(uint64(l)) - } - l = len(m.ActionId) - if l > 0 { - n += 1 + l + sovEvidence(uint64(l)) - } - l = len(m.EvidenceType) - if l > 0 { - n += 1 + l + sovEvidence(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovEvidence(uint64(l)) - } - if m.Severity != 0 { - n += 1 + sovEvidence(uint64(m.Severity)) - } - if m.Height != 0 { - n += 1 + sovEvidence(uint64(m.Height)) - } - return n -} - -func sovEvidence(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEvidence(x uint64) (n int) { - return sovEvidence(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Evidence) 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 ErrIntOverflowEvidence - } - 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: Evidence: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Evidence: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReporterAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - 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 ErrInvalidLengthEvidence - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ReporterAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 ErrIntOverflowEvidence - } - 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 ErrInvalidLengthEvidence - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ActionId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - 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 ErrInvalidLengthEvidence - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ActionId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - 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 ErrInvalidLengthEvidence - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EvidenceType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - 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 ErrInvalidLengthEvidence - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvidence - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Severity", wireType) - } - m.Severity = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Severity |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvidence - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipEvidence(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEvidence - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEvidence(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvidence - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvidence - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEvidence - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEvidence - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEvidence - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEvidence - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEvidence = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEvidence = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEvidence = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/supernode/types/genesis.pb.go b/gen/lumera/supernode/types/genesis.pb.go deleted file mode 100644 index bbf08d2c..00000000 --- a/gen/lumera/supernode/types/genesis.pb.go +++ /dev/null @@ -1,324 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/supernode/genesis.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GenesisState defines the supernode module's genesis state. -type GenesisState struct { - // params defines all the parameters of the module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *GenesisState) Reset() { *m = GenesisState{} } -func (m *GenesisState) String() string { return proto.CompactTextString(m) } -func (*GenesisState) ProtoMessage() {} -func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_f7a62c93d6363d11, []int{0} -} -func (m *GenesisState) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { - xxx_messageInfo_GenesisState.Merge(m, src) -} -func (m *GenesisState) XXX_Size() int { - return m.Size() -} -func (m *GenesisState) XXX_DiscardUnknown() { - xxx_messageInfo_GenesisState.DiscardUnknown(m) -} - -var xxx_messageInfo_GenesisState proto.InternalMessageInfo - -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -func init() { - proto.RegisterType((*GenesisState)(nil), "lumera.supernode.GenesisState") -} - -func init() { proto.RegisterFile("lumera/supernode/genesis.proto", fileDescriptor_f7a62c93d6363d11) } - -var fileDescriptor_f7a62c93d6363d11 = []byte{ - // 212 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0x29, 0xcd, 0x4d, - 0x2d, 0x4a, 0xd4, 0x2f, 0x2e, 0x2d, 0x48, 0x2d, 0xca, 0xcb, 0x4f, 0x49, 0xd5, 0x4f, 0x4f, 0xcd, - 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0xc8, 0xeb, 0xc1, - 0xe5, 0xa5, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x91, 0x94, 0x48, 0x7a, - 0x7e, 0x7a, 0x3e, 0x98, 0xa9, 0x0f, 0x62, 0x41, 0x45, 0x65, 0x31, 0x8c, 0x2e, 0x48, 0x2c, 0x4a, - 0xcc, 0x85, 0x9a, 0xac, 0xe4, 0xcd, 0xc5, 0xe3, 0x0e, 0xb1, 0x2a, 0xb8, 0x24, 0xb1, 0x24, 0x55, - 0xc8, 0x9a, 0x8b, 0x0d, 0x22, 0x2f, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa1, 0x87, 0x6e, - 0xb5, 0x5e, 0x00, 0x58, 0xde, 0x89, 0xf3, 0xc4, 0x3d, 0x79, 0x86, 0x15, 0xcf, 0x37, 0x68, 0x31, - 0x06, 0x41, 0xb5, 0x38, 0xf9, 0x9c, 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, - 0x51, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0xbe, 0x0f, 0xd8, 0xc0, 0x00, - 0x90, 0xf5, 0xc9, 0xf9, 0x39, 0xfa, 0x50, 0xf7, 0x55, 0x20, 0xb9, 0xb0, 0xa4, 0xb2, 0x20, 0xb5, - 0x38, 0x89, 0x0d, 0xec, 0x42, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x53, 0x82, 0x85, 0x17, - 0x1d, 0x01, 0x00, 0x00, -} - -func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenesisState) 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 = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { - offset -= sovGenesis(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GenesisState) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) - return n -} - -func sovGenesis(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenesis(x uint64) (n int) { - return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GenesisState) 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: GenesisState: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - 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 := 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 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenesis - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenesis - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenesis - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenesis - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/supernode/types/ip_address_history.pb.go b/gen/lumera/supernode/types/ip_address_history.pb.go deleted file mode 100644 index f26c9bad..00000000 --- a/gen/lumera/supernode/types/ip_address_history.pb.go +++ /dev/null @@ -1,358 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/supernode/ip_address_history.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type IPAddressHistory struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *IPAddressHistory) Reset() { *m = IPAddressHistory{} } -func (m *IPAddressHistory) String() string { return proto.CompactTextString(m) } -func (*IPAddressHistory) ProtoMessage() {} -func (*IPAddressHistory) Descriptor() ([]byte, []int) { - return fileDescriptor_526993d2fa660654, []int{0} -} -func (m *IPAddressHistory) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *IPAddressHistory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_IPAddressHistory.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 *IPAddressHistory) XXX_Merge(src proto.Message) { - xxx_messageInfo_IPAddressHistory.Merge(m, src) -} -func (m *IPAddressHistory) XXX_Size() int { - return m.Size() -} -func (m *IPAddressHistory) XXX_DiscardUnknown() { - xxx_messageInfo_IPAddressHistory.DiscardUnknown(m) -} - -var xxx_messageInfo_IPAddressHistory proto.InternalMessageInfo - -func (m *IPAddressHistory) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *IPAddressHistory) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func init() { - proto.RegisterType((*IPAddressHistory)(nil), "lumera.supernode.IPAddressHistory") -} - -func init() { - proto.RegisterFile("lumera/supernode/ip_address_history.proto", fileDescriptor_526993d2fa660654) -} - -var fileDescriptor_526993d2fa660654 = []byte{ - // 225 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0xcc, 0x29, 0xcd, 0x4d, - 0x2d, 0x4a, 0xd4, 0x2f, 0x2e, 0x2d, 0x48, 0x2d, 0xca, 0xcb, 0x4f, 0x49, 0xd5, 0xcf, 0x2c, 0x88, - 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x8e, 0xcf, 0xc8, 0x2c, 0x2e, 0xc9, 0x2f, 0xaa, 0xd4, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0x28, 0xd5, 0x83, 0x2b, 0x95, 0x92, 0x4f, 0xcf, - 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x07, 0xcb, 0x27, 0x95, 0xa6, 0xe9, 0x97, 0x64, 0xe6, 0xa6, 0x16, - 0x97, 0x24, 0xe6, 0x16, 0x40, 0xb4, 0x48, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x99, 0xfa, 0x20, - 0x16, 0x44, 0x54, 0xc9, 0x85, 0x4b, 0xc0, 0x33, 0xc0, 0x11, 0x62, 0x87, 0x07, 0xc4, 0x0a, 0x21, - 0x09, 0x2e, 0x76, 0xa8, 0xad, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x30, 0xae, 0x90, 0x18, - 0x17, 0x5b, 0x46, 0x6a, 0x66, 0x7a, 0x46, 0x89, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x94, - 0xe7, 0xe4, 0x73, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, - 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x46, 0xe9, 0x99, - 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0x3e, 0x60, 0x37, 0x07, 0x80, 0xec, 0x4d, - 0xce, 0xcf, 0xd1, 0x87, 0xfa, 0xb6, 0x02, 0xc9, 0xbf, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, - 0x60, 0xa7, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x80, 0xdb, 0x84, 0x10, 0x01, 0x00, - 0x00, -} - -func (m *IPAddressHistory) 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 *IPAddressHistory) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IPAddressHistory) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintIpAddressHistory(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintIpAddressHistory(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintIpAddressHistory(dAtA []byte, offset int, v uint64) int { - offset -= sovIpAddressHistory(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *IPAddressHistory) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovIpAddressHistory(uint64(l)) - } - if m.Height != 0 { - n += 1 + sovIpAddressHistory(uint64(m.Height)) - } - return n -} - -func sovIpAddressHistory(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozIpAddressHistory(x uint64) (n int) { - return sovIpAddressHistory(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *IPAddressHistory) 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 ErrIntOverflowIpAddressHistory - } - 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: IPAddressHistory: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IPAddressHistory: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIpAddressHistory - } - 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 ErrInvalidLengthIpAddressHistory - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthIpAddressHistory - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowIpAddressHistory - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipIpAddressHistory(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthIpAddressHistory - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipIpAddressHistory(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIpAddressHistory - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIpAddressHistory - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowIpAddressHistory - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthIpAddressHistory - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupIpAddressHistory - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthIpAddressHistory - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthIpAddressHistory = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowIpAddressHistory = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupIpAddressHistory = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/supernode/types/metrics_aggregate.pb.go b/gen/lumera/supernode/types/metrics_aggregate.pb.go deleted file mode 100644 index 918d4110..00000000 --- a/gen/lumera/supernode/types/metrics_aggregate.pb.go +++ /dev/null @@ -1,488 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/supernode/metrics_aggregate.proto - -package types - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type MetricsAggregate struct { - Metrics map[string]float64 `protobuf:"bytes,1,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - ReportCount uint64 `protobuf:"varint,2,opt,name=report_count,json=reportCount,proto3" json:"report_count,omitempty"` - Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *MetricsAggregate) Reset() { *m = MetricsAggregate{} } -func (m *MetricsAggregate) String() string { return proto.CompactTextString(m) } -func (*MetricsAggregate) ProtoMessage() {} -func (*MetricsAggregate) Descriptor() ([]byte, []int) { - return fileDescriptor_438cc5ca9a32c6ea, []int{0} -} -func (m *MetricsAggregate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricsAggregate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetricsAggregate.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 *MetricsAggregate) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricsAggregate.Merge(m, src) -} -func (m *MetricsAggregate) XXX_Size() int { - return m.Size() -} -func (m *MetricsAggregate) XXX_DiscardUnknown() { - xxx_messageInfo_MetricsAggregate.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricsAggregate proto.InternalMessageInfo - -func (m *MetricsAggregate) GetMetrics() map[string]float64 { - if m != nil { - return m.Metrics - } - return nil -} - -func (m *MetricsAggregate) GetReportCount() uint64 { - if m != nil { - return m.ReportCount - } - return 0 -} - -func (m *MetricsAggregate) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func init() { - proto.RegisterType((*MetricsAggregate)(nil), "lumera.supernode.MetricsAggregate") - proto.RegisterMapType((map[string]float64)(nil), "lumera.supernode.MetricsAggregate.MetricsEntry") -} - -func init() { - proto.RegisterFile("lumera/supernode/metrics_aggregate.proto", fileDescriptor_438cc5ca9a32c6ea) -} - -var fileDescriptor_438cc5ca9a32c6ea = []byte{ - // 302 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0x31, 0x4f, 0xc3, 0x30, - 0x10, 0x85, 0xeb, 0x06, 0x8a, 0x70, 0x3b, 0x54, 0x56, 0x85, 0xa2, 0x0e, 0x26, 0x30, 0x65, 0x8a, - 0xa5, 0xb2, 0xa0, 0x6e, 0x80, 0x18, 0x90, 0x8a, 0x84, 0x32, 0xb2, 0x54, 0x49, 0x38, 0x9c, 0x88, - 0x24, 0x8e, 0x1c, 0x1b, 0x91, 0x7f, 0xc1, 0xcf, 0x62, 0xec, 0xc0, 0xc0, 0x88, 0x92, 0x3f, 0x82, - 0x12, 0x27, 0xa8, 0xea, 0xf6, 0xee, 0xf9, 0xde, 0x3d, 0xf9, 0xc3, 0x6e, 0xaa, 0x33, 0x90, 0x01, - 0x2b, 0x75, 0x01, 0x32, 0x17, 0x2f, 0xc0, 0x32, 0x50, 0x32, 0x89, 0xca, 0x6d, 0xc0, 0xb9, 0x04, - 0x1e, 0x28, 0xf0, 0x0a, 0x29, 0x94, 0x20, 0x73, 0xb3, 0xe9, 0xfd, 0x6f, 0x2e, 0xcf, 0xb9, 0x10, - 0x3c, 0x05, 0xd6, 0xbd, 0x87, 0xfa, 0x95, 0xa9, 0x24, 0x83, 0x52, 0x05, 0x59, 0x61, 0x22, 0xcb, - 0x05, 0x17, 0x5c, 0x74, 0x92, 0xb5, 0xca, 0xb8, 0x97, 0xdf, 0x08, 0xcf, 0x1f, 0x4d, 0xc9, 0xcd, - 0xd0, 0x41, 0x1e, 0xf0, 0x49, 0x5f, 0x6c, 0x23, 0xc7, 0x72, 0xa7, 0x2b, 0xe6, 0x1d, 0xf6, 0x79, - 0x87, 0xa1, 0xc1, 0xb8, 0xcf, 0x95, 0xac, 0xfc, 0x21, 0x4f, 0x2e, 0xf0, 0x4c, 0x42, 0x21, 0xa4, - 0xda, 0x46, 0x42, 0xe7, 0xca, 0x1e, 0x3b, 0xc8, 0x3d, 0xf2, 0xa7, 0xc6, 0xbb, 0x6b, 0x2d, 0x72, - 0x86, 0x27, 0x31, 0x24, 0x3c, 0x56, 0xb6, 0xe5, 0x20, 0xd7, 0xf2, 0xfb, 0x69, 0xb9, 0xc6, 0xb3, - 0xfd, 0x9b, 0x64, 0x8e, 0xad, 0x37, 0xa8, 0x6c, 0xe4, 0x20, 0xf7, 0xd4, 0x6f, 0x25, 0x59, 0xe0, - 0xe3, 0xf7, 0x20, 0xd5, 0xd0, 0x5d, 0x45, 0xbe, 0x19, 0xd6, 0xe3, 0x6b, 0x74, 0xbb, 0xf9, 0xaa, - 0x29, 0xda, 0xd5, 0x14, 0xfd, 0xd6, 0x14, 0x7d, 0x36, 0x74, 0xb4, 0x6b, 0xe8, 0xe8, 0xa7, 0xa1, - 0xa3, 0xe7, 0x15, 0x4f, 0x54, 0xac, 0x43, 0x2f, 0x12, 0x19, 0xdb, 0x74, 0x9f, 0x7a, 0x6a, 0x41, - 0x44, 0x22, 0x65, 0x3d, 0xfd, 0x8f, 0x3d, 0xfe, 0xaa, 0x2a, 0xa0, 0x0c, 0x27, 0x1d, 0xab, 0xab, - 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf5, 0x3b, 0x27, 0x50, 0xa0, 0x01, 0x00, 0x00, -} - -func (m *MetricsAggregate) 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 *MetricsAggregate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetricsAggregate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintMetricsAggregate(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x18 - } - if m.ReportCount != 0 { - i = encodeVarintMetricsAggregate(dAtA, i, uint64(m.ReportCount)) - i-- - dAtA[i] = 0x10 - } - if len(m.Metrics) > 0 { - for k := range m.Metrics { - v := m.Metrics[k] - baseI := i - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i-- - dAtA[i] = 0x11 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintMetricsAggregate(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintMetricsAggregate(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintMetricsAggregate(dAtA []byte, offset int, v uint64) int { - offset -= sovMetricsAggregate(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MetricsAggregate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Metrics) > 0 { - for k, v := range m.Metrics { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovMetricsAggregate(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + sovMetricsAggregate(uint64(mapEntrySize)) - } - } - if m.ReportCount != 0 { - n += 1 + sovMetricsAggregate(uint64(m.ReportCount)) - } - if m.Height != 0 { - n += 1 + sovMetricsAggregate(uint64(m.Height)) - } - return n -} - -func sovMetricsAggregate(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetricsAggregate(x uint64) (n int) { - return sovMetricsAggregate(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MetricsAggregate) 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 ErrIntOverflowMetricsAggregate - } - 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: MetricsAggregate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetricsAggregate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsAggregate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetricsAggregate - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetricsAggregate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metrics == nil { - m.Metrics = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsAggregate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsAggregate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthMetricsAggregate - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthMetricsAggregate - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := skipMetricsAggregate(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetricsAggregate - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Metrics[mapkey] = mapvalue - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReportCount", wireType) - } - m.ReportCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsAggregate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReportCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsAggregate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetricsAggregate(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetricsAggregate - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetricsAggregate(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsAggregate - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsAggregate - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsAggregate - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetricsAggregate - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetricsAggregate - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetricsAggregate - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetricsAggregate = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetricsAggregate = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetricsAggregate = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/supernode/types/params.pb.go b/gen/lumera/supernode/types/params.pb.go deleted file mode 100644 index 14292262..00000000 --- a/gen/lumera/supernode/types/params.pb.go +++ /dev/null @@ -1,635 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/supernode/params.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Params defines the parameters for the module. -type Params struct { - MinimumStakeForSn uint64 `protobuf:"varint,1,opt,name=minimum_stake_for_sn,json=minimumStakeForSn,proto3" json:"minimum_stake_for_sn,omitempty" yaml:"minimum_stake_for_sn"` - ReportingThreshold uint64 `protobuf:"varint,2,opt,name=reporting_threshold,json=reportingThreshold,proto3" json:"reporting_threshold,omitempty" yaml:"reporting_threshold"` - SlashingThreshold uint64 `protobuf:"varint,3,opt,name=slashing_threshold,json=slashingThreshold,proto3" json:"slashing_threshold,omitempty" yaml:"slashing_threshold"` - MetricsThresholds string `protobuf:"bytes,4,opt,name=metrics_thresholds,json=metricsThresholds,proto3" json:"metrics_thresholds,omitempty" yaml:"metrics_thresholds"` - EvidenceRetentionPeriod string `protobuf:"bytes,5,opt,name=evidence_retention_period,json=evidenceRetentionPeriod,proto3" json:"evidence_retention_period,omitempty" yaml:"evidence_retention_period"` - SlashingFraction string `protobuf:"bytes,6,opt,name=slashing_fraction,json=slashingFraction,proto3" json:"slashing_fraction,omitempty" yaml:"slashing_fraction"` - InactivityPenaltyPeriod string `protobuf:"bytes,7,opt,name=inactivity_penalty_period,json=inactivityPenaltyPeriod,proto3" json:"inactivity_penalty_period,omitempty" yaml:"inactivity_penalty_period"` -} - -func (m *Params) Reset() { *m = Params{} } -func (m *Params) String() string { return proto.CompactTextString(m) } -func (*Params) ProtoMessage() {} -func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_c882c1766d55b81a, []int{0} -} -func (m *Params) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Params.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Params) XXX_Merge(src proto.Message) { - xxx_messageInfo_Params.Merge(m, src) -} -func (m *Params) XXX_Size() int { - return m.Size() -} -func (m *Params) XXX_DiscardUnknown() { - xxx_messageInfo_Params.DiscardUnknown(m) -} - -var xxx_messageInfo_Params proto.InternalMessageInfo - -func (m *Params) GetMinimumStakeForSn() uint64 { - if m != nil { - return m.MinimumStakeForSn - } - return 0 -} - -func (m *Params) GetReportingThreshold() uint64 { - if m != nil { - return m.ReportingThreshold - } - return 0 -} - -func (m *Params) GetSlashingThreshold() uint64 { - if m != nil { - return m.SlashingThreshold - } - return 0 -} - -func (m *Params) GetMetricsThresholds() string { - if m != nil { - return m.MetricsThresholds - } - return "" -} - -func (m *Params) GetEvidenceRetentionPeriod() string { - if m != nil { - return m.EvidenceRetentionPeriod - } - return "" -} - -func (m *Params) GetSlashingFraction() string { - if m != nil { - return m.SlashingFraction - } - return "" -} - -func (m *Params) GetInactivityPenaltyPeriod() string { - if m != nil { - return m.InactivityPenaltyPeriod - } - return "" -} - -func init() { - proto.RegisterType((*Params)(nil), "lumera.supernode.Params") -} - -func init() { proto.RegisterFile("lumera/supernode/params.proto", fileDescriptor_c882c1766d55b81a) } - -var fileDescriptor_c882c1766d55b81a = []byte{ - // 443 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x3f, 0x8f, 0xd3, 0x30, - 0x18, 0xc6, 0x1b, 0x28, 0x45, 0x64, 0xba, 0x9a, 0x93, 0x2e, 0x2d, 0x5c, 0x52, 0x59, 0x0c, 0x27, - 0x86, 0x46, 0x82, 0xed, 0xc6, 0x1b, 0x4e, 0x42, 0xaa, 0x44, 0x94, 0x63, 0x62, 0x31, 0xbe, 0xc4, - 0x97, 0x58, 0xc4, 0x76, 0x64, 0x3b, 0x27, 0xfa, 0x15, 0x98, 0xf8, 0x08, 0x7c, 0x04, 0x3e, 0x06, - 0xe3, 0x8d, 0x4c, 0x11, 0x6a, 0x07, 0x98, 0x33, 0x32, 0xa1, 0xd8, 0x4d, 0xee, 0x4f, 0xdb, 0x25, - 0x79, 0xf5, 0x3c, 0x8f, 0x7f, 0x7a, 0x5f, 0xe9, 0x71, 0x8f, 0x8b, 0x8a, 0x11, 0x89, 0x43, 0x55, - 0x95, 0x44, 0x72, 0x91, 0x92, 0xb0, 0xc4, 0x12, 0x33, 0x35, 0x2f, 0xa5, 0xd0, 0x02, 0x1c, 0x58, - 0x7b, 0xde, 0xdb, 0xd3, 0x31, 0x66, 0x94, 0x8b, 0xd0, 0x7c, 0x6d, 0x68, 0x7a, 0x98, 0x89, 0x4c, - 0x98, 0x31, 0x6c, 0x27, 0xab, 0xc2, 0x7f, 0x43, 0x77, 0x14, 0x19, 0x16, 0x88, 0xdc, 0x43, 0x46, - 0x39, 0x65, 0x15, 0x43, 0x4a, 0xe3, 0xcf, 0x04, 0x5d, 0x09, 0x89, 0x14, 0xf7, 0x9c, 0x99, 0x73, - 0x32, 0x3c, 0x0b, 0x9a, 0x3a, 0x78, 0xb1, 0xc4, 0xac, 0x38, 0x85, 0xbb, 0x52, 0x30, 0x1e, 0x6f, - 0xe4, 0x8b, 0x56, 0x3d, 0x17, 0xf2, 0x82, 0x83, 0xf7, 0xee, 0x73, 0x49, 0x4a, 0x21, 0x35, 0xe5, - 0x19, 0xd2, 0xb9, 0x24, 0x2a, 0x17, 0x45, 0xea, 0x3d, 0x32, 0x40, 0xbf, 0xa9, 0x83, 0xa9, 0x05, - 0xee, 0x08, 0xc1, 0x18, 0xf4, 0xea, 0x87, 0x4e, 0x04, 0x0b, 0x17, 0xa8, 0x02, 0xab, 0xfc, 0x3e, - 0xef, 0xb1, 0xe1, 0x1d, 0x37, 0x75, 0x30, 0xb1, 0xbc, 0xed, 0x0c, 0x8c, 0xc7, 0x9d, 0x78, 0x8f, - 0xc6, 0x88, 0x96, 0x34, 0x51, 0xb7, 0x41, 0xe5, 0x0d, 0x67, 0xce, 0xc9, 0xb3, 0xbb, 0xb4, 0xed, - 0x4c, 0x7b, 0xac, 0x15, 0x7b, 0x98, 0x02, 0x9f, 0xdc, 0x09, 0xb9, 0xa6, 0x29, 0xe1, 0x09, 0x41, - 0x92, 0x68, 0xc2, 0x35, 0x15, 0x1c, 0x95, 0x44, 0x52, 0x91, 0x7a, 0x4f, 0x0c, 0xf4, 0x55, 0x53, - 0x07, 0x33, 0x0b, 0xdd, 0x1b, 0x85, 0xf1, 0x51, 0xe7, 0xc5, 0x9d, 0x15, 0x19, 0x07, 0xbc, 0x73, - 0xfb, 0x23, 0xd0, 0x95, 0xc4, 0x49, 0x6b, 0x79, 0x23, 0x43, 0x7e, 0xd9, 0xd4, 0x81, 0xf7, 0xe0, - 0xf8, 0x2e, 0x02, 0xe3, 0x83, 0x4e, 0x3b, 0xdf, 0x48, 0xed, 0xb2, 0x94, 0xb7, 0xf3, 0x35, 0xd5, - 0x4b, 0x54, 0x12, 0x8e, 0x0b, 0xf3, 0x37, 0xcb, 0x3e, 0x7d, 0xb8, 0xec, 0xde, 0x28, 0x8c, 0x8f, - 0x6e, 0xbd, 0xc8, 0x5a, 0x76, 0xd9, 0x53, 0xf8, 0xf7, 0x7b, 0xe0, 0x7c, 0xfd, 0xf3, 0xe3, 0xf5, - 0x64, 0xd3, 0xdd, 0x2f, 0x77, 0xda, 0x6b, 0x1b, 0x77, 0xb6, 0xf8, 0xb9, 0xf2, 0x9d, 0x9b, 0x95, - 0xef, 0xfc, 0x5e, 0xf9, 0xce, 0xb7, 0xb5, 0x3f, 0xb8, 0x59, 0xfb, 0x83, 0x5f, 0x6b, 0x7f, 0xf0, - 0xf1, 0x4d, 0x46, 0x75, 0x5e, 0x5d, 0xce, 0x13, 0xc1, 0xc2, 0x85, 0x79, 0x1f, 0xb5, 0x75, 0x4d, - 0x44, 0x11, 0xee, 0xc0, 0xe9, 0x65, 0x49, 0xd4, 0xe5, 0xc8, 0x34, 0xfa, 0xed, 0xff, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x81, 0xec, 0x56, 0xd4, 0x2d, 0x03, 0x00, 0x00, -} - -func (this *Params) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Params) - if !ok { - that2, ok := that.(Params) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.MinimumStakeForSn != that1.MinimumStakeForSn { - return false - } - if this.ReportingThreshold != that1.ReportingThreshold { - return false - } - if this.SlashingThreshold != that1.SlashingThreshold { - return false - } - if this.MetricsThresholds != that1.MetricsThresholds { - return false - } - if this.EvidenceRetentionPeriod != that1.EvidenceRetentionPeriod { - return false - } - if this.SlashingFraction != that1.SlashingFraction { - return false - } - if this.InactivityPenaltyPeriod != that1.InactivityPenaltyPeriod { - return false - } - return true -} -func (m *Params) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Params) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.InactivityPenaltyPeriod) > 0 { - i -= len(m.InactivityPenaltyPeriod) - copy(dAtA[i:], m.InactivityPenaltyPeriod) - i = encodeVarintParams(dAtA, i, uint64(len(m.InactivityPenaltyPeriod))) - i-- - dAtA[i] = 0x3a - } - if len(m.SlashingFraction) > 0 { - i -= len(m.SlashingFraction) - copy(dAtA[i:], m.SlashingFraction) - i = encodeVarintParams(dAtA, i, uint64(len(m.SlashingFraction))) - i-- - dAtA[i] = 0x32 - } - if len(m.EvidenceRetentionPeriod) > 0 { - i -= len(m.EvidenceRetentionPeriod) - copy(dAtA[i:], m.EvidenceRetentionPeriod) - i = encodeVarintParams(dAtA, i, uint64(len(m.EvidenceRetentionPeriod))) - i-- - dAtA[i] = 0x2a - } - if len(m.MetricsThresholds) > 0 { - i -= len(m.MetricsThresholds) - copy(dAtA[i:], m.MetricsThresholds) - i = encodeVarintParams(dAtA, i, uint64(len(m.MetricsThresholds))) - i-- - dAtA[i] = 0x22 - } - if m.SlashingThreshold != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.SlashingThreshold)) - i-- - dAtA[i] = 0x18 - } - if m.ReportingThreshold != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.ReportingThreshold)) - i-- - dAtA[i] = 0x10 - } - if m.MinimumStakeForSn != 0 { - i = encodeVarintParams(dAtA, i, uint64(m.MinimumStakeForSn)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintParams(dAtA []byte, offset int, v uint64) int { - offset -= sovParams(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Params) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MinimumStakeForSn != 0 { - n += 1 + sovParams(uint64(m.MinimumStakeForSn)) - } - if m.ReportingThreshold != 0 { - n += 1 + sovParams(uint64(m.ReportingThreshold)) - } - if m.SlashingThreshold != 0 { - n += 1 + sovParams(uint64(m.SlashingThreshold)) - } - l = len(m.MetricsThresholds) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - l = len(m.EvidenceRetentionPeriod) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - l = len(m.SlashingFraction) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - l = len(m.InactivityPenaltyPeriod) - if l > 0 { - n += 1 + l + sovParams(uint64(l)) - } - return n -} - -func sovParams(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozParams(x uint64) (n int) { - return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Params) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinimumStakeForSn", wireType) - } - m.MinimumStakeForSn = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinimumStakeForSn |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReportingThreshold", wireType) - } - m.ReportingThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReportingThreshold |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashingThreshold", wireType) - } - m.SlashingThreshold = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SlashingThreshold |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetricsThresholds", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MetricsThresholds = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvidenceRetentionPeriod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EvidenceRetentionPeriod = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SlashingFraction", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SlashingFraction = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InactivityPenaltyPeriod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InactivityPenaltyPeriod = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipParams(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthParams - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipParams(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowParams - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthParams - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupParams - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthParams - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/supernode/types/query.pb.go b/gen/lumera/supernode/types/query.pb.go deleted file mode 100644 index 5a057895..00000000 --- a/gen/lumera/supernode/types/query.pb.go +++ /dev/null @@ -1,2267 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/supernode/query.proto - -package types - -import ( - context "context" - fmt "fmt" - query "github.com/cosmos/cosmos-sdk/types/query" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// QueryParamsRequest is request type for the Query/Params RPC method. -type QueryParamsRequest struct { -} - -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6f2a532d05351cde, []int{0} -} -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) -} -func (m *QueryParamsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo - -// QueryParamsResponse is response type for the Query/Params RPC method. -type QueryParamsResponse struct { - // params holds all the parameters of this module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` -} - -func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } -func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryParamsResponse) ProtoMessage() {} -func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6f2a532d05351cde, []int{1} -} -func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsResponse.Merge(m, src) -} -func (m *QueryParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo - -func (m *QueryParamsResponse) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -type QueryGetSuperNodeRequest struct { - ValidatorAddress string `protobuf:"bytes,1,opt,name=validatorAddress,proto3" json:"validatorAddress,omitempty"` -} - -func (m *QueryGetSuperNodeRequest) Reset() { *m = QueryGetSuperNodeRequest{} } -func (m *QueryGetSuperNodeRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetSuperNodeRequest) ProtoMessage() {} -func (*QueryGetSuperNodeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6f2a532d05351cde, []int{2} -} -func (m *QueryGetSuperNodeRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetSuperNodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetSuperNodeRequest.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 *QueryGetSuperNodeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetSuperNodeRequest.Merge(m, src) -} -func (m *QueryGetSuperNodeRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetSuperNodeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetSuperNodeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetSuperNodeRequest proto.InternalMessageInfo - -func (m *QueryGetSuperNodeRequest) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -type QueryGetSuperNodeResponse struct { - Supernode *SuperNode `protobuf:"bytes,1,opt,name=supernode,proto3" json:"supernode,omitempty"` -} - -func (m *QueryGetSuperNodeResponse) Reset() { *m = QueryGetSuperNodeResponse{} } -func (m *QueryGetSuperNodeResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetSuperNodeResponse) ProtoMessage() {} -func (*QueryGetSuperNodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6f2a532d05351cde, []int{3} -} -func (m *QueryGetSuperNodeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetSuperNodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetSuperNodeResponse.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 *QueryGetSuperNodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetSuperNodeResponse.Merge(m, src) -} -func (m *QueryGetSuperNodeResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetSuperNodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetSuperNodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetSuperNodeResponse proto.InternalMessageInfo - -func (m *QueryGetSuperNodeResponse) GetSupernode() *SuperNode { - if m != nil { - return m.Supernode - } - return nil -} - -type QueryGetSuperNodeBySuperNodeAddressRequest struct { - SupernodeAddress string `protobuf:"bytes,1,opt,name=supernodeAddress,proto3" json:"supernodeAddress,omitempty"` -} - -func (m *QueryGetSuperNodeBySuperNodeAddressRequest) Reset() { - *m = QueryGetSuperNodeBySuperNodeAddressRequest{} -} -func (m *QueryGetSuperNodeBySuperNodeAddressRequest) String() string { - return proto.CompactTextString(m) -} -func (*QueryGetSuperNodeBySuperNodeAddressRequest) ProtoMessage() {} -func (*QueryGetSuperNodeBySuperNodeAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6f2a532d05351cde, []int{4} -} -func (m *QueryGetSuperNodeBySuperNodeAddressRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetSuperNodeBySuperNodeAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetSuperNodeBySuperNodeAddressRequest.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 *QueryGetSuperNodeBySuperNodeAddressRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetSuperNodeBySuperNodeAddressRequest.Merge(m, src) -} -func (m *QueryGetSuperNodeBySuperNodeAddressRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetSuperNodeBySuperNodeAddressRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetSuperNodeBySuperNodeAddressRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetSuperNodeBySuperNodeAddressRequest proto.InternalMessageInfo - -func (m *QueryGetSuperNodeBySuperNodeAddressRequest) GetSupernodeAddress() string { - if m != nil { - return m.SupernodeAddress - } - return "" -} - -type QueryGetSuperNodeBySuperNodeAddressResponse struct { - Supernode *SuperNode `protobuf:"bytes,1,opt,name=supernode,proto3" json:"supernode,omitempty"` -} - -func (m *QueryGetSuperNodeBySuperNodeAddressResponse) Reset() { - *m = QueryGetSuperNodeBySuperNodeAddressResponse{} -} -func (m *QueryGetSuperNodeBySuperNodeAddressResponse) String() string { - return proto.CompactTextString(m) -} -func (*QueryGetSuperNodeBySuperNodeAddressResponse) ProtoMessage() {} -func (*QueryGetSuperNodeBySuperNodeAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6f2a532d05351cde, []int{5} -} -func (m *QueryGetSuperNodeBySuperNodeAddressResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetSuperNodeBySuperNodeAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetSuperNodeBySuperNodeAddressResponse.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 *QueryGetSuperNodeBySuperNodeAddressResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetSuperNodeBySuperNodeAddressResponse.Merge(m, src) -} -func (m *QueryGetSuperNodeBySuperNodeAddressResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetSuperNodeBySuperNodeAddressResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetSuperNodeBySuperNodeAddressResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetSuperNodeBySuperNodeAddressResponse proto.InternalMessageInfo - -func (m *QueryGetSuperNodeBySuperNodeAddressResponse) GetSupernode() *SuperNode { - if m != nil { - return m.Supernode - } - return nil -} - -type QueryListSuperNodesRequest struct { - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryListSuperNodesRequest) Reset() { *m = QueryListSuperNodesRequest{} } -func (m *QueryListSuperNodesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryListSuperNodesRequest) ProtoMessage() {} -func (*QueryListSuperNodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6f2a532d05351cde, []int{6} -} -func (m *QueryListSuperNodesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryListSuperNodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryListSuperNodesRequest.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 *QueryListSuperNodesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryListSuperNodesRequest.Merge(m, src) -} -func (m *QueryListSuperNodesRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryListSuperNodesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryListSuperNodesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryListSuperNodesRequest proto.InternalMessageInfo - -func (m *QueryListSuperNodesRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryListSuperNodesResponse struct { - Supernodes []*SuperNode `protobuf:"bytes,1,rep,name=supernodes,proto3" json:"supernodes,omitempty"` - Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *QueryListSuperNodesResponse) Reset() { *m = QueryListSuperNodesResponse{} } -func (m *QueryListSuperNodesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryListSuperNodesResponse) ProtoMessage() {} -func (*QueryListSuperNodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6f2a532d05351cde, []int{7} -} -func (m *QueryListSuperNodesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryListSuperNodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryListSuperNodesResponse.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 *QueryListSuperNodesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryListSuperNodesResponse.Merge(m, src) -} -func (m *QueryListSuperNodesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryListSuperNodesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryListSuperNodesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryListSuperNodesResponse proto.InternalMessageInfo - -func (m *QueryListSuperNodesResponse) GetSupernodes() []*SuperNode { - if m != nil { - return m.Supernodes - } - return nil -} - -func (m *QueryListSuperNodesResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -type QueryGetTopSuperNodesForBlockRequest struct { - BlockHeight int32 `protobuf:"varint,1,opt,name=blockHeight,proto3" json:"blockHeight,omitempty"` - Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty" yaml:"state"` -} - -func (m *QueryGetTopSuperNodesForBlockRequest) Reset() { *m = QueryGetTopSuperNodesForBlockRequest{} } -func (m *QueryGetTopSuperNodesForBlockRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGetTopSuperNodesForBlockRequest) ProtoMessage() {} -func (*QueryGetTopSuperNodesForBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6f2a532d05351cde, []int{8} -} -func (m *QueryGetTopSuperNodesForBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetTopSuperNodesForBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetTopSuperNodesForBlockRequest.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 *QueryGetTopSuperNodesForBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetTopSuperNodesForBlockRequest.Merge(m, src) -} -func (m *QueryGetTopSuperNodesForBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGetTopSuperNodesForBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetTopSuperNodesForBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetTopSuperNodesForBlockRequest proto.InternalMessageInfo - -func (m *QueryGetTopSuperNodesForBlockRequest) GetBlockHeight() int32 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *QueryGetTopSuperNodesForBlockRequest) GetLimit() int32 { - if m != nil { - return m.Limit - } - return 0 -} - -func (m *QueryGetTopSuperNodesForBlockRequest) GetState() string { - if m != nil { - return m.State - } - return "" -} - -type QueryGetTopSuperNodesForBlockResponse struct { - Supernodes []*SuperNode `protobuf:"bytes,1,rep,name=supernodes,proto3" json:"supernodes,omitempty"` -} - -func (m *QueryGetTopSuperNodesForBlockResponse) Reset() { *m = QueryGetTopSuperNodesForBlockResponse{} } -func (m *QueryGetTopSuperNodesForBlockResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGetTopSuperNodesForBlockResponse) ProtoMessage() {} -func (*QueryGetTopSuperNodesForBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6f2a532d05351cde, []int{9} -} -func (m *QueryGetTopSuperNodesForBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGetTopSuperNodesForBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGetTopSuperNodesForBlockResponse.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 *QueryGetTopSuperNodesForBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGetTopSuperNodesForBlockResponse.Merge(m, src) -} -func (m *QueryGetTopSuperNodesForBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGetTopSuperNodesForBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGetTopSuperNodesForBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGetTopSuperNodesForBlockResponse proto.InternalMessageInfo - -func (m *QueryGetTopSuperNodesForBlockResponse) GetSupernodes() []*SuperNode { - if m != nil { - return m.Supernodes - } - return nil -} - -func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "lumera.supernode.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "lumera.supernode.QueryParamsResponse") - proto.RegisterType((*QueryGetSuperNodeRequest)(nil), "lumera.supernode.QueryGetSuperNodeRequest") - proto.RegisterType((*QueryGetSuperNodeResponse)(nil), "lumera.supernode.QueryGetSuperNodeResponse") - proto.RegisterType((*QueryGetSuperNodeBySuperNodeAddressRequest)(nil), "lumera.supernode.QueryGetSuperNodeBySuperNodeAddressRequest") - proto.RegisterType((*QueryGetSuperNodeBySuperNodeAddressResponse)(nil), "lumera.supernode.QueryGetSuperNodeBySuperNodeAddressResponse") - proto.RegisterType((*QueryListSuperNodesRequest)(nil), "lumera.supernode.QueryListSuperNodesRequest") - proto.RegisterType((*QueryListSuperNodesResponse)(nil), "lumera.supernode.QueryListSuperNodesResponse") - proto.RegisterType((*QueryGetTopSuperNodesForBlockRequest)(nil), "lumera.supernode.QueryGetTopSuperNodesForBlockRequest") - proto.RegisterType((*QueryGetTopSuperNodesForBlockResponse)(nil), "lumera.supernode.QueryGetTopSuperNodesForBlockResponse") -} - -func init() { proto.RegisterFile("lumera/supernode/query.proto", fileDescriptor_6f2a532d05351cde) } - -var fileDescriptor_6f2a532d05351cde = []byte{ - // 764 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x95, 0xcd, 0x6e, 0xd3, 0x4a, - 0x14, 0xc7, 0xe3, 0x56, 0xe9, 0x55, 0xa7, 0xd5, 0x55, 0xef, 0xdc, 0x2e, 0x72, 0xdd, 0xde, 0xb4, - 0x58, 0xfd, 0x80, 0x14, 0x3c, 0x6a, 0x2b, 0x81, 0xca, 0xc7, 0x82, 0x08, 0xb5, 0x08, 0x85, 0x52, - 0x4c, 0x41, 0x88, 0x4d, 0x34, 0x49, 0x06, 0xd7, 0xc2, 0xf6, 0xb8, 0x9e, 0x49, 0x45, 0x54, 0x75, - 0xc3, 0xa2, 0x6b, 0x24, 0x1e, 0x81, 0x4d, 0x97, 0x48, 0xbc, 0x44, 0x17, 0x2c, 0x2a, 0xb1, 0x61, - 0x55, 0x41, 0x8b, 0xc4, 0x1e, 0xf1, 0x00, 0xc8, 0xe3, 0x89, 0xe3, 0xc4, 0x71, 0x93, 0x02, 0x9b, - 0x68, 0x3c, 0xf3, 0x3f, 0xe7, 0xfc, 0xce, 0x99, 0x39, 0x27, 0x60, 0xd2, 0xae, 0x3b, 0xc4, 0xc7, - 0x88, 0xd5, 0x3d, 0xe2, 0xbb, 0xb4, 0x46, 0xd0, 0x76, 0x9d, 0xf8, 0x0d, 0xdd, 0xf3, 0x29, 0xa7, - 0x70, 0x2c, 0x3c, 0xd5, 0xa3, 0x53, 0xf5, 0x1f, 0xec, 0x58, 0x2e, 0x45, 0xe2, 0x37, 0x14, 0xa9, - 0xe3, 0x26, 0x35, 0xa9, 0x58, 0xa2, 0x60, 0x25, 0x77, 0x27, 0x4d, 0x4a, 0x4d, 0x9b, 0x20, 0xec, - 0x59, 0x08, 0xbb, 0x2e, 0xe5, 0x98, 0x5b, 0xd4, 0x65, 0xf2, 0xb4, 0x50, 0xa5, 0xcc, 0xa1, 0x0c, - 0x55, 0x30, 0x93, 0x11, 0xd1, 0xce, 0x62, 0x85, 0x70, 0xbc, 0x88, 0x3c, 0x6c, 0x5a, 0xae, 0x10, - 0x4b, 0xed, 0xff, 0x09, 0x44, 0x0f, 0xfb, 0xd8, 0x69, 0xba, 0xba, 0x90, 0x38, 0x16, 0xab, 0x72, - 0xb0, 0x94, 0x92, 0xb9, 0xee, 0x92, 0x60, 0x55, 0x66, 0x1c, 0x73, 0xa9, 0xd3, 0xc6, 0x01, 0x7c, - 0x18, 0xb0, 0x6c, 0x08, 0xff, 0x06, 0xd9, 0xae, 0x13, 0xc6, 0x35, 0x03, 0xfc, 0xdb, 0xb6, 0xcb, - 0x3c, 0xea, 0x32, 0x02, 0x6f, 0x80, 0xa1, 0x90, 0x23, 0xa7, 0x4c, 0x2b, 0x17, 0x47, 0x96, 0x72, - 0x7a, 0x67, 0xb1, 0xf4, 0xd0, 0xa2, 0x38, 0x7c, 0x78, 0x3c, 0x95, 0x39, 0xf8, 0xf6, 0xae, 0xa0, - 0x18, 0xd2, 0x44, 0x5b, 0x05, 0x39, 0xe1, 0x73, 0x8d, 0xf0, 0x47, 0x81, 0x7c, 0x9d, 0xd6, 0x88, - 0x8c, 0x07, 0x0b, 0x60, 0x6c, 0x07, 0xdb, 0x56, 0x0d, 0x73, 0xea, 0xdf, 0xae, 0xd5, 0x7c, 0xc2, - 0xc2, 0x10, 0xc3, 0x46, 0x62, 0x5f, 0x7b, 0x02, 0xfe, 0xeb, 0xe2, 0x47, 0x12, 0xae, 0x80, 0xe1, - 0x88, 0x45, 0x42, 0x4e, 0x24, 0x21, 0x5b, 0x76, 0x2d, 0xb5, 0xf6, 0x14, 0x14, 0x12, 0x7e, 0x8b, - 0x8d, 0x68, 0x29, 0xc3, 0xc7, 0x88, 0x23, 0xd3, 0x0e, 0xe2, 0xce, 0x7d, 0x6d, 0x0b, 0x2c, 0xf4, - 0xe5, 0xf9, 0xf7, 0x73, 0xa8, 0x01, 0x55, 0x44, 0x2a, 0x59, 0xac, 0x15, 0x2a, 0x62, 0x5e, 0x05, - 0xa0, 0xf5, 0xd2, 0xa4, 0xe7, 0x39, 0x3d, 0x7c, 0x96, 0x7a, 0xf0, 0x2c, 0xf5, 0xb0, 0x11, 0xe4, - 0xb3, 0xd4, 0x37, 0xb0, 0xd9, 0xbc, 0x21, 0x23, 0x66, 0xa9, 0xbd, 0x55, 0xc0, 0x44, 0xd7, 0x30, - 0xd1, 0x33, 0x01, 0x11, 0x52, 0x50, 0x95, 0xc1, 0x5e, 0x19, 0xc4, 0xe4, 0x70, 0xad, 0x0d, 0x72, - 0x40, 0x40, 0xce, 0xf7, 0x84, 0x0c, 0x23, 0xb7, 0x51, 0xee, 0x2b, 0x60, 0xa6, 0x59, 0xf6, 0x4d, - 0xea, 0xb5, 0x38, 0x57, 0xa9, 0x5f, 0xb4, 0x69, 0xf5, 0x45, 0xb3, 0x2c, 0xd3, 0x60, 0xa4, 0x12, - 0x7c, 0xdf, 0x25, 0x96, 0xb9, 0xc5, 0x45, 0x5d, 0xb2, 0x46, 0x7c, 0x0b, 0x8e, 0x83, 0xac, 0x6d, - 0x39, 0x16, 0x17, 0x38, 0x59, 0x23, 0xfc, 0x80, 0x73, 0x20, 0x2b, 0x3a, 0x29, 0x37, 0x18, 0xdc, - 0x7b, 0x71, 0xec, 0xfb, 0xf1, 0xd4, 0x68, 0x03, 0x3b, 0xf6, 0x75, 0x4d, 0x6c, 0x6b, 0x46, 0x78, - 0xac, 0xd5, 0xc0, 0x6c, 0x0f, 0x8e, 0x3f, 0x50, 0xb7, 0xa5, 0x0f, 0x7f, 0x81, 0xac, 0x08, 0x03, - 0xf7, 0x15, 0x30, 0x14, 0xb6, 0x21, 0x9c, 0x49, 0x5a, 0x27, 0xbb, 0x5d, 0x9d, 0xed, 0xa1, 0x0a, - 0xf1, 0x34, 0xf4, 0xea, 0xe3, 0xd7, 0x37, 0x03, 0x97, 0xe0, 0x3c, 0x2a, 0x09, 0xf9, 0x46, 0x30, - 0x40, 0xaa, 0xd4, 0x46, 0x29, 0xc3, 0x0a, 0xbe, 0x57, 0xc0, 0x68, 0xfc, 0xcd, 0xc3, 0x42, 0x4a, - 0xa0, 0x2e, 0x23, 0x41, 0x5d, 0xe8, 0x4b, 0x2b, 0xd1, 0xee, 0x09, 0xb4, 0x3b, 0xb0, 0xd8, 0x13, - 0xcd, 0x24, 0xbc, 0xdc, 0x1a, 0x96, 0x68, 0xb7, 0x73, 0xbc, 0xec, 0xc1, 0x1f, 0x0a, 0xc8, 0x9f, - 0xdd, 0xa9, 0xf0, 0x66, 0x1f, 0x6c, 0xa9, 0xa3, 0x43, 0xbd, 0xf5, 0x8b, 0xd6, 0x32, 0xd7, 0xc7, - 0x22, 0xd7, 0x07, 0xf0, 0xfe, 0x39, 0x73, 0x2d, 0x57, 0x1a, 0x65, 0x1c, 0xfa, 0x42, 0xbb, 0x9d, - 0x33, 0x6a, 0x0f, 0x1e, 0x28, 0xe0, 0xef, 0xf6, 0x7e, 0x86, 0x97, 0x53, 0x40, 0xbb, 0x4e, 0x17, - 0xf5, 0x4a, 0x9f, 0x6a, 0x99, 0xc6, 0x8a, 0x48, 0x63, 0x19, 0x2e, 0xf6, 0x4c, 0xc3, 0xb6, 0x58, - 0x3c, 0x0f, 0x06, 0xbf, 0x28, 0x20, 0x97, 0xd6, 0x4c, 0xf0, 0x6a, 0x7a, 0x75, 0xcf, 0x9a, 0x02, - 0xea, 0xb5, 0x73, 0xdb, 0xc9, 0x44, 0x36, 0x45, 0x22, 0xeb, 0xb0, 0xd4, 0xd7, 0x7d, 0x70, 0xea, - 0xc5, 0x73, 0x29, 0x3f, 0xa7, 0x7e, 0x59, 0x8c, 0x1a, 0xb4, 0x1b, 0x9b, 0x38, 0x7b, 0xc5, 0xd2, - 0xe1, 0x49, 0x5e, 0x39, 0x3a, 0xc9, 0x2b, 0x9f, 0x4f, 0xf2, 0xca, 0xeb, 0xd3, 0x7c, 0xe6, 0xe8, - 0x34, 0x9f, 0xf9, 0x74, 0x9a, 0xcf, 0x3c, 0x5b, 0x32, 0x2d, 0xbe, 0x55, 0xaf, 0xe8, 0x55, 0xea, - 0xa4, 0x44, 0x7c, 0x19, 0x8b, 0xc9, 0x1b, 0x1e, 0x61, 0x95, 0x21, 0xf1, 0x67, 0xbf, 0xfc, 0x33, - 0x00, 0x00, 0xff, 0xff, 0x14, 0xa4, 0x11, 0xb2, 0xfb, 0x08, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// QueryClient is the client API for Query service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type QueryClient interface { - // Parameters queries the parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Queries a SuperNode by validatorAddress. - GetSuperNode(ctx context.Context, in *QueryGetSuperNodeRequest, opts ...grpc.CallOption) (*QueryGetSuperNodeResponse, error) - // Queries a SuperNode by supernodeAddress. - GetSuperNodeBySuperNodeAddress(ctx context.Context, in *QueryGetSuperNodeBySuperNodeAddressRequest, opts ...grpc.CallOption) (*QueryGetSuperNodeBySuperNodeAddressResponse, error) - // Queries a list of SuperNodes. - ListSuperNodes(ctx context.Context, in *QueryListSuperNodesRequest, opts ...grpc.CallOption) (*QueryListSuperNodesResponse, error) - // Queries a list of GetTopSuperNodesForBlock items. - GetTopSuperNodesForBlock(ctx context.Context, in *QueryGetTopSuperNodesForBlockRequest, opts ...grpc.CallOption) (*QueryGetTopSuperNodesForBlockResponse, error) -} - -type queryClient struct { - cc grpc1.ClientConn -} - -func NewQueryClient(cc grpc1.ClientConn) QueryClient { - return &queryClient{cc} -} - -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/lumera.supernode.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GetSuperNode(ctx context.Context, in *QueryGetSuperNodeRequest, opts ...grpc.CallOption) (*QueryGetSuperNodeResponse, error) { - out := new(QueryGetSuperNodeResponse) - err := c.cc.Invoke(ctx, "/lumera.supernode.Query/GetSuperNode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GetSuperNodeBySuperNodeAddress(ctx context.Context, in *QueryGetSuperNodeBySuperNodeAddressRequest, opts ...grpc.CallOption) (*QueryGetSuperNodeBySuperNodeAddressResponse, error) { - out := new(QueryGetSuperNodeBySuperNodeAddressResponse) - err := c.cc.Invoke(ctx, "/lumera.supernode.Query/GetSuperNodeBySuperNodeAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ListSuperNodes(ctx context.Context, in *QueryListSuperNodesRequest, opts ...grpc.CallOption) (*QueryListSuperNodesResponse, error) { - out := new(QueryListSuperNodesResponse) - err := c.cc.Invoke(ctx, "/lumera.supernode.Query/ListSuperNodes", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GetTopSuperNodesForBlock(ctx context.Context, in *QueryGetTopSuperNodesForBlockRequest, opts ...grpc.CallOption) (*QueryGetTopSuperNodesForBlockResponse, error) { - out := new(QueryGetTopSuperNodesForBlockResponse) - err := c.cc.Invoke(ctx, "/lumera.supernode.Query/GetTopSuperNodesForBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// QueryServer is the server API for Query service. -type QueryServer interface { - // Parameters queries the parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Queries a SuperNode by validatorAddress. - GetSuperNode(context.Context, *QueryGetSuperNodeRequest) (*QueryGetSuperNodeResponse, error) - // Queries a SuperNode by supernodeAddress. - GetSuperNodeBySuperNodeAddress(context.Context, *QueryGetSuperNodeBySuperNodeAddressRequest) (*QueryGetSuperNodeBySuperNodeAddressResponse, error) - // Queries a list of SuperNodes. - ListSuperNodes(context.Context, *QueryListSuperNodesRequest) (*QueryListSuperNodesResponse, error) - // Queries a list of GetTopSuperNodesForBlock items. - GetTopSuperNodesForBlock(context.Context, *QueryGetTopSuperNodesForBlockRequest) (*QueryGetTopSuperNodesForBlockResponse, error) -} - -// UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct { -} - -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} -func (*UnimplementedQueryServer) GetSuperNode(ctx context.Context, req *QueryGetSuperNodeRequest) (*QueryGetSuperNodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSuperNode not implemented") -} -func (*UnimplementedQueryServer) GetSuperNodeBySuperNodeAddress(ctx context.Context, req *QueryGetSuperNodeBySuperNodeAddressRequest) (*QueryGetSuperNodeBySuperNodeAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSuperNodeBySuperNodeAddress not implemented") -} -func (*UnimplementedQueryServer) ListSuperNodes(ctx context.Context, req *QueryListSuperNodesRequest) (*QueryListSuperNodesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListSuperNodes not implemented") -} -func (*UnimplementedQueryServer) GetTopSuperNodesForBlock(ctx context.Context, req *QueryGetTopSuperNodesForBlockRequest) (*QueryGetTopSuperNodesForBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTopSuperNodesForBlock not implemented") -} - -func RegisterQueryServer(s grpc1.Server, srv QueryServer) { - s.RegisterService(&_Query_serviceDesc, srv) -} - -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.supernode.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GetSuperNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetSuperNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetSuperNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.supernode.Query/GetSuperNode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetSuperNode(ctx, req.(*QueryGetSuperNodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GetSuperNodeBySuperNodeAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetSuperNodeBySuperNodeAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetSuperNodeBySuperNodeAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.supernode.Query/GetSuperNodeBySuperNodeAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetSuperNodeBySuperNodeAddress(ctx, req.(*QueryGetSuperNodeBySuperNodeAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ListSuperNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryListSuperNodesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ListSuperNodes(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.supernode.Query/ListSuperNodes", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ListSuperNodes(ctx, req.(*QueryListSuperNodesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GetTopSuperNodesForBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGetTopSuperNodesForBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetTopSuperNodesForBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.supernode.Query/GetTopSuperNodesForBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetTopSuperNodesForBlock(ctx, req.(*QueryGetTopSuperNodesForBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var Query_serviceDesc = _Query_serviceDesc -var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "lumera.supernode.Query", - HandlerType: (*QueryServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, - { - MethodName: "GetSuperNode", - Handler: _Query_GetSuperNode_Handler, - }, - { - MethodName: "GetSuperNodeBySuperNodeAddress", - Handler: _Query_GetSuperNodeBySuperNodeAddress_Handler, - }, - { - MethodName: "ListSuperNodes", - Handler: _Query_ListSuperNodes_Handler, - }, - { - MethodName: "GetTopSuperNodesForBlock", - Handler: _Query_GetTopSuperNodesForBlock_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "lumera/supernode/query.proto", -} - -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *QueryGetSuperNodeRequest) 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 *QueryGetSuperNodeRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetSuperNodeRequest) 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 *QueryGetSuperNodeResponse) 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 *QueryGetSuperNodeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetSuperNodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Supernode != nil { - { - size, err := m.Supernode.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetSuperNodeBySuperNodeAddressRequest) 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 *QueryGetSuperNodeBySuperNodeAddressRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetSuperNodeBySuperNodeAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SupernodeAddress) > 0 { - i -= len(m.SupernodeAddress) - copy(dAtA[i:], m.SupernodeAddress) - i = encodeVarintQuery(dAtA, i, uint64(len(m.SupernodeAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryGetSuperNodeBySuperNodeAddressResponse) 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 *QueryGetSuperNodeBySuperNodeAddressResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetSuperNodeBySuperNodeAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Supernode != nil { - { - size, err := m.Supernode.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryListSuperNodesRequest) 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 *QueryListSuperNodesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryListSuperNodesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *QueryListSuperNodesResponse) 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 *QueryListSuperNodesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryListSuperNodesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Supernodes) > 0 { - for iNdEx := len(m.Supernodes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Supernodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryGetTopSuperNodesForBlockRequest) 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 *QueryGetTopSuperNodesForBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetTopSuperNodesForBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.State) > 0 { - i -= len(m.State) - copy(dAtA[i:], m.State) - i = encodeVarintQuery(dAtA, i, uint64(len(m.State))) - i-- - dAtA[i] = 0x1a - } - if m.Limit != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Limit)) - i-- - dAtA[i] = 0x10 - } - if m.BlockHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *QueryGetTopSuperNodesForBlockResponse) 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 *QueryGetTopSuperNodesForBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGetTopSuperNodesForBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Supernodes) > 0 { - for iNdEx := len(m.Supernodes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Supernodes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *QueryParamsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Params.Size() - n += 1 + l + sovQuery(uint64(l)) - return n -} - -func (m *QueryGetSuperNodeRequest) 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 *QueryGetSuperNodeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Supernode != nil { - l = m.Supernode.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetSuperNodeBySuperNodeAddressRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SupernodeAddress) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetSuperNodeBySuperNodeAddressResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Supernode != nil { - l = m.Supernode.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryListSuperNodesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryListSuperNodesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Supernodes) > 0 { - for _, e := range m.Supernodes { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetTopSuperNodesForBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovQuery(uint64(m.BlockHeight)) - } - if m.Limit != 0 { - n += 1 + sovQuery(uint64(m.Limit)) - } - l = len(m.State) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryGetTopSuperNodesForBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Supernodes) > 0 { - for _, e := range m.Supernodes { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryParamsResponse) 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: QueryParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetSuperNodeRequest) 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: QueryGetSuperNodeRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetSuperNodeRequest: 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 *QueryGetSuperNodeResponse) 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: QueryGetSuperNodeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetSuperNodeResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Supernode", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Supernode == nil { - m.Supernode = &SuperNode{} - } - if err := m.Supernode.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetSuperNodeBySuperNodeAddressRequest) 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: QueryGetSuperNodeBySuperNodeAddressRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetSuperNodeBySuperNodeAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAddress", 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.SupernodeAddress = 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 *QueryGetSuperNodeBySuperNodeAddressResponse) 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: QueryGetSuperNodeBySuperNodeAddressResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetSuperNodeBySuperNodeAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Supernode", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Supernode == nil { - m.Supernode = &SuperNode{} - } - if err := m.Supernode.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryListSuperNodesRequest) 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: QueryListSuperNodesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryListSuperNodesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryListSuperNodesResponse) 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: QueryListSuperNodesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryListSuperNodesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Supernodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Supernodes = append(m.Supernodes, &SuperNode{}) - if err := m.Supernodes[len(m.Supernodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGetTopSuperNodesForBlockRequest) 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: QueryGetTopSuperNodesForBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetTopSuperNodesForBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Limit", wireType) - } - m.Limit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Limit |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", 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.State = 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 *QueryGetTopSuperNodesForBlockResponse) 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: QueryGetTopSuperNodesForBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGetTopSuperNodesForBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Supernodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Supernodes = append(m.Supernodes, &SuperNode{}) - if err := m.Supernodes[len(m.Supernodes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/supernode/types/query.pb.gw.go b/gen/lumera/supernode/types/query.pb.gw.go deleted file mode 100644 index e0b811a3..00000000 --- a/gen/lumera/supernode/types/query.pb.gw.go +++ /dev/null @@ -1,557 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: lumera/supernode/query.proto - -/* -Package types is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package types - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join - -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_GetSuperNode_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetSuperNodeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["validatorAddress"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validatorAddress") - } - - protoReq.ValidatorAddress, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validatorAddress", err) - } - - msg, err := client.GetSuperNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_GetSuperNode_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetSuperNodeRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["validatorAddress"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "validatorAddress") - } - - protoReq.ValidatorAddress, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "validatorAddress", err) - } - - msg, err := server.GetSuperNode(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Query_GetSuperNodeBySuperNodeAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetSuperNodeBySuperNodeAddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["supernodeAddress"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "supernodeAddress") - } - - protoReq.SupernodeAddress, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "supernodeAddress", err) - } - - msg, err := client.GetSuperNodeBySuperNodeAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_GetSuperNodeBySuperNodeAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetSuperNodeBySuperNodeAddressRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["supernodeAddress"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "supernodeAddress") - } - - protoReq.SupernodeAddress, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "supernodeAddress", err) - } - - msg, err := server.GetSuperNodeBySuperNodeAddress(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_ListSuperNodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Query_ListSuperNodes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListSuperNodesRequest - 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_ListSuperNodes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListSuperNodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_ListSuperNodes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryListSuperNodesRequest - 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_ListSuperNodes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListSuperNodes(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Query_GetTopSuperNodesForBlock_0 = &utilities.DoubleArray{Encoding: map[string]int{"blockHeight": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Query_GetTopSuperNodesForBlock_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetTopSuperNodesForBlockRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["blockHeight"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "blockHeight") - } - - protoReq.BlockHeight, err = runtime.Int32(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "blockHeight", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetTopSuperNodesForBlock_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetTopSuperNodesForBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_GetTopSuperNodesForBlock_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGetTopSuperNodesForBlockRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["blockHeight"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "blockHeight") - } - - protoReq.BlockHeight, err = runtime.Int32(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "blockHeight", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetTopSuperNodesForBlock_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetTopSuperNodesForBlock(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". -// UnaryRPC :call QueryServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. -func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_GetSuperNode_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_GetSuperNode_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_GetSuperNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_GetSuperNodeBySuperNodeAddress_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_GetSuperNodeBySuperNodeAddress_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_GetSuperNodeBySuperNodeAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ListSuperNodes_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_ListSuperNodes_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_ListSuperNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_GetTopSuperNodesForBlock_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_GetTopSuperNodesForBlock_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_GetTopSuperNodesForBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterQueryHandler(ctx, mux, conn) -} - -// RegisterQueryHandler registers the http handlers for service Query to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) -} - -// RegisterQueryHandlerClient registers the http handlers for service Query -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "QueryClient" to call the correct interceptors. -func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_GetSuperNode_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_GetSuperNode_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_GetSuperNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_GetSuperNodeBySuperNodeAddress_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_GetSuperNodeBySuperNodeAddress_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_GetSuperNodeBySuperNodeAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_ListSuperNodes_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_ListSuperNodes_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_ListSuperNodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Query_GetTopSuperNodesForBlock_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_GetTopSuperNodesForBlock_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_GetTopSuperNodesForBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"LumeraProtocol", "lumera", "supernode", "params"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_GetSuperNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"LumeraProtocol", "lumera", "supernode", "get_super_node", "validatorAddress"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_GetSuperNodeBySuperNodeAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"LumeraProtocol", "lumera", "supernode", "get_super_node_by_address", "supernodeAddress"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_ListSuperNodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"LumeraProtocol", "lumera", "supernode", "list_super_nodes"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_GetTopSuperNodesForBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"LumeraProtocol", "lumera", "supernode", "get_top_super_nodes_for_block", "blockHeight"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Query_Params_0 = runtime.ForwardResponseMessage - - forward_Query_GetSuperNode_0 = runtime.ForwardResponseMessage - - forward_Query_GetSuperNodeBySuperNodeAddress_0 = runtime.ForwardResponseMessage - - forward_Query_ListSuperNodes_0 = runtime.ForwardResponseMessage - - forward_Query_GetTopSuperNodesForBlock_0 = runtime.ForwardResponseMessage -) diff --git a/gen/lumera/supernode/types/super_node.pb.go b/gen/lumera/supernode/types/super_node.pb.go deleted file mode 100644 index 130201df..00000000 --- a/gen/lumera/supernode/types/super_node.pb.go +++ /dev/null @@ -1,686 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/supernode/super_node.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type SuperNode struct { - ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - States []*SuperNodeStateRecord `protobuf:"bytes,2,rep,name=states,proto3" json:"states,omitempty"` - Evidence []*Evidence `protobuf:"bytes,3,rep,name=evidence,proto3" json:"evidence,omitempty"` - PrevIpAddresses []*IPAddressHistory `protobuf:"bytes,4,rep,name=prev_ip_addresses,json=prevIpAddresses,proto3" json:"prev_ip_addresses,omitempty"` - Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"` - Metrics *MetricsAggregate `protobuf:"bytes,6,opt,name=metrics,proto3" json:"metrics,omitempty"` - SupernodeAccount string `protobuf:"bytes,7,opt,name=supernode_account,json=supernodeAccount,proto3" json:"supernode_account,omitempty"` -} - -func (m *SuperNode) Reset() { *m = SuperNode{} } -func (m *SuperNode) String() string { return proto.CompactTextString(m) } -func (*SuperNode) ProtoMessage() {} -func (*SuperNode) Descriptor() ([]byte, []int) { - return fileDescriptor_ad964d60a05f811b, []int{0} -} -func (m *SuperNode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SuperNode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SuperNode.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 *SuperNode) XXX_Merge(src proto.Message) { - xxx_messageInfo_SuperNode.Merge(m, src) -} -func (m *SuperNode) XXX_Size() int { - return m.Size() -} -func (m *SuperNode) XXX_DiscardUnknown() { - xxx_messageInfo_SuperNode.DiscardUnknown(m) -} - -var xxx_messageInfo_SuperNode proto.InternalMessageInfo - -func (m *SuperNode) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *SuperNode) GetStates() []*SuperNodeStateRecord { - if m != nil { - return m.States - } - return nil -} - -func (m *SuperNode) GetEvidence() []*Evidence { - if m != nil { - return m.Evidence - } - return nil -} - -func (m *SuperNode) GetPrevIpAddresses() []*IPAddressHistory { - if m != nil { - return m.PrevIpAddresses - } - return nil -} - -func (m *SuperNode) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *SuperNode) GetMetrics() *MetricsAggregate { - if m != nil { - return m.Metrics - } - return nil -} - -func (m *SuperNode) GetSupernodeAccount() string { - if m != nil { - return m.SupernodeAccount - } - return "" -} - -func init() { - proto.RegisterType((*SuperNode)(nil), "lumera.supernode.SuperNode") -} - -func init() { proto.RegisterFile("lumera/supernode/super_node.proto", fileDescriptor_ad964d60a05f811b) } - -var fileDescriptor_ad964d60a05f811b = []byte{ - // 468 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0x41, 0x6b, 0xd4, 0x40, - 0x14, 0xc7, 0x1b, 0x57, 0x77, 0x6d, 0x3c, 0xd8, 0x06, 0xc1, 0xb8, 0x62, 0xdc, 0xf6, 0x50, 0xd6, - 0x43, 0x13, 0x5a, 0xc1, 0x93, 0x08, 0x29, 0x08, 0x2d, 0xd4, 0x52, 0xb2, 0xe0, 0xc1, 0x4b, 0x98, - 0x4c, 0x9e, 0xe9, 0xc0, 0x26, 0x2f, 0xcc, 0x4c, 0x82, 0xfd, 0x16, 0x7e, 0x98, 0x7e, 0x05, 0xc1, - 0x63, 0xe9, 0xc9, 0xa3, 0xec, 0x7e, 0x11, 0x99, 0xcc, 0x4c, 0x2a, 0x9b, 0xde, 0xde, 0xcb, 0xfc, - 0xfe, 0xff, 0x79, 0xf9, 0xbf, 0x71, 0xf7, 0x96, 0x4d, 0x09, 0x9c, 0x44, 0xa2, 0xa9, 0x81, 0x57, - 0x98, 0x83, 0xae, 0x52, 0x55, 0x86, 0x35, 0x47, 0x89, 0xde, 0x8e, 0x46, 0xc2, 0x1e, 0x99, 0x06, - 0x14, 0x45, 0x89, 0x22, 0xca, 0x88, 0x80, 0xa8, 0x3d, 0xca, 0x40, 0x92, 0xa3, 0x88, 0x22, 0xab, - 0xb4, 0x62, 0xfa, 0x4a, 0x9f, 0xa7, 0x5d, 0x17, 0xe9, 0xc6, 0x1c, 0xbd, 0x2d, 0x10, 0x8b, 0x25, - 0x44, 0x5d, 0x97, 0x35, 0xdf, 0x23, 0xc9, 0x4a, 0x10, 0x92, 0x94, 0xb5, 0x01, 0x5e, 0x14, 0x58, - 0xa0, 0x16, 0xaa, 0xca, 0xca, 0x06, 0x63, 0x42, 0xcb, 0x72, 0xa8, 0xa8, 0x19, 0x72, 0x3a, 0x1f, - 0x00, 0x25, 0x48, 0xce, 0xa8, 0x48, 0x49, 0x51, 0x70, 0x28, 0x88, 0xb4, 0xe4, 0xbb, 0x01, 0xc9, - 0xea, 0x94, 0xe4, 0x39, 0x07, 0x21, 0xd2, 0x2b, 0x26, 0x24, 0xf2, 0x6b, 0x83, 0x1e, 0x3c, 0x1c, - 0x8e, 0xaa, 0x52, 0x21, 0x7b, 0xcb, 0xfd, 0x5f, 0x23, 0x77, 0x7b, 0xa1, 0x4e, 0x2e, 0x30, 0x07, - 0xef, 0xc2, 0xdd, 0x6d, 0xc9, 0x92, 0xe5, 0x44, 0x22, 0xb7, 0xc6, 0xbe, 0x33, 0x73, 0xe6, 0xdb, - 0x27, 0x7b, 0x77, 0x37, 0x87, 0x6f, 0x4c, 0x1e, 0x5f, 0x2d, 0x13, 0x6b, 0x64, 0x21, 0x39, 0xab, - 0x8a, 0x64, 0xa7, 0xdd, 0xf8, 0xee, 0x7d, 0x72, 0xc7, 0xdd, 0x65, 0xc2, 0x7f, 0x34, 0x1b, 0xcd, - 0x9f, 0x1d, 0x1f, 0x84, 0x9b, 0x0b, 0x09, 0xfb, 0xcb, 0x17, 0x0a, 0x4c, 0x80, 0x22, 0xcf, 0x13, - 0xa3, 0xf2, 0x3e, 0xb8, 0x4f, 0x6d, 0x58, 0xfe, 0xa8, 0x73, 0x98, 0x0e, 0x1d, 0x3e, 0x1b, 0x22, - 0xe9, 0x59, 0xf5, 0x1f, 0x35, 0x87, 0x36, 0xbd, 0x8f, 0x07, 0x84, 0xff, 0xb8, 0x33, 0xd8, 0x1f, - 0x1a, 0x9c, 0x5d, 0x9a, 0x79, 0x4f, 0x75, 0x84, 0xc9, 0x73, 0x25, 0x3e, 0xab, 0x63, 0x2b, 0xf5, - 0x7c, 0x77, 0xd2, 0x02, 0x17, 0x0c, 0x2b, 0xff, 0x89, 0x4a, 0x23, 0xb1, 0xad, 0xf7, 0xd1, 0x9d, - 0x98, 0x6d, 0xf9, 0xe3, 0x99, 0xf3, 0xb0, 0xff, 0x17, 0x0d, 0xc4, 0x76, 0x9b, 0x89, 0x95, 0x78, - 0xa7, 0xee, 0xee, 0xfd, 0x5a, 0x08, 0xa5, 0xd8, 0x54, 0xd2, 0x9f, 0x74, 0x79, 0xbf, 0xbe, 0xbb, - 0x39, 0x7c, 0x69, 0xf2, 0x8e, 0x29, 0xdd, 0x48, 0xba, 0x57, 0xc5, 0x5a, 0x74, 0x72, 0xfe, 0x7b, - 0x15, 0x38, 0xb7, 0xab, 0xc0, 0xf9, 0xbb, 0x0a, 0x9c, 0x9f, 0xeb, 0x60, 0xeb, 0x76, 0x1d, 0x6c, - 0xfd, 0x59, 0x07, 0x5b, 0xdf, 0x8e, 0x0b, 0x26, 0xaf, 0x9a, 0x2c, 0xa4, 0x58, 0x46, 0xe7, 0xdd, - 0x68, 0x97, 0x6a, 0xf3, 0x14, 0x97, 0x91, 0x79, 0x23, 0x3f, 0xfe, 0x7b, 0x25, 0xf2, 0xba, 0x06, - 0x91, 0x8d, 0xbb, 0xc7, 0xf1, 0xfe, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x95, 0x6e, 0x7d, 0x2b, - 0x63, 0x03, 0x00, 0x00, -} - -func (m *SuperNode) 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 *SuperNode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SuperNode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SupernodeAccount) > 0 { - i -= len(m.SupernodeAccount) - copy(dAtA[i:], m.SupernodeAccount) - i = encodeVarintSuperNode(dAtA, i, uint64(len(m.SupernodeAccount))) - i-- - dAtA[i] = 0x3a - } - if m.Metrics != nil { - { - size, err := m.Metrics.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSuperNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintSuperNode(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x2a - } - if len(m.PrevIpAddresses) > 0 { - for iNdEx := len(m.PrevIpAddresses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.PrevIpAddresses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSuperNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Evidence) > 0 { - for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSuperNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.States) > 0 { - for iNdEx := len(m.States) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.States[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSuperNode(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintSuperNode(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintSuperNode(dAtA []byte, offset int, v uint64) int { - offset -= sovSuperNode(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SuperNode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovSuperNode(uint64(l)) - } - if len(m.States) > 0 { - for _, e := range m.States { - l = e.Size() - n += 1 + l + sovSuperNode(uint64(l)) - } - } - if len(m.Evidence) > 0 { - for _, e := range m.Evidence { - l = e.Size() - n += 1 + l + sovSuperNode(uint64(l)) - } - } - if len(m.PrevIpAddresses) > 0 { - for _, e := range m.PrevIpAddresses { - l = e.Size() - n += 1 + l + sovSuperNode(uint64(l)) - } - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovSuperNode(uint64(l)) - } - if m.Metrics != nil { - l = m.Metrics.Size() - n += 1 + l + sovSuperNode(uint64(l)) - } - l = len(m.SupernodeAccount) - if l > 0 { - n += 1 + l + sovSuperNode(uint64(l)) - } - return n -} - -func sovSuperNode(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSuperNode(x uint64) (n int) { - return sovSuperNode(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SuperNode) 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 ErrIntOverflowSuperNode - } - 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: SuperNode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SuperNode: 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 ErrIntOverflowSuperNode - } - 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 ErrInvalidLengthSuperNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSuperNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field States", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSuperNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSuperNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSuperNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.States = append(m.States, &SuperNodeStateRecord{}) - if err := m.States[len(m.States)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSuperNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSuperNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSuperNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Evidence = append(m.Evidence, &Evidence{}) - if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PrevIpAddresses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSuperNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSuperNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSuperNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PrevIpAddresses = append(m.PrevIpAddresses, &IPAddressHistory{}) - if err := m.PrevIpAddresses[len(m.PrevIpAddresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSuperNode - } - 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 ErrInvalidLengthSuperNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSuperNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSuperNode - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSuperNode - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSuperNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metrics == nil { - m.Metrics = &MetricsAggregate{} - } - if err := m.Metrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSuperNode - } - 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 ErrInvalidLengthSuperNode - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSuperNode - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SupernodeAccount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSuperNode(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSuperNode - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSuperNode(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSuperNode - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSuperNode - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSuperNode - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSuperNode - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSuperNode - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSuperNode - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSuperNode = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSuperNode = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSuperNode = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/supernode/types/supernode_state.pb.go b/gen/lumera/supernode/types/supernode_state.pb.go deleted file mode 100644 index 01639514..00000000 --- a/gen/lumera/supernode/types/supernode_state.pb.go +++ /dev/null @@ -1,387 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/supernode/supernode_state.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type SuperNodeState int32 - -const ( - SuperNodeStateUnspecified SuperNodeState = 0 - SuperNodeStateActive SuperNodeState = 1 - SuperNodeStateDisabled SuperNodeState = 2 - SuperNodeStateStopped SuperNodeState = 3 - SuperNodeStatePenalized SuperNodeState = 4 -) - -var SuperNodeState_name = map[int32]string{ - 0: "SUPERNODE_STATE_UNSPECIFIED", - 1: "SUPERNODE_STATE_ACTIVE", - 2: "SUPERNODE_STATE_DISABLED", - 3: "SUPERNODE_STATE_STOPPED", - 4: "SUPERNODE_STATE_PENALIZED", -} - -var SuperNodeState_value = map[string]int32{ - "SUPERNODE_STATE_UNSPECIFIED": 0, - "SUPERNODE_STATE_ACTIVE": 1, - "SUPERNODE_STATE_DISABLED": 2, - "SUPERNODE_STATE_STOPPED": 3, - "SUPERNODE_STATE_PENALIZED": 4, -} - -func (x SuperNodeState) String() string { - return proto.EnumName(SuperNodeState_name, int32(x)) -} - -func (SuperNodeState) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_1e8544c7b0c375ed, []int{0} -} - -type SuperNodeStateRecord struct { - State SuperNodeState `protobuf:"varint,1,opt,name=state,proto3,enum=lumera.supernode.SuperNodeState" json:"state,omitempty" yaml:"state"` - Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *SuperNodeStateRecord) Reset() { *m = SuperNodeStateRecord{} } -func (m *SuperNodeStateRecord) String() string { return proto.CompactTextString(m) } -func (*SuperNodeStateRecord) ProtoMessage() {} -func (*SuperNodeStateRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_1e8544c7b0c375ed, []int{0} -} -func (m *SuperNodeStateRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SuperNodeStateRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SuperNodeStateRecord.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 *SuperNodeStateRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_SuperNodeStateRecord.Merge(m, src) -} -func (m *SuperNodeStateRecord) XXX_Size() int { - return m.Size() -} -func (m *SuperNodeStateRecord) XXX_DiscardUnknown() { - xxx_messageInfo_SuperNodeStateRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_SuperNodeStateRecord proto.InternalMessageInfo - -func (m *SuperNodeStateRecord) GetState() SuperNodeState { - if m != nil { - return m.State - } - return SuperNodeStateUnspecified -} - -func (m *SuperNodeStateRecord) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func init() { - proto.RegisterEnum("lumera.supernode.SuperNodeState", SuperNodeState_name, SuperNodeState_value) - proto.RegisterType((*SuperNodeStateRecord)(nil), "lumera.supernode.SuperNodeStateRecord") -} - -func init() { - proto.RegisterFile("lumera/supernode/supernode_state.proto", fileDescriptor_1e8544c7b0c375ed) -} - -var fileDescriptor_1e8544c7b0c375ed = []byte{ - // 416 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xcb, 0x29, 0xcd, 0x4d, - 0x2d, 0x4a, 0xd4, 0x2f, 0x2e, 0x2d, 0x48, 0x2d, 0xca, 0xcb, 0x4f, 0x49, 0x45, 0xb0, 0xe2, 0x8b, - 0x4b, 0x12, 0x4b, 0x52, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0x04, 0x20, 0xea, 0xf4, 0xe0, - 0xb2, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0x49, 0x7d, 0x10, 0x0b, 0xa2, 0x4e, 0xa9, 0x82, - 0x4b, 0x24, 0x18, 0xa4, 0xc4, 0x2f, 0x3f, 0x25, 0x35, 0x18, 0xa4, 0x3f, 0x28, 0x35, 0x39, 0xbf, - 0x28, 0x45, 0xc8, 0x83, 0x8b, 0x15, 0x6c, 0x9c, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x9f, 0x91, 0x82, - 0x1e, 0xba, 0x79, 0x7a, 0xa8, 0xda, 0x9c, 0x04, 0x3e, 0xdd, 0x93, 0xe7, 0xa9, 0x4c, 0xcc, 0xcd, - 0xb1, 0x52, 0x02, 0x6b, 0x54, 0x0a, 0x82, 0x18, 0x20, 0x24, 0xc6, 0xc5, 0x96, 0x91, 0x9a, 0x99, - 0x9e, 0x51, 0x22, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x1c, 0x04, 0xe5, 0x69, 0xed, 0x63, 0xe2, 0xe2, - 0x43, 0x35, 0x43, 0xc8, 0x8e, 0x4b, 0x3a, 0x38, 0x34, 0xc0, 0x35, 0xc8, 0xcf, 0xdf, 0xc5, 0x35, - 0x3e, 0x38, 0xc4, 0x31, 0xc4, 0x35, 0x3e, 0xd4, 0x2f, 0x38, 0xc0, 0xd5, 0xd9, 0xd3, 0xcd, 0xd3, - 0xd5, 0x45, 0x80, 0x41, 0x4a, 0xb6, 0x6b, 0xae, 0x82, 0x24, 0xaa, 0xa6, 0xd0, 0xbc, 0xe2, 0x82, - 0xd4, 0xe4, 0xcc, 0xb4, 0xcc, 0xd4, 0x14, 0x21, 0x13, 0x2e, 0x31, 0x74, 0xfd, 0x8e, 0xce, 0x21, - 0x9e, 0x61, 0xae, 0x02, 0x8c, 0x52, 0x12, 0x5d, 0x73, 0x15, 0xd0, 0xbc, 0xea, 0x98, 0x5c, 0x92, - 0x59, 0x96, 0x2a, 0x64, 0xc1, 0x25, 0x81, 0xae, 0xcb, 0xc5, 0x33, 0xd8, 0xd1, 0xc9, 0xc7, 0xd5, - 0x45, 0x80, 0x49, 0x4a, 0xaa, 0x6b, 0xae, 0x82, 0x18, 0xaa, 0x3e, 0x97, 0xcc, 0xe2, 0xc4, 0xa4, - 0x9c, 0xd4, 0x14, 0x21, 0x33, 0x2e, 0x71, 0x74, 0x9d, 0xc1, 0x21, 0xfe, 0x01, 0x01, 0xae, 0x2e, - 0x02, 0xcc, 0x52, 0x92, 0x5d, 0x73, 0x15, 0x44, 0x51, 0x35, 0x06, 0x97, 0xe4, 0x17, 0x14, 0xa4, - 0xa6, 0x08, 0x59, 0x71, 0x49, 0xa2, 0xeb, 0x0b, 0x70, 0xf5, 0x73, 0xf4, 0xf1, 0x8c, 0x72, 0x75, - 0x11, 0x60, 0x91, 0x92, 0xee, 0x9a, 0xab, 0x20, 0x8e, 0xaa, 0x33, 0x20, 0x35, 0x2f, 0x31, 0x27, - 0xb3, 0x2a, 0x35, 0x45, 0x8a, 0xa3, 0x63, 0xb1, 0x1c, 0xc3, 0x8a, 0x25, 0x72, 0x8c, 0x4e, 0x3e, - 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, - 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x94, 0x9e, 0x59, 0x92, 0x51, - 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0xef, 0x03, 0x8e, 0xb7, 0x00, 0x50, 0x64, 0x27, 0xe7, 0xe7, - 0xe8, 0x43, 0x93, 0x4f, 0x05, 0x52, 0x02, 0x2a, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, 0xa7, - 0x07, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x34, 0xdd, 0x16, 0x14, 0x61, 0x02, 0x00, 0x00, -} - -func (m *SuperNodeStateRecord) 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 *SuperNodeStateRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SuperNodeStateRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintSupernodeState(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x10 - } - if m.State != 0 { - i = encodeVarintSupernodeState(dAtA, i, uint64(m.State)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintSupernodeState(dAtA []byte, offset int, v uint64) int { - offset -= sovSupernodeState(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SuperNodeStateRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.State != 0 { - n += 1 + sovSupernodeState(uint64(m.State)) - } - if m.Height != 0 { - n += 1 + sovSupernodeState(uint64(m.Height)) - } - return n -} - -func sovSupernodeState(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSupernodeState(x uint64) (n int) { - return sovSupernodeState(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SuperNodeStateRecord) 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 ErrIntOverflowSupernodeState - } - 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: SuperNodeStateRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SuperNodeStateRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - m.State = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSupernodeState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.State |= SuperNodeState(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSupernodeState - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSupernodeState(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSupernodeState - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSupernodeState(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSupernodeState - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSupernodeState - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSupernodeState - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSupernodeState - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSupernodeState - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSupernodeState - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSupernodeState = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSupernodeState = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSupernodeState = fmt.Errorf("proto: unexpected end of group") -) diff --git a/gen/lumera/supernode/types/tx.pb.go b/gen/lumera/supernode/types/tx.pb.go deleted file mode 100644 index 71b30074..00000000 --- a/gen/lumera/supernode/types/tx.pb.go +++ /dev/null @@ -1,2852 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lumera/supernode/tx.proto - -package types - -import ( - context "context" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// MsgUpdateParams is the Msg/UpdateParams request type. -type MsgUpdateParams struct { - // authority is the address that controls the module (defaults to x/gov unless overwritten). - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // NOTE: All parameters must be supplied. - Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` -} - -func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } -func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParams) ProtoMessage() {} -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{0} -} -func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParams.Merge(m, src) -} -func (m *MsgUpdateParams) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParams) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo - -func (m *MsgUpdateParams) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgUpdateParams) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -type MsgUpdateParamsResponse struct { -} - -func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } -func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateParamsResponse) ProtoMessage() {} -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{1} -} -func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) -} -func (m *MsgUpdateParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo - -type MsgRegisterSupernode struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validatorAddress,proto3" json:"validatorAddress,omitempty"` - IpAddress string `protobuf:"bytes,3,opt,name=ipAddress,proto3" json:"ipAddress,omitempty"` - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - SupernodeAccount string `protobuf:"bytes,5,opt,name=supernodeAccount,proto3" json:"supernodeAccount,omitempty"` -} - -func (m *MsgRegisterSupernode) Reset() { *m = MsgRegisterSupernode{} } -func (m *MsgRegisterSupernode) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterSupernode) ProtoMessage() {} -func (*MsgRegisterSupernode) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{2} -} -func (m *MsgRegisterSupernode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterSupernode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterSupernode.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 *MsgRegisterSupernode) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterSupernode.Merge(m, src) -} -func (m *MsgRegisterSupernode) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterSupernode) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterSupernode.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterSupernode proto.InternalMessageInfo - -func (m *MsgRegisterSupernode) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgRegisterSupernode) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *MsgRegisterSupernode) GetIpAddress() string { - if m != nil { - return m.IpAddress - } - return "" -} - -func (m *MsgRegisterSupernode) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *MsgRegisterSupernode) GetSupernodeAccount() string { - if m != nil { - return m.SupernodeAccount - } - return "" -} - -type MsgRegisterSupernodeResponse struct { -} - -func (m *MsgRegisterSupernodeResponse) Reset() { *m = MsgRegisterSupernodeResponse{} } -func (m *MsgRegisterSupernodeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgRegisterSupernodeResponse) ProtoMessage() {} -func (*MsgRegisterSupernodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{3} -} -func (m *MsgRegisterSupernodeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgRegisterSupernodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgRegisterSupernodeResponse.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 *MsgRegisterSupernodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgRegisterSupernodeResponse.Merge(m, src) -} -func (m *MsgRegisterSupernodeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgRegisterSupernodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgRegisterSupernodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgRegisterSupernodeResponse proto.InternalMessageInfo - -type MsgDeregisterSupernode struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validatorAddress,proto3" json:"validatorAddress,omitempty"` -} - -func (m *MsgDeregisterSupernode) Reset() { *m = MsgDeregisterSupernode{} } -func (m *MsgDeregisterSupernode) String() string { return proto.CompactTextString(m) } -func (*MsgDeregisterSupernode) ProtoMessage() {} -func (*MsgDeregisterSupernode) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{4} -} -func (m *MsgDeregisterSupernode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeregisterSupernode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeregisterSupernode.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 *MsgDeregisterSupernode) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeregisterSupernode.Merge(m, src) -} -func (m *MsgDeregisterSupernode) XXX_Size() int { - return m.Size() -} -func (m *MsgDeregisterSupernode) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeregisterSupernode.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeregisterSupernode proto.InternalMessageInfo - -func (m *MsgDeregisterSupernode) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgDeregisterSupernode) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -type MsgDeregisterSupernodeResponse struct { -} - -func (m *MsgDeregisterSupernodeResponse) Reset() { *m = MsgDeregisterSupernodeResponse{} } -func (m *MsgDeregisterSupernodeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgDeregisterSupernodeResponse) ProtoMessage() {} -func (*MsgDeregisterSupernodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{5} -} -func (m *MsgDeregisterSupernodeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgDeregisterSupernodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgDeregisterSupernodeResponse.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 *MsgDeregisterSupernodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgDeregisterSupernodeResponse.Merge(m, src) -} -func (m *MsgDeregisterSupernodeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgDeregisterSupernodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgDeregisterSupernodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgDeregisterSupernodeResponse proto.InternalMessageInfo - -type MsgStartSupernode struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validatorAddress,proto3" json:"validatorAddress,omitempty"` -} - -func (m *MsgStartSupernode) Reset() { *m = MsgStartSupernode{} } -func (m *MsgStartSupernode) String() string { return proto.CompactTextString(m) } -func (*MsgStartSupernode) ProtoMessage() {} -func (*MsgStartSupernode) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{6} -} -func (m *MsgStartSupernode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgStartSupernode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgStartSupernode.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 *MsgStartSupernode) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgStartSupernode.Merge(m, src) -} -func (m *MsgStartSupernode) XXX_Size() int { - return m.Size() -} -func (m *MsgStartSupernode) XXX_DiscardUnknown() { - xxx_messageInfo_MsgStartSupernode.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgStartSupernode proto.InternalMessageInfo - -func (m *MsgStartSupernode) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgStartSupernode) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -type MsgStartSupernodeResponse struct { -} - -func (m *MsgStartSupernodeResponse) Reset() { *m = MsgStartSupernodeResponse{} } -func (m *MsgStartSupernodeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgStartSupernodeResponse) ProtoMessage() {} -func (*MsgStartSupernodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{7} -} -func (m *MsgStartSupernodeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgStartSupernodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgStartSupernodeResponse.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 *MsgStartSupernodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgStartSupernodeResponse.Merge(m, src) -} -func (m *MsgStartSupernodeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgStartSupernodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgStartSupernodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgStartSupernodeResponse proto.InternalMessageInfo - -type MsgStopSupernode struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validatorAddress,proto3" json:"validatorAddress,omitempty"` - Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` -} - -func (m *MsgStopSupernode) Reset() { *m = MsgStopSupernode{} } -func (m *MsgStopSupernode) String() string { return proto.CompactTextString(m) } -func (*MsgStopSupernode) ProtoMessage() {} -func (*MsgStopSupernode) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{8} -} -func (m *MsgStopSupernode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgStopSupernode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgStopSupernode.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 *MsgStopSupernode) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgStopSupernode.Merge(m, src) -} -func (m *MsgStopSupernode) XXX_Size() int { - return m.Size() -} -func (m *MsgStopSupernode) XXX_DiscardUnknown() { - xxx_messageInfo_MsgStopSupernode.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgStopSupernode proto.InternalMessageInfo - -func (m *MsgStopSupernode) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgStopSupernode) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *MsgStopSupernode) GetReason() string { - if m != nil { - return m.Reason - } - return "" -} - -type MsgStopSupernodeResponse struct { -} - -func (m *MsgStopSupernodeResponse) Reset() { *m = MsgStopSupernodeResponse{} } -func (m *MsgStopSupernodeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgStopSupernodeResponse) ProtoMessage() {} -func (*MsgStopSupernodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{9} -} -func (m *MsgStopSupernodeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgStopSupernodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgStopSupernodeResponse.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 *MsgStopSupernodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgStopSupernodeResponse.Merge(m, src) -} -func (m *MsgStopSupernodeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgStopSupernodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgStopSupernodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgStopSupernodeResponse proto.InternalMessageInfo - -type MsgUpdateSupernode struct { - Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validatorAddress,proto3" json:"validatorAddress,omitempty"` - IpAddress string `protobuf:"bytes,3,opt,name=ipAddress,proto3" json:"ipAddress,omitempty"` - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - SupernodeAccount string `protobuf:"bytes,5,opt,name=supernodeAccount,proto3" json:"supernodeAccount,omitempty"` -} - -func (m *MsgUpdateSupernode) Reset() { *m = MsgUpdateSupernode{} } -func (m *MsgUpdateSupernode) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateSupernode) ProtoMessage() {} -func (*MsgUpdateSupernode) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{10} -} -func (m *MsgUpdateSupernode) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateSupernode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateSupernode.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 *MsgUpdateSupernode) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateSupernode.Merge(m, src) -} -func (m *MsgUpdateSupernode) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateSupernode) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateSupernode.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateSupernode proto.InternalMessageInfo - -func (m *MsgUpdateSupernode) GetCreator() string { - if m != nil { - return m.Creator - } - return "" -} - -func (m *MsgUpdateSupernode) GetValidatorAddress() string { - if m != nil { - return m.ValidatorAddress - } - return "" -} - -func (m *MsgUpdateSupernode) GetIpAddress() string { - if m != nil { - return m.IpAddress - } - return "" -} - -func (m *MsgUpdateSupernode) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *MsgUpdateSupernode) GetSupernodeAccount() string { - if m != nil { - return m.SupernodeAccount - } - return "" -} - -type MsgUpdateSupernodeResponse struct { -} - -func (m *MsgUpdateSupernodeResponse) Reset() { *m = MsgUpdateSupernodeResponse{} } -func (m *MsgUpdateSupernodeResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpdateSupernodeResponse) ProtoMessage() {} -func (*MsgUpdateSupernodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_cbe7d1f063c0233d, []int{11} -} -func (m *MsgUpdateSupernodeResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpdateSupernodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpdateSupernodeResponse.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 *MsgUpdateSupernodeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpdateSupernodeResponse.Merge(m, src) -} -func (m *MsgUpdateSupernodeResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgUpdateSupernodeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpdateSupernodeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpdateSupernodeResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*MsgUpdateParams)(nil), "lumera.supernode.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "lumera.supernode.MsgUpdateParamsResponse") - proto.RegisterType((*MsgRegisterSupernode)(nil), "lumera.supernode.MsgRegisterSupernode") - proto.RegisterType((*MsgRegisterSupernodeResponse)(nil), "lumera.supernode.MsgRegisterSupernodeResponse") - proto.RegisterType((*MsgDeregisterSupernode)(nil), "lumera.supernode.MsgDeregisterSupernode") - proto.RegisterType((*MsgDeregisterSupernodeResponse)(nil), "lumera.supernode.MsgDeregisterSupernodeResponse") - proto.RegisterType((*MsgStartSupernode)(nil), "lumera.supernode.MsgStartSupernode") - proto.RegisterType((*MsgStartSupernodeResponse)(nil), "lumera.supernode.MsgStartSupernodeResponse") - proto.RegisterType((*MsgStopSupernode)(nil), "lumera.supernode.MsgStopSupernode") - proto.RegisterType((*MsgStopSupernodeResponse)(nil), "lumera.supernode.MsgStopSupernodeResponse") - proto.RegisterType((*MsgUpdateSupernode)(nil), "lumera.supernode.MsgUpdateSupernode") - proto.RegisterType((*MsgUpdateSupernodeResponse)(nil), "lumera.supernode.MsgUpdateSupernodeResponse") -} - -func init() { proto.RegisterFile("lumera/supernode/tx.proto", fileDescriptor_cbe7d1f063c0233d) } - -var fileDescriptor_cbe7d1f063c0233d = []byte{ - // 626 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0x3f, 0x6f, 0xd3, 0x5e, - 0x14, 0x8d, 0x7f, 0xfd, 0xf3, 0x53, 0x2e, 0x85, 0x36, 0x26, 0x6a, 0x1d, 0x13, 0x4c, 0x30, 0x08, - 0x85, 0x00, 0x36, 0x04, 0xc1, 0x50, 0xa6, 0x46, 0x8c, 0x8d, 0x54, 0x39, 0x62, 0x41, 0x48, 0x95, - 0xe3, 0x3c, 0xbd, 0x5a, 0xc4, 0x7e, 0xe6, 0xbd, 0x97, 0xa8, 0x5d, 0x10, 0x62, 0x64, 0xe2, 0x63, - 0x30, 0x66, 0x60, 0x65, 0xef, 0x80, 0x50, 0xc5, 0xc4, 0x84, 0x50, 0x32, 0xe4, 0x1b, 0x30, 0x23, - 0xff, 0x4d, 0x63, 0x1b, 0x9a, 0x81, 0x0e, 0x2c, 0x49, 0xee, 0xbd, 0xe7, 0xdd, 0x73, 0x4e, 0xfc, - 0xae, 0x2f, 0x54, 0xfa, 0x03, 0x07, 0x51, 0x53, 0x67, 0x03, 0x0f, 0x51, 0x97, 0xf4, 0x90, 0xce, - 0x0f, 0x35, 0x8f, 0x12, 0x4e, 0xc4, 0x8d, 0xb0, 0xa4, 0x25, 0x25, 0xb9, 0x64, 0x3a, 0xb6, 0x4b, - 0xf4, 0xe0, 0x33, 0x04, 0xc9, 0x5b, 0x16, 0x61, 0x0e, 0x61, 0xba, 0xc3, 0xb0, 0x3e, 0x7c, 0xe0, - 0x7f, 0x45, 0x85, 0x4a, 0x58, 0xd8, 0x0f, 0x22, 0x3d, 0x0c, 0xa2, 0x52, 0x19, 0x13, 0x4c, 0xc2, - 0xbc, 0xff, 0x2b, 0xca, 0x5e, 0xcd, 0x28, 0xf1, 0x4c, 0x6a, 0x3a, 0xd1, 0x21, 0xf5, 0x93, 0x00, - 0xeb, 0x6d, 0x86, 0x9f, 0x79, 0x3d, 0x93, 0xa3, 0xbd, 0xa0, 0x22, 0x3e, 0x86, 0xa2, 0x39, 0xe0, - 0x07, 0x84, 0xda, 0xfc, 0x48, 0x12, 0x6a, 0x42, 0xbd, 0xd8, 0x92, 0xbe, 0x7e, 0xbc, 0x57, 0x8e, - 0xd8, 0x76, 0x7a, 0x3d, 0x8a, 0x18, 0xeb, 0x70, 0x6a, 0xbb, 0xd8, 0x98, 0x41, 0xc5, 0x27, 0xb0, - 0x1a, 0xf6, 0x96, 0xfe, 0xab, 0x09, 0xf5, 0x0b, 0x4d, 0x49, 0x4b, 0x5b, 0xd5, 0x42, 0x86, 0x56, - 0xf1, 0xf8, 0xfb, 0xb5, 0xc2, 0x87, 0xe9, 0xa8, 0x21, 0x18, 0xd1, 0x91, 0xed, 0x47, 0x6f, 0xa7, - 0xa3, 0xc6, 0xac, 0xd9, 0xbb, 0xe9, 0xa8, 0xa1, 0x46, 0xd2, 0x0f, 0x4f, 0x89, 0x4f, 0x69, 0x55, - 0x2b, 0xb0, 0x95, 0x4a, 0x19, 0x88, 0x79, 0xc4, 0x65, 0x48, 0xfd, 0x22, 0x40, 0xb9, 0xcd, 0xb0, - 0x81, 0xb0, 0xcd, 0x38, 0xa2, 0x9d, 0xb8, 0x87, 0x28, 0xc1, 0xff, 0x16, 0x45, 0x26, 0x27, 0x34, - 0x74, 0x67, 0xc4, 0xa1, 0xd8, 0x80, 0x8d, 0xa1, 0xd9, 0xb7, 0x7b, 0x7e, 0x10, 0xd9, 0x0c, 0xbc, - 0x14, 0x8d, 0x4c, 0x5e, 0xac, 0x42, 0xd1, 0xf6, 0x62, 0xd0, 0x52, 0x00, 0x9a, 0x25, 0x7c, 0x8e, - 0x21, 0xa2, 0xcc, 0x26, 0xae, 0xb4, 0x1c, 0x72, 0x44, 0xa1, 0xcf, 0x91, 0xd8, 0xd9, 0xb1, 0x2c, - 0x32, 0x70, 0xb9, 0xb4, 0x12, 0x72, 0xa4, 0xf3, 0xdb, 0x6b, 0xfe, 0x9f, 0x12, 0xab, 0x53, 0x15, - 0xa8, 0xe6, 0xf9, 0x49, 0x0c, 0xf7, 0x61, 0xb3, 0xcd, 0xf0, 0x53, 0x44, 0xcf, 0xc7, 0x71, 0x4a, - 0x4d, 0x0d, 0x94, 0x7c, 0xb6, 0x44, 0x0f, 0x86, 0x52, 0x9b, 0xe1, 0x0e, 0x37, 0x29, 0x3f, 0x5f, - 0x29, 0x57, 0xa0, 0x92, 0x21, 0x4a, 0x54, 0xbc, 0x86, 0x8d, 0xa0, 0x48, 0xbc, 0xbf, 0x7d, 0x03, - 0x36, 0x61, 0x95, 0x22, 0x93, 0x11, 0x37, 0x7a, 0xfc, 0x51, 0x94, 0x12, 0x27, 0x83, 0x94, 0xe6, - 0x4f, 0xb4, 0x7d, 0x16, 0x40, 0x4c, 0xae, 0xef, 0xbf, 0x7f, 0x41, 0xab, 0x20, 0x67, 0xdd, 0xc4, - 0x66, 0x9b, 0x3f, 0x97, 0x61, 0xa9, 0xcd, 0xb0, 0xf8, 0x02, 0xd6, 0xe6, 0x5e, 0x37, 0xd7, 0xb3, - 0xaf, 0x89, 0xd4, 0x48, 0xcb, 0xb7, 0xcf, 0x84, 0xc4, 0x2c, 0xe2, 0x4b, 0x28, 0x65, 0x27, 0xfe, - 0x56, 0xee, 0xf9, 0x0c, 0x4e, 0xd6, 0x16, 0xc3, 0x25, 0x64, 0xaf, 0xe0, 0x72, 0xde, 0xb8, 0xd5, - 0x73, 0xdb, 0xe4, 0x20, 0xe5, 0xfb, 0x8b, 0x22, 0x13, 0xca, 0x2e, 0x5c, 0x4a, 0x4d, 0xd4, 0x8d, - 0xdc, 0x1e, 0xf3, 0x20, 0xf9, 0xce, 0x02, 0xa0, 0x84, 0x63, 0x1f, 0x2e, 0xce, 0xcf, 0x8b, 0xfa, - 0x9b, 0xd3, 0xa7, 0x30, 0x72, 0xe3, 0x6c, 0x4c, 0x42, 0x80, 0x60, 0x3d, 0x7d, 0xe7, 0x6f, 0xfe, - 0xe1, 0x11, 0xcf, 0x48, 0xee, 0x2e, 0x82, 0x8a, 0x69, 0xe4, 0x95, 0x37, 0xfe, 0x8a, 0x69, 0xed, - 0x1e, 0x8f, 0x15, 0xe1, 0x64, 0xac, 0x08, 0x3f, 0xc6, 0x8a, 0xf0, 0x7e, 0xa2, 0x14, 0x4e, 0x26, - 0x4a, 0xe1, 0xdb, 0x44, 0x29, 0x3c, 0x6f, 0x62, 0x9b, 0x1f, 0x0c, 0xba, 0x9a, 0x45, 0x1c, 0x7d, - 0x37, 0x68, 0xbc, 0xe7, 0x6f, 0x45, 0x8b, 0xf4, 0xf5, 0x9c, 0xdd, 0xc3, 0x8f, 0x3c, 0xc4, 0xba, - 0xab, 0xc1, 0xe2, 0x7c, 0xf8, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x0e, 0xaa, 0x77, 0x37, 0xe3, 0x07, - 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// MsgClient is the client API for Msg service. -// -// 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 { - // UpdateParams defines a (governance) operation for updating the module - // parameters. The authority defaults to the x/gov module account. - UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - RegisterSupernode(ctx context.Context, in *MsgRegisterSupernode, opts ...grpc.CallOption) (*MsgRegisterSupernodeResponse, error) - DeregisterSupernode(ctx context.Context, in *MsgDeregisterSupernode, opts ...grpc.CallOption) (*MsgDeregisterSupernodeResponse, error) - StartSupernode(ctx context.Context, in *MsgStartSupernode, opts ...grpc.CallOption) (*MsgStartSupernodeResponse, error) - StopSupernode(ctx context.Context, in *MsgStopSupernode, opts ...grpc.CallOption) (*MsgStopSupernodeResponse, error) - UpdateSupernode(ctx context.Context, in *MsgUpdateSupernode, opts ...grpc.CallOption) (*MsgUpdateSupernodeResponse, error) -} - -type msgClient struct { - cc grpc1.ClientConn -} - -func NewMsgClient(cc grpc1.ClientConn) MsgClient { - return &msgClient{cc} -} - -func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { - out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/lumera.supernode.Msg/UpdateParams", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) RegisterSupernode(ctx context.Context, in *MsgRegisterSupernode, opts ...grpc.CallOption) (*MsgRegisterSupernodeResponse, error) { - out := new(MsgRegisterSupernodeResponse) - err := c.cc.Invoke(ctx, "/lumera.supernode.Msg/RegisterSupernode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) DeregisterSupernode(ctx context.Context, in *MsgDeregisterSupernode, opts ...grpc.CallOption) (*MsgDeregisterSupernodeResponse, error) { - out := new(MsgDeregisterSupernodeResponse) - err := c.cc.Invoke(ctx, "/lumera.supernode.Msg/DeregisterSupernode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) StartSupernode(ctx context.Context, in *MsgStartSupernode, opts ...grpc.CallOption) (*MsgStartSupernodeResponse, error) { - out := new(MsgStartSupernodeResponse) - err := c.cc.Invoke(ctx, "/lumera.supernode.Msg/StartSupernode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) StopSupernode(ctx context.Context, in *MsgStopSupernode, opts ...grpc.CallOption) (*MsgStopSupernodeResponse, error) { - out := new(MsgStopSupernodeResponse) - err := c.cc.Invoke(ctx, "/lumera.supernode.Msg/StopSupernode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *msgClient) UpdateSupernode(ctx context.Context, in *MsgUpdateSupernode, opts ...grpc.CallOption) (*MsgUpdateSupernodeResponse, error) { - out := new(MsgUpdateSupernodeResponse) - err := c.cc.Invoke(ctx, "/lumera.supernode.Msg/UpdateSupernode", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// MsgServer is the server API for Msg service. -type MsgServer interface { - // UpdateParams defines a (governance) operation for updating the module - // parameters. The authority defaults to the x/gov module account. - UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - RegisterSupernode(context.Context, *MsgRegisterSupernode) (*MsgRegisterSupernodeResponse, error) - DeregisterSupernode(context.Context, *MsgDeregisterSupernode) (*MsgDeregisterSupernodeResponse, error) - StartSupernode(context.Context, *MsgStartSupernode) (*MsgStartSupernodeResponse, error) - StopSupernode(context.Context, *MsgStopSupernode) (*MsgStopSupernodeResponse, error) - UpdateSupernode(context.Context, *MsgUpdateSupernode) (*MsgUpdateSupernodeResponse, error) -} - -// UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct { -} - -func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") -} -func (*UnimplementedMsgServer) RegisterSupernode(ctx context.Context, req *MsgRegisterSupernode) (*MsgRegisterSupernodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterSupernode not implemented") -} -func (*UnimplementedMsgServer) DeregisterSupernode(ctx context.Context, req *MsgDeregisterSupernode) (*MsgDeregisterSupernodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeregisterSupernode not implemented") -} -func (*UnimplementedMsgServer) StartSupernode(ctx context.Context, req *MsgStartSupernode) (*MsgStartSupernodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StartSupernode not implemented") -} -func (*UnimplementedMsgServer) StopSupernode(ctx context.Context, req *MsgStopSupernode) (*MsgStopSupernodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StopSupernode not implemented") -} -func (*UnimplementedMsgServer) UpdateSupernode(ctx context.Context, req *MsgUpdateSupernode) (*MsgUpdateSupernodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSupernode not implemented") -} - -func RegisterMsgServer(s grpc1.Server, srv MsgServer) { - s.RegisterService(&_Msg_serviceDesc, srv) -} - -func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateParams) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateParams(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.supernode.Msg/UpdateParams", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_RegisterSupernode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgRegisterSupernode) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).RegisterSupernode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.supernode.Msg/RegisterSupernode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterSupernode(ctx, req.(*MsgRegisterSupernode)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_DeregisterSupernode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgDeregisterSupernode) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).DeregisterSupernode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.supernode.Msg/DeregisterSupernode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).DeregisterSupernode(ctx, req.(*MsgDeregisterSupernode)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_StartSupernode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgStartSupernode) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).StartSupernode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.supernode.Msg/StartSupernode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).StartSupernode(ctx, req.(*MsgStartSupernode)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_StopSupernode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgStopSupernode) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).StopSupernode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.supernode.Msg/StopSupernode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).StopSupernode(ctx, req.(*MsgStopSupernode)) - } - return interceptor(ctx, in, info, handler) -} - -func _Msg_UpdateSupernode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpdateSupernode) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).UpdateSupernode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lumera.supernode.Msg/UpdateSupernode", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpdateSupernode(ctx, req.(*MsgUpdateSupernode)) - } - return interceptor(ctx, in, info, handler) -} - -var Msg_serviceDesc = _Msg_serviceDesc -var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "lumera.supernode.Msg", - HandlerType: (*MsgServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "UpdateParams", - Handler: _Msg_UpdateParams_Handler, - }, - { - MethodName: "RegisterSupernode", - Handler: _Msg_RegisterSupernode_Handler, - }, - { - MethodName: "DeregisterSupernode", - Handler: _Msg_DeregisterSupernode_Handler, - }, - { - MethodName: "StartSupernode", - Handler: _Msg_StartSupernode_Handler, - }, - { - MethodName: "StopSupernode", - Handler: _Msg_StopSupernode_Handler, - }, - { - MethodName: "UpdateSupernode", - Handler: _Msg_UpdateSupernode_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "lumera/supernode/tx.proto", -} - -func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgRegisterSupernode) 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 *MsgRegisterSupernode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRegisterSupernode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SupernodeAccount) > 0 { - i -= len(m.SupernodeAccount) - copy(dAtA[i:], m.SupernodeAccount) - i = encodeVarintTx(dAtA, i, uint64(len(m.SupernodeAccount))) - i-- - dAtA[i] = 0x2a - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintTx(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.IpAddress) > 0 { - i -= len(m.IpAddress) - copy(dAtA[i:], m.IpAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.IpAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgRegisterSupernodeResponse) 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 *MsgRegisterSupernodeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgRegisterSupernodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgDeregisterSupernode) 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 *MsgDeregisterSupernode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDeregisterSupernode) 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 = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgDeregisterSupernodeResponse) 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 *MsgDeregisterSupernodeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgDeregisterSupernodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgStartSupernode) 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 *MsgStartSupernode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgStartSupernode) 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 = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgStartSupernodeResponse) 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 *MsgStartSupernodeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgStartSupernodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgStopSupernode) 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 *MsgStopSupernode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgStopSupernode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Reason) > 0 { - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintTx(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x1a - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgStopSupernodeResponse) 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 *MsgStopSupernodeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgStopSupernodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *MsgUpdateSupernode) 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 *MsgUpdateSupernode) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateSupernode) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SupernodeAccount) > 0 { - i -= len(m.SupernodeAccount) - copy(dAtA[i:], m.SupernodeAccount) - i = encodeVarintTx(dAtA, i, uint64(len(m.SupernodeAccount))) - i-- - dAtA[i] = 0x2a - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintTx(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.IpAddress) > 0 { - i -= len(m.IpAddress) - copy(dAtA[i:], m.IpAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.IpAddress))) - i-- - dAtA[i] = 0x1a - } - if len(m.ValidatorAddress) > 0 { - i -= len(m.ValidatorAddress) - copy(dAtA[i:], m.ValidatorAddress) - i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(m.Creator) > 0 { - i -= len(m.Creator) - copy(dAtA[i:], m.Creator) - i = encodeVarintTx(dAtA, i, uint64(len(m.Creator))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpdateSupernodeResponse) 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 *MsgUpdateSupernodeResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpdateSupernodeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintTx(dAtA []byte, offset int, v uint64) int { - offset -= sovTx(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MsgUpdateParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Authority) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = m.Params.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - -func (m *MsgUpdateParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgRegisterSupernode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.IpAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.SupernodeAccount) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgRegisterSupernodeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgDeregisterSupernode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgDeregisterSupernodeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgStartSupernode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgStartSupernodeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgStopSupernode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Reason) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgStopSupernodeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *MsgUpdateSupernode) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Creator) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.ValidatorAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.IpAddress) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.SupernodeAccount) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - return n -} - -func (m *MsgUpdateSupernodeResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovTx(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTx(x uint64) (n int) { - return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgRegisterSupernode) 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: MsgRegisterSupernode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterSupernode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IpAddress", 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.IpAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", 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.SupernodeAccount = string(dAtA[iNdEx:postIndex]) - 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 *MsgRegisterSupernodeResponse) 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: MsgRegisterSupernodeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterSupernodeResponse: 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 *MsgDeregisterSupernode) 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: MsgDeregisterSupernode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeregisterSupernode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - 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 *MsgDeregisterSupernodeResponse) 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: MsgDeregisterSupernodeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgDeregisterSupernodeResponse: 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 *MsgStartSupernode) 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: MsgStartSupernode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgStartSupernode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - 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 *MsgStartSupernodeResponse) 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: MsgStartSupernodeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgStartSupernodeResponse: 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 *MsgStopSupernode) 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: MsgStopSupernode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgStopSupernode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", 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.Reason = string(dAtA[iNdEx:postIndex]) - 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 *MsgStopSupernodeResponse) 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: MsgStopSupernodeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgStopSupernodeResponse: 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 *MsgUpdateSupernode) 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: MsgUpdateSupernode: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateSupernode: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creator", 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.Creator = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 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.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IpAddress", 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.IpAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", 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.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupernodeAccount", 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.SupernodeAccount = string(dAtA[iNdEx:postIndex]) - 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 *MsgUpdateSupernodeResponse) 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: MsgUpdateSupernodeResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpdateSupernodeResponse: 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 skipTx(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTx - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTx - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTx - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTx - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") -) diff --git a/go.mod b/go.mod index d5781287..2edef66e 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,13 @@ module github.com/LumeraProtocol/supernode -go 1.24.0 +go 1.24.1 require ( - github.com/LumeraProtocol/lumera v0.4.4 + github.com/LumeraProtocol/lumera v0.4.5 github.com/LumeraProtocol/rq-go v0.2.1 github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce github.com/cenkalti/backoff/v4 v4.3.0 github.com/cosmos/btcutil v1.0.5 - github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.50.13 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.7.0 @@ -17,7 +16,6 @@ require ( github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/google/uuid v1.6.0 - github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/jmoiron/sqlx v1.4.0 github.com/json-iterator/go v1.1.12 github.com/klauspost/compress v1.18.0 @@ -34,7 +32,6 @@ require ( golang.org/x/crypto v0.36.0 golang.org/x/sync v0.12.0 golang.org/x/sys v0.31.0 - google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463 google.golang.org/grpc v1.71.0 google.golang.org/protobuf v1.36.6 gopkg.in/natefinch/lumberjack.v2 v2.2.1 @@ -75,6 +72,7 @@ require ( github.com/cometbft/cometbft v0.38.15 // indirect github.com/cometbft/cometbft-db v0.14.1 // indirect github.com/cosmos/cosmos-db v1.1.1 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/iavl v1.2.2 // indirect github.com/cosmos/ics23/go v0.11.0 // indirect @@ -108,6 +106,7 @@ require ( github.com/gorilla/mux v1.8.1 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect @@ -174,6 +173,7 @@ require ( golang.org/x/term v0.30.0 // indirect golang.org/x/text v0.23.0 // indirect google.golang.org/genproto v0.0.0-20240701130421-f6361c86f094 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250324211829-b45e905df463 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/go.sum b/go.sum index 14e2286c..c7fb5292 100644 --- a/go.sum +++ b/go.sum @@ -61,8 +61,8 @@ github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3 github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/LumeraProtocol/lumera v0.4.4 h1:jMMyKs5fT5mShdLwVDM2QA+hJ4zNk4Tn0teaKGQSvak= -github.com/LumeraProtocol/lumera v0.4.4/go.mod h1:MRqVY+f8edEBkDvpr4z2nJpglp3Qj1OUvjeWvrvIUSM= +github.com/LumeraProtocol/lumera v0.4.5 h1:eeDeUFMKYAbCKDZVZzPsFpdiypoWsFUD37fd49EyGSE= +github.com/LumeraProtocol/lumera v0.4.5/go.mod h1:c1M+sjewuCvxw+pznwlspUzenDJI8Y+suKB3RFKS2Wo= github.com/LumeraProtocol/rq-go v0.2.1 h1:8B3UzRChLsGMmvZ+UVbJsJj6JZzL9P9iYxbdUwGsQI4= github.com/LumeraProtocol/rq-go v0.2.1/go.mod h1:APnKCZRh1Es2Vtrd2w4kCLgAyaL5Bqrkz/BURoRJ+O8= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= diff --git a/pkg/lumera/modules/action/action_mock.go b/pkg/lumera/modules/action/action_mock.go index ac10afbc..7f643155 100644 --- a/pkg/lumera/modules/action/action_mock.go +++ b/pkg/lumera/modules/action/action_mock.go @@ -8,7 +8,7 @@ import ( context "context" reflect "reflect" - types "github.com/LumeraProtocol/supernode/gen/lumera/action/types" + types "github.com/LumeraProtocol/lumera/x/action/types" gomock "github.com/golang/mock/gomock" ) diff --git a/pkg/lumera/modules/action/impl.go b/pkg/lumera/modules/action/impl.go index affa8b91..c4e66960 100644 --- a/pkg/lumera/modules/action/impl.go +++ b/pkg/lumera/modules/action/impl.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/LumeraProtocol/supernode/gen/lumera/action/types" + "github.com/LumeraProtocol/lumera/x/action/types" "google.golang.org/grpc" ) diff --git a/pkg/lumera/modules/action/interface.go b/pkg/lumera/modules/action/interface.go index 84746f26..3b90f493 100644 --- a/pkg/lumera/modules/action/interface.go +++ b/pkg/lumera/modules/action/interface.go @@ -4,7 +4,7 @@ package action import ( "context" - "github.com/LumeraProtocol/supernode/gen/lumera/action/types" + "github.com/LumeraProtocol/lumera/x/action/types" "google.golang.org/grpc" ) diff --git a/pkg/lumera/modules/action_msg/impl.go b/pkg/lumera/modules/action_msg/impl.go index 1e32be43..45caad11 100644 --- a/pkg/lumera/modules/action_msg/impl.go +++ b/pkg/lumera/modules/action_msg/impl.go @@ -2,10 +2,10 @@ package action_msg import ( "context" - "encoding/json" "fmt" - actiontypes "github.com/LumeraProtocol/supernode/gen/lumera/action/types" + actionapi "github.com/LumeraProtocol/lumera/api/lumera/action" + actiontypes "github.com/LumeraProtocol/lumera/x/action/types" "github.com/LumeraProtocol/supernode/pkg/logtrace" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" @@ -19,6 +19,7 @@ import ( authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "google.golang.org/grpc" + "google.golang.org/protobuf/encoding/protojson" ) // Default gas parameters @@ -81,7 +82,6 @@ func (m *module) FinalizeCascadeAction( ctx context.Context, actionId string, rqIdsIds []string, - rqIdsOti []byte, ) (*FinalizeActionResult, error) { // Basic validation if actionId == "" { @@ -90,9 +90,6 @@ func (m *module) FinalizeCascadeAction( if len(rqIdsIds) == 0 { return nil, fmt.Errorf("rq_ids_ids cannot be empty for cascade action") } - if len(rqIdsOti) == 0 { - return nil, fmt.Errorf("rq_ids_oti cannot be empty for cascade action") - } // Get creator address from keyring key, err := m.kr.Key(m.keyName) @@ -109,15 +106,14 @@ func (m *module) FinalizeCascadeAction( logtrace.Info(ctx, "finalize action started", logtrace.Fields{"creator": creator}) // Create CASCADE metadata - metadata := map[string]interface{}{ - "rq_ids_ids": rqIdsIds, - "rq_ids_oti": rqIdsOti, + cascadeMeta := actionapi.CascadeMetadata{ + RqIdsIds: rqIdsIds, } - // Convert metadata to JSON - metadataJSON, err := json.Marshal(metadata) + // Convert metadata to JSON instead of binary protobuf + metadataBytes, err := protojson.Marshal(&cascadeMeta) if err != nil { - return nil, fmt.Errorf("failed to marshal metadata: %w", err) + return nil, fmt.Errorf("failed to marshal metadata to JSON: %w", err) } // Create the message @@ -125,7 +121,7 @@ func (m *module) FinalizeCascadeAction( Creator: creator, ActionId: actionId, ActionType: "CASCADE", - Metadata: string(metadataJSON), + Metadata: string(metadataBytes), } // Create encoding config @@ -156,6 +152,7 @@ func (m *module) FinalizeCascadeAction( WithGas(m.gasLimit). WithGasAdjustment(m.gasAdjustment). WithSignMode(signingtypes.SignMode_SIGN_MODE_DIRECT). + WithFees("1000stake"). BuildUnsignedTx(msg) if err != nil { return nil, fmt.Errorf("failed to build unsigned tx for simulation: %w", err) diff --git a/pkg/lumera/modules/action_msg/interface.go b/pkg/lumera/modules/action_msg/interface.go index 210cf8f8..2a4e9c39 100644 --- a/pkg/lumera/modules/action_msg/interface.go +++ b/pkg/lumera/modules/action_msg/interface.go @@ -22,7 +22,6 @@ type Module interface { ctx context.Context, actionId string, rqIdsIds []string, - rqIdsOti []byte, ) (*FinalizeActionResult, error) } diff --git a/pkg/lumera/modules/supernode/impl.go b/pkg/lumera/modules/supernode/impl.go index 8e14b5a7..3ebac493 100644 --- a/pkg/lumera/modules/supernode/impl.go +++ b/pkg/lumera/modules/supernode/impl.go @@ -5,7 +5,7 @@ import ( "fmt" "sort" - "github.com/LumeraProtocol/supernode/gen/lumera/supernode/types" + "github.com/LumeraProtocol/lumera/x/supernode/types" "github.com/LumeraProtocol/supernode/pkg/errors" "google.golang.org/grpc" diff --git a/pkg/lumera/modules/supernode/interface.go b/pkg/lumera/modules/supernode/interface.go index 1602e86c..5c447137 100644 --- a/pkg/lumera/modules/supernode/interface.go +++ b/pkg/lumera/modules/supernode/interface.go @@ -4,7 +4,7 @@ package supernode import ( "context" - "github.com/LumeraProtocol/supernode/gen/lumera/supernode/types" + "github.com/LumeraProtocol/lumera/x/supernode/types" "google.golang.org/grpc" ) diff --git a/pkg/lumera/modules/supernode/supernode_mock.go b/pkg/lumera/modules/supernode/supernode_mock.go index ddc00e70..682043a7 100644 --- a/pkg/lumera/modules/supernode/supernode_mock.go +++ b/pkg/lumera/modules/supernode/supernode_mock.go @@ -8,7 +8,7 @@ import ( context "context" reflect "reflect" - types "github.com/LumeraProtocol/supernode/gen/lumera/supernode/types" + types "github.com/LumeraProtocol/lumera/x/supernode/types" gomock "github.com/golang/mock/gomock" ) diff --git a/pkg/testutil/lumera.go b/pkg/testutil/lumera.go index b3077d20..0f7b682f 100644 --- a/pkg/testutil/lumera.go +++ b/pkg/testutil/lumera.go @@ -4,8 +4,8 @@ import ( "context" "strconv" - "github.com/LumeraProtocol/supernode/gen/lumera/action/types" - supernodeTypes "github.com/LumeraProtocol/supernode/gen/lumera/supernode/types" + "github.com/LumeraProtocol/lumera/x/action/types" + supernodeTypes "github.com/LumeraProtocol/lumera/x/supernode/types" "github.com/LumeraProtocol/supernode/pkg/lumera" "github.com/LumeraProtocol/supernode/pkg/lumera/modules/action" "github.com/LumeraProtocol/supernode/pkg/lumera/modules/action_msg" diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 4a8c4c06..a7f0c78d 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -11,7 +11,6 @@ import ( "fmt" "io" "log" - "lukechampine.com/blake3" "math" "math/big" "net" @@ -23,6 +22,8 @@ import ( "strings" "time" + "lukechampine.com/blake3" + "github.com/LumeraProtocol/supernode/pkg/errors" "golang.org/x/sync/semaphore" @@ -418,6 +419,16 @@ func RandomDuration(min, max int) time.Duration { return time.Duration(randomMillisecond) * time.Millisecond } +func ZstdCompress(data []byte) ([]byte, error) { + encoder, err := zstd.NewWriter(nil) + if err != nil { + return nil, fmt.Errorf("failed to create zstd encoder: %v", err) + } + defer encoder.Close() + + return encoder.EncodeAll(data, nil), nil +} + // HighCompress compresses the data func HighCompress(cctx context.Context, data []byte) ([]byte, error) { ctx, cancel := context.WithTimeout(cctx, highCompressTimeout) diff --git a/sdk/adapters/lumera/adapter.go b/sdk/adapters/lumera/adapter.go index 266b0491..404ce3f6 100644 --- a/sdk/adapters/lumera/adapter.go +++ b/sdk/adapters/lumera/adapter.go @@ -7,9 +7,9 @@ import ( "github.com/LumeraProtocol/supernode/sdk/log" - actiontypes "github.com/LumeraProtocol/supernode/gen/lumera/action/types" + actiontypes "github.com/LumeraProtocol/lumera/x/action/types" - sntypes "github.com/LumeraProtocol/supernode/gen/lumera/supernode/types" + sntypes "github.com/LumeraProtocol/lumera/x/supernode/types" lumeraclient "github.com/LumeraProtocol/supernode/pkg/lumera" "github.com/cosmos/cosmos-sdk/crypto/keyring" ) diff --git a/supernode/services/cascade/helper.go b/supernode/services/cascade/helper.go index 4bae06cb..54298fd9 100644 --- a/supernode/services/cascade/helper.go +++ b/supernode/services/cascade/helper.go @@ -18,7 +18,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - actiontypes "github.com/LumeraProtocol/supernode/gen/lumera/action/types" + actiontypes "github.com/LumeraProtocol/lumera/x/action/types" ) func (task *CascadeRegistrationTask) fetchAction(ctx context.Context, actionID string, f logtrace.Fields) (*actiontypes.Action, error) { diff --git a/supernode/services/cascade/metadata.go b/supernode/services/cascade/metadata.go index 7249a1cb..3add83cd 100644 --- a/supernode/services/cascade/metadata.go +++ b/supernode/services/cascade/metadata.go @@ -76,7 +76,7 @@ func GetIDFiles(ctx context.Context, encMetadataFileWithSignature []byte, ic uin buffer.WriteByte(SeparatorByte) buffer.WriteString(strconv.Itoa(int(counter))) // Using the string representation to maintain backward compatibility - compressedData, err := utils.HighCompress(ctx, buffer.Bytes()) + compressedData, err := utils.ZstdCompress(buffer.Bytes()) if err != nil { return ids, idFiles, errors.Errorf("compress identifiers file: %w", err) } diff --git a/supernode/services/cascade/register.go b/supernode/services/cascade/register.go index c5c9bdd6..d81d49c9 100644 --- a/supernode/services/cascade/register.go +++ b/supernode/services/cascade/register.go @@ -92,7 +92,8 @@ func (task *CascadeRegistrationTask) Register(ctx context.Context, req *Register return nil, err } logtrace.Info(ctx, "artefacts have been stored", fields) - resp, err := task.lumeraClient.ActionMsg().FinalizeCascadeAction(ctx, action.ActionID, rqidResp.RQIDs, []byte(" ")) + + resp, err := task.lumeraClient.ActionMsg().FinalizeCascadeAction(ctx, action.ActionID, rqidResp.RQIDs) if err != nil { logtrace.Info(ctx, "Finalize Action Error", logtrace.Fields{ diff --git a/tests/system/e2e_cascade_test.go b/tests/system/e2e_cascade_test.go index 3de71194..0935849b 100644 --- a/tests/system/e2e_cascade_test.go +++ b/tests/system/e2e_cascade_test.go @@ -22,11 +22,12 @@ import ( "github.com/LumeraProtocol/supernode/sdk/event" "github.com/LumeraProtocol/supernode/sdk/task" - "github.com/LumeraProtocol/supernode/gen/lumera/action/types" + "github.com/LumeraProtocol/lumera/x/action/types" sdkconfig "github.com/LumeraProtocol/supernode/sdk/config" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" + "github.com/tidwall/sjson" ) // TestCascadeE2E performs an end-to-end test of the Cascade functionality in the Lumera network. @@ -64,11 +65,14 @@ func TestCascadeE2E(t *testing.T) { // Action request parameters const ( - actionType = "CASCADE" // The action type for fountain code processing - price = "10ulume" // Price for the action in ulume tokens + actionType = "CASCADE" // The action type for fountain code processing + price = "10200ulume" // Price for the action in ulume tokens ) t.Log("Step 1: Starting all services") + // Update the genesis file with action parameters + sut.ModifyGenesisJSON(t, SetActionParams(t)) + // Reset and start the blockchain sut.ResetChain(t) sut.StartChain(t) @@ -352,7 +356,7 @@ func TestCascadeE2E(t *testing.T) { require.NotEmpty(t, actionID, "Action ID should not be empty") t.Logf("Extracted action ID: %s", actionID) - time.Sleep(30 * time.Second) + time.Sleep(60 * time.Second) // Set up action client configuration // This defines how to connect to network services @@ -453,3 +457,31 @@ func Blake3Hash(msg []byte) ([]byte, error) { } return hasher.Sum(nil), nil } + +// SetActionParams sets the initial parameters for the action module in genesis +func SetActionParams(t *testing.T) GenesisMutator { + return func(genesis []byte) []byte { + t.Helper() + state, err := sjson.SetRawBytes(genesis, "app_state.action.params", []byte(`{ + "base_action_fee": { + "amount": "10000", + "denom": "ulume" + }, + "expiration_duration": "24h0m0s", + "fee_per_byte": { + "amount": "100", + "denom": "ulume" + }, + "foundation_fee_share": "0.000000000000000000", + "max_actions_per_block": "10", + "max_dd_and_fingerprints": "50", + "max_processing_time": "1h0m0s", + "max_raptor_q_symbols": "50", + "min_processing_time": "1m0s", + "min_super_nodes": "1", + "super_node_fee_share": "1.000000000000000000" + }`)) + require.NoError(t, err) + return state + } +} diff --git a/tests/system/go.mod b/tests/system/go.mod index 4fcc902d..eeb0c109 100644 --- a/tests/system/go.mod +++ b/tests/system/go.mod @@ -1,6 +1,6 @@ module github.com/LumeraProtocol/supernode/tests/systemtests -go 1.24.0 +go 1.24.1 replace github.com/LumeraProtocol/supernode => ../../ @@ -29,6 +29,7 @@ require ( require ( cosmossdk.io/math v1.5.3 + github.com/LumeraProtocol/lumera v0.4.5 github.com/LumeraProtocol/supernode v0.0.0-00010101000000-000000000000 github.com/LumeraProtocol/supernode/sdk v0.0.0-00010101000000-000000000000 github.com/cometbft/cometbft v0.38.17 @@ -53,7 +54,6 @@ require ( github.com/99designs/keyring v1.2.2 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.7 // indirect - github.com/LumeraProtocol/lumera v0.4.4 // indirect github.com/LumeraProtocol/rq-go v0.2.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.2.0 // indirect diff --git a/tests/system/go.sum b/tests/system/go.sum index 8a2f0d60..a3a1b9e5 100644 --- a/tests/system/go.sum +++ b/tests/system/go.sum @@ -73,8 +73,8 @@ github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48 github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 h1:8nn+rsCvTq9axyEh382S0PFLBeaFwNsT43IrPWzctRU= github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1/go.mod h1:viRWSEhtMZqz1rhwmOVKkWl6SwmVowfL9O2YR5gI2PE= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/LumeraProtocol/lumera v0.4.4 h1:jMMyKs5fT5mShdLwVDM2QA+hJ4zNk4Tn0teaKGQSvak= -github.com/LumeraProtocol/lumera v0.4.4/go.mod h1:MRqVY+f8edEBkDvpr4z2nJpglp3Qj1OUvjeWvrvIUSM= +github.com/LumeraProtocol/lumera v0.4.5 h1:eeDeUFMKYAbCKDZVZzPsFpdiypoWsFUD37fd49EyGSE= +github.com/LumeraProtocol/lumera v0.4.5/go.mod h1:c1M+sjewuCvxw+pznwlspUzenDJI8Y+suKB3RFKS2Wo= github.com/LumeraProtocol/rq-go v0.2.1 h1:8B3UzRChLsGMmvZ+UVbJsJj6JZzL9P9iYxbdUwGsQI4= github.com/LumeraProtocol/rq-go v0.2.1/go.mod h1:APnKCZRh1Es2Vtrd2w4kCLgAyaL5Bqrkz/BURoRJ+O8= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=