github.com/Finschia/ostracon@v1.1.5/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 // 161 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, 0xbc, 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, 0xca, 0x30, 0x3d, 0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xdf, 0x2d, 0x33, 96 0xaf, 0x38, 0x39, 0x23, 0x33, 0x51, 0x1f, 0xee, 0x20, 0xb0, 0x23, 0xf4, 0x51, 0xdd, 0x97, 0xc4, 97 0x06, 0x16, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4c, 0x47, 0xcc, 0x4e, 0xb8, 0x00, 0x00, 98 0x00, 99 } 100 101 func (m *Entropy) Marshal() (dAtA []byte, err error) { 102 size := m.Size() 103 dAtA = make([]byte, size) 104 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 105 if err != nil { 106 return nil, err 107 } 108 return dAtA[:n], nil 109 } 110 111 func (m *Entropy) MarshalTo(dAtA []byte) (int, error) { 112 size := m.Size() 113 return m.MarshalToSizedBuffer(dAtA[:size]) 114 } 115 116 func (m *Entropy) MarshalToSizedBuffer(dAtA []byte) (int, error) { 117 i := len(dAtA) 118 _ = i 119 var l int 120 _ = l 121 if len(m.Proof) > 0 { 122 i -= len(m.Proof) 123 copy(dAtA[i:], m.Proof) 124 i = encodeVarintTypes(dAtA, i, uint64(len(m.Proof))) 125 i-- 126 dAtA[i] = 0x12 127 } 128 if m.Round != 0 { 129 i = encodeVarintTypes(dAtA, i, uint64(m.Round)) 130 i-- 131 dAtA[i] = 0x8 132 } 133 return len(dAtA) - i, nil 134 } 135 136 func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { 137 offset -= sovTypes(v) 138 base := offset 139 for v >= 1<<7 { 140 dAtA[offset] = uint8(v&0x7f | 0x80) 141 v >>= 7 142 offset++ 143 } 144 dAtA[offset] = uint8(v) 145 return base 146 } 147 func (m *Entropy) Size() (n int) { 148 if m == nil { 149 return 0 150 } 151 var l int 152 _ = l 153 if m.Round != 0 { 154 n += 1 + sovTypes(uint64(m.Round)) 155 } 156 l = len(m.Proof) 157 if l > 0 { 158 n += 1 + l + sovTypes(uint64(l)) 159 } 160 return n 161 } 162 163 func sovTypes(x uint64) (n int) { 164 return (math_bits.Len64(x|1) + 6) / 7 165 } 166 func sozTypes(x uint64) (n int) { 167 return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 168 } 169 func (m *Entropy) Unmarshal(dAtA []byte) error { 170 l := len(dAtA) 171 iNdEx := 0 172 for iNdEx < l { 173 preIndex := iNdEx 174 var wire uint64 175 for shift := uint(0); ; shift += 7 { 176 if shift >= 64 { 177 return ErrIntOverflowTypes 178 } 179 if iNdEx >= l { 180 return io.ErrUnexpectedEOF 181 } 182 b := dAtA[iNdEx] 183 iNdEx++ 184 wire |= uint64(b&0x7F) << shift 185 if b < 0x80 { 186 break 187 } 188 } 189 fieldNum := int32(wire >> 3) 190 wireType := int(wire & 0x7) 191 if wireType == 4 { 192 return fmt.Errorf("proto: Entropy: wiretype end group for non-group") 193 } 194 if fieldNum <= 0 { 195 return fmt.Errorf("proto: Entropy: illegal tag %d (wire type %d)", fieldNum, wire) 196 } 197 switch fieldNum { 198 case 1: 199 if wireType != 0 { 200 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 201 } 202 m.Round = 0 203 for shift := uint(0); ; shift += 7 { 204 if shift >= 64 { 205 return ErrIntOverflowTypes 206 } 207 if iNdEx >= l { 208 return io.ErrUnexpectedEOF 209 } 210 b := dAtA[iNdEx] 211 iNdEx++ 212 m.Round |= int32(b&0x7F) << shift 213 if b < 0x80 { 214 break 215 } 216 } 217 case 2: 218 if wireType != 2 { 219 return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType) 220 } 221 var byteLen int 222 for shift := uint(0); ; shift += 7 { 223 if shift >= 64 { 224 return ErrIntOverflowTypes 225 } 226 if iNdEx >= l { 227 return io.ErrUnexpectedEOF 228 } 229 b := dAtA[iNdEx] 230 iNdEx++ 231 byteLen |= int(b&0x7F) << shift 232 if b < 0x80 { 233 break 234 } 235 } 236 if byteLen < 0 { 237 return ErrInvalidLengthTypes 238 } 239 postIndex := iNdEx + byteLen 240 if postIndex < 0 { 241 return ErrInvalidLengthTypes 242 } 243 if postIndex > l { 244 return io.ErrUnexpectedEOF 245 } 246 m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...) 247 if m.Proof == nil { 248 m.Proof = []byte{} 249 } 250 iNdEx = postIndex 251 default: 252 iNdEx = preIndex 253 skippy, err := skipTypes(dAtA[iNdEx:]) 254 if err != nil { 255 return err 256 } 257 if (skippy < 0) || (iNdEx+skippy) < 0 { 258 return ErrInvalidLengthTypes 259 } 260 if (iNdEx + skippy) > l { 261 return io.ErrUnexpectedEOF 262 } 263 iNdEx += skippy 264 } 265 } 266 267 if iNdEx > l { 268 return io.ErrUnexpectedEOF 269 } 270 return nil 271 } 272 func skipTypes(dAtA []byte) (n int, err error) { 273 l := len(dAtA) 274 iNdEx := 0 275 depth := 0 276 for iNdEx < l { 277 var wire uint64 278 for shift := uint(0); ; shift += 7 { 279 if shift >= 64 { 280 return 0, ErrIntOverflowTypes 281 } 282 if iNdEx >= l { 283 return 0, io.ErrUnexpectedEOF 284 } 285 b := dAtA[iNdEx] 286 iNdEx++ 287 wire |= (uint64(b) & 0x7F) << shift 288 if b < 0x80 { 289 break 290 } 291 } 292 wireType := int(wire & 0x7) 293 switch wireType { 294 case 0: 295 for shift := uint(0); ; shift += 7 { 296 if shift >= 64 { 297 return 0, ErrIntOverflowTypes 298 } 299 if iNdEx >= l { 300 return 0, io.ErrUnexpectedEOF 301 } 302 iNdEx++ 303 if dAtA[iNdEx-1] < 0x80 { 304 break 305 } 306 } 307 case 1: 308 iNdEx += 8 309 case 2: 310 var length int 311 for shift := uint(0); ; shift += 7 { 312 if shift >= 64 { 313 return 0, ErrIntOverflowTypes 314 } 315 if iNdEx >= l { 316 return 0, io.ErrUnexpectedEOF 317 } 318 b := dAtA[iNdEx] 319 iNdEx++ 320 length |= (int(b) & 0x7F) << shift 321 if b < 0x80 { 322 break 323 } 324 } 325 if length < 0 { 326 return 0, ErrInvalidLengthTypes 327 } 328 iNdEx += length 329 case 3: 330 depth++ 331 case 4: 332 if depth == 0 { 333 return 0, ErrUnexpectedEndOfGroupTypes 334 } 335 depth-- 336 case 5: 337 iNdEx += 4 338 default: 339 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 340 } 341 if iNdEx < 0 { 342 return 0, ErrInvalidLengthTypes 343 } 344 if depth == 0 { 345 return iNdEx, nil 346 } 347 } 348 return 0, io.ErrUnexpectedEOF 349 } 350 351 var ( 352 ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") 353 ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") 354 ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") 355 )