github.com/line/ostracon@v1.0.10-0.20230328032236-7f20145f065d/proto/ostracon/types/types.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: ostracon/types/types.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 24 25 // Entropy represents height-specific complexity and used in proposer-election. 26 // Entropy contains vrf proof and generated round. The relationship of each field is as follows. 27 // Entropy.proof = VRFProof(last_proof_hash, current_height, Entropy.round) 28 type Entropy struct { 29 Round int32 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"` 30 Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` 31 } 32 33 func (m *Entropy) Reset() { *m = Entropy{} } 34 func (m *Entropy) String() string { return proto.CompactTextString(m) } 35 func (*Entropy) ProtoMessage() {} 36 func (*Entropy) Descriptor() ([]byte, []int) { 37 return fileDescriptor_0e52e849a4baef8c, []int{0} 38 } 39 func (m *Entropy) XXX_Unmarshal(b []byte) error { 40 return m.Unmarshal(b) 41 } 42 func (m *Entropy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 if deterministic { 44 return xxx_messageInfo_Entropy.Marshal(b, m, deterministic) 45 } else { 46 b = b[:cap(b)] 47 n, err := m.MarshalToSizedBuffer(b) 48 if err != nil { 49 return nil, err 50 } 51 return b[:n], nil 52 } 53 } 54 func (m *Entropy) XXX_Merge(src proto.Message) { 55 xxx_messageInfo_Entropy.Merge(m, src) 56 } 57 func (m *Entropy) XXX_Size() int { 58 return m.Size() 59 } 60 func (m *Entropy) XXX_DiscardUnknown() { 61 xxx_messageInfo_Entropy.DiscardUnknown(m) 62 } 63 64 var xxx_messageInfo_Entropy proto.InternalMessageInfo 65 66 func (m *Entropy) GetRound() int32 { 67 if m != nil { 68 return m.Round 69 } 70 return 0 71 } 72 73 func (m *Entropy) GetProof() []byte { 74 if m != nil { 75 return m.Proof 76 } 77 return nil 78 } 79 80 func init() { 81 proto.RegisterType((*Entropy)(nil), "ostracon.types.Entropy") 82 } 83 84 func init() { proto.RegisterFile("ostracon/types/types.proto", fileDescriptor_0e52e849a4baef8c) } 85 86 var fileDescriptor_0e52e849a4baef8c = []byte{ 87 // 157 bytes of a gzipped FileDescriptorProto 88 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0x2f, 0x2e, 0x29, 89 0x4a, 0x4c, 0xce, 0xcf, 0xd3, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x86, 0x90, 0x7a, 0x05, 0x45, 0xf9, 90 0x25, 0xf9, 0x42, 0x7c, 0x30, 0x39, 0x3d, 0xb0, 0xa8, 0x92, 0x29, 0x17, 0xbb, 0x6b, 0x5e, 0x49, 91 0x51, 0x7e, 0x41, 0xa5, 0x90, 0x08, 0x17, 0x6b, 0x51, 0x7e, 0x69, 0x5e, 0x8a, 0x04, 0xa3, 0x02, 92 0xa3, 0x06, 0x6b, 0x10, 0x84, 0x03, 0x12, 0x2d, 0x28, 0xca, 0xcf, 0x4f, 0x93, 0x60, 0x52, 0x60, 93 0xd4, 0xe0, 0x09, 0x82, 0x70, 0x9c, 0xdc, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 94 0xc1, 0x23, 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 95 0x21, 0x4a, 0x37, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x27, 0x33, 96 0x2f, 0x55, 0x1f, 0xee, 0x18, 0xb0, 0x03, 0xf4, 0x51, 0xdd, 0x96, 0xc4, 0x06, 0x16, 0x35, 0x06, 97 0x04, 0x00, 0x00, 0xff, 0xff, 0xe8, 0xcd, 0x92, 0x13, 0xb4, 0x00, 0x00, 0x00, 98 } 99 100 func (m *Entropy) Marshal() (dAtA []byte, err error) { 101 size := m.Size() 102 dAtA = make([]byte, size) 103 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 104 if err != nil { 105 return nil, err 106 } 107 return dAtA[:n], nil 108 } 109 110 func (m *Entropy) MarshalTo(dAtA []byte) (int, error) { 111 size := m.Size() 112 return m.MarshalToSizedBuffer(dAtA[:size]) 113 } 114 115 func (m *Entropy) MarshalToSizedBuffer(dAtA []byte) (int, error) { 116 i := len(dAtA) 117 _ = i 118 var l int 119 _ = l 120 if len(m.Proof) > 0 { 121 i -= len(m.Proof) 122 copy(dAtA[i:], m.Proof) 123 i = encodeVarintTypes(dAtA, i, uint64(len(m.Proof))) 124 i-- 125 dAtA[i] = 0x12 126 } 127 if m.Round != 0 { 128 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 129 i-- 130 dAtA[i] = 0x8 131 } 132 return len(dAtA) - i, nil 133 } 134 135 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 136 offset -= sovTypes(v) 137 base := offset 138 for v >= 1<<7 { 139 dAtA[offset] = uint8(v&0x7f | 0x80) 140 v >>= 7 141 offset++ 142 } 143 dAtA[offset] = uint8(v) 144 return base 145 } 146 func (m *Entropy) Size() (n int) { 147 if m == nil { 148 return 0 149 } 150 var l int 151 _ = l 152 if m.Round != 0 { 153 n += 1 + sovTypes(uint64(m.Round)) 154 } 155 l = len(m.Proof) 156 if l > 0 { 157 n += 1 + l + sovTypes(uint64(l)) 158 } 159 return n 160 } 161 162 func sovTypes(x uint64) (n int) { 163 return (math_bits.Len64(x|1) + 6) / 7 164 } 165 func sozTypes(x uint64) (n int) { 166 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 167 } 168 func (m *Entropy) Unmarshal(dAtA []byte) error { 169 l := len(dAtA) 170 iNdEx := 0 171 for iNdEx < l { 172 preIndex := iNdEx 173 var wire uint64 174 for shift := uint(0); ; shift += 7 { 175 if shift >= 64 { 176 return ErrIntOverflowTypes 177 } 178 if iNdEx >= l { 179 return io.ErrUnexpectedEOF 180 } 181 b := dAtA[iNdEx] 182 iNdEx++ 183 wire |= uint64(b&0x7F) << shift 184 if b < 0x80 { 185 break 186 } 187 } 188 fieldNum := int32(wire >> 3) 189 wireType := int(wire & 0x7) 190 if wireType == 4 { 191 return fmt.Errorf("proto: Entropy: wiretype end group for non-group") 192 } 193 if fieldNum <= 0 { 194 return fmt.Errorf("proto: Entropy: illegal tag %d (wire type %d)", fieldNum, wire) 195 } 196 switch fieldNum { 197 case 1: 198 if wireType != 0 { 199 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 200 } 201 m.Round = 0 202 for shift := uint(0); ; shift += 7 { 203 if shift >= 64 { 204 return ErrIntOverflowTypes 205 } 206 if iNdEx >= l { 207 return io.ErrUnexpectedEOF 208 } 209 b := dAtA[iNdEx] 210 iNdEx++ 211 m.Round |= int32(b&0x7F) << shift 212 if b < 0x80 { 213 break 214 } 215 } 216 case 2: 217 if wireType != 2 { 218 return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) 219 } 220 var byteLen int 221 for shift := uint(0); ; shift += 7 { 222 if shift >= 64 { 223 return ErrIntOverflowTypes 224 } 225 if iNdEx >= l { 226 return io.ErrUnexpectedEOF 227 } 228 b := dAtA[iNdEx] 229 iNdEx++ 230 byteLen |= int(b&0x7F) << shift 231 if b < 0x80 { 232 break 233 } 234 } 235 if byteLen < 0 { 236 return ErrInvalidLengthTypes 237 } 238 postIndex := iNdEx + byteLen 239 if postIndex < 0 { 240 return ErrInvalidLengthTypes 241 } 242 if postIndex > l { 243 return io.ErrUnexpectedEOF 244 } 245 m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) 246 if m.Proof == nil { 247 m.Proof = []byte{} 248 } 249 iNdEx = postIndex 250 default: 251 iNdEx = preIndex 252 skippy, err := skipTypes(dAtA[iNdEx:]) 253 if err != nil { 254 return err 255 } 256 if (skippy < 0) || (iNdEx+skippy) < 0 { 257 return ErrInvalidLengthTypes 258 } 259 if (iNdEx + skippy) > l { 260 return io.ErrUnexpectedEOF 261 } 262 iNdEx += skippy 263 } 264 } 265 266 if iNdEx > l { 267 return io.ErrUnexpectedEOF 268 } 269 return nil 270 } 271 func skipTypes(dAtA []byte) (n int, err error) { 272 l := len(dAtA) 273 iNdEx := 0 274 depth := 0 275 for iNdEx < l { 276 var wire uint64 277 for shift := uint(0); ; shift += 7 { 278 if shift >= 64 { 279 return 0, ErrIntOverflowTypes 280 } 281 if iNdEx >= l { 282 return 0, io.ErrUnexpectedEOF 283 } 284 b := dAtA[iNdEx] 285 iNdEx++ 286 wire |= (uint64(b) & 0x7F) << shift 287 if b < 0x80 { 288 break 289 } 290 } 291 wireType := int(wire & 0x7) 292 switch wireType { 293 case 0: 294 for shift := uint(0); ; shift += 7 { 295 if shift >= 64 { 296 return 0, ErrIntOverflowTypes 297 } 298 if iNdEx >= l { 299 return 0, io.ErrUnexpectedEOF 300 } 301 iNdEx++ 302 if dAtA[iNdEx-1] < 0x80 { 303 break 304 } 305 } 306 case 1: 307 iNdEx += 8 308 case 2: 309 var length int 310 for shift := uint(0); ; shift += 7 { 311 if shift >= 64 { 312 return 0, ErrIntOverflowTypes 313 } 314 if iNdEx >= l { 315 return 0, io.ErrUnexpectedEOF 316 } 317 b := dAtA[iNdEx] 318 iNdEx++ 319 length |= (int(b) & 0x7F) << shift 320 if b < 0x80 { 321 break 322 } 323 } 324 if length < 0 { 325 return 0, ErrInvalidLengthTypes 326 } 327 iNdEx += length 328 case 3: 329 depth++ 330 case 4: 331 if depth == 0 { 332 return 0, ErrUnexpectedEndOfGroupTypes 333 } 334 depth-- 335 case 5: 336 iNdEx += 4 337 default: 338 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 339 } 340 if iNdEx < 0 { 341 return 0, ErrInvalidLengthTypes 342 } 343 if depth == 0 { 344 return iNdEx, nil 345 } 346 } 347 return 0, io.ErrUnexpectedEOF 348 } 349 350 var ( 351 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 352 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 353 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 354 )