diff --git a/proto/umee/leverage/v1/gov.proto b/proto/umee/leverage/v1/gov.proto new file mode 100644 index 0000000000..4ea9d79eba --- /dev/null +++ b/proto/umee/leverage/v1/gov.proto @@ -0,0 +1,21 @@ +syntax = "proto3"; +package umee.leverage.v1; + +import "gogoproto/gogo.proto"; +import "umee/leverage/v1/leverage.proto"; + +option go_package = "github.com/umee-network/umee/v3/x/leverage/types"; + +option (gogoproto.goproto_getters_all) = false; + +// UpdateRegistryProposal is DEPRECATED. +// We will keep the proto so old proposals are readable. +message UpdateRegistryProposal { + option (gogoproto.equal) = true; + option (gogoproto.goproto_getters) = false; + option (gogoproto.goproto_stringer) = false; + + string title = 1; + string description = 2; + repeated Token registry = 3 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/swagger/swagger.yaml b/swagger/swagger.yaml index 7343d65f80..25b1096f25 100644 --- a/swagger/swagger.yaml +++ b/swagger/swagger.yaml @@ -862,9 +862,77 @@ paths: format: byte tags: - Query + /umee/historacle/v1/denoms/median_deviations: + get: + summary: |- + MedianDeviations returns median deviations of all denoms, + or, if specified, returns a single median deviation + operationId: MedianDeviations + responses: + '200': + description: A successful response. + schema: + type: object + properties: + medianDeviations: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + description: >- + medians defines a list of the median deviations for all + stamped denoms. + description: |- + QueryMedianDeviationsResponse is response type for the + Query/MedianDeviations RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: denom + description: denom defines the denomination to query for. + in: query + required: false + type: string + tags: + - Query /umee/historacle/v1/denoms/medians: get: - summary: Medians returns medians of all denoms + summary: |- + Medians returns medians of all denoms, + or, if specified, returns a single median operationId: Medians responses: '200': @@ -1098,6 +1166,38 @@ paths: we want to keep a record of our set of exchange rates. + median_period: + type: string + format: uint64 + description: >- + Median Period represents the amount blocks we will wait + between + + calculating the median and standard deviation of the + median of + + historic prices in the last Prune Period. + historic_accept_list: + type: array + items: + type: object + properties: + base_denom: + type: string + symbol_denom: + type: string + exponent: + type: integer + format: int64 + title: Denom - the object to hold configurations of each denom + description: >- + Historic Asset List is a list of assets which will use the + historic + + price stamping protection methodology (mainly + manipulatable assets). + + Any assets not on this list will not be stamped. description: >- QueryParamsResponse is the response type for the Query/Params RPC method. @@ -2515,6 +2615,30 @@ definitions: description: |- Prune Period represents the maximum amount of blocks which we want to keep a record of our set of exchange rates. + median_period: + type: string + format: uint64 + description: |- + Median Period represents the amount blocks we will wait between + calculating the median and standard deviation of the median of + historic prices in the last Prune Period. + historic_accept_list: + type: array + items: + type: object + properties: + base_denom: + type: string + symbol_denom: + type: string + exponent: + type: integer + format: int64 + title: Denom - the object to hold configurations of each denom + description: |- + Historic Asset List is a list of assets which will use the historic + price stamping protection methodology (mainly manipulatable assets). + Any assets not on this list will not be stamped. description: Params defines the parameters for the oracle module. umee.oracle.v1.QueryActiveExchangeRatesResponse: type: object @@ -2688,6 +2812,29 @@ definitions: description: |- QueryFeederDelegationResponse is response type for the Query/FeederDelegation RPC method. + umee.oracle.v1.QueryMedianDeviationsResponse: + type: object + properties: + medianDeviations: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + DecCoin defines a token with a denomination and a decimal amount. + + NOTE: The amount field is an Dec which implements the custom method + signatures required by gogoproto. + description: >- + medians defines a list of the median deviations for all stamped + denoms. + description: |- + QueryMedianDeviationsResponse is response type for the + Query/MedianDeviations RPC method. umee.oracle.v1.QueryMediansResponse: type: object properties: @@ -2768,6 +2915,34 @@ definitions: description: |- Prune Period represents the maximum amount of blocks which we want to keep a record of our set of exchange rates. + median_period: + type: string + format: uint64 + description: |- + Median Period represents the amount blocks we will wait between + calculating the median and standard deviation of the median of + historic prices in the last Prune Period. + historic_accept_list: + type: array + items: + type: object + properties: + base_denom: + type: string + symbol_denom: + type: string + exponent: + type: integer + format: int64 + title: Denom - the object to hold configurations of each denom + description: >- + Historic Asset List is a list of assets which will use the + historic + + price stamping protection methodology (mainly manipulatable + assets). + + Any assets not on this list will not be stamped. description: QueryParamsResponse is the response type for the Query/Params RPC method. umee.oracle.v1.QuerySlashWindowResponse: type: object diff --git a/x/leverage/types/codec.go b/x/leverage/types/codec.go index 419c8405ce..c3cd8116ea 100644 --- a/x/leverage/types/codec.go +++ b/x/leverage/types/codec.go @@ -6,6 +6,7 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" + gov1b1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) var ( @@ -34,6 +35,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgBorrow{}, "umee/leverage/MsgBorrow", nil) cdc.RegisterConcrete(&MsgRepay{}, "umee/leverage/MsgRepay", nil) cdc.RegisterConcrete(&MsgLiquidate{}, "umee/leverage/MsgLiquidate", nil) + cdc.RegisterConcrete(&UpdateRegistryProposal{}, "umee/leverage/UpdateRegistryProposal", nil) cdc.RegisterConcrete(&MsgGovUpdateRegistry{}, "umee/leverage/MsgGovUpdateRegistry", nil) cdc.RegisterConcrete(&MsgSupplyCollateral{}, "umee/leverage/MsgSupplyCollateral", nil) } @@ -52,5 +54,10 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { &MsgSupplyCollateral{}, ) + registry.RegisterImplementations( + (*gov1b1.Content)(nil), + &UpdateRegistryProposal{}, + ) + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/leverage/types/gov.go b/x/leverage/types/gov.go new file mode 100644 index 0000000000..96cd37ebe4 --- /dev/null +++ b/x/leverage/types/gov.go @@ -0,0 +1,61 @@ +package types + +import ( + gov1b1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + "gopkg.in/yaml.v3" +) + +const ( + // ProposalTypeUpdateRegistryProposal defines the type for a UpdateRegistryProposal + // proposal type. + ProposalTypeUpdateRegistryProposal = "UpdateRegistryProposal" +) + +func init() { + gov1b1.RegisterProposalType(ProposalTypeUpdateRegistryProposal) +} + +// Assert UpdateRegistryProposal implements govtypes.Content at compile-time +var _ gov1b1.Content = &UpdateRegistryProposal{} + +func NewUpdateRegistryProposal(title, description string, tokens []Token) *UpdateRegistryProposal { + return &UpdateRegistryProposal{ + Title: title, + Description: description, + Registry: tokens, + } +} + +// String implements the Stringer interface. +func (p UpdateRegistryProposal) String() string { + out, _ := yaml.Marshal(p) + return string(out) +} + +// GetTitle returns the title of the proposal. +func (p *UpdateRegistryProposal) GetTitle() string { return p.Title } + +// GetDescription returns the description of the proposal. +func (p *UpdateRegistryProposal) GetDescription() string { return p.Description } + +// ProposalRoute returns the x/gov routing key of the proposal. +func (p *UpdateRegistryProposal) ProposalRoute() string { return RouterKey } + +// ProposalType returns the x/gov type of the proposal. +func (p *UpdateRegistryProposal) ProposalType() string { return ProposalTypeUpdateRegistryProposal } + +// ValidateBasic validates the proposal returning an error if invalid. +func (p *UpdateRegistryProposal) ValidateBasic() error { + err := gov1b1.ValidateAbstract(p) + if err != nil { + return err + } + + for _, token := range p.Registry { + if err := token.Validate(); err != nil { + return err + } + } + + return nil +} diff --git a/x/leverage/types/gov.pb.go b/x/leverage/types/gov.pb.go new file mode 100644 index 0000000000..80278192d4 --- /dev/null +++ b/x/leverage/types/gov.pb.go @@ -0,0 +1,450 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: umee/leverage/v1/gov.proto + +package types + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/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 + +// UpdateRegistryProposal is DEPRECATED. +// We will keep the proto so old proposals are readable. +type UpdateRegistryProposal struct { + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Registry []Token `protobuf:"bytes,3,rep,name=registry,proto3" json:"registry"` +} + +func (m *UpdateRegistryProposal) Reset() { *m = UpdateRegistryProposal{} } +func (*UpdateRegistryProposal) ProtoMessage() {} +func (*UpdateRegistryProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_3febb94c702124d7, []int{0} +} +func (m *UpdateRegistryProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateRegistryProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateRegistryProposal.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 *UpdateRegistryProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateRegistryProposal.Merge(m, src) +} +func (m *UpdateRegistryProposal) XXX_Size() int { + return m.Size() +} +func (m *UpdateRegistryProposal) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateRegistryProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateRegistryProposal proto.InternalMessageInfo + +func init() { + proto.RegisterType((*UpdateRegistryProposal)(nil), "umee.leverage.v1.UpdateRegistryProposal") +} + +func init() { proto.RegisterFile("umee/leverage/v1/gov.proto", fileDescriptor_3febb94c702124d7) } + +var fileDescriptor_3febb94c702124d7 = []byte{ + // 271 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0xcd, 0x4d, 0x4d, + 0xd5, 0xcf, 0x49, 0x2d, 0x4b, 0x2d, 0x4a, 0x4c, 0x4f, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0xcf, 0x2f, + 0xd3, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x00, 0xc9, 0xe9, 0xc1, 0xe4, 0xf4, 0xca, 0x0c, + 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, 0x9d, 0x94, 0x3c, 0x86, + 0x19, 0x70, 0x3d, 0x60, 0x05, 0x4a, 0x33, 0x19, 0xb9, 0xc4, 0x42, 0x0b, 0x52, 0x12, 0x4b, 0x52, + 0x83, 0x52, 0xd3, 0x33, 0x8b, 0x4b, 0x8a, 0x2a, 0x03, 0x8a, 0xf2, 0x0b, 0xf2, 0x8b, 0x13, 0x73, + 0x84, 0x44, 0xb8, 0x58, 0x4b, 0x32, 0x4b, 0x72, 0x52, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, + 0x20, 0x1c, 0x21, 0x05, 0x2e, 0xee, 0x94, 0xd4, 0xe2, 0xe4, 0xa2, 0xcc, 0x82, 0x92, 0xcc, 0xfc, + 0x3c, 0x09, 0x26, 0xb0, 0x1c, 0xb2, 0x90, 0x90, 0x25, 0x17, 0x47, 0x11, 0xd4, 0x2c, 0x09, 0x66, + 0x05, 0x66, 0x0d, 0x6e, 0x23, 0x71, 0x3d, 0x74, 0xe7, 0xea, 0x85, 0xe4, 0x67, 0xa7, 0xe6, 0x39, + 0xb1, 0x9c, 0xb8, 0x27, 0xcf, 0x10, 0x04, 0x57, 0x6e, 0xc5, 0xd3, 0xb1, 0x40, 0x9e, 0x61, 0xc6, + 0x02, 0x79, 0x86, 0x17, 0x0b, 0xe4, 0x19, 0x9d, 0xfc, 0x4e, 0x3c, 0x94, 0x63, 0x38, 0xf1, 0x48, + 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, + 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0x83, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, + 0xe4, 0xfc, 0x5c, 0x7d, 0x90, 0xf1, 0xba, 0x79, 0xa9, 0x25, 0xe5, 0xf9, 0x45, 0xd9, 0x60, 0x8e, + 0x7e, 0x99, 0xb1, 0x7e, 0x05, 0xc2, 0xdf, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x2f, + 0x1b, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x28, 0xf0, 0xed, 0x0b, 0x59, 0x01, 0x00, 0x00, +} + +func (this *UpdateRegistryProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UpdateRegistryProposal) + if !ok { + that2, ok := that.(UpdateRegistryProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if len(this.Registry) != len(that1.Registry) { + return false + } + for i := range this.Registry { + if !this.Registry[i].Equal(&that1.Registry[i]) { + return false + } + } + return true +} +func (m *UpdateRegistryProposal) 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 *UpdateRegistryProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateRegistryProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Registry) > 0 { + for iNdEx := len(m.Registry) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Registry[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGov(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintGov(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintGov(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGov(dAtA []byte, offset int, v uint64) int { + offset -= sovGov(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *UpdateRegistryProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovGov(uint64(l)) + } + if len(m.Registry) > 0 { + for _, e := range m.Registry { + l = e.Size() + n += 1 + l + sovGov(uint64(l)) + } + } + return n +} + +func sovGov(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGov(x uint64) (n int) { + return sovGov(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *UpdateRegistryProposal) 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 ErrIntOverflowGov + } + 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: UpdateRegistryProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateRegistryProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Registry", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGov + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGov + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Registry = append(m.Registry, Token{}) + if err := m.Registry[len(m.Registry)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGov(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGov + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGov(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, ErrIntOverflowGov + } + 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, ErrIntOverflowGov + } + 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, ErrIntOverflowGov + } + 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, ErrInvalidLengthGov + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGov + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGov + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGov = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGov = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGov = fmt.Errorf("proto: unexpected end of group") +)