|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
|
// source: proto/types/params.proto
|
|
|
|
package types
|
|
|
|
import (
|
|
bytes "bytes"
|
|
fmt "fmt"
|
|
_ "github.com/gogo/protobuf/gogoproto"
|
|
proto "github.com/gogo/protobuf/proto"
|
|
github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
|
|
_ "github.com/golang/protobuf/ptypes/duration"
|
|
math "math"
|
|
time "time"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
var _ = time.Kitchen
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// ConsensusParams contains consensus critical parameters that determine the
|
|
// validity of blocks.
|
|
type ConsensusParams struct {
|
|
Block BlockParams `protobuf:"bytes,1,opt,name=block,proto3" json:"block"`
|
|
Evidence EvidenceParams `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence"`
|
|
Validator ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ConsensusParams) Reset() { *m = ConsensusParams{} }
|
|
func (m *ConsensusParams) String() string { return proto.CompactTextString(m) }
|
|
func (*ConsensusParams) ProtoMessage() {}
|
|
func (*ConsensusParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_95a9f934fa6f056c, []int{0}
|
|
}
|
|
func (m *ConsensusParams) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ConsensusParams.Unmarshal(m, b)
|
|
}
|
|
func (m *ConsensusParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ConsensusParams.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ConsensusParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ConsensusParams.Merge(m, src)
|
|
}
|
|
func (m *ConsensusParams) XXX_Size() int {
|
|
return xxx_messageInfo_ConsensusParams.Size(m)
|
|
}
|
|
func (m *ConsensusParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ConsensusParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ConsensusParams proto.InternalMessageInfo
|
|
|
|
func (m *ConsensusParams) GetBlock() BlockParams {
|
|
if m != nil {
|
|
return m.Block
|
|
}
|
|
return BlockParams{}
|
|
}
|
|
|
|
func (m *ConsensusParams) GetEvidence() EvidenceParams {
|
|
if m != nil {
|
|
return m.Evidence
|
|
}
|
|
return EvidenceParams{}
|
|
}
|
|
|
|
func (m *ConsensusParams) GetValidator() ValidatorParams {
|
|
if m != nil {
|
|
return m.Validator
|
|
}
|
|
return ValidatorParams{}
|
|
}
|
|
|
|
// BlockParams contains limits on the block size.
|
|
type BlockParams struct {
|
|
// Note: must be greater than 0
|
|
MaxBytes int64 `protobuf:"varint,1,opt,name=max_bytes,json=maxBytes,proto3" json:"max_bytes,omitempty"`
|
|
// Note: must be greater or equal to -1
|
|
MaxGas int64 `protobuf:"varint,2,opt,name=max_gas,json=maxGas,proto3" json:"max_gas,omitempty"`
|
|
// Minimum time increment between consecutive blocks (in milliseconds)
|
|
// Not exposed to the application.
|
|
TimeIotaMs int64 `protobuf:"varint,3,opt,name=time_iota_ms,json=timeIotaMs,proto3" json:"time_iota_ms,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *BlockParams) Reset() { *m = BlockParams{} }
|
|
func (m *BlockParams) String() string { return proto.CompactTextString(m) }
|
|
func (*BlockParams) ProtoMessage() {}
|
|
func (*BlockParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_95a9f934fa6f056c, []int{1}
|
|
}
|
|
func (m *BlockParams) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_BlockParams.Unmarshal(m, b)
|
|
}
|
|
func (m *BlockParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_BlockParams.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *BlockParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_BlockParams.Merge(m, src)
|
|
}
|
|
func (m *BlockParams) XXX_Size() int {
|
|
return xxx_messageInfo_BlockParams.Size(m)
|
|
}
|
|
func (m *BlockParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_BlockParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_BlockParams proto.InternalMessageInfo
|
|
|
|
func (m *BlockParams) GetMaxBytes() int64 {
|
|
if m != nil {
|
|
return m.MaxBytes
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *BlockParams) GetMaxGas() int64 {
|
|
if m != nil {
|
|
return m.MaxGas
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *BlockParams) GetTimeIotaMs() int64 {
|
|
if m != nil {
|
|
return m.TimeIotaMs
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// EvidenceParams determine how we handle evidence of malfeasance.
|
|
type EvidenceParams struct {
|
|
// Note: must be greater than 0
|
|
MaxAgeNumBlocks int64 `protobuf:"varint,1,opt,name=max_age_num_blocks,json=maxAgeNumBlocks,proto3" json:"max_age_num_blocks,omitempty"`
|
|
MaxAgeDuration time.Duration `protobuf:"bytes,2,opt,name=max_age_duration,json=maxAgeDuration,proto3,stdduration" json:"max_age_duration"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *EvidenceParams) Reset() { *m = EvidenceParams{} }
|
|
func (m *EvidenceParams) String() string { return proto.CompactTextString(m) }
|
|
func (*EvidenceParams) ProtoMessage() {}
|
|
func (*EvidenceParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_95a9f934fa6f056c, []int{2}
|
|
}
|
|
func (m *EvidenceParams) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_EvidenceParams.Unmarshal(m, b)
|
|
}
|
|
func (m *EvidenceParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_EvidenceParams.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *EvidenceParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_EvidenceParams.Merge(m, src)
|
|
}
|
|
func (m *EvidenceParams) XXX_Size() int {
|
|
return xxx_messageInfo_EvidenceParams.Size(m)
|
|
}
|
|
func (m *EvidenceParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_EvidenceParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_EvidenceParams proto.InternalMessageInfo
|
|
|
|
func (m *EvidenceParams) GetMaxAgeNumBlocks() int64 {
|
|
if m != nil {
|
|
return m.MaxAgeNumBlocks
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *EvidenceParams) GetMaxAgeDuration() time.Duration {
|
|
if m != nil {
|
|
return m.MaxAgeDuration
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// ValidatorParams restrict the public key types validators can use.
|
|
// NOTE: uses ABCI pubkey naming, not Amino names.
|
|
type ValidatorParams struct {
|
|
PubKeyTypes []string `protobuf:"bytes,1,rep,name=pub_key_types,json=pubKeyTypes,proto3" json:"pub_key_types,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ValidatorParams) Reset() { *m = ValidatorParams{} }
|
|
func (m *ValidatorParams) String() string { return proto.CompactTextString(m) }
|
|
func (*ValidatorParams) ProtoMessage() {}
|
|
func (*ValidatorParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_95a9f934fa6f056c, []int{3}
|
|
}
|
|
func (m *ValidatorParams) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ValidatorParams.Unmarshal(m, b)
|
|
}
|
|
func (m *ValidatorParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ValidatorParams.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ValidatorParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ValidatorParams.Merge(m, src)
|
|
}
|
|
func (m *ValidatorParams) XXX_Size() int {
|
|
return xxx_messageInfo_ValidatorParams.Size(m)
|
|
}
|
|
func (m *ValidatorParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ValidatorParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ValidatorParams proto.InternalMessageInfo
|
|
|
|
func (m *ValidatorParams) GetPubKeyTypes() []string {
|
|
if m != nil {
|
|
return m.PubKeyTypes
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// HashedParams is a subset of ConsensusParams.
|
|
// It is amino encoded and hashed into
|
|
// the Header.ConsensusHash.
|
|
type HashedParams struct {
|
|
BlockMaxBytes int64 `protobuf:"varint,1,opt,name=block_max_bytes,json=blockMaxBytes,proto3" json:"block_max_bytes,omitempty"`
|
|
BlockMaxGas int64 `protobuf:"varint,2,opt,name=block_max_gas,json=blockMaxGas,proto3" json:"block_max_gas,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *HashedParams) Reset() { *m = HashedParams{} }
|
|
func (m *HashedParams) String() string { return proto.CompactTextString(m) }
|
|
func (*HashedParams) ProtoMessage() {}
|
|
func (*HashedParams) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_95a9f934fa6f056c, []int{4}
|
|
}
|
|
func (m *HashedParams) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_HashedParams.Unmarshal(m, b)
|
|
}
|
|
func (m *HashedParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_HashedParams.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *HashedParams) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_HashedParams.Merge(m, src)
|
|
}
|
|
func (m *HashedParams) XXX_Size() int {
|
|
return xxx_messageInfo_HashedParams.Size(m)
|
|
}
|
|
func (m *HashedParams) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_HashedParams.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_HashedParams proto.InternalMessageInfo
|
|
|
|
func (m *HashedParams) GetBlockMaxBytes() int64 {
|
|
if m != nil {
|
|
return m.BlockMaxBytes
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *HashedParams) GetBlockMaxGas() int64 {
|
|
if m != nil {
|
|
return m.BlockMaxGas
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*ConsensusParams)(nil), "tendermint.proto.types.ConsensusParams")
|
|
proto.RegisterType((*BlockParams)(nil), "tendermint.proto.types.BlockParams")
|
|
proto.RegisterType((*EvidenceParams)(nil), "tendermint.proto.types.EvidenceParams")
|
|
proto.RegisterType((*ValidatorParams)(nil), "tendermint.proto.types.ValidatorParams")
|
|
proto.RegisterType((*HashedParams)(nil), "tendermint.proto.types.HashedParams")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("proto/types/params.proto", fileDescriptor_95a9f934fa6f056c) }
|
|
|
|
var fileDescriptor_95a9f934fa6f056c = []byte{
|
|
// 465 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x53, 0xd1, 0x6e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,
|
|
0xd1, 0xb5, 0x8c, 0x88, 0x0f, 0xc3, 0xa2, 0x8a, 0xd9, 0x05, 0xaf, 0x99, 0x09, 0xd1, 0x73, 0x26,
|
|
0xee, 0x51, 0x3f, 0x1a, 0x14, 0x55, 0x7c, 0xc6, 0xeb, 0xcf, 0x4d, 0x69, 0x43, 0xe0, 0x1c, 0xf6,
|
|
0x4f, 0x51, 0x2d, 0x78, 0xb2, 0x66, 0x4f, 0x61, 0x64, 0xac, 0xb0, 0xeb, 0x39, 0x0e, 0x4d, 0x79,
|
|
0xd6, 0x86, 0xe9, 0xc3, 0xb0, 0xc3, 0x75, 0x91, 0x0e, 0x5a, 0xd4, 0x09, 0xaa, 0x90, 0x9e, 0xbf,
|
|
0x48, 0x33, 0xbd, 0xa8, 0x62, 0x3a, 0x97, 0x22, 0xe8, 0x56, 0xbc, 0x79, 0xdc, 0xf8, 0x25, 0xf1,
|
|
0x9e, 0xb9, 0xbc, 0xfa, 0x17, 0x00, 0x00, 0xff, 0xff, 0xc9, 0xc9, 0x35, 0x8e, 0x3b, 0x03, 0x00,
|
|
0x00,
|
|
}
|
|
|
|
func (this *EvidenceParams) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*EvidenceParams)
|
|
if !ok {
|
|
that2, ok := that.(EvidenceParams)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if this.MaxAgeNumBlocks != that1.MaxAgeNumBlocks {
|
|
return false
|
|
}
|
|
if this.MaxAgeDuration != that1.MaxAgeDuration {
|
|
return false
|
|
}
|
|
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func (this *ValidatorParams) Equal(that interface{}) bool {
|
|
if that == nil {
|
|
return this == nil
|
|
}
|
|
|
|
that1, ok := that.(*ValidatorParams)
|
|
if !ok {
|
|
that2, ok := that.(ValidatorParams)
|
|
if ok {
|
|
that1 = &that2
|
|
} else {
|
|
return false
|
|
}
|
|
}
|
|
if that1 == nil {
|
|
return this == nil
|
|
} else if this == nil {
|
|
return false
|
|
}
|
|
if len(this.PubKeyTypes) != len(that1.PubKeyTypes) {
|
|
return false
|
|
}
|
|
for i := range this.PubKeyTypes {
|
|
if this.PubKeyTypes[i] != that1.PubKeyTypes[i] {
|
|
return false
|
|
}
|
|
}
|
|
if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
func NewPopulatedEvidenceParams(r randyParams, easy bool) *EvidenceParams {
|
|
this := &EvidenceParams{}
|
|
this.MaxAgeNumBlocks = int64(r.Int63())
|
|
if r.Intn(2) == 0 {
|
|
this.MaxAgeNumBlocks *= -1
|
|
}
|
|
v1 := github_com_gogo_protobuf_types.NewPopulatedStdDuration(r, easy)
|
|
this.MaxAgeDuration = *v1
|
|
if !easy && r.Intn(10) != 0 {
|
|
this.XXX_unrecognized = randUnrecognizedParams(r, 3)
|
|
}
|
|
return this
|
|
}
|
|
|
|
func NewPopulatedValidatorParams(r randyParams, easy bool) *ValidatorParams {
|
|
this := &ValidatorParams{}
|
|
v2 := r.Intn(10)
|
|
this.PubKeyTypes = make([]string, v2)
|
|
for i := 0; i < v2; i++ {
|
|
this.PubKeyTypes[i] = string(randStringParams(r))
|
|
}
|
|
if !easy && r.Intn(10) != 0 {
|
|
this.XXX_unrecognized = randUnrecognizedParams(r, 2)
|
|
}
|
|
return this
|
|
}
|
|
|
|
type randyParams interface {
|
|
Float32() float32
|
|
Float64() float64
|
|
Int63() int64
|
|
Int31() int32
|
|
Uint32() uint32
|
|
Intn(n int) int
|
|
}
|
|
|
|
func randUTF8RuneParams(r randyParams) rune {
|
|
ru := r.Intn(62)
|
|
if ru < 10 {
|
|
return rune(ru + 48)
|
|
} else if ru < 36 {
|
|
return rune(ru + 55)
|
|
}
|
|
return rune(ru + 61)
|
|
}
|
|
func randStringParams(r randyParams) string {
|
|
v3 := r.Intn(100)
|
|
tmps := make([]rune, v3)
|
|
for i := 0; i < v3; i++ {
|
|
tmps[i] = randUTF8RuneParams(r)
|
|
}
|
|
return string(tmps)
|
|
}
|
|
func randUnrecognizedParams(r randyParams, maxFieldNumber int) (dAtA []byte) {
|
|
l := r.Intn(5)
|
|
for i := 0; i < l; i++ {
|
|
wire := r.Intn(4)
|
|
if wire == 3 {
|
|
wire = 5
|
|
}
|
|
fieldNumber := maxFieldNumber + r.Intn(100)
|
|
dAtA = randFieldParams(dAtA, r, fieldNumber, wire)
|
|
}
|
|
return dAtA
|
|
}
|
|
func randFieldParams(dAtA []byte, r randyParams, fieldNumber int, wire int) []byte {
|
|
key := uint32(fieldNumber)<<3 | uint32(wire)
|
|
switch wire {
|
|
case 0:
|
|
dAtA = encodeVarintPopulateParams(dAtA, uint64(key))
|
|
v4 := r.Int63()
|
|
if r.Intn(2) == 0 {
|
|
v4 *= -1
|
|
}
|
|
dAtA = encodeVarintPopulateParams(dAtA, uint64(v4))
|
|
case 1:
|
|
dAtA = encodeVarintPopulateParams(dAtA, uint64(key))
|
|
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)))
|
|
case 2:
|
|
dAtA = encodeVarintPopulateParams(dAtA, uint64(key))
|
|
ll := r.Intn(100)
|
|
dAtA = encodeVarintPopulateParams(dAtA, uint64(ll))
|
|
for j := 0; j < ll; j++ {
|
|
dAtA = append(dAtA, byte(r.Intn(256)))
|
|
}
|
|
default:
|
|
dAtA = encodeVarintPopulateParams(dAtA, uint64(key))
|
|
dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
|
|
}
|
|
return dAtA
|
|
}
|
|
func encodeVarintPopulateParams(dAtA []byte, v uint64) []byte {
|
|
for v >= 1<<7 {
|
|
dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
|
|
v >>= 7
|
|
}
|
|
dAtA = append(dAtA, uint8(v))
|
|
return dAtA
|
|
}
|