github.com/vipernet-xyz/tm@v0.34.24/proto/tendermint/types/params.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: tendermint/types/params.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 11 _ "github.com/golang/protobuf/ptypes/duration" 12 io "io" 13 math "math" 14 math_bits "math/bits" 15 time "time" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 var _ = time.Kitchen 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 29 30 // ConsensusParams contains consensus critical parameters that determine the 31 // validity of blocks. 32 type ConsensusParams struct { 33 Block BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block"` 34 Evidence EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence"` 35 Validator ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator"` 36 Version VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version"` 37 } 38 39 func (m *ConsensusParams) Reset() { *m = ConsensusParams{} } 40 func (m *ConsensusParams) String() string { return proto.CompactTextString(m) } 41 func (*ConsensusParams) ProtoMessage() {} 42 func (*ConsensusParams) Descriptor() ([]byte, []int) { 43 return fileDescriptor_e12598271a686f57, []int{0} 44 } 45 func (m *ConsensusParams) XXX_Unmarshal(b []byte) error { 46 return m.Unmarshal(b) 47 } 48 func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 49 if deterministic { 50 return xxx_messageInfo_ConsensusParams.Marshal(b, m, deterministic) 51 } else { 52 b = b[:cap(b)] 53 n, err := m.MarshalToSizedBuffer(b) 54 if err != nil { 55 return nil, err 56 } 57 return b[:n], nil 58 } 59 } 60 func (m *ConsensusParams) XXX_Merge(src proto.Message) { 61 xxx_messageInfo_ConsensusParams.Merge(m, src) 62 } 63 func (m *ConsensusParams) XXX_Size() int { 64 return m.Size() 65 } 66 func (m *ConsensusParams) XXX_DiscardUnknown() { 67 xxx_messageInfo_ConsensusParams.DiscardUnknown(m) 68 } 69 70 var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo 71 72 func (m *ConsensusParams) GetBlock() BlockParams { 73 if m != nil { 74 return m.Block 75 } 76 return BlockParams{} 77 } 78 79 func (m *ConsensusParams) GetEvidence() EvidenceParams { 80 if m != nil { 81 return m.Evidence 82 } 83 return EvidenceParams{} 84 } 85 86 func (m *ConsensusParams) GetValidator() ValidatorParams { 87 if m != nil { 88 return m.Validator 89 } 90 return ValidatorParams{} 91 } 92 93 func (m *ConsensusParams) GetVersion() VersionParams { 94 if m != nil { 95 return m.Version 96 } 97 return VersionParams{} 98 } 99 100 // BlockParams contains limits on the block size. 101 type BlockParams struct { 102 // Max block size, in bytes. 103 // Note: must be greater than 0 104 MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` 105 // Max gas per block. 106 // Note: must be greater or equal to -1 107 MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"` 108 // Minimum time increment between consecutive blocks (in milliseconds) If the 109 // block header timestamp is ahead of the system clock, decrease this value. 110 // 111 // Not exposed to the application. 112 TimeIotaMs int64 `protobuf:"varint,3,opt,name=time_iota_ms,json=timeIotaMs,proto3" json:"time_iota_ms,omitempty"` 113 } 114 115 func (m *BlockParams) Reset() { *m = BlockParams{} } 116 func (m *BlockParams) String() string { return proto.CompactTextString(m) } 117 func (*BlockParams) ProtoMessage() {} 118 func (*BlockParams) Descriptor() ([]byte, []int) { 119 return fileDescriptor_e12598271a686f57, []int{1} 120 } 121 func (m *BlockParams) XXX_Unmarshal(b []byte) error { 122 return m.Unmarshal(b) 123 } 124 func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 125 if deterministic { 126 return xxx_messageInfo_BlockParams.Marshal(b, m, deterministic) 127 } else { 128 b = b[:cap(b)] 129 n, err := m.MarshalToSizedBuffer(b) 130 if err != nil { 131 return nil, err 132 } 133 return b[:n], nil 134 } 135 } 136 func (m *BlockParams) XXX_Merge(src proto.Message) { 137 xxx_messageInfo_BlockParams.Merge(m, src) 138 } 139 func (m *BlockParams) XXX_Size() int { 140 return m.Size() 141 } 142 func (m *BlockParams) XXX_DiscardUnknown() { 143 xxx_messageInfo_BlockParams.DiscardUnknown(m) 144 } 145 146 var xxx_messageInfo_BlockParams proto.InternalMessageInfo 147 148 func (m *BlockParams) GetMaxBytes() int64 { 149 if m != nil { 150 return m.MaxBytes 151 } 152 return 0 153 } 154 155 func (m *BlockParams) GetMaxGas() int64 { 156 if m != nil { 157 return m.MaxGas 158 } 159 return 0 160 } 161 162 func (m *BlockParams) GetTimeIotaMs() int64 { 163 if m != nil { 164 return m.TimeIotaMs 165 } 166 return 0 167 } 168 169 // EvidenceParams determine how we handle evidence of malfeasance. 170 type EvidenceParams struct { 171 // Max age of evidence, in blocks. 172 // 173 // The basic formula for calculating this is: MaxAgeDuration / {average block 174 // time}. 175 MaxAgeNumBlocks int64 `protobuf:"varint,1,opt,name=max_age_num_blocks,json=maxAgeNumBlocks,proto3" json:"max_age_num_blocks,omitempty"` 176 // Max age of evidence, in time. 177 // 178 // It should correspond with an app's "unbonding period" or other similar 179 // mechanism for handling [Nothing-At-Stake 180 // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). 181 MaxAgeDuration time.Duration `protobuf:"bytes,2,opt,name=max_age_duration,json=maxAgeDuration,proto3,stdduration" json:"max_age_duration"` 182 // This sets the maximum size of total evidence in bytes that can be committed in a single block. 183 // and should fall comfortably under the max block bytes. 184 // Default is 1048576 or 1MB 185 MaxBytes int64 `protobuf:"varint,3,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"` 186 } 187 188 func (m *EvidenceParams) Reset() { *m = EvidenceParams{} } 189 func (m *EvidenceParams) String() string { return proto.CompactTextString(m) } 190 func (*EvidenceParams) ProtoMessage() {} 191 func (*EvidenceParams) Descriptor() ([]byte, []int) { 192 return fileDescriptor_e12598271a686f57, []int{2} 193 } 194 func (m *EvidenceParams) XXX_Unmarshal(b []byte) error { 195 return m.Unmarshal(b) 196 } 197 func (m *EvidenceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 198 if deterministic { 199 return xxx_messageInfo_EvidenceParams.Marshal(b, m, deterministic) 200 } else { 201 b = b[:cap(b)] 202 n, err := m.MarshalToSizedBuffer(b) 203 if err != nil { 204 return nil, err 205 } 206 return b[:n], nil 207 } 208 } 209 func (m *EvidenceParams) XXX_Merge(src proto.Message) { 210 xxx_messageInfo_EvidenceParams.Merge(m, src) 211 } 212 func (m *EvidenceParams) XXX_Size() int { 213 return m.Size() 214 } 215 func (m *EvidenceParams) XXX_DiscardUnknown() { 216 xxx_messageInfo_EvidenceParams.DiscardUnknown(m) 217 } 218 219 var xxx_messageInfo_EvidenceParams proto.InternalMessageInfo 220 221 func (m *EvidenceParams) GetMaxAgeNumBlocks() int64 { 222 if m != nil { 223 return m.MaxAgeNumBlocks 224 } 225 return 0 226 } 227 228 func (m *EvidenceParams) GetMaxAgeDuration() time.Duration { 229 if m != nil { 230 return m.MaxAgeDuration 231 } 232 return 0 233 } 234 235 func (m *EvidenceParams) GetMaxBytes() int64 { 236 if m != nil { 237 return m.MaxBytes 238 } 239 return 0 240 } 241 242 // ValidatorParams restrict the public key types validators can use. 243 // NOTE: uses ABCI pubkey naming, not Amino names. 244 type ValidatorParams struct { 245 PubKeyTypes []string `protobuf:"bytes,1,rep,name=pub_key_types,json=pubKeyTypes,proto3" json:"pub_key_types,omitempty"` 246 } 247 248 func (m *ValidatorParams) Reset() { *m = ValidatorParams{} } 249 func (m *ValidatorParams) String() string { return proto.CompactTextString(m) } 250 func (*ValidatorParams) ProtoMessage() {} 251 func (*ValidatorParams) Descriptor() ([]byte, []int) { 252 return fileDescriptor_e12598271a686f57, []int{3} 253 } 254 func (m *ValidatorParams) XXX_Unmarshal(b []byte) error { 255 return m.Unmarshal(b) 256 } 257 func (m *ValidatorParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 258 if deterministic { 259 return xxx_messageInfo_ValidatorParams.Marshal(b, m, deterministic) 260 } else { 261 b = b[:cap(b)] 262 n, err := m.MarshalToSizedBuffer(b) 263 if err != nil { 264 return nil, err 265 } 266 return b[:n], nil 267 } 268 } 269 func (m *ValidatorParams) XXX_Merge(src proto.Message) { 270 xxx_messageInfo_ValidatorParams.Merge(m, src) 271 } 272 func (m *ValidatorParams) XXX_Size() int { 273 return m.Size() 274 } 275 func (m *ValidatorParams) XXX_DiscardUnknown() { 276 xxx_messageInfo_ValidatorParams.DiscardUnknown(m) 277 } 278 279 var xxx_messageInfo_ValidatorParams proto.InternalMessageInfo 280 281 func (m *ValidatorParams) GetPubKeyTypes() []string { 282 if m != nil { 283 return m.PubKeyTypes 284 } 285 return nil 286 } 287 288 // VersionParams contains the ABCI application version. 289 type VersionParams struct { 290 AppVersion uint64 `protobuf:"varint,1,opt,name=app_version,json=appVersion,proto3" json:"app_version,omitempty"` 291 } 292 293 func (m *VersionParams) Reset() { *m = VersionParams{} } 294 func (m *VersionParams) String() string { return proto.CompactTextString(m) } 295 func (*VersionParams) ProtoMessage() {} 296 func (*VersionParams) Descriptor() ([]byte, []int) { 297 return fileDescriptor_e12598271a686f57, []int{4} 298 } 299 func (m *VersionParams) XXX_Unmarshal(b []byte) error { 300 return m.Unmarshal(b) 301 } 302 func (m *VersionParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 303 if deterministic { 304 return xxx_messageInfo_VersionParams.Marshal(b, m, deterministic) 305 } else { 306 b = b[:cap(b)] 307 n, err := m.MarshalToSizedBuffer(b) 308 if err != nil { 309 return nil, err 310 } 311 return b[:n], nil 312 } 313 } 314 func (m *VersionParams) XXX_Merge(src proto.Message) { 315 xxx_messageInfo_VersionParams.Merge(m, src) 316 } 317 func (m *VersionParams) XXX_Size() int { 318 return m.Size() 319 } 320 func (m *VersionParams) XXX_DiscardUnknown() { 321 xxx_messageInfo_VersionParams.DiscardUnknown(m) 322 } 323 324 var xxx_messageInfo_VersionParams proto.InternalMessageInfo 325 326 func (m *VersionParams) GetAppVersion() uint64 { 327 if m != nil { 328 return m.AppVersion 329 } 330 return 0 331 } 332 333 // HashedParams is a subset of ConsensusParams. 334 // 335 // It is hashed into the Header.ConsensusHash. 336 type HashedParams struct { 337 BlockMaxBytes int64 `protobuf:"varint,1,opt,name=block_max_bytes,json=blockMaxBytes,proto3" json:"block_max_bytes,omitempty"` 338 BlockMaxGas int64 `protobuf:"varint,2,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"` 339 } 340 341 func (m *HashedParams) Reset() { *m = HashedParams{} } 342 func (m *HashedParams) String() string { return proto.CompactTextString(m) } 343 func (*HashedParams) ProtoMessage() {} 344 func (*HashedParams) Descriptor() ([]byte, []int) { 345 return fileDescriptor_e12598271a686f57, []int{5} 346 } 347 func (m *HashedParams) XXX_Unmarshal(b []byte) error { 348 return m.Unmarshal(b) 349 } 350 func (m *HashedParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 351 if deterministic { 352 return xxx_messageInfo_HashedParams.Marshal(b, m, deterministic) 353 } else { 354 b = b[:cap(b)] 355 n, err := m.MarshalToSizedBuffer(b) 356 if err != nil { 357 return nil, err 358 } 359 return b[:n], nil 360 } 361 } 362 func (m *HashedParams) XXX_Merge(src proto.Message) { 363 xxx_messageInfo_HashedParams.Merge(m, src) 364 } 365 func (m *HashedParams) XXX_Size() int { 366 return m.Size() 367 } 368 func (m *HashedParams) XXX_DiscardUnknown() { 369 xxx_messageInfo_HashedParams.DiscardUnknown(m) 370 } 371 372 var xxx_messageInfo_HashedParams proto.InternalMessageInfo 373 374 func (m *HashedParams) GetBlockMaxBytes() int64 { 375 if m != nil { 376 return m.BlockMaxBytes 377 } 378 return 0 379 } 380 381 func (m *HashedParams) GetBlockMaxGas() int64 { 382 if m != nil { 383 return m.BlockMaxGas 384 } 385 return 0 386 } 387 388 func init() { 389 proto.RegisterType((*ConsensusParams)(nil), "tendermint.types.ConsensusParams") 390 proto.RegisterType((*BlockParams)(nil), "tendermint.types.BlockParams") 391 proto.RegisterType((*EvidenceParams)(nil), "tendermint.types.EvidenceParams") 392 proto.RegisterType((*ValidatorParams)(nil), "tendermint.types.ValidatorParams") 393 proto.RegisterType((*VersionParams)(nil), "tendermint.types.VersionParams") 394 proto.RegisterType((*HashedParams)(nil), "tendermint.types.HashedParams") 395 } 396 397 func init() { proto.RegisterFile("tendermint/types/params.proto", fileDescriptor_e12598271a686f57) } 398 399 var fileDescriptor_e12598271a686f57 = []byte{ 400 // 537 bytes of a gzipped FileDescriptorProto 401 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0x31, 0x6f, 0xd3, 0x40, 402 0x18, 0xcd, 0xd5, 0xa5, 0x4d, 0xbe, 0x34, 0x4d, 0x75, 0x42, 0x22, 0x14, 0xd5, 0x0e, 0x1e, 0x50, 403 0x25, 0x24, 0x5b, 0x82, 0x01, 0xd1, 0xa5, 0xc2, 0x50, 0x15, 0x84, 0x82, 0x90, 0x05, 0x0c, 0x5d, 404 0xac, 0x73, 0x72, 0xb8, 0x56, 0x73, 0x3e, 0xcb, 0x77, 0x8e, 0x92, 0x7f, 0xc1, 0xd8, 0xb1, 0x23, 405 0xfc, 0x03, 0x7e, 0x42, 0xc7, 0x8e, 0x4c, 0x80, 0x92, 0x85, 0x9f, 0x81, 0x7c, 0xce, 0xe1, 0x38, 406 0x65, 0xf3, 0x7d, 0xdf, 0x7b, 0xef, 0xfc, 0xde, 0xd3, 0xc1, 0x81, 0xa4, 0xc9, 0x88, 0x66, 0x2c, 407 0x4e, 0xa4, 0x2b, 0x67, 0x29, 0x15, 0x6e, 0x4a, 0x32, 0xc2, 0x84, 0x93, 0x66, 0x5c, 0x72, 0xbc, 408 0x57, 0xad, 0x1d, 0xb5, 0xde, 0xbf, 0x1b, 0xf1, 0x88, 0xab, 0xa5, 0x5b, 0x7c, 0x95, 0xb8, 0x7d, 409 0x33, 0xe2, 0x3c, 0x1a, 0x53, 0x57, 0x9d, 0xc2, 0xfc, 0xb3, 0x3b, 0xca, 0x33, 0x22, 0x63, 0x9e, 410 0x94, 0x7b, 0xfb, 0x72, 0x03, 0xba, 0x2f, 0x79, 0x22, 0x68, 0x22, 0x72, 0xf1, 0x5e, 0xdd, 0x80, 411 0x9f, 0xc3, 0x9d, 0x70, 0xcc, 0x87, 0x17, 0x3d, 0xd4, 0x47, 0x87, 0xed, 0x27, 0x07, 0xce, 0xfa, 412 0x5d, 0x8e, 0x57, 0xac, 0x4b, 0xb4, 0xb7, 0x79, 0xfd, 0xd3, 0x6a, 0xf8, 0x25, 0x03, 0x7b, 0xd0, 413 0xa4, 0x93, 0x78, 0x44, 0x93, 0x21, 0xed, 0x6d, 0x28, 0x76, 0xff, 0x36, 0xfb, 0x64, 0x89, 0xa8, 414 0x09, 0xfc, 0xe3, 0xe1, 0x13, 0x68, 0x4d, 0xc8, 0x38, 0x1e, 0x11, 0xc9, 0xb3, 0x9e, 0xa1, 0x44, 415 0x1e, 0xde, 0x16, 0xf9, 0xa4, 0x21, 0x35, 0x95, 0x8a, 0x89, 0x8f, 0x61, 0x7b, 0x42, 0x33, 0x11, 416 0xf3, 0xa4, 0xb7, 0xa9, 0x44, 0xac, 0xff, 0x88, 0x94, 0x80, 0x9a, 0x84, 0x66, 0xd9, 0x14, 0xda, 417 0x2b, 0x3e, 0xf1, 0x03, 0x68, 0x31, 0x32, 0x0d, 0xc2, 0x99, 0xa4, 0x42, 0x25, 0x63, 0xf8, 0x4d, 418 0x46, 0xa6, 0x5e, 0x71, 0xc6, 0xf7, 0x60, 0xbb, 0x58, 0x46, 0x44, 0x28, 0xdb, 0x86, 0xbf, 0xc5, 419 0xc8, 0xf4, 0x94, 0x08, 0xdc, 0x87, 0x1d, 0x19, 0x33, 0x1a, 0xc4, 0x5c, 0x92, 0x80, 0x09, 0xe5, 420 0xc7, 0xf0, 0xa1, 0x98, 0xbd, 0xe1, 0x92, 0x0c, 0x84, 0xfd, 0x0d, 0xc1, 0x6e, 0x3d, 0x11, 0xfc, 421 0x18, 0x70, 0xa1, 0x46, 0x22, 0x1a, 0x24, 0x39, 0x0b, 0x54, 0xb4, 0xfa, 0xce, 0x2e, 0x23, 0xd3, 422 0x17, 0x11, 0x7d, 0x97, 0x33, 0xf5, 0x73, 0x02, 0x0f, 0x60, 0x4f, 0x83, 0x75, 0xb7, 0xcb, 0xe8, 423 0xef, 0x3b, 0x65, 0xf9, 0x8e, 0x2e, 0xdf, 0x79, 0xb5, 0x04, 0x78, 0xcd, 0xc2, 0xea, 0xe5, 0x2f, 424 0x0b, 0xf9, 0xbb, 0xa5, 0x9e, 0xde, 0xd4, 0x6d, 0x1a, 0x75, 0x9b, 0xf6, 0x31, 0x74, 0xd7, 0x72, 425 0xc7, 0x36, 0x74, 0xd2, 0x3c, 0x0c, 0x2e, 0xe8, 0x2c, 0x50, 0x99, 0xf6, 0x50, 0xdf, 0x38, 0x6c, 426 0xf9, 0xed, 0x34, 0x0f, 0xdf, 0xd2, 0xd9, 0x87, 0x62, 0x74, 0xd4, 0xfc, 0x7e, 0x65, 0xa1, 0x3f, 427 0x57, 0x16, 0xb2, 0x8f, 0xa0, 0x53, 0xcb, 0x1c, 0x5b, 0xd0, 0x26, 0x69, 0x1a, 0xe8, 0xa6, 0x0a, 428 0x8f, 0x9b, 0x3e, 0x90, 0x34, 0x5d, 0xc2, 0x56, 0xb8, 0x67, 0xb0, 0xf3, 0x9a, 0x88, 0x73, 0x3a, 429 0x5a, 0x52, 0x1f, 0x41, 0x57, 0x25, 0x13, 0xac, 0xd7, 0xd2, 0x51, 0xe3, 0x81, 0xee, 0xc6, 0x86, 430 0x4e, 0x85, 0xab, 0x1a, 0x6a, 0x6b, 0xd4, 0x29, 0x11, 0xde, 0xc7, 0xaf, 0x73, 0x13, 0x5d, 0xcf, 431 0x4d, 0x74, 0x33, 0x37, 0xd1, 0xef, 0xb9, 0x89, 0xbe, 0x2c, 0xcc, 0xc6, 0xcd, 0xc2, 0x6c, 0xfc, 432 0x58, 0x98, 0x8d, 0xb3, 0x67, 0x51, 0x2c, 0xcf, 0xf3, 0xd0, 0x19, 0x72, 0xe6, 0xae, 0x3e, 0xcb, 433 0xea, 0xb3, 0x7c, 0x77, 0xeb, 0x4f, 0x36, 0xdc, 0x52, 0xf3, 0xa7, 0x7f, 0x03, 0x00, 0x00, 0xff, 434 0xff, 0xfe, 0xe0, 0x3d, 0x9c, 0xcd, 0x03, 0x00, 0x00, 435 } 436 437 func (this *ConsensusParams) Equal(that interface{}) bool { 438 if that == nil { 439 return this == nil 440 } 441 442 that1, ok := that.(*ConsensusParams) 443 if !ok { 444 that2, ok := that.(ConsensusParams) 445 if ok { 446 that1 = &that2 447 } else { 448 return false 449 } 450 } 451 if that1 == nil { 452 return this == nil 453 } else if this == nil { 454 return false 455 } 456 if !this.Block.Equal(&that1.Block) { 457 return false 458 } 459 if !this.Evidence.Equal(&that1.Evidence) { 460 return false 461 } 462 if !this.Validator.Equal(&that1.Validator) { 463 return false 464 } 465 if !this.Version.Equal(&that1.Version) { 466 return false 467 } 468 return true 469 } 470 func (this *BlockParams) Equal(that interface{}) bool { 471 if that == nil { 472 return this == nil 473 } 474 475 that1, ok := that.(*BlockParams) 476 if !ok { 477 that2, ok := that.(BlockParams) 478 if ok { 479 that1 = &that2 480 } else { 481 return false 482 } 483 } 484 if that1 == nil { 485 return this == nil 486 } else if this == nil { 487 return false 488 } 489 if this.MaxBytes != that1.MaxBytes { 490 return false 491 } 492 if this.MaxGas != that1.MaxGas { 493 return false 494 } 495 if this.TimeIotaMs != that1.TimeIotaMs { 496 return false 497 } 498 return true 499 } 500 func (this *EvidenceParams) Equal(that interface{}) bool { 501 if that == nil { 502 return this == nil 503 } 504 505 that1, ok := that.(*EvidenceParams) 506 if !ok { 507 that2, ok := that.(EvidenceParams) 508 if ok { 509 that1 = &that2 510 } else { 511 return false 512 } 513 } 514 if that1 == nil { 515 return this == nil 516 } else if this == nil { 517 return false 518 } 519 if this.MaxAgeNumBlocks != that1.MaxAgeNumBlocks { 520 return false 521 } 522 if this.MaxAgeDuration != that1.MaxAgeDuration { 523 return false 524 } 525 if this.MaxBytes != that1.MaxBytes { 526 return false 527 } 528 return true 529 } 530 func (this *ValidatorParams) Equal(that interface{}) bool { 531 if that == nil { 532 return this == nil 533 } 534 535 that1, ok := that.(*ValidatorParams) 536 if !ok { 537 that2, ok := that.(ValidatorParams) 538 if ok { 539 that1 = &that2 540 } else { 541 return false 542 } 543 } 544 if that1 == nil { 545 return this == nil 546 } else if this == nil { 547 return false 548 } 549 if len(this.PubKeyTypes) != len(that1.PubKeyTypes) { 550 return false 551 } 552 for i := range this.PubKeyTypes { 553 if this.PubKeyTypes[i] != that1.PubKeyTypes[i] { 554 return false 555 } 556 } 557 return true 558 } 559 func (this *VersionParams) Equal(that interface{}) bool { 560 if that == nil { 561 return this == nil 562 } 563 564 that1, ok := that.(*VersionParams) 565 if !ok { 566 that2, ok := that.(VersionParams) 567 if ok { 568 that1 = &that2 569 } else { 570 return false 571 } 572 } 573 if that1 == nil { 574 return this == nil 575 } else if this == nil { 576 return false 577 } 578 if this.AppVersion != that1.AppVersion { 579 return false 580 } 581 return true 582 } 583 func (this *HashedParams) Equal(that interface{}) bool { 584 if that == nil { 585 return this == nil 586 } 587 588 that1, ok := that.(*HashedParams) 589 if !ok { 590 that2, ok := that.(HashedParams) 591 if ok { 592 that1 = &that2 593 } else { 594 return false 595 } 596 } 597 if that1 == nil { 598 return this == nil 599 } else if this == nil { 600 return false 601 } 602 if this.BlockMaxBytes != that1.BlockMaxBytes { 603 return false 604 } 605 if this.BlockMaxGas != that1.BlockMaxGas { 606 return false 607 } 608 return true 609 } 610 func (m *ConsensusParams) Marshal() (dAtA []byte, err error) { 611 size := m.Size() 612 dAtA = make([]byte, size) 613 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 614 if err != nil { 615 return nil, err 616 } 617 return dAtA[:n], nil 618 } 619 620 func (m *ConsensusParams) MarshalTo(dAtA []byte) (int, error) { 621 size := m.Size() 622 return m.MarshalToSizedBuffer(dAtA[:size]) 623 } 624 625 func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { 626 i := len(dAtA) 627 _ = i 628 var l int 629 _ = l 630 { 631 size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) 632 if err != nil { 633 return 0, err 634 } 635 i -= size 636 i = encodeVarintParams(dAtA, i, uint64(size)) 637 } 638 i-- 639 dAtA[i] = 0x22 640 { 641 size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) 642 if err != nil { 643 return 0, err 644 } 645 i -= size 646 i = encodeVarintParams(dAtA, i, uint64(size)) 647 } 648 i-- 649 dAtA[i] = 0x1a 650 { 651 size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) 652 if err != nil { 653 return 0, err 654 } 655 i -= size 656 i = encodeVarintParams(dAtA, i, uint64(size)) 657 } 658 i-- 659 dAtA[i] = 0x12 660 { 661 size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) 662 if err != nil { 663 return 0, err 664 } 665 i -= size 666 i = encodeVarintParams(dAtA, i, uint64(size)) 667 } 668 i-- 669 dAtA[i] = 0xa 670 return len(dAtA) - i, nil 671 } 672 673 func (m *BlockParams) Marshal() (dAtA []byte, err error) { 674 size := m.Size() 675 dAtA = make([]byte, size) 676 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 677 if err != nil { 678 return nil, err 679 } 680 return dAtA[:n], nil 681 } 682 683 func (m *BlockParams) MarshalTo(dAtA []byte) (int, error) { 684 size := m.Size() 685 return m.MarshalToSizedBuffer(dAtA[:size]) 686 } 687 688 func (m *BlockParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { 689 i := len(dAtA) 690 _ = i 691 var l int 692 _ = l 693 if m.TimeIotaMs != 0 { 694 i = encodeVarintParams(dAtA, i, uint64(m.TimeIotaMs)) 695 i-- 696 dAtA[i] = 0x18 697 } 698 if m.MaxGas != 0 { 699 i = encodeVarintParams(dAtA, i, uint64(m.MaxGas)) 700 i-- 701 dAtA[i] = 0x10 702 } 703 if m.MaxBytes != 0 { 704 i = encodeVarintParams(dAtA, i, uint64(m.MaxBytes)) 705 i-- 706 dAtA[i] = 0x8 707 } 708 return len(dAtA) - i, nil 709 } 710 711 func (m *EvidenceParams) Marshal() (dAtA []byte, err error) { 712 size := m.Size() 713 dAtA = make([]byte, size) 714 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 715 if err != nil { 716 return nil, err 717 } 718 return dAtA[:n], nil 719 } 720 721 func (m *EvidenceParams) MarshalTo(dAtA []byte) (int, error) { 722 size := m.Size() 723 return m.MarshalToSizedBuffer(dAtA[:size]) 724 } 725 726 func (m *EvidenceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { 727 i := len(dAtA) 728 _ = i 729 var l int 730 _ = l 731 if m.MaxBytes != 0 { 732 i = encodeVarintParams(dAtA, i, uint64(m.MaxBytes)) 733 i-- 734 dAtA[i] = 0x18 735 } 736 n5, err5 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration):]) 737 if err5 != nil { 738 return 0, err5 739 } 740 i -= n5 741 i = encodeVarintParams(dAtA, i, uint64(n5)) 742 i-- 743 dAtA[i] = 0x12 744 if m.MaxAgeNumBlocks != 0 { 745 i = encodeVarintParams(dAtA, i, uint64(m.MaxAgeNumBlocks)) 746 i-- 747 dAtA[i] = 0x8 748 } 749 return len(dAtA) - i, nil 750 } 751 752 func (m *ValidatorParams) Marshal() (dAtA []byte, err error) { 753 size := m.Size() 754 dAtA = make([]byte, size) 755 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 756 if err != nil { 757 return nil, err 758 } 759 return dAtA[:n], nil 760 } 761 762 func (m *ValidatorParams) MarshalTo(dAtA []byte) (int, error) { 763 size := m.Size() 764 return m.MarshalToSizedBuffer(dAtA[:size]) 765 } 766 767 func (m *ValidatorParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { 768 i := len(dAtA) 769 _ = i 770 var l int 771 _ = l 772 if len(m.PubKeyTypes) > 0 { 773 for iNdEx := len(m.PubKeyTypes) - 1; iNdEx >= 0; iNdEx-- { 774 i -= len(m.PubKeyTypes[iNdEx]) 775 copy(dAtA[i:], m.PubKeyTypes[iNdEx]) 776 i = encodeVarintParams(dAtA, i, uint64(len(m.PubKeyTypes[iNdEx]))) 777 i-- 778 dAtA[i] = 0xa 779 } 780 } 781 return len(dAtA) - i, nil 782 } 783 784 func (m *VersionParams) Marshal() (dAtA []byte, err error) { 785 size := m.Size() 786 dAtA = make([]byte, size) 787 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 788 if err != nil { 789 return nil, err 790 } 791 return dAtA[:n], nil 792 } 793 794 func (m *VersionParams) MarshalTo(dAtA []byte) (int, error) { 795 size := m.Size() 796 return m.MarshalToSizedBuffer(dAtA[:size]) 797 } 798 799 func (m *VersionParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { 800 i := len(dAtA) 801 _ = i 802 var l int 803 _ = l 804 if m.AppVersion != 0 { 805 i = encodeVarintParams(dAtA, i, uint64(m.AppVersion)) 806 i-- 807 dAtA[i] = 0x8 808 } 809 return len(dAtA) - i, nil 810 } 811 812 func (m *HashedParams) Marshal() (dAtA []byte, err error) { 813 size := m.Size() 814 dAtA = make([]byte, size) 815 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 816 if err != nil { 817 return nil, err 818 } 819 return dAtA[:n], nil 820 } 821 822 func (m *HashedParams) MarshalTo(dAtA []byte) (int, error) { 823 size := m.Size() 824 return m.MarshalToSizedBuffer(dAtA[:size]) 825 } 826 827 func (m *HashedParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { 828 i := len(dAtA) 829 _ = i 830 var l int 831 _ = l 832 if m.BlockMaxGas != 0 { 833 i = encodeVarintParams(dAtA, i, uint64(m.BlockMaxGas)) 834 i-- 835 dAtA[i] = 0x10 836 } 837 if m.BlockMaxBytes != 0 { 838 i = encodeVarintParams(dAtA, i, uint64(m.BlockMaxBytes)) 839 i-- 840 dAtA[i] = 0x8 841 } 842 return len(dAtA) - i, nil 843 } 844 845 func encodeVarintParams(dAtA []byte, offset int, v uint64) int { 846 offset -= sovParams(v) 847 base := offset 848 for v >= 1<<7 { 849 dAtA[offset] = uint8(v&0x7f | 0x80) 850 v >>= 7 851 offset++ 852 } 853 dAtA[offset] = uint8(v) 854 return base 855 } 856 func NewPopulatedValidatorParams(r randyParams, easy bool) *ValidatorParams { 857 this := &ValidatorParams{} 858 v1 := r.Intn(10) 859 this.PubKeyTypes = make([]string, v1) 860 for i := 0; i < v1; i++ { 861 this.PubKeyTypes[i] = string(randStringParams(r)) 862 } 863 if !easy && r.Intn(10) != 0 { 864 } 865 return this 866 } 867 868 func NewPopulatedVersionParams(r randyParams, easy bool) *VersionParams { 869 this := &VersionParams{} 870 this.AppVersion = uint64(uint64(r.Uint32())) 871 if !easy && r.Intn(10) != 0 { 872 } 873 return this 874 } 875 876 type randyParams interface { 877 Float32() float32 878 Float64() float64 879 Int63() int64 880 Int31() int32 881 Uint32() uint32 882 Intn(n int) int 883 } 884 885 func randUTF8RuneParams(r randyParams) rune { 886 ru := r.Intn(62) 887 if ru < 10 { 888 return rune(ru + 48) 889 } else if ru < 36 { 890 return rune(ru + 55) 891 } 892 return rune(ru + 61) 893 } 894 func randStringParams(r randyParams) string { 895 v2 := r.Intn(100) 896 tmps := make([]rune, v2) 897 for i := 0; i < v2; i++ { 898 tmps[i] = randUTF8RuneParams(r) 899 } 900 return string(tmps) 901 } 902 func randUnrecognizedParams(r randyParams, maxFieldNumber int) (dAtA []byte) { 903 l := r.Intn(5) 904 for i := 0; i < l; i++ { 905 wire := r.Intn(4) 906 if wire == 3 { 907 wire = 5 908 } 909 fieldNumber := maxFieldNumber + r.Intn(100) 910 dAtA = randFieldParams(dAtA, r, fieldNumber, wire) 911 } 912 return dAtA 913 } 914 func randFieldParams(dAtA []byte, r randyParams, fieldNumber int, wire int) []byte { 915 key := uint32(fieldNumber)<<3 | uint32(wire) 916 switch wire { 917 case 0: 918 dAtA = encodeVarintPopulateParams(dAtA, uint64(key)) 919 v3 := r.Int63() 920 if r.Intn(2) == 0 { 921 v3 *= -1 922 } 923 dAtA = encodeVarintPopulateParams(dAtA, uint64(v3)) 924 case 1: 925 dAtA = encodeVarintPopulateParams(dAtA, uint64(key)) 926 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 927 case 2: 928 dAtA = encodeVarintPopulateParams(dAtA, uint64(key)) 929 ll := r.Intn(100) 930 dAtA = encodeVarintPopulateParams(dAtA, uint64(ll)) 931 for j := 0; j < ll; j++ { 932 dAtA = append(dAtA, byte(r.Intn(256))) 933 } 934 default: 935 dAtA = encodeVarintPopulateParams(dAtA, uint64(key)) 936 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) 937 } 938 return dAtA 939 } 940 func encodeVarintPopulateParams(dAtA []byte, v uint64) []byte { 941 for v >= 1<<7 { 942 dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) 943 v >>= 7 944 } 945 dAtA = append(dAtA, uint8(v)) 946 return dAtA 947 } 948 func (m *ConsensusParams) Size() (n int) { 949 if m == nil { 950 return 0 951 } 952 var l int 953 _ = l 954 l = m.Block.Size() 955 n += 1 + l + sovParams(uint64(l)) 956 l = m.Evidence.Size() 957 n += 1 + l + sovParams(uint64(l)) 958 l = m.Validator.Size() 959 n += 1 + l + sovParams(uint64(l)) 960 l = m.Version.Size() 961 n += 1 + l + sovParams(uint64(l)) 962 return n 963 } 964 965 func (m *BlockParams) Size() (n int) { 966 if m == nil { 967 return 0 968 } 969 var l int 970 _ = l 971 if m.MaxBytes != 0 { 972 n += 1 + sovParams(uint64(m.MaxBytes)) 973 } 974 if m.MaxGas != 0 { 975 n += 1 + sovParams(uint64(m.MaxGas)) 976 } 977 if m.TimeIotaMs != 0 { 978 n += 1 + sovParams(uint64(m.TimeIotaMs)) 979 } 980 return n 981 } 982 983 func (m *EvidenceParams) Size() (n int) { 984 if m == nil { 985 return 0 986 } 987 var l int 988 _ = l 989 if m.MaxAgeNumBlocks != 0 { 990 n += 1 + sovParams(uint64(m.MaxAgeNumBlocks)) 991 } 992 l = github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration) 993 n += 1 + l + sovParams(uint64(l)) 994 if m.MaxBytes != 0 { 995 n += 1 + sovParams(uint64(m.MaxBytes)) 996 } 997 return n 998 } 999 1000 func (m *ValidatorParams) Size() (n int) { 1001 if m == nil { 1002 return 0 1003 } 1004 var l int 1005 _ = l 1006 if len(m.PubKeyTypes) > 0 { 1007 for _, s := range m.PubKeyTypes { 1008 l = len(s) 1009 n += 1 + l + sovParams(uint64(l)) 1010 } 1011 } 1012 return n 1013 } 1014 1015 func (m *VersionParams) Size() (n int) { 1016 if m == nil { 1017 return 0 1018 } 1019 var l int 1020 _ = l 1021 if m.AppVersion != 0 { 1022 n += 1 + sovParams(uint64(m.AppVersion)) 1023 } 1024 return n 1025 } 1026 1027 func (m *HashedParams) Size() (n int) { 1028 if m == nil { 1029 return 0 1030 } 1031 var l int 1032 _ = l 1033 if m.BlockMaxBytes != 0 { 1034 n += 1 + sovParams(uint64(m.BlockMaxBytes)) 1035 } 1036 if m.BlockMaxGas != 0 { 1037 n += 1 + sovParams(uint64(m.BlockMaxGas)) 1038 } 1039 return n 1040 } 1041 1042 func sovParams(x uint64) (n int) { 1043 return (math_bits.Len64(x|1) + 6) / 7 1044 } 1045 func sozParams(x uint64) (n int) { 1046 return sovParams(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1047 } 1048 func (m *ConsensusParams) Unmarshal(dAtA []byte) error { 1049 l := len(dAtA) 1050 iNdEx := 0 1051 for iNdEx < l { 1052 preIndex := iNdEx 1053 var wire uint64 1054 for shift := uint(0); ; shift += 7 { 1055 if shift >= 64 { 1056 return ErrIntOverflowParams 1057 } 1058 if iNdEx >= l { 1059 return io.ErrUnexpectedEOF 1060 } 1061 b := dAtA[iNdEx] 1062 iNdEx++ 1063 wire |= uint64(b&0x7F) << shift 1064 if b < 0x80 { 1065 break 1066 } 1067 } 1068 fieldNum := int32(wire >> 3) 1069 wireType := int(wire & 0x7) 1070 if wireType == 4 { 1071 return fmt.Errorf("proto: ConsensusParams: wiretype end group for non-group") 1072 } 1073 if fieldNum <= 0 { 1074 return fmt.Errorf("proto: ConsensusParams: illegal tag %d (wire type %d)", fieldNum, wire) 1075 } 1076 switch fieldNum { 1077 case 1: 1078 if wireType != 2 { 1079 return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) 1080 } 1081 var msglen int 1082 for shift := uint(0); ; shift += 7 { 1083 if shift >= 64 { 1084 return ErrIntOverflowParams 1085 } 1086 if iNdEx >= l { 1087 return io.ErrUnexpectedEOF 1088 } 1089 b := dAtA[iNdEx] 1090 iNdEx++ 1091 msglen |= int(b&0x7F) << shift 1092 if b < 0x80 { 1093 break 1094 } 1095 } 1096 if msglen < 0 { 1097 return ErrInvalidLengthParams 1098 } 1099 postIndex := iNdEx + msglen 1100 if postIndex < 0 { 1101 return ErrInvalidLengthParams 1102 } 1103 if postIndex > l { 1104 return io.ErrUnexpectedEOF 1105 } 1106 if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1107 return err 1108 } 1109 iNdEx = postIndex 1110 case 2: 1111 if wireType != 2 { 1112 return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) 1113 } 1114 var msglen int 1115 for shift := uint(0); ; shift += 7 { 1116 if shift >= 64 { 1117 return ErrIntOverflowParams 1118 } 1119 if iNdEx >= l { 1120 return io.ErrUnexpectedEOF 1121 } 1122 b := dAtA[iNdEx] 1123 iNdEx++ 1124 msglen |= int(b&0x7F) << shift 1125 if b < 0x80 { 1126 break 1127 } 1128 } 1129 if msglen < 0 { 1130 return ErrInvalidLengthParams 1131 } 1132 postIndex := iNdEx + msglen 1133 if postIndex < 0 { 1134 return ErrInvalidLengthParams 1135 } 1136 if postIndex > l { 1137 return io.ErrUnexpectedEOF 1138 } 1139 if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1140 return err 1141 } 1142 iNdEx = postIndex 1143 case 3: 1144 if wireType != 2 { 1145 return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) 1146 } 1147 var msglen int 1148 for shift := uint(0); ; shift += 7 { 1149 if shift >= 64 { 1150 return ErrIntOverflowParams 1151 } 1152 if iNdEx >= l { 1153 return io.ErrUnexpectedEOF 1154 } 1155 b := dAtA[iNdEx] 1156 iNdEx++ 1157 msglen |= int(b&0x7F) << shift 1158 if b < 0x80 { 1159 break 1160 } 1161 } 1162 if msglen < 0 { 1163 return ErrInvalidLengthParams 1164 } 1165 postIndex := iNdEx + msglen 1166 if postIndex < 0 { 1167 return ErrInvalidLengthParams 1168 } 1169 if postIndex > l { 1170 return io.ErrUnexpectedEOF 1171 } 1172 if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1173 return err 1174 } 1175 iNdEx = postIndex 1176 case 4: 1177 if wireType != 2 { 1178 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 1179 } 1180 var msglen int 1181 for shift := uint(0); ; shift += 7 { 1182 if shift >= 64 { 1183 return ErrIntOverflowParams 1184 } 1185 if iNdEx >= l { 1186 return io.ErrUnexpectedEOF 1187 } 1188 b := dAtA[iNdEx] 1189 iNdEx++ 1190 msglen |= int(b&0x7F) << shift 1191 if b < 0x80 { 1192 break 1193 } 1194 } 1195 if msglen < 0 { 1196 return ErrInvalidLengthParams 1197 } 1198 postIndex := iNdEx + msglen 1199 if postIndex < 0 { 1200 return ErrInvalidLengthParams 1201 } 1202 if postIndex > l { 1203 return io.ErrUnexpectedEOF 1204 } 1205 if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1206 return err 1207 } 1208 iNdEx = postIndex 1209 default: 1210 iNdEx = preIndex 1211 skippy, err := skipParams(dAtA[iNdEx:]) 1212 if err != nil { 1213 return err 1214 } 1215 if (skippy < 0) || (iNdEx+skippy) < 0 { 1216 return ErrInvalidLengthParams 1217 } 1218 if (iNdEx + skippy) > l { 1219 return io.ErrUnexpectedEOF 1220 } 1221 iNdEx += skippy 1222 } 1223 } 1224 1225 if iNdEx > l { 1226 return io.ErrUnexpectedEOF 1227 } 1228 return nil 1229 } 1230 func (m *BlockParams) Unmarshal(dAtA []byte) error { 1231 l := len(dAtA) 1232 iNdEx := 0 1233 for iNdEx < l { 1234 preIndex := iNdEx 1235 var wire uint64 1236 for shift := uint(0); ; shift += 7 { 1237 if shift >= 64 { 1238 return ErrIntOverflowParams 1239 } 1240 if iNdEx >= l { 1241 return io.ErrUnexpectedEOF 1242 } 1243 b := dAtA[iNdEx] 1244 iNdEx++ 1245 wire |= uint64(b&0x7F) << shift 1246 if b < 0x80 { 1247 break 1248 } 1249 } 1250 fieldNum := int32(wire >> 3) 1251 wireType := int(wire & 0x7) 1252 if wireType == 4 { 1253 return fmt.Errorf("proto: BlockParams: wiretype end group for non-group") 1254 } 1255 if fieldNum <= 0 { 1256 return fmt.Errorf("proto: BlockParams: illegal tag %d (wire type %d)", fieldNum, wire) 1257 } 1258 switch fieldNum { 1259 case 1: 1260 if wireType != 0 { 1261 return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType) 1262 } 1263 m.MaxBytes = 0 1264 for shift := uint(0); ; shift += 7 { 1265 if shift >= 64 { 1266 return ErrIntOverflowParams 1267 } 1268 if iNdEx >= l { 1269 return io.ErrUnexpectedEOF 1270 } 1271 b := dAtA[iNdEx] 1272 iNdEx++ 1273 m.MaxBytes |= int64(b&0x7F) << shift 1274 if b < 0x80 { 1275 break 1276 } 1277 } 1278 case 2: 1279 if wireType != 0 { 1280 return fmt.Errorf("proto: wrong wireType = %d for field MaxGas", wireType) 1281 } 1282 m.MaxGas = 0 1283 for shift := uint(0); ; shift += 7 { 1284 if shift >= 64 { 1285 return ErrIntOverflowParams 1286 } 1287 if iNdEx >= l { 1288 return io.ErrUnexpectedEOF 1289 } 1290 b := dAtA[iNdEx] 1291 iNdEx++ 1292 m.MaxGas |= int64(b&0x7F) << shift 1293 if b < 0x80 { 1294 break 1295 } 1296 } 1297 case 3: 1298 if wireType != 0 { 1299 return fmt.Errorf("proto: wrong wireType = %d for field TimeIotaMs", wireType) 1300 } 1301 m.TimeIotaMs = 0 1302 for shift := uint(0); ; shift += 7 { 1303 if shift >= 64 { 1304 return ErrIntOverflowParams 1305 } 1306 if iNdEx >= l { 1307 return io.ErrUnexpectedEOF 1308 } 1309 b := dAtA[iNdEx] 1310 iNdEx++ 1311 m.TimeIotaMs |= int64(b&0x7F) << shift 1312 if b < 0x80 { 1313 break 1314 } 1315 } 1316 default: 1317 iNdEx = preIndex 1318 skippy, err := skipParams(dAtA[iNdEx:]) 1319 if err != nil { 1320 return err 1321 } 1322 if (skippy < 0) || (iNdEx+skippy) < 0 { 1323 return ErrInvalidLengthParams 1324 } 1325 if (iNdEx + skippy) > l { 1326 return io.ErrUnexpectedEOF 1327 } 1328 iNdEx += skippy 1329 } 1330 } 1331 1332 if iNdEx > l { 1333 return io.ErrUnexpectedEOF 1334 } 1335 return nil 1336 } 1337 func (m *EvidenceParams) Unmarshal(dAtA []byte) error { 1338 l := len(dAtA) 1339 iNdEx := 0 1340 for iNdEx < l { 1341 preIndex := iNdEx 1342 var wire uint64 1343 for shift := uint(0); ; shift += 7 { 1344 if shift >= 64 { 1345 return ErrIntOverflowParams 1346 } 1347 if iNdEx >= l { 1348 return io.ErrUnexpectedEOF 1349 } 1350 b := dAtA[iNdEx] 1351 iNdEx++ 1352 wire |= uint64(b&0x7F) << shift 1353 if b < 0x80 { 1354 break 1355 } 1356 } 1357 fieldNum := int32(wire >> 3) 1358 wireType := int(wire & 0x7) 1359 if wireType == 4 { 1360 return fmt.Errorf("proto: EvidenceParams: wiretype end group for non-group") 1361 } 1362 if fieldNum <= 0 { 1363 return fmt.Errorf("proto: EvidenceParams: illegal tag %d (wire type %d)", fieldNum, wire) 1364 } 1365 switch fieldNum { 1366 case 1: 1367 if wireType != 0 { 1368 return fmt.Errorf("proto: wrong wireType = %d for field MaxAgeNumBlocks", wireType) 1369 } 1370 m.MaxAgeNumBlocks = 0 1371 for shift := uint(0); ; shift += 7 { 1372 if shift >= 64 { 1373 return ErrIntOverflowParams 1374 } 1375 if iNdEx >= l { 1376 return io.ErrUnexpectedEOF 1377 } 1378 b := dAtA[iNdEx] 1379 iNdEx++ 1380 m.MaxAgeNumBlocks |= int64(b&0x7F) << shift 1381 if b < 0x80 { 1382 break 1383 } 1384 } 1385 case 2: 1386 if wireType != 2 { 1387 return fmt.Errorf("proto: wrong wireType = %d for field MaxAgeDuration", wireType) 1388 } 1389 var msglen int 1390 for shift := uint(0); ; shift += 7 { 1391 if shift >= 64 { 1392 return ErrIntOverflowParams 1393 } 1394 if iNdEx >= l { 1395 return io.ErrUnexpectedEOF 1396 } 1397 b := dAtA[iNdEx] 1398 iNdEx++ 1399 msglen |= int(b&0x7F) << shift 1400 if b < 0x80 { 1401 break 1402 } 1403 } 1404 if msglen < 0 { 1405 return ErrInvalidLengthParams 1406 } 1407 postIndex := iNdEx + msglen 1408 if postIndex < 0 { 1409 return ErrInvalidLengthParams 1410 } 1411 if postIndex > l { 1412 return io.ErrUnexpectedEOF 1413 } 1414 if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(&m.MaxAgeDuration, dAtA[iNdEx:postIndex]); err != nil { 1415 return err 1416 } 1417 iNdEx = postIndex 1418 case 3: 1419 if wireType != 0 { 1420 return fmt.Errorf("proto: wrong wireType = %d for field MaxBytes", wireType) 1421 } 1422 m.MaxBytes = 0 1423 for shift := uint(0); ; shift += 7 { 1424 if shift >= 64 { 1425 return ErrIntOverflowParams 1426 } 1427 if iNdEx >= l { 1428 return io.ErrUnexpectedEOF 1429 } 1430 b := dAtA[iNdEx] 1431 iNdEx++ 1432 m.MaxBytes |= int64(b&0x7F) << shift 1433 if b < 0x80 { 1434 break 1435 } 1436 } 1437 default: 1438 iNdEx = preIndex 1439 skippy, err := skipParams(dAtA[iNdEx:]) 1440 if err != nil { 1441 return err 1442 } 1443 if (skippy < 0) || (iNdEx+skippy) < 0 { 1444 return ErrInvalidLengthParams 1445 } 1446 if (iNdEx + skippy) > l { 1447 return io.ErrUnexpectedEOF 1448 } 1449 iNdEx += skippy 1450 } 1451 } 1452 1453 if iNdEx > l { 1454 return io.ErrUnexpectedEOF 1455 } 1456 return nil 1457 } 1458 func (m *ValidatorParams) Unmarshal(dAtA []byte) error { 1459 l := len(dAtA) 1460 iNdEx := 0 1461 for iNdEx < l { 1462 preIndex := iNdEx 1463 var wire uint64 1464 for shift := uint(0); ; shift += 7 { 1465 if shift >= 64 { 1466 return ErrIntOverflowParams 1467 } 1468 if iNdEx >= l { 1469 return io.ErrUnexpectedEOF 1470 } 1471 b := dAtA[iNdEx] 1472 iNdEx++ 1473 wire |= uint64(b&0x7F) << shift 1474 if b < 0x80 { 1475 break 1476 } 1477 } 1478 fieldNum := int32(wire >> 3) 1479 wireType := int(wire & 0x7) 1480 if wireType == 4 { 1481 return fmt.Errorf("proto: ValidatorParams: wiretype end group for non-group") 1482 } 1483 if fieldNum <= 0 { 1484 return fmt.Errorf("proto: ValidatorParams: illegal tag %d (wire type %d)", fieldNum, wire) 1485 } 1486 switch fieldNum { 1487 case 1: 1488 if wireType != 2 { 1489 return fmt.Errorf("proto: wrong wireType = %d for field PubKeyTypes", wireType) 1490 } 1491 var stringLen uint64 1492 for shift := uint(0); ; shift += 7 { 1493 if shift >= 64 { 1494 return ErrIntOverflowParams 1495 } 1496 if iNdEx >= l { 1497 return io.ErrUnexpectedEOF 1498 } 1499 b := dAtA[iNdEx] 1500 iNdEx++ 1501 stringLen |= uint64(b&0x7F) << shift 1502 if b < 0x80 { 1503 break 1504 } 1505 } 1506 intStringLen := int(stringLen) 1507 if intStringLen < 0 { 1508 return ErrInvalidLengthParams 1509 } 1510 postIndex := iNdEx + intStringLen 1511 if postIndex < 0 { 1512 return ErrInvalidLengthParams 1513 } 1514 if postIndex > l { 1515 return io.ErrUnexpectedEOF 1516 } 1517 m.PubKeyTypes = append(m.PubKeyTypes, string(dAtA[iNdEx:postIndex])) 1518 iNdEx = postIndex 1519 default: 1520 iNdEx = preIndex 1521 skippy, err := skipParams(dAtA[iNdEx:]) 1522 if err != nil { 1523 return err 1524 } 1525 if (skippy < 0) || (iNdEx+skippy) < 0 { 1526 return ErrInvalidLengthParams 1527 } 1528 if (iNdEx + skippy) > l { 1529 return io.ErrUnexpectedEOF 1530 } 1531 iNdEx += skippy 1532 } 1533 } 1534 1535 if iNdEx > l { 1536 return io.ErrUnexpectedEOF 1537 } 1538 return nil 1539 } 1540 func (m *VersionParams) Unmarshal(dAtA []byte) error { 1541 l := len(dAtA) 1542 iNdEx := 0 1543 for iNdEx < l { 1544 preIndex := iNdEx 1545 var wire uint64 1546 for shift := uint(0); ; shift += 7 { 1547 if shift >= 64 { 1548 return ErrIntOverflowParams 1549 } 1550 if iNdEx >= l { 1551 return io.ErrUnexpectedEOF 1552 } 1553 b := dAtA[iNdEx] 1554 iNdEx++ 1555 wire |= uint64(b&0x7F) << shift 1556 if b < 0x80 { 1557 break 1558 } 1559 } 1560 fieldNum := int32(wire >> 3) 1561 wireType := int(wire & 0x7) 1562 if wireType == 4 { 1563 return fmt.Errorf("proto: VersionParams: wiretype end group for non-group") 1564 } 1565 if fieldNum <= 0 { 1566 return fmt.Errorf("proto: VersionParams: illegal tag %d (wire type %d)", fieldNum, wire) 1567 } 1568 switch fieldNum { 1569 case 1: 1570 if wireType != 0 { 1571 return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType) 1572 } 1573 m.AppVersion = 0 1574 for shift := uint(0); ; shift += 7 { 1575 if shift >= 64 { 1576 return ErrIntOverflowParams 1577 } 1578 if iNdEx >= l { 1579 return io.ErrUnexpectedEOF 1580 } 1581 b := dAtA[iNdEx] 1582 iNdEx++ 1583 m.AppVersion |= uint64(b&0x7F) << shift 1584 if b < 0x80 { 1585 break 1586 } 1587 } 1588 default: 1589 iNdEx = preIndex 1590 skippy, err := skipParams(dAtA[iNdEx:]) 1591 if err != nil { 1592 return err 1593 } 1594 if (skippy < 0) || (iNdEx+skippy) < 0 { 1595 return ErrInvalidLengthParams 1596 } 1597 if (iNdEx + skippy) > l { 1598 return io.ErrUnexpectedEOF 1599 } 1600 iNdEx += skippy 1601 } 1602 } 1603 1604 if iNdEx > l { 1605 return io.ErrUnexpectedEOF 1606 } 1607 return nil 1608 } 1609 func (m *HashedParams) Unmarshal(dAtA []byte) error { 1610 l := len(dAtA) 1611 iNdEx := 0 1612 for iNdEx < l { 1613 preIndex := iNdEx 1614 var wire uint64 1615 for shift := uint(0); ; shift += 7 { 1616 if shift >= 64 { 1617 return ErrIntOverflowParams 1618 } 1619 if iNdEx >= l { 1620 return io.ErrUnexpectedEOF 1621 } 1622 b := dAtA[iNdEx] 1623 iNdEx++ 1624 wire |= uint64(b&0x7F) << shift 1625 if b < 0x80 { 1626 break 1627 } 1628 } 1629 fieldNum := int32(wire >> 3) 1630 wireType := int(wire & 0x7) 1631 if wireType == 4 { 1632 return fmt.Errorf("proto: HashedParams: wiretype end group for non-group") 1633 } 1634 if fieldNum <= 0 { 1635 return fmt.Errorf("proto: HashedParams: illegal tag %d (wire type %d)", fieldNum, wire) 1636 } 1637 switch fieldNum { 1638 case 1: 1639 if wireType != 0 { 1640 return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxBytes", wireType) 1641 } 1642 m.BlockMaxBytes = 0 1643 for shift := uint(0); ; shift += 7 { 1644 if shift >= 64 { 1645 return ErrIntOverflowParams 1646 } 1647 if iNdEx >= l { 1648 return io.ErrUnexpectedEOF 1649 } 1650 b := dAtA[iNdEx] 1651 iNdEx++ 1652 m.BlockMaxBytes |= int64(b&0x7F) << shift 1653 if b < 0x80 { 1654 break 1655 } 1656 } 1657 case 2: 1658 if wireType != 0 { 1659 return fmt.Errorf("proto: wrong wireType = %d for field BlockMaxGas", wireType) 1660 } 1661 m.BlockMaxGas = 0 1662 for shift := uint(0); ; shift += 7 { 1663 if shift >= 64 { 1664 return ErrIntOverflowParams 1665 } 1666 if iNdEx >= l { 1667 return io.ErrUnexpectedEOF 1668 } 1669 b := dAtA[iNdEx] 1670 iNdEx++ 1671 m.BlockMaxGas |= int64(b&0x7F) << shift 1672 if b < 0x80 { 1673 break 1674 } 1675 } 1676 default: 1677 iNdEx = preIndex 1678 skippy, err := skipParams(dAtA[iNdEx:]) 1679 if err != nil { 1680 return err 1681 } 1682 if (skippy < 0) || (iNdEx+skippy) < 0 { 1683 return ErrInvalidLengthParams 1684 } 1685 if (iNdEx + skippy) > l { 1686 return io.ErrUnexpectedEOF 1687 } 1688 iNdEx += skippy 1689 } 1690 } 1691 1692 if iNdEx > l { 1693 return io.ErrUnexpectedEOF 1694 } 1695 return nil 1696 } 1697 func skipParams(dAtA []byte) (n int, err error) { 1698 l := len(dAtA) 1699 iNdEx := 0 1700 depth := 0 1701 for iNdEx < l { 1702 var wire uint64 1703 for shift := uint(0); ; shift += 7 { 1704 if shift >= 64 { 1705 return 0, ErrIntOverflowParams 1706 } 1707 if iNdEx >= l { 1708 return 0, io.ErrUnexpectedEOF 1709 } 1710 b := dAtA[iNdEx] 1711 iNdEx++ 1712 wire |= (uint64(b) & 0x7F) << shift 1713 if b < 0x80 { 1714 break 1715 } 1716 } 1717 wireType := int(wire & 0x7) 1718 switch wireType { 1719 case 0: 1720 for shift := uint(0); ; shift += 7 { 1721 if shift >= 64 { 1722 return 0, ErrIntOverflowParams 1723 } 1724 if iNdEx >= l { 1725 return 0, io.ErrUnexpectedEOF 1726 } 1727 iNdEx++ 1728 if dAtA[iNdEx-1] < 0x80 { 1729 break 1730 } 1731 } 1732 case 1: 1733 iNdEx += 8 1734 case 2: 1735 var length int 1736 for shift := uint(0); ; shift += 7 { 1737 if shift >= 64 { 1738 return 0, ErrIntOverflowParams 1739 } 1740 if iNdEx >= l { 1741 return 0, io.ErrUnexpectedEOF 1742 } 1743 b := dAtA[iNdEx] 1744 iNdEx++ 1745 length |= (int(b) & 0x7F) << shift 1746 if b < 0x80 { 1747 break 1748 } 1749 } 1750 if length < 0 { 1751 return 0, ErrInvalidLengthParams 1752 } 1753 iNdEx += length 1754 case 3: 1755 depth++ 1756 case 4: 1757 if depth == 0 { 1758 return 0, ErrUnexpectedEndOfGroupParams 1759 } 1760 depth-- 1761 case 5: 1762 iNdEx += 4 1763 default: 1764 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1765 } 1766 if iNdEx < 0 { 1767 return 0, ErrInvalidLengthParams 1768 } 1769 if depth == 0 { 1770 return iNdEx, nil 1771 } 1772 } 1773 return 0, io.ErrUnexpectedEOF 1774 } 1775 1776 var ( 1777 ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") 1778 ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") 1779 ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") 1780 )