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