diff --git a/api/cosmos/consensus/v1/consensus.pulsar.go b/api/cosmos/consensus/v1/consensus.pulsar.go index d041a019096b..7168b5e078a3 100644 --- a/api/cosmos/consensus/v1/consensus.pulsar.go +++ b/api/cosmos/consensus/v1/consensus.pulsar.go @@ -2,7 +2,7 @@ package consensusv1 import ( - v1 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/types/v1" + v1 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/abci/v1" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -13,38 +13,83 @@ import ( sync "sync" ) +var _ protoreflect.List = (*_CometInfo_1_list)(nil) + +type _CometInfo_1_list struct { + list *[]*v1.Misbehavior +} + +func (x *_CometInfo_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_CometInfo_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_CometInfo_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1.Misbehavior) + (*x.list)[i] = concreteValue +} + +func (x *_CometInfo_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1.Misbehavior) + *x.list = append(*x.list, concreteValue) +} + +func (x *_CometInfo_1_list) AppendMutable() protoreflect.Value { + v := new(v1.Misbehavior) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_CometInfo_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_CometInfo_1_list) NewElement() protoreflect.Value { + v := new(v1.Misbehavior) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_CometInfo_1_list) IsValid() bool { + return x.list != nil +} + var ( - md_ConsensusMsgParams protoreflect.MessageDescriptor - fd_ConsensusMsgParams_version protoreflect.FieldDescriptor - fd_ConsensusMsgParams_block protoreflect.FieldDescriptor - fd_ConsensusMsgParams_evidence protoreflect.FieldDescriptor - fd_ConsensusMsgParams_validator protoreflect.FieldDescriptor - fd_ConsensusMsgParams_abci protoreflect.FieldDescriptor - fd_ConsensusMsgParams_synchrony protoreflect.FieldDescriptor - fd_ConsensusMsgParams_feature protoreflect.FieldDescriptor + md_CometInfo protoreflect.MessageDescriptor + fd_CometInfo_evidence protoreflect.FieldDescriptor + fd_CometInfo_validators_hash protoreflect.FieldDescriptor + fd_CometInfo_proposer_address protoreflect.FieldDescriptor + fd_CometInfo_last_commit protoreflect.FieldDescriptor ) func init() { file_cosmos_consensus_v1_consensus_proto_init() - md_ConsensusMsgParams = File_cosmos_consensus_v1_consensus_proto.Messages().ByName("ConsensusMsgParams") - fd_ConsensusMsgParams_version = md_ConsensusMsgParams.Fields().ByName("version") - fd_ConsensusMsgParams_block = md_ConsensusMsgParams.Fields().ByName("block") - fd_ConsensusMsgParams_evidence = md_ConsensusMsgParams.Fields().ByName("evidence") - fd_ConsensusMsgParams_validator = md_ConsensusMsgParams.Fields().ByName("validator") - fd_ConsensusMsgParams_abci = md_ConsensusMsgParams.Fields().ByName("abci") - fd_ConsensusMsgParams_synchrony = md_ConsensusMsgParams.Fields().ByName("synchrony") - fd_ConsensusMsgParams_feature = md_ConsensusMsgParams.Fields().ByName("feature") + md_CometInfo = File_cosmos_consensus_v1_consensus_proto.Messages().ByName("CometInfo") + fd_CometInfo_evidence = md_CometInfo.Fields().ByName("evidence") + fd_CometInfo_validators_hash = md_CometInfo.Fields().ByName("validators_hash") + fd_CometInfo_proposer_address = md_CometInfo.Fields().ByName("proposer_address") + fd_CometInfo_last_commit = md_CometInfo.Fields().ByName("last_commit") } -var _ protoreflect.Message = (*fastReflection_ConsensusMsgParams)(nil) +var _ protoreflect.Message = (*fastReflection_CometInfo)(nil) -type fastReflection_ConsensusMsgParams ConsensusMsgParams +type fastReflection_CometInfo CometInfo -func (x *ConsensusMsgParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_ConsensusMsgParams)(x) +func (x *CometInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_CometInfo)(x) } -func (x *ConsensusMsgParams) slowProtoReflect() protoreflect.Message { +func (x *CometInfo) slowProtoReflect() protoreflect.Message { mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -56,43 +101,43 @@ func (x *ConsensusMsgParams) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ConsensusMsgParams_messageType fastReflection_ConsensusMsgParams_messageType -var _ protoreflect.MessageType = fastReflection_ConsensusMsgParams_messageType{} +var _fastReflection_CometInfo_messageType fastReflection_CometInfo_messageType +var _ protoreflect.MessageType = fastReflection_CometInfo_messageType{} -type fastReflection_ConsensusMsgParams_messageType struct{} +type fastReflection_CometInfo_messageType struct{} -func (x fastReflection_ConsensusMsgParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_ConsensusMsgParams)(nil) +func (x fastReflection_CometInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_CometInfo)(nil) } -func (x fastReflection_ConsensusMsgParams_messageType) New() protoreflect.Message { - return new(fastReflection_ConsensusMsgParams) +func (x fastReflection_CometInfo_messageType) New() protoreflect.Message { + return new(fastReflection_CometInfo) } -func (x fastReflection_ConsensusMsgParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusMsgParams +func (x fastReflection_CometInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_CometInfo } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_ConsensusMsgParams) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusMsgParams +func (x *fastReflection_CometInfo) Descriptor() protoreflect.MessageDescriptor { + return md_CometInfo } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_ConsensusMsgParams) Type() protoreflect.MessageType { - return _fastReflection_ConsensusMsgParams_messageType +func (x *fastReflection_CometInfo) Type() protoreflect.MessageType { + return _fastReflection_CometInfo_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ConsensusMsgParams) New() protoreflect.Message { - return new(fastReflection_ConsensusMsgParams) +func (x *fastReflection_CometInfo) New() protoreflect.Message { + return new(fastReflection_CometInfo) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_ConsensusMsgParams) Interface() protoreflect.ProtoMessage { - return (*ConsensusMsgParams)(x) +func (x *fastReflection_CometInfo) Interface() protoreflect.ProtoMessage { + return (*CometInfo)(x) } // Range iterates over every populated field in an undefined order, @@ -100,46 +145,28 @@ func (x *fastReflection_ConsensusMsgParams) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_ConsensusMsgParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Version != nil { - value := protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - if !f(fd_ConsensusMsgParams_version, value) { - return - } - } - if x.Block != nil { - value := protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - if !f(fd_ConsensusMsgParams_block, value) { +func (x *fastReflection_CometInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Evidence) != 0 { + value := protoreflect.ValueOfList(&_CometInfo_1_list{list: &x.Evidence}) + if !f(fd_CometInfo_evidence, value) { return } } - if x.Evidence != nil { - value := protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - if !f(fd_ConsensusMsgParams_evidence, value) { + if len(x.ValidatorsHash) != 0 { + value := protoreflect.ValueOfBytes(x.ValidatorsHash) + if !f(fd_CometInfo_validators_hash, value) { return } } - if x.Validator != nil { - value := protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - if !f(fd_ConsensusMsgParams_validator, value) { + if len(x.ProposerAddress) != 0 { + value := protoreflect.ValueOfBytes(x.ProposerAddress) + if !f(fd_CometInfo_proposer_address, value) { return } } - if x.Abci != nil { - value := protoreflect.ValueOfMessage(x.Abci.ProtoReflect()) - if !f(fd_ConsensusMsgParams_abci, value) { - return - } - } - if x.Synchrony != nil { - value := protoreflect.ValueOfMessage(x.Synchrony.ProtoReflect()) - if !f(fd_ConsensusMsgParams_synchrony, value) { - return - } - } - if x.Feature != nil { - value := protoreflect.ValueOfMessage(x.Feature.ProtoReflect()) - if !f(fd_ConsensusMsgParams_feature, value) { + if x.LastCommit != nil { + value := protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) + if !f(fd_CometInfo_last_commit, value) { return } } @@ -156,27 +183,21 @@ func (x *fastReflection_ConsensusMsgParams) Range(f func(protoreflect.FieldDescr // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_ConsensusMsgParams) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_CometInfo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - return x.Version != nil - case "cosmos.consensus.v1.ConsensusMsgParams.block": - return x.Block != nil - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - return x.Evidence != nil - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - return x.Validator != nil - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - return x.Abci != nil - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - return x.Synchrony != nil - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - return x.Feature != nil + case "cosmos.consensus.v1.CometInfo.evidence": + return len(x.Evidence) != 0 + case "cosmos.consensus.v1.CometInfo.validators_hash": + return len(x.ValidatorsHash) != 0 + case "cosmos.consensus.v1.CometInfo.proposer_address": + return len(x.ProposerAddress) != 0 + case "cosmos.consensus.v1.CometInfo.last_commit": + return x.LastCommit != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.CometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo does not contain field %s", fd.FullName())) } } @@ -186,27 +207,21 @@ func (x *fastReflection_ConsensusMsgParams) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ConsensusMsgParams) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_CometInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - x.Version = nil - case "cosmos.consensus.v1.ConsensusMsgParams.block": - x.Block = nil - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": + case "cosmos.consensus.v1.CometInfo.evidence": x.Evidence = nil - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - x.Validator = nil - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - x.Abci = nil - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - x.Synchrony = nil - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - x.Feature = nil + case "cosmos.consensus.v1.CometInfo.validators_hash": + x.ValidatorsHash = nil + case "cosmos.consensus.v1.CometInfo.proposer_address": + x.ProposerAddress = nil + case "cosmos.consensus.v1.CometInfo.last_commit": + x.LastCommit = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.CometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo does not contain field %s", fd.FullName())) } } @@ -216,34 +231,28 @@ func (x *fastReflection_ConsensusMsgParams) Clear(fd protoreflect.FieldDescripto // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ConsensusMsgParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_CometInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - value := x.Version - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - value := x.Block - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - value := x.Evidence - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - value := x.Validator - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - value := x.Abci - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - value := x.Synchrony - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - value := x.Feature + case "cosmos.consensus.v1.CometInfo.evidence": + if len(x.Evidence) == 0 { + return protoreflect.ValueOfList(&_CometInfo_1_list{}) + } + listValue := &_CometInfo_1_list{list: &x.Evidence} + return protoreflect.ValueOfList(listValue) + case "cosmos.consensus.v1.CometInfo.validators_hash": + value := x.ValidatorsHash + return protoreflect.ValueOfBytes(value) + case "cosmos.consensus.v1.CometInfo.proposer_address": + value := x.ProposerAddress + return protoreflect.ValueOfBytes(value) + case "cosmos.consensus.v1.CometInfo.last_commit": + value := x.LastCommit return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.CometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo does not contain field %s", descriptor.FullName())) } } @@ -257,27 +266,23 @@ func (x *fastReflection_ConsensusMsgParams) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ConsensusMsgParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_CometInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - x.Version = value.Message().Interface().(*v1.VersionParams) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - x.Block = value.Message().Interface().(*v1.BlockParams) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - x.Evidence = value.Message().Interface().(*v1.EvidenceParams) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - x.Validator = value.Message().Interface().(*v1.ValidatorParams) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - x.Abci = value.Message().Interface().(*v1.ABCIParams) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - x.Synchrony = value.Message().Interface().(*v1.SynchronyParams) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - x.Feature = value.Message().Interface().(*v1.FeatureParams) + case "cosmos.consensus.v1.CometInfo.evidence": + lv := value.List() + clv := lv.(*_CometInfo_1_list) + x.Evidence = *clv.list + case "cosmos.consensus.v1.CometInfo.validators_hash": + x.ValidatorsHash = value.Bytes() + case "cosmos.consensus.v1.CometInfo.proposer_address": + x.ProposerAddress = value.Bytes() + case "cosmos.consensus.v1.CometInfo.last_commit": + x.LastCommit = value.Message().Interface().(*v1.CommitInfo) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.CometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo does not contain field %s", fd.FullName())) } } @@ -291,92 +296,61 @@ func (x *fastReflection_ConsensusMsgParams) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ConsensusMsgParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_CometInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - if x.Version == nil { - x.Version = new(v1.VersionParams) - } - return protoreflect.ValueOfMessage(x.Version.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - if x.Block == nil { - x.Block = new(v1.BlockParams) - } - return protoreflect.ValueOfMessage(x.Block.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": + case "cosmos.consensus.v1.CometInfo.evidence": if x.Evidence == nil { - x.Evidence = new(v1.EvidenceParams) - } - return protoreflect.ValueOfMessage(x.Evidence.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - if x.Validator == nil { - x.Validator = new(v1.ValidatorParams) - } - return protoreflect.ValueOfMessage(x.Validator.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - if x.Abci == nil { - x.Abci = new(v1.ABCIParams) - } - return protoreflect.ValueOfMessage(x.Abci.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - if x.Synchrony == nil { - x.Synchrony = new(v1.SynchronyParams) - } - return protoreflect.ValueOfMessage(x.Synchrony.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - if x.Feature == nil { - x.Feature = new(v1.FeatureParams) - } - return protoreflect.ValueOfMessage(x.Feature.ProtoReflect()) + x.Evidence = []*v1.Misbehavior{} + } + value := &_CometInfo_1_list{list: &x.Evidence} + return protoreflect.ValueOfList(value) + case "cosmos.consensus.v1.CometInfo.last_commit": + if x.LastCommit == nil { + x.LastCommit = new(v1.CommitInfo) + } + return protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) + case "cosmos.consensus.v1.CometInfo.validators_hash": + panic(fmt.Errorf("field validators_hash of message cosmos.consensus.v1.CometInfo is not mutable")) + case "cosmos.consensus.v1.CometInfo.proposer_address": + panic(fmt.Errorf("field proposer_address of message cosmos.consensus.v1.CometInfo is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.CometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ConsensusMsgParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_CometInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "cosmos.consensus.v1.ConsensusMsgParams.version": - m := new(v1.VersionParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.block": - m := new(v1.BlockParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.evidence": - m := new(v1.EvidenceParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.validator": - m := new(v1.ValidatorParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.abci": - m := new(v1.ABCIParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.synchrony": - m := new(v1.SynchronyParams) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.consensus.v1.ConsensusMsgParams.feature": - m := new(v1.FeatureParams) + case "cosmos.consensus.v1.CometInfo.evidence": + list := []*v1.Misbehavior{} + return protoreflect.ValueOfList(&_CometInfo_1_list{list: &list}) + case "cosmos.consensus.v1.CometInfo.validators_hash": + return protoreflect.ValueOfBytes(nil) + case "cosmos.consensus.v1.CometInfo.proposer_address": + return protoreflect.ValueOfBytes(nil) + case "cosmos.consensus.v1.CometInfo.last_commit": + m := new(v1.CommitInfo) return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParams")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.CometInfo")) } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParams does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message cosmos.consensus.v1.CometInfo does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ConsensusMsgParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_CometInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.ConsensusMsgParams", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.CometInfo", d.FullName())) } panic("unreachable") } @@ -384,7 +358,7 @@ func (x *fastReflection_ConsensusMsgParams) WhichOneof(d protoreflect.OneofDescr // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ConsensusMsgParams) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_CometInfo) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -395,7 +369,7 @@ func (x *fastReflection_ConsensusMsgParams) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ConsensusMsgParams) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_CometInfo) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -407,7 +381,7 @@ func (x *fastReflection_ConsensusMsgParams) SetUnknown(fields protoreflect.RawFi // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_ConsensusMsgParams) IsValid() bool { +func (x *fastReflection_CometInfo) IsValid() bool { return x != nil } @@ -417,9 +391,9 @@ func (x *fastReflection_ConsensusMsgParams) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_CometInfo) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ConsensusMsgParams) + x := input.Message.Interface().(*CometInfo) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -431,32 +405,22 @@ func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Version != nil { - l = options.Size(x.Version) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Block != nil { - l = options.Size(x.Block) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Evidence != nil { - l = options.Size(x.Evidence) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Validator != nil { - l = options.Size(x.Validator) - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Evidence) > 0 { + for _, e := range x.Evidence { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } - if x.Abci != nil { - l = options.Size(x.Abci) + l = len(x.ValidatorsHash) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Synchrony != nil { - l = options.Size(x.Synchrony) + l = len(x.ProposerAddress) + if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Feature != nil { - l = options.Size(x.Feature) + if x.LastCommit != nil { + l = options.Size(x.LastCommit) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -469,7 +433,7 @@ func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ConsensusMsgParams) + x := input.Message.Interface().(*CometInfo) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -488,50 +452,8 @@ func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.Feature != nil { - encoded, err := options.Marshal(x.Feature) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - if x.Synchrony != nil { - encoded, err := options.Marshal(x.Synchrony) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - if x.Abci != nil { - encoded, err := options.Marshal(x.Abci) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.Validator != nil { - encoded, err := options.Marshal(x.Validator) + if x.LastCommit != nil { + encoded, err := options.Marshal(x.LastCommit) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -544,47 +466,35 @@ func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x22 } - if x.Evidence != nil { - encoded, err := options.Marshal(x.Evidence) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + if len(x.ProposerAddress) > 0 { + i -= len(x.ProposerAddress) + copy(dAtA[i:], x.ProposerAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProposerAddress))) i-- dAtA[i] = 0x1a } - if x.Block != nil { - encoded, err := options.Marshal(x.Block) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + if len(x.ValidatorsHash) > 0 { + i -= len(x.ValidatorsHash) + copy(dAtA[i:], x.ValidatorsHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorsHash))) i-- dAtA[i] = 0x12 } - if x.Version != nil { - encoded, err := options.Marshal(x.Version) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err + if len(x.Evidence) > 0 { + for iNdEx := len(x.Evidence) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Evidence[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -597,7 +507,7 @@ func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ConsensusMsgParams) + x := input.Message.Interface().(*CometInfo) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -629,15 +539,15 @@ func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConsensusMsgParams: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CometInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConsensusMsgParams: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CometInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -664,18 +574,16 @@ func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Version == nil { - x.Version = &v1.VersionParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Version); err != nil { + x.Evidence = append(x.Evidence, &v1.Misbehavior{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence[len(x.Evidence)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -685,33 +593,31 @@ func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Block == nil { - x.Block = &v1.BlockParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Block); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + x.ValidatorsHash = append(x.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if x.ValidatorsHash == nil { + x.ValidatorsHash = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -721,139 +627,29 @@ func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Evidence == nil { - x.Evidence = &v1.EvidenceParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + x.ProposerAddress = append(x.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if x.ProposerAddress == nil { + x.ProposerAddress = []byte{} } iNdEx = postIndex case 4: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Validator == nil { - x.Validator = &v1.ValidatorParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validator); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Abci", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Abci == nil { - x.Abci = &v1.ABCIParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Abci); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Synchrony", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Synchrony == nil { - x.Synchrony = &v1.SynchronyParams{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Synchrony); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Feature", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -880,10 +676,10 @@ func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Feature == nil { - x.Feature = &v1.FeatureParams{} + if x.LastCommit == nil { + x.LastCommit = &v1.CommitInfo{} } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Feature); err != nil { + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastCommit); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -922,546 +718,117 @@ func (x *fastReflection_ConsensusMsgParams) ProtoMethods() *protoiface.Methods { } } -var ( - md_ConsensusMsgParamsResponse protoreflect.MessageDescriptor -) +// Since: cosmos-sdk 0.52 -func init() { - file_cosmos_consensus_v1_consensus_proto_init() - md_ConsensusMsgParamsResponse = File_cosmos_consensus_v1_consensus_proto.Messages().ByName("ConsensusMsgParamsResponse") -} +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/consensus/v1/consensus.proto -var _ protoreflect.Message = (*fastReflection_ConsensusMsgParamsResponse)(nil) +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -type fastReflection_ConsensusMsgParamsResponse ConsensusMsgParamsResponse +// CometInfo defines the structure of the x/consensus module's comet info. +type CometInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (x *ConsensusMsgParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_ConsensusMsgParamsResponse)(x) + Evidence []*v1.Misbehavior `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` + ValidatorsHash []byte `protobuf:"bytes,2,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + LastCommit *v1.CommitInfo `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` } -func (x *ConsensusMsgParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { +func (x *CometInfo) Reset() { + *x = CometInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms + ms.StoreMessageInfo(mi) } - return mi.MessageOf(x) } -var _fastReflection_ConsensusMsgParamsResponse_messageType fastReflection_ConsensusMsgParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_ConsensusMsgParamsResponse_messageType{} +func (x *CometInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} -type fastReflection_ConsensusMsgParamsResponse_messageType struct{} +func (*CometInfo) ProtoMessage() {} -func (x fastReflection_ConsensusMsgParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_ConsensusMsgParamsResponse)(nil) -} -func (x fastReflection_ConsensusMsgParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_ConsensusMsgParamsResponse) -} -func (x fastReflection_ConsensusMsgParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusMsgParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ConsensusMsgParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_ConsensusMsgParamsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ConsensusMsgParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_ConsensusMsgParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ConsensusMsgParamsResponse) New() protoreflect.Message { - return new(fastReflection_ConsensusMsgParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ConsensusMsgParamsResponse) Interface() protoreflect.ProtoMessage { - return (*ConsensusMsgParamsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ConsensusMsgParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ConsensusMsgParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ConsensusMsgParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ConsensusMsgParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ConsensusMsgParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ConsensusMsgParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ConsensusMsgParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.ConsensusMsgParamsResponse")) - } - panic(fmt.Errorf("message cosmos.consensus.v1.ConsensusMsgParamsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ConsensusMsgParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.ConsensusMsgParamsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ConsensusMsgParamsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ConsensusMsgParamsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ConsensusMsgParamsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ConsensusMsgParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ConsensusMsgParamsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ConsensusMsgParamsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ConsensusMsgParamsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConsensusMsgParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ConsensusMsgParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Since: cosmos-sdk 0.51 - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/consensus/v1/consensus.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft. -type ConsensusMsgParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // params defines the x/consensus parameters to be passed from comet. - // - // NOTE: All parameters must be supplied. - Version *v1.VersionParams `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Block *v1.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` - Evidence *v1.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` - Validator *v1.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` - // Deprecated: Do not use. - Abci *v1.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` - Synchrony *v1.SynchronyParams `protobuf:"bytes,6,opt,name=synchrony,proto3" json:"synchrony,omitempty"` - Feature *v1.FeatureParams `protobuf:"bytes,7,opt,name=feature,proto3" json:"feature,omitempty"` -} - -func (x *ConsensusMsgParams) Reset() { - *x = ConsensusMsgParams{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConsensusMsgParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConsensusMsgParams) ProtoMessage() {} - -// Deprecated: Use ConsensusMsgParams.ProtoReflect.Descriptor instead. -func (*ConsensusMsgParams) Descriptor() ([]byte, []int) { +// Deprecated: Use CometInfo.ProtoReflect.Descriptor instead. +func (*CometInfo) Descriptor() ([]byte, []int) { return file_cosmos_consensus_v1_consensus_proto_rawDescGZIP(), []int{0} } -func (x *ConsensusMsgParams) GetVersion() *v1.VersionParams { - if x != nil { - return x.Version - } - return nil -} - -func (x *ConsensusMsgParams) GetBlock() *v1.BlockParams { - if x != nil { - return x.Block - } - return nil -} - -func (x *ConsensusMsgParams) GetEvidence() *v1.EvidenceParams { +func (x *CometInfo) GetEvidence() []*v1.Misbehavior { if x != nil { return x.Evidence } return nil } -func (x *ConsensusMsgParams) GetValidator() *v1.ValidatorParams { +func (x *CometInfo) GetValidatorsHash() []byte { if x != nil { - return x.Validator + return x.ValidatorsHash } return nil } -// Deprecated: Do not use. -func (x *ConsensusMsgParams) GetAbci() *v1.ABCIParams { +func (x *CometInfo) GetProposerAddress() []byte { if x != nil { - return x.Abci + return x.ProposerAddress } return nil } -func (x *ConsensusMsgParams) GetSynchrony() *v1.SynchronyParams { +func (x *CometInfo) GetLastCommit() *v1.CommitInfo { if x != nil { - return x.Synchrony + return x.LastCommit } return nil } -func (x *ConsensusMsgParams) GetFeature() *v1.FeatureParams { - if x != nil { - return x.Feature - } - return nil -} - -// ConsensusMsgParamsResponse defines the response structure for executing a -// ConsensusMsgParams message. -type ConsensusMsgParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ConsensusMsgParamsResponse) Reset() { - *x = ConsensusMsgParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_consensus_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ConsensusMsgParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ConsensusMsgParamsResponse) ProtoMessage() {} - -// Deprecated: Use ConsensusMsgParamsResponse.ProtoReflect.Descriptor instead. -func (*ConsensusMsgParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_consensus_proto_rawDescGZIP(), []int{1} -} - var File_cosmos_consensus_v1_consensus_proto protoreflect.FileDescriptor var file_cosmos_consensus_v1_consensus_proto_rawDesc = []byte{ 0x0a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, - 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1e, 0x63, 0x6f, 0x6d, 0x65, - 0x74, 0x62, 0x66, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbc, 0x03, 0x0a, 0x12, 0x43, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x3a, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, - 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, - 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x04, 0x61, 0x62, 0x63, 0x69, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x42, 0x43, 0x49, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x02, 0x18, 0x01, 0x52, 0x04, 0x61, 0x62, 0x63, 0x69, 0x12, 0x40, 0x0a, 0x09, 0x73, - 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x12, 0x3a, 0x0a, - 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x1c, 0x0a, 0x1a, 0x43, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x4d, 0x73, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc9, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, - 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x73, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x13, - 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x63, 0x6f, 0x6d, 0x65, + 0x74, 0x62, 0x66, 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd9, 0x01, 0x0a, 0x09, 0x43, 0x6f, 0x6d, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x39, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, + 0x62, 0x66, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x73, 0x62, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, + 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x48, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, + 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6d, + 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x61, 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, + 0x6d, 0x6d, 0x69, 0x74, 0x42, 0xc9, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, + 0x42, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1476,31 +843,20 @@ func file_cosmos_consensus_v1_consensus_proto_rawDescGZIP() []byte { return file_cosmos_consensus_v1_consensus_proto_rawDescData } -var file_cosmos_consensus_v1_consensus_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cosmos_consensus_v1_consensus_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_cosmos_consensus_v1_consensus_proto_goTypes = []interface{}{ - (*ConsensusMsgParams)(nil), // 0: cosmos.consensus.v1.ConsensusMsgParams - (*ConsensusMsgParamsResponse)(nil), // 1: cosmos.consensus.v1.ConsensusMsgParamsResponse - (*v1.VersionParams)(nil), // 2: cometbft.types.v1.VersionParams - (*v1.BlockParams)(nil), // 3: cometbft.types.v1.BlockParams - (*v1.EvidenceParams)(nil), // 4: cometbft.types.v1.EvidenceParams - (*v1.ValidatorParams)(nil), // 5: cometbft.types.v1.ValidatorParams - (*v1.ABCIParams)(nil), // 6: cometbft.types.v1.ABCIParams - (*v1.SynchronyParams)(nil), // 7: cometbft.types.v1.SynchronyParams - (*v1.FeatureParams)(nil), // 8: cometbft.types.v1.FeatureParams + (*CometInfo)(nil), // 0: cosmos.consensus.v1.CometInfo + (*v1.Misbehavior)(nil), // 1: cometbft.abci.v1.Misbehavior + (*v1.CommitInfo)(nil), // 2: cometbft.abci.v1.CommitInfo } var file_cosmos_consensus_v1_consensus_proto_depIdxs = []int32{ - 2, // 0: cosmos.consensus.v1.ConsensusMsgParams.version:type_name -> cometbft.types.v1.VersionParams - 3, // 1: cosmos.consensus.v1.ConsensusMsgParams.block:type_name -> cometbft.types.v1.BlockParams - 4, // 2: cosmos.consensus.v1.ConsensusMsgParams.evidence:type_name -> cometbft.types.v1.EvidenceParams - 5, // 3: cosmos.consensus.v1.ConsensusMsgParams.validator:type_name -> cometbft.types.v1.ValidatorParams - 6, // 4: cosmos.consensus.v1.ConsensusMsgParams.abci:type_name -> cometbft.types.v1.ABCIParams - 7, // 5: cosmos.consensus.v1.ConsensusMsgParams.synchrony:type_name -> cometbft.types.v1.SynchronyParams - 8, // 6: cosmos.consensus.v1.ConsensusMsgParams.feature:type_name -> cometbft.types.v1.FeatureParams - 7, // [7:7] is the sub-list for method output_type - 7, // [7:7] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 1, // 0: cosmos.consensus.v1.CometInfo.evidence:type_name -> cometbft.abci.v1.Misbehavior + 2, // 1: cosmos.consensus.v1.CometInfo.last_commit:type_name -> cometbft.abci.v1.CommitInfo + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_cosmos_consensus_v1_consensus_proto_init() } @@ -1510,19 +866,7 @@ func file_cosmos_consensus_v1_consensus_proto_init() { } if !protoimpl.UnsafeEnabled { file_cosmos_consensus_v1_consensus_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConsensusMsgParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_consensus_v1_consensus_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConsensusMsgParamsResponse); i { + switch v := v.(*CometInfo); i { case 0: return &v.state case 1: @@ -1540,7 +884,7 @@ func file_cosmos_consensus_v1_consensus_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_consensus_v1_consensus_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 1, NumExtensions: 0, NumServices: 0, }, diff --git a/api/cosmos/consensus/v1/query.pulsar.go b/api/cosmos/consensus/v1/query.pulsar.go index ef4d64ea7464..ca4bad59679e 100644 --- a/api/cosmos/consensus/v1/query.pulsar.go +++ b/api/cosmos/consensus/v1/query.pulsar.go @@ -14,6 +14,797 @@ import ( sync "sync" ) +var ( + md_QueryGetCometInfoRequest protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_consensus_v1_query_proto_init() + md_QueryGetCometInfoRequest = File_cosmos_consensus_v1_query_proto.Messages().ByName("QueryGetCometInfoRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetCometInfoRequest)(nil) + +type fastReflection_QueryGetCometInfoRequest QueryGetCometInfoRequest + +func (x *QueryGetCometInfoRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetCometInfoRequest)(x) +} + +func (x *QueryGetCometInfoRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryGetCometInfoRequest_messageType fastReflection_QueryGetCometInfoRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetCometInfoRequest_messageType{} + +type fastReflection_QueryGetCometInfoRequest_messageType struct{} + +func (x fastReflection_QueryGetCometInfoRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetCometInfoRequest)(nil) +} +func (x fastReflection_QueryGetCometInfoRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetCometInfoRequest) +} +func (x fastReflection_QueryGetCometInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetCometInfoRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetCometInfoRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetCometInfoRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryGetCometInfoRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryGetCometInfoRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetCometInfoRequest) New() protoreflect.Message { + return new(fastReflection_QueryGetCometInfoRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetCometInfoRequest) Interface() protoreflect.ProtoMessage { + return (*QueryGetCometInfoRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryGetCometInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryGetCometInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetCometInfoRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryGetCometInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetCometInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetCometInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryGetCometInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoRequest")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryGetCometInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.QueryGetCometInfoRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryGetCometInfoRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetCometInfoRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryGetCometInfoRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryGetCometInfoRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetCometInfoRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryGetCometInfoRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryGetCometInfoRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetCometInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetCometInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryGetCometInfoResponse protoreflect.MessageDescriptor + fd_QueryGetCometInfoResponse_comet_info protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_consensus_v1_query_proto_init() + md_QueryGetCometInfoResponse = File_cosmos_consensus_v1_query_proto.Messages().ByName("QueryGetCometInfoResponse") + fd_QueryGetCometInfoResponse_comet_info = md_QueryGetCometInfoResponse.Fields().ByName("comet_info") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetCometInfoResponse)(nil) + +type fastReflection_QueryGetCometInfoResponse QueryGetCometInfoResponse + +func (x *QueryGetCometInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetCometInfoResponse)(x) +} + +func (x *QueryGetCometInfoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryGetCometInfoResponse_messageType fastReflection_QueryGetCometInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetCometInfoResponse_messageType{} + +type fastReflection_QueryGetCometInfoResponse_messageType struct{} + +func (x fastReflection_QueryGetCometInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetCometInfoResponse)(nil) +} +func (x fastReflection_QueryGetCometInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetCometInfoResponse) +} +func (x fastReflection_QueryGetCometInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetCometInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetCometInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetCometInfoResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryGetCometInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryGetCometInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetCometInfoResponse) New() protoreflect.Message { + return new(fastReflection_QueryGetCometInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetCometInfoResponse) Interface() protoreflect.ProtoMessage { + return (*QueryGetCometInfoResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryGetCometInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.CometInfo != nil { + value := protoreflect.ValueOfMessage(x.CometInfo.ProtoReflect()) + if !f(fd_QueryGetCometInfoResponse_comet_info, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryGetCometInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": + return x.CometInfo != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetCometInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": + x.CometInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryGetCometInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": + value := x.CometInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetCometInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": + x.CometInfo = value.Message().Interface().(*CometInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetCometInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": + if x.CometInfo == nil { + x.CometInfo = new(CometInfo) + } + return protoreflect.ValueOfMessage(x.CometInfo.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryGetCometInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info": + m := new(CometInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.QueryGetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.QueryGetCometInfoResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryGetCometInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.QueryGetCometInfoResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryGetCometInfoResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryGetCometInfoResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryGetCometInfoResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryGetCometInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetCometInfoResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.CometInfo != nil { + l = options.Size(x.CometInfo) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryGetCometInfoResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.CometInfo != nil { + encoded, err := options.Marshal(x.CometInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryGetCometInfoResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetCometInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CometInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.CometInfo == nil { + x.CometInfo = &CometInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CometInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_QueryParamsRequest protoreflect.MessageDescriptor ) @@ -32,7 +823,7 @@ func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { } func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[0] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -390,7 +1181,7 @@ func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[1] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -820,6 +1611,70 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// QueryCometInfoRequest defines the request type for querying x/consensus comet info. +type QueryGetCometInfoRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryGetCometInfoRequest) Reset() { + *x = QueryGetCometInfoRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetCometInfoRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetCometInfoRequest) ProtoMessage() {} + +// Deprecated: Use QueryGetCometInfoRequest.ProtoReflect.Descriptor instead. +func (*QueryGetCometInfoRequest) Descriptor() ([]byte, []int) { + return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{0} +} + +// QueryCometInfoResponse defines the response type for querying x/consensus comet info. +type QueryGetCometInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // comet_info is the comet info of the x/consensus module. + CometInfo *CometInfo `protobuf:"bytes,1,opt,name=comet_info,json=cometInfo,proto3" json:"comet_info,omitempty"` +} + +func (x *QueryGetCometInfoResponse) Reset() { + *x = QueryGetCometInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetCometInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetCometInfoResponse) ProtoMessage() {} + +// Deprecated: Use QueryGetCometInfoResponse.ProtoReflect.Descriptor instead. +func (*QueryGetCometInfoResponse) Descriptor() ([]byte, []int) { + return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{1} +} + +func (x *QueryGetCometInfoResponse) GetCometInfo() *CometInfo { + if x != nil { + return x.CometInfo + } + return nil +} + // QueryParamsRequest defines the request type for querying x/consensus parameters. type QueryParamsRequest struct { state protoimpl.MessageState @@ -830,7 +1685,7 @@ type QueryParamsRequest struct { func (x *QueryParamsRequest) Reset() { *x = QueryParamsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[0] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -844,7 +1699,7 @@ func (*QueryParamsRequest) ProtoMessage() {} // Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{0} + return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{2} } // QueryParamsResponse defines the response type for querying x/consensus parameters. @@ -862,7 +1717,7 @@ type QueryParamsResponse struct { func (x *QueryParamsResponse) Reset() { *x = QueryParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_cosmos_consensus_v1_query_proto_msgTypes[1] + mi := &file_cosmos_consensus_v1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -876,7 +1731,7 @@ func (*QueryParamsResponse) ProtoMessage() {} // Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead. func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{1} + return file_cosmos_consensus_v1_query_proto_rawDescGZIP(), []int{3} } func (x *QueryParamsResponse) GetParams() *v1.ConsensusParams { @@ -896,35 +1751,52 @@ var file_cosmos_consensus_v1_query_proto_rawDesc = []byte{ 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x13, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x8a, 0x01, - 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x80, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, - 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, - 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x73, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x13, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1a, 0x0a, 0x18, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x51, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, + 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0xf9, 0x01, 0x0a, 0x05, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x80, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, + 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x6d, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x43, 0x6f, + 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc5, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, + 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, + 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, + 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -939,21 +1811,27 @@ func file_cosmos_consensus_v1_query_proto_rawDescGZIP() []byte { return file_cosmos_consensus_v1_query_proto_rawDescData } -var file_cosmos_consensus_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cosmos_consensus_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_consensus_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: cosmos.consensus.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: cosmos.consensus.v1.QueryParamsResponse - (*v1.ConsensusParams)(nil), // 2: cometbft.types.v1.ConsensusParams + (*QueryGetCometInfoRequest)(nil), // 0: cosmos.consensus.v1.QueryGetCometInfoRequest + (*QueryGetCometInfoResponse)(nil), // 1: cosmos.consensus.v1.QueryGetCometInfoResponse + (*QueryParamsRequest)(nil), // 2: cosmos.consensus.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 3: cosmos.consensus.v1.QueryParamsResponse + (*CometInfo)(nil), // 4: cosmos.consensus.v1.CometInfo + (*v1.ConsensusParams)(nil), // 5: cometbft.types.v1.ConsensusParams } var file_cosmos_consensus_v1_query_proto_depIdxs = []int32{ - 2, // 0: cosmos.consensus.v1.QueryParamsResponse.params:type_name -> cometbft.types.v1.ConsensusParams - 0, // 1: cosmos.consensus.v1.Query.Params:input_type -> cosmos.consensus.v1.QueryParamsRequest - 1, // 2: cosmos.consensus.v1.Query.Params:output_type -> cosmos.consensus.v1.QueryParamsResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 4, // 0: cosmos.consensus.v1.QueryGetCometInfoResponse.comet_info:type_name -> cosmos.consensus.v1.CometInfo + 5, // 1: cosmos.consensus.v1.QueryParamsResponse.params:type_name -> cometbft.types.v1.ConsensusParams + 2, // 2: cosmos.consensus.v1.Query.Params:input_type -> cosmos.consensus.v1.QueryParamsRequest + 0, // 3: cosmos.consensus.v1.Query.GetCometInfo:input_type -> cosmos.consensus.v1.QueryGetCometInfoRequest + 3, // 4: cosmos.consensus.v1.Query.Params:output_type -> cosmos.consensus.v1.QueryParamsResponse + 1, // 5: cosmos.consensus.v1.Query.GetCometInfo:output_type -> cosmos.consensus.v1.QueryGetCometInfoResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_cosmos_consensus_v1_query_proto_init() } @@ -961,9 +1839,10 @@ func file_cosmos_consensus_v1_query_proto_init() { if File_cosmos_consensus_v1_query_proto != nil { return } + file_cosmos_consensus_v1_consensus_proto_init() if !protoimpl.UnsafeEnabled { file_cosmos_consensus_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { + switch v := v.(*QueryGetCometInfoRequest); i { case 0: return &v.state case 1: @@ -975,6 +1854,30 @@ func file_cosmos_consensus_v1_query_proto_init() { } } file_cosmos_consensus_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetCometInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_consensus_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryParamsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_consensus_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsResponse); i { case 0: return &v.state @@ -993,7 +1896,7 @@ func file_cosmos_consensus_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_consensus_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/consensus/v1/query_grpc.pb.go b/api/cosmos/consensus/v1/query_grpc.pb.go index 03694d673fe9..ce898bd95251 100644 --- a/api/cosmos/consensus/v1/query_grpc.pb.go +++ b/api/cosmos/consensus/v1/query_grpc.pb.go @@ -21,7 +21,8 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params" + Query_Params_FullMethodName = "/cosmos.consensus.v1.Query/Params" + Query_GetCometInfo_FullMethodName = "/cosmos.consensus.v1.Query/GetCometInfo" ) // QueryClient is the client API for Query service. @@ -30,6 +31,8 @@ const ( type QueryClient interface { // Params queries the parameters of x/consensus module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // CometInfo queries the comet info of x/consensus module. + GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) } type queryClient struct { @@ -49,12 +52,23 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) { + out := new(QueryGetCometInfoResponse) + err := c.cc.Invoke(ctx, Query_GetCometInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { // Params queries the parameters of x/consensus module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // CometInfo queries the comet info of x/consensus module. + GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) mustEmbedUnimplementedQueryServer() } @@ -65,6 +79,9 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (UnimplementedQueryServer) GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCometInfo not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -96,6 +113,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_GetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetCometInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetCometInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_GetCometInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetCometInfo(ctx, req.(*QueryGetCometInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -107,6 +142,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "GetCometInfo", + Handler: _Query_GetCometInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/query.proto", diff --git a/api/cosmos/consensus/v1/tx.pulsar.go b/api/cosmos/consensus/v1/tx.pulsar.go index 72743d913bcd..def6529fc167 100644 --- a/api/cosmos/consensus/v1/tx.pulsar.go +++ b/api/cosmos/consensus/v1/tx.pulsar.go @@ -2,6 +2,7 @@ package consensusv1 import ( + v11 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/abci/v1" v1 "buf.build/gen/go/cometbft/cometbft/protocolbuffers/go/cometbft/types/v1" _ "cosmossdk.io/api/amino" _ "cosmossdk.io/api/cosmos/msg/v1" @@ -1266,6 +1267,1131 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } +var _ protoreflect.List = (*_MsgSetCometInfo_2_list)(nil) + +type _MsgSetCometInfo_2_list struct { + list *[]*v11.Misbehavior +} + +func (x *_MsgSetCometInfo_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgSetCometInfo_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgSetCometInfo_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v11.Misbehavior) + (*x.list)[i] = concreteValue +} + +func (x *_MsgSetCometInfo_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v11.Misbehavior) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgSetCometInfo_2_list) AppendMutable() protoreflect.Value { + v := new(v11.Misbehavior) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgSetCometInfo_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgSetCometInfo_2_list) NewElement() protoreflect.Value { + v := new(v11.Misbehavior) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgSetCometInfo_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgSetCometInfo protoreflect.MessageDescriptor + fd_MsgSetCometInfo_authority protoreflect.FieldDescriptor + fd_MsgSetCometInfo_evidence protoreflect.FieldDescriptor + fd_MsgSetCometInfo_validators_hash protoreflect.FieldDescriptor + fd_MsgSetCometInfo_proposer_address protoreflect.FieldDescriptor + fd_MsgSetCometInfo_last_commit protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_consensus_v1_tx_proto_init() + md_MsgSetCometInfo = File_cosmos_consensus_v1_tx_proto.Messages().ByName("MsgSetCometInfo") + fd_MsgSetCometInfo_authority = md_MsgSetCometInfo.Fields().ByName("authority") + fd_MsgSetCometInfo_evidence = md_MsgSetCometInfo.Fields().ByName("evidence") + fd_MsgSetCometInfo_validators_hash = md_MsgSetCometInfo.Fields().ByName("validators_hash") + fd_MsgSetCometInfo_proposer_address = md_MsgSetCometInfo.Fields().ByName("proposer_address") + fd_MsgSetCometInfo_last_commit = md_MsgSetCometInfo.Fields().ByName("last_commit") +} + +var _ protoreflect.Message = (*fastReflection_MsgSetCometInfo)(nil) + +type fastReflection_MsgSetCometInfo MsgSetCometInfo + +func (x *MsgSetCometInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetCometInfo)(x) +} + +func (x *MsgSetCometInfo) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_consensus_v1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSetCometInfo_messageType fastReflection_MsgSetCometInfo_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetCometInfo_messageType{} + +type fastReflection_MsgSetCometInfo_messageType struct{} + +func (x fastReflection_MsgSetCometInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetCometInfo)(nil) +} +func (x fastReflection_MsgSetCometInfo_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetCometInfo) +} +func (x fastReflection_MsgSetCometInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetCometInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSetCometInfo) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetCometInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSetCometInfo) Type() protoreflect.MessageType { + return _fastReflection_MsgSetCometInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSetCometInfo) New() protoreflect.Message { + return new(fastReflection_MsgSetCometInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSetCometInfo) Interface() protoreflect.ProtoMessage { + return (*MsgSetCometInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSetCometInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgSetCometInfo_authority, value) { + return + } + } + if len(x.Evidence) != 0 { + value := protoreflect.ValueOfList(&_MsgSetCometInfo_2_list{list: &x.Evidence}) + if !f(fd_MsgSetCometInfo_evidence, value) { + return + } + } + if len(x.ValidatorsHash) != 0 { + value := protoreflect.ValueOfBytes(x.ValidatorsHash) + if !f(fd_MsgSetCometInfo_validators_hash, value) { + return + } + } + if len(x.ProposerAddress) != 0 { + value := protoreflect.ValueOfBytes(x.ProposerAddress) + if !f(fd_MsgSetCometInfo_proposer_address, value) { + return + } + } + if x.LastCommit != nil { + value := protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) + if !f(fd_MsgSetCometInfo_last_commit, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSetCometInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.consensus.v1.MsgSetCometInfo.authority": + return x.Authority != "" + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": + return len(x.Evidence) != 0 + case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": + return len(x.ValidatorsHash) != 0 + case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": + return len(x.ProposerAddress) != 0 + case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": + return x.LastCommit != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetCometInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.consensus.v1.MsgSetCometInfo.authority": + x.Authority = "" + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": + x.Evidence = nil + case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": + x.ValidatorsHash = nil + case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": + x.ProposerAddress = nil + case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": + x.LastCommit = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSetCometInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.consensus.v1.MsgSetCometInfo.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": + if len(x.Evidence) == 0 { + return protoreflect.ValueOfList(&_MsgSetCometInfo_2_list{}) + } + listValue := &_MsgSetCometInfo_2_list{list: &x.Evidence} + return protoreflect.ValueOfList(listValue) + case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": + value := x.ValidatorsHash + return protoreflect.ValueOfBytes(value) + case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": + value := x.ProposerAddress + return protoreflect.ValueOfBytes(value) + case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": + value := x.LastCommit + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetCometInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.consensus.v1.MsgSetCometInfo.authority": + x.Authority = value.Interface().(string) + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": + lv := value.List() + clv := lv.(*_MsgSetCometInfo_2_list) + x.Evidence = *clv.list + case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": + x.ValidatorsHash = value.Bytes() + case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": + x.ProposerAddress = value.Bytes() + case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": + x.LastCommit = value.Message().Interface().(*v11.CommitInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetCometInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": + if x.Evidence == nil { + x.Evidence = []*v11.Misbehavior{} + } + value := &_MsgSetCometInfo_2_list{list: &x.Evidence} + return protoreflect.ValueOfList(value) + case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": + if x.LastCommit == nil { + x.LastCommit = new(v11.CommitInfo) + } + return protoreflect.ValueOfMessage(x.LastCommit.ProtoReflect()) + case "cosmos.consensus.v1.MsgSetCometInfo.authority": + panic(fmt.Errorf("field authority of message cosmos.consensus.v1.MsgSetCometInfo is not mutable")) + case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": + panic(fmt.Errorf("field validators_hash of message cosmos.consensus.v1.MsgSetCometInfo is not mutable")) + case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": + panic(fmt.Errorf("field proposer_address of message cosmos.consensus.v1.MsgSetCometInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSetCometInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.consensus.v1.MsgSetCometInfo.authority": + return protoreflect.ValueOfString("") + case "cosmos.consensus.v1.MsgSetCometInfo.evidence": + list := []*v11.Misbehavior{} + return protoreflect.ValueOfList(&_MsgSetCometInfo_2_list{list: &list}) + case "cosmos.consensus.v1.MsgSetCometInfo.validators_hash": + return protoreflect.ValueOfBytes(nil) + case "cosmos.consensus.v1.MsgSetCometInfo.proposer_address": + return protoreflect.ValueOfBytes(nil) + case "cosmos.consensus.v1.MsgSetCometInfo.last_commit": + m := new(v11.CommitInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfo")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSetCometInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.MsgSetCometInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSetCometInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetCometInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSetCometInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSetCometInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSetCometInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Evidence) > 0 { + for _, e := range x.Evidence { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.ValidatorsHash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ProposerAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.LastCommit != nil { + l = options.Size(x.LastCommit) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSetCometInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.LastCommit != nil { + encoded, err := options.Marshal(x.LastCommit) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if len(x.ProposerAddress) > 0 { + i -= len(x.ProposerAddress) + copy(dAtA[i:], x.ProposerAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ProposerAddress))) + i-- + dAtA[i] = 0x22 + } + if len(x.ValidatorsHash) > 0 { + i -= len(x.ValidatorsHash) + copy(dAtA[i:], x.ValidatorsHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorsHash))) + i-- + dAtA[i] = 0x1a + } + if len(x.Evidence) > 0 { + for iNdEx := len(x.Evidence) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Evidence[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSetCometInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetCometInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetCometInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Evidence = append(x.Evidence, &v11.Misbehavior{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Evidence[len(x.Evidence)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ValidatorsHash = append(x.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if x.ValidatorsHash == nil { + x.ValidatorsHash = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ProposerAddress = append(x.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if x.ProposerAddress == nil { + x.ProposerAddress = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.LastCommit == nil { + x.LastCommit = &v11.CommitInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LastCommit); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSetCometInfoResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_consensus_v1_tx_proto_init() + md_MsgSetCometInfoResponse = File_cosmos_consensus_v1_tx_proto.Messages().ByName("MsgSetCometInfoResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgSetCometInfoResponse)(nil) + +type fastReflection_MsgSetCometInfoResponse MsgSetCometInfoResponse + +func (x *MsgSetCometInfoResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSetCometInfoResponse)(x) +} + +func (x *MsgSetCometInfoResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_consensus_v1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSetCometInfoResponse_messageType fastReflection_MsgSetCometInfoResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSetCometInfoResponse_messageType{} + +type fastReflection_MsgSetCometInfoResponse_messageType struct{} + +func (x fastReflection_MsgSetCometInfoResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSetCometInfoResponse)(nil) +} +func (x fastReflection_MsgSetCometInfoResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSetCometInfoResponse) +} +func (x fastReflection_MsgSetCometInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetCometInfoResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSetCometInfoResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSetCometInfoResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSetCometInfoResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSetCometInfoResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSetCometInfoResponse) New() protoreflect.Message { + return new(fastReflection_MsgSetCometInfoResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSetCometInfoResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSetCometInfoResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSetCometInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSetCometInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetCometInfoResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSetCometInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetCometInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetCometInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSetCometInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.consensus.v1.MsgSetCometInfoResponse")) + } + panic(fmt.Errorf("message cosmos.consensus.v1.MsgSetCometInfoResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSetCometInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.consensus.v1.MsgSetCometInfoResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSetCometInfoResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSetCometInfoResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSetCometInfoResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSetCometInfoResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSetCometInfoResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSetCometInfoResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSetCometInfoResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetCometInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Since: cosmos-sdk 0.47 // Code generated by protoc-gen-go. DO NOT EDIT. @@ -1403,6 +2529,106 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_cosmos_consensus_v1_tx_proto_rawDescGZIP(), []int{1} } +// MsgCometInfo is the Msg/CometInfo request type. +type MsgSetCometInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // evidence is the misbehaviour evidence to submit. + Evidence []*v11.Misbehavior `protobuf:"bytes,2,rep,name=evidence,proto3" json:"evidence,omitempty"` + // validators_hash is the hash of the current validator set. + ValidatorsHash []byte `protobuf:"bytes,3,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + // proposer_address is the address of the current proposer. + ProposerAddress []byte `protobuf:"bytes,4,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + // last_commit is the last commit info. + LastCommit *v11.CommitInfo `protobuf:"bytes,5,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` +} + +func (x *MsgSetCometInfo) Reset() { + *x = MsgSetCometInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_consensus_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSetCometInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSetCometInfo) ProtoMessage() {} + +// Deprecated: Use MsgSetCometInfo.ProtoReflect.Descriptor instead. +func (*MsgSetCometInfo) Descriptor() ([]byte, []int) { + return file_cosmos_consensus_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgSetCometInfo) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgSetCometInfo) GetEvidence() []*v11.Misbehavior { + if x != nil { + return x.Evidence + } + return nil +} + +func (x *MsgSetCometInfo) GetValidatorsHash() []byte { + if x != nil { + return x.ValidatorsHash + } + return nil +} + +func (x *MsgSetCometInfo) GetProposerAddress() []byte { + if x != nil { + return x.ProposerAddress + } + return nil +} + +func (x *MsgSetCometInfo) GetLastCommit() *v11.CommitInfo { + if x != nil { + return x.LastCommit + } + return nil +} + +// MsgCometInfoResponse defines the response +type MsgSetCometInfoResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgSetCometInfoResponse) Reset() { + *x = MsgSetCometInfoResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_consensus_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSetCometInfoResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSetCometInfoResponse) ProtoMessage() {} + +// Deprecated: Use MsgSetCometInfoResponse.ProtoReflect.Descriptor instead. +func (*MsgSetCometInfoResponse) Descriptor() ([]byte, []int) { + return file_cosmos_consensus_v1_tx_proto_rawDescGZIP(), []int{3} +} + var File_cosmos_consensus_v1_tx_proto protoreflect.FileDescriptor var file_cosmos_consensus_v1_tx_proto_rawDesc = []byte{ @@ -1415,65 +2641,96 @@ var file_cosmos_consensus_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x04, 0x0a, 0x0f, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, - 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x08, - 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, - 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x48, 0x0a, - 0x04, 0x61, 0x62, 0x63, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, - 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x42, 0x43, 0x49, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x15, 0x18, 0x01, 0xda, 0xb4, + 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x63, 0x6f, 0x6d, 0x65, + 0x74, 0x62, 0x66, 0x74, 0x2f, 0x61, 0x62, 0x63, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x04, 0x0a, 0x0f, 0x4d, 0x73, 0x67, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x3d, 0x0a, 0x08, 0x65, 0x76, + 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x63, + 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x45, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x40, 0x0a, 0x09, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, + 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x09, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x48, 0x0a, 0x04, 0x61, + 0x62, 0x63, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6d, 0x65, + 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x42, + 0x43, 0x49, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x15, 0x18, 0x01, 0xda, 0xb4, 0x2d, 0x0f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x35, 0x30, 0x52, + 0x04, 0x61, 0x62, 0x63, 0x69, 0x12, 0x55, 0x0a, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, + 0x6e, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, + 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, + 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x13, 0xda, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x35, - 0x30, 0x52, 0x04, 0x61, 0x62, 0x63, 0x69, 0x12, 0x55, 0x0a, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, - 0x72, 0x6f, 0x6e, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x63, 0x6f, 0x6d, - 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x13, - 0xda, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, - 0x2e, 0x35, 0x31, 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x12, 0x4f, - 0x0a, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x20, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x13, 0xda, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x20, 0x30, 0x2e, 0x35, 0x32, 0x52, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, - 0x39, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, - 0xe7, 0xb0, 0x2a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, - 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x85, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x77, 0x0a, - 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x13, 0xca, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x37, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xc2, 0x01, - 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, - 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, - 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x65, - 0x6e, 0x73, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x13, 0x43, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, - 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x31, 0x52, 0x09, 0x73, 0x79, 0x6e, 0x63, 0x68, 0x72, 0x6f, 0x6e, 0x79, 0x12, 0x4f, 0x0a, 0x07, + 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x2e, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x13, 0xda, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, + 0x30, 0x2e, 0x35, 0x32, 0x52, 0x07, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x39, 0x82, + 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, + 0x2a, 0x26, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x63, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xcf, 0x02, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6f, + 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, + 0x39, 0x0a, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x61, 0x62, 0x63, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x73, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x52, 0x08, 0x65, 0x76, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, + 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3d, + 0x0a, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6d, 0x65, 0x74, 0x62, 0x66, 0x74, 0x2e, 0x61, + 0x62, 0x63, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x0a, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x3a, 0x36, 0x82, + 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, + 0x2a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x78, 0x2f, 0x63, + 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x4d, 0x73, 0x67, 0x43, 0x6f, 0x6d, 0x65, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, + 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0xe9, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x77, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2c, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0xca, 0xb4, + 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, + 0x37, 0x12, 0x62, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x65, 0x74, 0x43, 0x6f, + 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6d, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xc2, 0x01, 0x0a, + 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x63, 0x6f, 0x6e, 0x73, + 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x6e, + 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x6e, + 0x73, 0x75, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x43, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, + 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x3a, 0x3a, 0x43, 0x6f, 0x6e, 0x73, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1488,31 +2745,39 @@ func file_cosmos_consensus_v1_tx_proto_rawDescGZIP() []byte { return file_cosmos_consensus_v1_tx_proto_rawDescData } -var file_cosmos_consensus_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cosmos_consensus_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_consensus_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: cosmos.consensus.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: cosmos.consensus.v1.MsgUpdateParamsResponse - (*v1.BlockParams)(nil), // 2: cometbft.types.v1.BlockParams - (*v1.EvidenceParams)(nil), // 3: cometbft.types.v1.EvidenceParams - (*v1.ValidatorParams)(nil), // 4: cometbft.types.v1.ValidatorParams - (*v1.ABCIParams)(nil), // 5: cometbft.types.v1.ABCIParams - (*v1.SynchronyParams)(nil), // 6: cometbft.types.v1.SynchronyParams - (*v1.FeatureParams)(nil), // 7: cometbft.types.v1.FeatureParams + (*MsgSetCometInfo)(nil), // 2: cosmos.consensus.v1.MsgSetCometInfo + (*MsgSetCometInfoResponse)(nil), // 3: cosmos.consensus.v1.MsgSetCometInfoResponse + (*v1.BlockParams)(nil), // 4: cometbft.types.v1.BlockParams + (*v1.EvidenceParams)(nil), // 5: cometbft.types.v1.EvidenceParams + (*v1.ValidatorParams)(nil), // 6: cometbft.types.v1.ValidatorParams + (*v1.ABCIParams)(nil), // 7: cometbft.types.v1.ABCIParams + (*v1.SynchronyParams)(nil), // 8: cometbft.types.v1.SynchronyParams + (*v1.FeatureParams)(nil), // 9: cometbft.types.v1.FeatureParams + (*v11.Misbehavior)(nil), // 10: cometbft.abci.v1.Misbehavior + (*v11.CommitInfo)(nil), // 11: cometbft.abci.v1.CommitInfo } var file_cosmos_consensus_v1_tx_proto_depIdxs = []int32{ - 2, // 0: cosmos.consensus.v1.MsgUpdateParams.block:type_name -> cometbft.types.v1.BlockParams - 3, // 1: cosmos.consensus.v1.MsgUpdateParams.evidence:type_name -> cometbft.types.v1.EvidenceParams - 4, // 2: cosmos.consensus.v1.MsgUpdateParams.validator:type_name -> cometbft.types.v1.ValidatorParams - 5, // 3: cosmos.consensus.v1.MsgUpdateParams.abci:type_name -> cometbft.types.v1.ABCIParams - 6, // 4: cosmos.consensus.v1.MsgUpdateParams.synchrony:type_name -> cometbft.types.v1.SynchronyParams - 7, // 5: cosmos.consensus.v1.MsgUpdateParams.feature:type_name -> cometbft.types.v1.FeatureParams - 0, // 6: cosmos.consensus.v1.Msg.UpdateParams:input_type -> cosmos.consensus.v1.MsgUpdateParams - 1, // 7: cosmos.consensus.v1.Msg.UpdateParams:output_type -> cosmos.consensus.v1.MsgUpdateParamsResponse - 7, // [7:8] is the sub-list for method output_type - 6, // [6:7] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 4, // 0: cosmos.consensus.v1.MsgUpdateParams.block:type_name -> cometbft.types.v1.BlockParams + 5, // 1: cosmos.consensus.v1.MsgUpdateParams.evidence:type_name -> cometbft.types.v1.EvidenceParams + 6, // 2: cosmos.consensus.v1.MsgUpdateParams.validator:type_name -> cometbft.types.v1.ValidatorParams + 7, // 3: cosmos.consensus.v1.MsgUpdateParams.abci:type_name -> cometbft.types.v1.ABCIParams + 8, // 4: cosmos.consensus.v1.MsgUpdateParams.synchrony:type_name -> cometbft.types.v1.SynchronyParams + 9, // 5: cosmos.consensus.v1.MsgUpdateParams.feature:type_name -> cometbft.types.v1.FeatureParams + 10, // 6: cosmos.consensus.v1.MsgSetCometInfo.evidence:type_name -> cometbft.abci.v1.Misbehavior + 11, // 7: cosmos.consensus.v1.MsgSetCometInfo.last_commit:type_name -> cometbft.abci.v1.CommitInfo + 0, // 8: cosmos.consensus.v1.Msg.UpdateParams:input_type -> cosmos.consensus.v1.MsgUpdateParams + 2, // 9: cosmos.consensus.v1.Msg.SetCometInfo:input_type -> cosmos.consensus.v1.MsgSetCometInfo + 1, // 10: cosmos.consensus.v1.Msg.UpdateParams:output_type -> cosmos.consensus.v1.MsgUpdateParamsResponse + 3, // 11: cosmos.consensus.v1.Msg.SetCometInfo:output_type -> cosmos.consensus.v1.MsgSetCometInfoResponse + 10, // [10:12] is the sub-list for method output_type + 8, // [8:10] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_cosmos_consensus_v1_tx_proto_init() } @@ -1545,6 +2810,30 @@ func file_cosmos_consensus_v1_tx_proto_init() { return nil } } + file_cosmos_consensus_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSetCometInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_consensus_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSetCometInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1552,7 +2841,7 @@ func file_cosmos_consensus_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_consensus_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/api/cosmos/consensus/v1/tx_grpc.pb.go b/api/cosmos/consensus/v1/tx_grpc.pb.go index 14f2e80d209e..50dfbe9de169 100644 --- a/api/cosmos/consensus/v1/tx_grpc.pb.go +++ b/api/cosmos/consensus/v1/tx_grpc.pb.go @@ -22,6 +22,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_UpdateParams_FullMethodName = "/cosmos.consensus.v1.Msg/UpdateParams" + Msg_SetCometInfo_FullMethodName = "/cosmos.consensus.v1.Msg/SetCometInfo" ) // MsgClient is the client API for Msg service. @@ -31,6 +32,8 @@ type MsgClient interface { // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // SetCometInfo defines how to set the comet info for the x/consensus module. + SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) } type msgClient struct { @@ -50,6 +53,15 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) { + out := new(MsgSetCometInfoResponse) + err := c.cc.Invoke(ctx, Msg_SetCometInfo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -57,6 +69,8 @@ type MsgServer interface { // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // SetCometInfo defines how to set the comet info for the x/consensus module. + SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) mustEmbedUnimplementedMsgServer() } @@ -67,6 +81,9 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (UnimplementedMsgServer) SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetCometInfo not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -98,6 +115,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_SetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetCometInfo) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetCometInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_SetCometInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetCometInfo(ctx, req.(*MsgSetCometInfo)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -109,6 +144,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "SetCometInfo", + Handler: _Msg_SetCometInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/tx.proto", diff --git a/x/consensus/CHANGELOG.md b/x/consensus/CHANGELOG.md index 16de809f2717..23c658a931ca 100644 --- a/x/consensus/CHANGELOG.md +++ b/x/consensus/CHANGELOG.md @@ -30,3 +30,5 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog ## [Unreleased] + +* [#20615](https://github.com/cosmos/cosmos-sdk/pull/20615) Add consensus messages to add cometinfo to consensus modules diff --git a/x/consensus/keeper/keeper.go b/x/consensus/keeper/keeper.go index ebcf2dab53c0..df6b6a4abdfa 100644 --- a/x/consensus/keeper/keeper.go +++ b/x/consensus/keeper/keeper.go @@ -1,6 +1,7 @@ package keeper import ( + "bytes" "context" "fmt" @@ -10,6 +11,7 @@ import ( "google.golang.org/grpc/status" "cosmossdk.io/collections" + coreapp "cosmossdk.io/core/app" "cosmossdk.io/core/appmodule" "cosmossdk.io/core/event" "cosmossdk.io/x/consensus/exported" @@ -25,6 +27,8 @@ type Keeper struct { authority string ParamsStore collections.Item[cmtproto.ConsensusParams] + // storage of the last comet info + cometInfo collections.Item[types.CometInfo] } var _ exported.ConsensusParamSetter = Keeper{}.ParamsStore @@ -35,6 +39,7 @@ func NewKeeper(cdc codec.BinaryCodec, env appmodule.Environment, authority strin Environment: env, authority: authority, ParamsStore: collections.NewItem(sb, collections.NewPrefix("Consensus"), "params", codec.CollValue[cmtproto.ConsensusParams](cdc)), + cometInfo: collections.NewItem(sb, collections.NewPrefix("CometInfo"), "comet_info", codec.CollValue[types.CometInfo](cdc)), } } @@ -99,3 +104,31 @@ func (k Keeper) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (* return &types.MsgUpdateParamsResponse{}, nil } + +func (k Keeper) SetCometInfo(ctx context.Context, msg *types.MsgSetCometInfo) (*types.MsgSetCometInfoResponse, error) { + if !bytes.Equal(coreapp.ConsensusIdentity, []byte(msg.Authority)) { + return nil, fmt.Errorf("invalid authority; expected %s, got %s", coreapp.ConsensusIdentity, msg.Authority) + } + + cometInfo := types.CometInfo{ + Evidence: msg.Evidence, + ValidatorsHash: msg.ValidatorsHash, + ProposerAddress: msg.ProposerAddress, + LastCommit: msg.LastCommit, + } + + if err := k.cometInfo.Set(ctx, cometInfo); err != nil { + return nil, err + } + + return &types.MsgSetCometInfoResponse{}, nil +} + +func (k Keeper) GetCometInfo(ctx context.Context, _ *types.QueryGetCometInfoRequest) (*types.QueryGetCometInfoResponse, error) { + cometInfo, err := k.cometInfo.Get(ctx) + if err != nil { + return nil, status.Error(codes.Internal, err.Error()) + } + + return &types.QueryGetCometInfoResponse{CometInfo: &cometInfo}, nil +} diff --git a/x/consensus/keeper/keeper_test.go b/x/consensus/keeper/keeper_test.go index 204cbac137bb..3d3681ff41c2 100644 --- a/x/consensus/keeper/keeper_test.go +++ b/x/consensus/keeper/keeper_test.go @@ -4,6 +4,7 @@ import ( "testing" "time" + v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1" cmttypes "github.com/cometbft/cometbft/types" gogotypes "github.com/cosmos/gogoproto/types" @@ -603,3 +604,53 @@ func (s *KeeperTestSuite) TestUpdateParams() { }) } } + +func (s *KeeperTestSuite) TestSetCometInfo() { + consensusIdentiy := "consensus" + testCases := []struct { + name string + enabledFeatures bool + input *types.MsgSetCometInfo + expErr bool + expErrMsg string + }{ + { + name: "valid comet info", + input: &types.MsgSetCometInfo{ + Authority: consensusIdentiy, + Evidence: []*v1.Misbehavior{}, + ValidatorsHash: []byte("validatorhash"), + ProposerAddress: []byte("proposeraddress"), + LastCommit: &v1.CommitInfo{}, + }, + expErr: false, + expErrMsg: "", + }, + { + name: "invalid authority", + input: &types.MsgSetCometInfo{ + Authority: "invalid", + Evidence: []*v1.Misbehavior{}, + ValidatorsHash: []byte("validatorhash"), + ProposerAddress: []byte("proposeraddress"), + LastCommit: &v1.CommitInfo{}, + }, + expErr: true, + expErrMsg: "invalid authority", + }, + } + + for _, tc := range testCases { + tc := tc + s.Run(tc.name, func() { + s.SetupTest(tc.enabledFeatures) + _, err := s.consensusParamsKeeper.SetCometInfo(s.ctx, tc.input) + if tc.expErr { + s.Require().Error(err) + s.Require().Contains(err.Error(), tc.expErrMsg) + } else { + s.Require().NoError(err) + } + }) + } +} diff --git a/x/consensus/proto/cosmos/consensus/v1/consensus.proto b/x/consensus/proto/cosmos/consensus/v1/consensus.proto index 45e2ba69ac74..b45f0c1d4eee 100644 --- a/x/consensus/proto/cosmos/consensus/v1/consensus.proto +++ b/x/consensus/proto/cosmos/consensus/v1/consensus.proto @@ -1,25 +1,15 @@ -// Since: cosmos-sdk 0.51 +// Since: cosmos-sdk 0.52 syntax = "proto3"; package cosmos.consensus.v1; -import "cometbft/types/v1/params.proto"; +import "cometbft/abci/v1/types.proto"; option go_package = "cosmossdk.io/x/consensus/types"; -// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft. -message ConsensusMsgParams { - // params defines the x/consensus parameters to be passed from comet. - // - // NOTE: All parameters must be supplied. - cometbft.types.v1.VersionParams version = 1; - cometbft.types.v1.BlockParams block = 2; - cometbft.types.v1.EvidenceParams evidence = 3; - cometbft.types.v1.ValidatorParams validator = 4; - cometbft.types.v1.ABCIParams abci = 5 [deprecated = true]; - cometbft.types.v1.SynchronyParams synchrony = 6; - cometbft.types.v1.FeatureParams feature = 7; +// CometInfo defines the structure of the x/consensus module's comet info. +message CometInfo { + repeated cometbft.abci.v1.Misbehavior evidence = 1; + bytes validators_hash = 2; + bytes proposer_address = 3; + cometbft.abci.v1.CommitInfo last_commit = 4; } - -// ConsensusMsgParamsResponse defines the response structure for executing a -// ConsensusMsgParams message. -message ConsensusMsgParamsResponse {} diff --git a/x/consensus/proto/cosmos/consensus/v1/query.proto b/x/consensus/proto/cosmos/consensus/v1/query.proto index 9a84c1909766..d458c32c55d2 100644 --- a/x/consensus/proto/cosmos/consensus/v1/query.proto +++ b/x/consensus/proto/cosmos/consensus/v1/query.proto @@ -4,6 +4,7 @@ package cosmos.consensus.v1; import "google/api/annotations.proto"; import "cometbft/types/v1/params.proto"; +import "cosmos/consensus/v1/consensus.proto"; option go_package = "cosmossdk.io/x/consensus/types"; @@ -13,6 +14,18 @@ service Query { rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/cosmos/consensus/v1/params"; } + + // CometInfo queries the comet info of x/consensus module. + rpc GetCometInfo(QueryGetCometInfoRequest) returns (QueryGetCometInfoResponse); +} + +// QueryCometInfoRequest defines the request type for querying x/consensus comet info. +message QueryGetCometInfoRequest {} + +// QueryCometInfoResponse defines the response type for querying x/consensus comet info. +message QueryGetCometInfoResponse { + // comet_info is the comet info of the x/consensus module. + CometInfo comet_info = 1; } // QueryParamsRequest defines the request type for querying x/consensus parameters. diff --git a/x/consensus/proto/cosmos/consensus/v1/tx.proto b/x/consensus/proto/cosmos/consensus/v1/tx.proto index d0d8405ffd89..74480b72a50c 100644 --- a/x/consensus/proto/cosmos/consensus/v1/tx.proto +++ b/x/consensus/proto/cosmos/consensus/v1/tx.proto @@ -6,6 +6,7 @@ import "amino/amino.proto"; import "cosmos_proto/cosmos.proto"; import "cosmos/msg/v1/msg.proto"; import "cometbft/types/v1/params.proto"; +import "cometbft/abci/v1/types.proto"; option go_package = "cosmossdk.io/x/consensus/types"; @@ -18,6 +19,9 @@ service Msg { rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse) { option (cosmos_proto.method_added_in) = "cosmos-sdk 0.47"; } + + // SetCometInfo defines how to set the comet info for the x/consensus module. + rpc SetCometInfo(MsgSetCometInfo) returns (MsgSetCometInfoResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -46,3 +50,27 @@ message MsgUpdateParams { // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. message MsgUpdateParamsResponse {} + +// MsgCometInfo is the Msg/CometInfo request type. +message MsgSetCometInfo { + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "cosmos-sdk/x/consensus/MsgCometInfo"; + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // evidence is the misbehaviour evidence to submit. + repeated cometbft.abci.v1.Misbehavior evidence = 2; + + // validators_hash is the hash of the current validator set. + bytes validators_hash = 3; + + // proposer_address is the address of the current proposer. + bytes proposer_address = 4; + + // last_commit is the last commit info. + cometbft.abci.v1.CommitInfo last_commit = 5; +} + +// MsgCometInfoResponse defines the response +message MsgSetCometInfoResponse {} diff --git a/x/consensus/types/consensus.pb.go b/x/consensus/types/consensus.pb.go index 3545af8cac9f..0029ca982928 100644 --- a/x/consensus/types/consensus.pb.go +++ b/x/consensus/types/consensus.pb.go @@ -5,7 +5,7 @@ package types import ( fmt "fmt" - v1 "github.com/cometbft/cometbft/api/cometbft/types/v1" + v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" proto "github.com/cosmos/gogoproto/proto" io "io" math "math" @@ -23,32 +23,26 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft. -type ConsensusMsgParams struct { - // params defines the x/consensus parameters to be passed from comet. - // - // NOTE: All parameters must be supplied. - Version *v1.VersionParams `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Block *v1.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` - Evidence *v1.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` - Validator *v1.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` - Abci *v1.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` // Deprecated: Do not use. - Synchrony *v1.SynchronyParams `protobuf:"bytes,6,opt,name=synchrony,proto3" json:"synchrony,omitempty"` - Feature *v1.FeatureParams `protobuf:"bytes,7,opt,name=feature,proto3" json:"feature,omitempty"` +// CometInfo defines the structure of the x/consensus module's comet info. +type CometInfo struct { + Evidence []*v1.Misbehavior `protobuf:"bytes,1,rep,name=evidence,proto3" json:"evidence,omitempty"` + ValidatorsHash []byte `protobuf:"bytes,2,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + ProposerAddress []byte `protobuf:"bytes,3,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + LastCommit *v1.CommitInfo `protobuf:"bytes,4,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` } -func (m *ConsensusMsgParams) Reset() { *m = ConsensusMsgParams{} } -func (m *ConsensusMsgParams) String() string { return proto.CompactTextString(m) } -func (*ConsensusMsgParams) ProtoMessage() {} -func (*ConsensusMsgParams) Descriptor() ([]byte, []int) { +func (m *CometInfo) Reset() { *m = CometInfo{} } +func (m *CometInfo) String() string { return proto.CompactTextString(m) } +func (*CometInfo) ProtoMessage() {} +func (*CometInfo) Descriptor() ([]byte, []int) { return fileDescriptor_7ed86dd7d42fb61b, []int{0} } -func (m *ConsensusMsgParams) XXX_Unmarshal(b []byte) error { +func (m *CometInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ConsensusMsgParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *CometInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ConsensusMsgParams.Marshal(b, m, deterministic) + return xxx_messageInfo_CometInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -58,109 +52,48 @@ func (m *ConsensusMsgParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *ConsensusMsgParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusMsgParams.Merge(m, src) +func (m *CometInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CometInfo.Merge(m, src) } -func (m *ConsensusMsgParams) XXX_Size() int { +func (m *CometInfo) XXX_Size() int { return m.Size() } -func (m *ConsensusMsgParams) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusMsgParams.DiscardUnknown(m) +func (m *CometInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CometInfo.DiscardUnknown(m) } -var xxx_messageInfo_ConsensusMsgParams proto.InternalMessageInfo +var xxx_messageInfo_CometInfo proto.InternalMessageInfo -func (m *ConsensusMsgParams) GetVersion() *v1.VersionParams { - if m != nil { - return m.Version - } - return nil -} - -func (m *ConsensusMsgParams) GetBlock() *v1.BlockParams { - if m != nil { - return m.Block - } - return nil -} - -func (m *ConsensusMsgParams) GetEvidence() *v1.EvidenceParams { +func (m *CometInfo) GetEvidence() []*v1.Misbehavior { if m != nil { return m.Evidence } return nil } -func (m *ConsensusMsgParams) GetValidator() *v1.ValidatorParams { +func (m *CometInfo) GetValidatorsHash() []byte { if m != nil { - return m.Validator + return m.ValidatorsHash } return nil } -// Deprecated: Do not use. -func (m *ConsensusMsgParams) GetAbci() *v1.ABCIParams { +func (m *CometInfo) GetProposerAddress() []byte { if m != nil { - return m.Abci + return m.ProposerAddress } return nil } -func (m *ConsensusMsgParams) GetSynchrony() *v1.SynchronyParams { +func (m *CometInfo) GetLastCommit() *v1.CommitInfo { if m != nil { - return m.Synchrony + return m.LastCommit } return nil } -func (m *ConsensusMsgParams) GetFeature() *v1.FeatureParams { - if m != nil { - return m.Feature - } - return nil -} - -// ConsensusMsgParamsResponse defines the response structure for executing a -// ConsensusMsgParams message. -type ConsensusMsgParamsResponse struct { -} - -func (m *ConsensusMsgParamsResponse) Reset() { *m = ConsensusMsgParamsResponse{} } -func (m *ConsensusMsgParamsResponse) String() string { return proto.CompactTextString(m) } -func (*ConsensusMsgParamsResponse) ProtoMessage() {} -func (*ConsensusMsgParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ed86dd7d42fb61b, []int{1} -} -func (m *ConsensusMsgParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusMsgParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusMsgParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ConsensusMsgParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusMsgParamsResponse.Merge(m, src) -} -func (m *ConsensusMsgParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *ConsensusMsgParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusMsgParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusMsgParamsResponse proto.InternalMessageInfo - func init() { - proto.RegisterType((*ConsensusMsgParams)(nil), "cosmos.consensus.v1.ConsensusMsgParams") - proto.RegisterType((*ConsensusMsgParamsResponse)(nil), "cosmos.consensus.v1.ConsensusMsgParamsResponse") + proto.RegisterType((*CometInfo)(nil), "cosmos.consensus.v1.CometInfo") } func init() { @@ -168,32 +101,28 @@ func init() { } var fileDescriptor_7ed86dd7d42fb61b = []byte{ - // 340 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd2, 0xcb, 0x4a, 0x33, 0x31, - 0x14, 0x07, 0xf0, 0x4e, 0xaf, 0xdf, 0x17, 0x77, 0x71, 0x13, 0x8a, 0x86, 0x5a, 0x37, 0xae, 0x32, - 0xd4, 0x0b, 0x88, 0x20, 0xe8, 0x14, 0x05, 0x17, 0x82, 0x54, 0x70, 0xe1, 0x6e, 0x26, 0x4d, 0x75, - 0x68, 0x3b, 0x19, 0x92, 0x34, 0xd8, 0xb7, 0xf0, 0x81, 0x7c, 0x00, 0x97, 0x5d, 0xba, 0x94, 0xf6, - 0x45, 0x64, 0x72, 0x69, 0x05, 0xa7, 0xcb, 0x49, 0xfe, 0xbf, 0x73, 0x86, 0x93, 0x03, 0x0e, 0x29, - 0x97, 0x53, 0x2e, 0x43, 0xca, 0x33, 0xc9, 0x32, 0x39, 0x93, 0xa1, 0xee, 0x6d, 0x3e, 0x48, 0x2e, - 0xb8, 0xe2, 0x70, 0xd7, 0x86, 0xc8, 0xe6, 0x5c, 0xf7, 0xda, 0x98, 0xf2, 0x29, 0x53, 0xc9, 0x48, - 0x85, 0x6a, 0x9e, 0x33, 0xe3, 0xf2, 0x58, 0xc4, 0x53, 0x87, 0xba, 0x1f, 0x35, 0x00, 0xfb, 0x1e, - 0xdc, 0xcb, 0x97, 0x07, 0x73, 0x09, 0x2f, 0x40, 0x4b, 0x33, 0x21, 0x53, 0x9e, 0xa1, 0xa0, 0x13, - 0x1c, 0xed, 0x1c, 0x77, 0x88, 0x2f, 0x44, 0x4c, 0x21, 0xa2, 0x7b, 0xe4, 0xc9, 0x26, 0x2c, 0x19, - 0x78, 0x00, 0x4f, 0x41, 0x23, 0x99, 0x70, 0x3a, 0x46, 0x55, 0x23, 0x71, 0x89, 0x8c, 0x8a, 0x7b, - 0xe7, 0x6c, 0x18, 0x5e, 0x82, 0x7f, 0x4c, 0xa7, 0x43, 0x96, 0x51, 0x86, 0x6a, 0x06, 0x1e, 0x94, - 0xc0, 0x1b, 0x17, 0x71, 0x76, 0x4d, 0xe0, 0x15, 0xf8, 0xaf, 0xe3, 0x49, 0x3a, 0x8c, 0x15, 0x17, - 0xa8, 0x6e, 0x7c, 0xb7, 0xec, 0x97, 0x7d, 0xc6, 0x15, 0xd8, 0x20, 0x78, 0x06, 0xea, 0x71, 0x42, - 0x53, 0xd4, 0x30, 0x78, 0xbf, 0x04, 0x5f, 0x47, 0xfd, 0x3b, 0xeb, 0xa2, 0x2a, 0x0a, 0x06, 0x26, - 0x5e, 0x34, 0x96, 0xf3, 0x8c, 0xbe, 0x0a, 0x9e, 0xcd, 0x51, 0x73, 0x6b, 0xe3, 0x47, 0x9f, 0xf1, - 0x8d, 0xd7, 0xa8, 0x98, 0xf5, 0x88, 0xc5, 0x6a, 0x26, 0x18, 0x6a, 0x6d, 0x9d, 0xf5, 0xad, 0x4d, - 0xf8, 0x59, 0x3b, 0xd0, 0xdd, 0x03, 0xed, 0xbf, 0xaf, 0x37, 0x60, 0x32, 0x2f, 0x0e, 0xa3, 0xf3, - 0xcf, 0x25, 0x0e, 0x16, 0x4b, 0x1c, 0x7c, 0x2f, 0x71, 0xf0, 0xbe, 0xc2, 0x95, 0xc5, 0x0a, 0x57, - 0xbe, 0x56, 0xb8, 0xf2, 0x8c, 0xed, 0xae, 0xc8, 0xe1, 0x98, 0xa4, 0x3c, 0x7c, 0xfb, 0xb5, 0x58, - 0xa6, 0x63, 0xd2, 0x34, 0xdb, 0x71, 0xf2, 0x13, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x8f, 0x7e, 0x2c, - 0x79, 0x02, 0x00, 0x00, -} - -func (m *ConsensusMsgParams) Marshal() (dAtA []byte, err error) { + // 285 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xb1, 0x4e, 0xf3, 0x30, + 0x14, 0x85, 0xeb, 0xbf, 0xbf, 0x10, 0xb8, 0x88, 0xa2, 0xb0, 0x44, 0xa8, 0x58, 0x15, 0x0c, 0x94, + 0xc5, 0x51, 0xca, 0x02, 0x03, 0x03, 0x74, 0x81, 0x81, 0x25, 0x23, 0x4b, 0xe4, 0x38, 0xae, 0x62, + 0xd1, 0xe4, 0x46, 0xbe, 0xc6, 0x82, 0xb7, 0xe0, 0xb1, 0x18, 0x3b, 0xc2, 0x86, 0x92, 0x17, 0x41, + 0x49, 0x28, 0x41, 0x62, 0x3c, 0xc7, 0xe7, 0x93, 0x7c, 0x3f, 0x7a, 0x22, 0x01, 0x73, 0xc0, 0x40, + 0x42, 0x81, 0xaa, 0xc0, 0x27, 0x0c, 0x5c, 0xd8, 0x07, 0x5e, 0x1a, 0xb0, 0xe0, 0x1d, 0x74, 0x23, + 0xde, 0xf7, 0x2e, 0x3c, 0x9c, 0x48, 0xc8, 0x95, 0x4d, 0x96, 0x36, 0x10, 0x89, 0xd4, 0x0d, 0x66, + 0x5f, 0x4a, 0xf5, 0x8d, 0x1c, 0x7f, 0x10, 0xba, 0xb3, 0x68, 0x06, 0x77, 0xc5, 0x12, 0xbc, 0x4b, + 0xba, 0xad, 0x9c, 0x4e, 0x55, 0x21, 0x95, 0x4f, 0xa6, 0xc3, 0xd9, 0x68, 0x7e, 0xc4, 0x37, 0x38, + 0x6f, 0x70, 0xee, 0x42, 0x7e, 0xaf, 0x31, 0x51, 0x99, 0x70, 0x1a, 0x4c, 0xf4, 0x33, 0xf7, 0x4e, + 0xe9, 0xd8, 0x89, 0x95, 0x4e, 0x85, 0x05, 0x83, 0x71, 0x26, 0x30, 0xf3, 0xff, 0x4d, 0xc9, 0x6c, + 0x37, 0xda, 0xeb, 0xeb, 0x5b, 0x81, 0x99, 0x77, 0x46, 0xf7, 0x4b, 0x03, 0x25, 0xa0, 0x32, 0xb1, + 0x48, 0x53, 0xa3, 0x10, 0xfd, 0x61, 0xbb, 0x1c, 0x6f, 0xfa, 0xeb, 0xae, 0xf6, 0xae, 0xe8, 0x68, + 0x25, 0xd0, 0xc6, 0x12, 0xf2, 0x5c, 0x5b, 0xff, 0xff, 0x94, 0xcc, 0x46, 0xf3, 0xc9, 0xdf, 0x1f, + 0x2d, 0xda, 0xf7, 0xe6, 0x82, 0x88, 0x36, 0x40, 0x97, 0x6f, 0x2e, 0xde, 0x2a, 0x46, 0xd6, 0x15, + 0x23, 0x9f, 0x15, 0x23, 0xaf, 0x35, 0x1b, 0xac, 0x6b, 0x36, 0x78, 0xaf, 0xd9, 0xe0, 0x81, 0x75, + 0xa2, 0x30, 0x7d, 0xe4, 0x1a, 0x82, 0xe7, 0x5f, 0x56, 0x5b, 0x37, 0xc9, 0x56, 0x2b, 0xe7, 0xfc, + 0x2b, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x63, 0x02, 0x4f, 0x76, 0x01, 0x00, 0x00, +} + +func (m *CometInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -203,55 +132,19 @@ func (m *ConsensusMsgParams) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ConsensusMsgParams) MarshalTo(dAtA []byte) (int, error) { +func (m *CometInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ConsensusMsgParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *CometInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Feature != nil { - { - size, err := m.Feature.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.Synchrony != nil { + if m.LastCommit != nil { { - size, err := m.Synchrony.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Abci != nil { - { - size, err := m.Abci.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Validator != nil { - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -261,68 +154,37 @@ func (m *ConsensusMsgParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if m.Evidence != nil { - { - size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintConsensus(dAtA, i, uint64(len(m.ProposerAddress))) i-- dAtA[i] = 0x1a } - if m.Block != nil { - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } + if len(m.ValidatorsHash) > 0 { + i -= len(m.ValidatorsHash) + copy(dAtA[i:], m.ValidatorsHash) + i = encodeVarintConsensus(dAtA, i, uint64(len(m.ValidatorsHash))) i-- dAtA[i] = 0x12 } - if m.Version != nil { - { - size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Evidence) > 0 { + for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintConsensus(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *ConsensusMsgParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConsensusMsgParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusMsgParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - func encodeVarintConsensus(dAtA []byte, offset int, v uint64) int { offset -= sovConsensus(v) base := offset @@ -334,59 +196,40 @@ func encodeVarintConsensus(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *ConsensusMsgParams) Size() (n int) { +func (m *CometInfo) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Version != nil { - l = m.Version.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Evidence != nil { - l = m.Evidence.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Validator != nil { - l = m.Validator.Size() - n += 1 + l + sovConsensus(uint64(l)) + if len(m.Evidence) > 0 { + for _, e := range m.Evidence { + l = e.Size() + n += 1 + l + sovConsensus(uint64(l)) + } } - if m.Abci != nil { - l = m.Abci.Size() + l = len(m.ValidatorsHash) + if l > 0 { n += 1 + l + sovConsensus(uint64(l)) } - if m.Synchrony != nil { - l = m.Synchrony.Size() + l = len(m.ProposerAddress) + if l > 0 { n += 1 + l + sovConsensus(uint64(l)) } - if m.Feature != nil { - l = m.Feature.Size() + if m.LastCommit != nil { + l = m.LastCommit.Size() n += 1 + l + sovConsensus(uint64(l)) } return n } -func (m *ConsensusMsgParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - func sovConsensus(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } func sozConsensus(x uint64) (n int) { return sovConsensus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error { +func (m *CometInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -409,15 +252,15 @@ func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ConsensusMsgParams: wiretype end group for non-group") + return fmt.Errorf("proto: CometInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusMsgParams: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: CometInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -444,18 +287,16 @@ func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Version == nil { - m.Version = &v1.VersionParams{} - } - if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Evidence = append(m.Evidence, &v1.Misbehavior{}) + if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowConsensus @@ -465,33 +306,31 @@ func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthConsensus } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthConsensus } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Block == nil { - m.Block = &v1.BlockParams{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.ValidatorsHash == nil { + m.ValidatorsHash = []byte{} } iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowConsensus @@ -501,103 +340,29 @@ func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthConsensus } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthConsensus } if postIndex > l { return io.ErrUnexpectedEOF } - if m.Evidence == nil { - m.Evidence = &v1.EvidenceParams{} - } - if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} } iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Validator == nil { - m.Validator = &v1.ValidatorParams{} - } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Abci", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Abci == nil { - m.Abci = &v1.ABCIParams{} - } - if err := m.Abci.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Synchrony", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -624,99 +389,13 @@ func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Synchrony == nil { - m.Synchrony = &v1.SynchronyParams{} + if m.LastCommit == nil { + m.LastCommit = &v1.CommitInfo{} } - if err := m.Synchrony.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Feature", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Feature == nil { - m.Feature = &v1.FeatureParams{} - } - if err := m.Feature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConsensusMsgParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConsensusMsgParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusMsgParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { default: iNdEx = preIndex skippy, err := skipConsensus(dAtA[iNdEx:]) diff --git a/x/consensus/types/query.pb.go b/x/consensus/types/query.pb.go index aafdfb1ef9ee..1ba4d07047af 100644 --- a/x/consensus/types/query.pb.go +++ b/x/consensus/types/query.pb.go @@ -29,6 +29,89 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// QueryCometInfoRequest defines the request type for querying x/consensus comet info. +type QueryGetCometInfoRequest struct { +} + +func (m *QueryGetCometInfoRequest) Reset() { *m = QueryGetCometInfoRequest{} } +func (m *QueryGetCometInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetCometInfoRequest) ProtoMessage() {} +func (*QueryGetCometInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_bf54d1e5df04cee9, []int{0} +} +func (m *QueryGetCometInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetCometInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetCometInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetCometInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetCometInfoRequest.Merge(m, src) +} +func (m *QueryGetCometInfoRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetCometInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetCometInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetCometInfoRequest proto.InternalMessageInfo + +// QueryCometInfoResponse defines the response type for querying x/consensus comet info. +type QueryGetCometInfoResponse struct { + // comet_info is the comet info of the x/consensus module. + CometInfo *CometInfo `protobuf:"bytes,1,opt,name=comet_info,json=cometInfo,proto3" json:"comet_info,omitempty"` +} + +func (m *QueryGetCometInfoResponse) Reset() { *m = QueryGetCometInfoResponse{} } +func (m *QueryGetCometInfoResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetCometInfoResponse) ProtoMessage() {} +func (*QueryGetCometInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bf54d1e5df04cee9, []int{1} +} +func (m *QueryGetCometInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryGetCometInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryGetCometInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetCometInfoResponse.Merge(m, src) +} +func (m *QueryGetCometInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetCometInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetCometInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetCometInfoResponse proto.InternalMessageInfo + +func (m *QueryGetCometInfoResponse) GetCometInfo() *CometInfo { + if m != nil { + return m.CometInfo + } + return nil +} + // QueryParamsRequest defines the request type for querying x/consensus parameters. type QueryParamsRequest struct { } @@ -37,7 +120,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bf54d1e5df04cee9, []int{0} + return fileDescriptor_bf54d1e5df04cee9, []int{2} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -78,7 +161,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bf54d1e5df04cee9, []int{1} + return fileDescriptor_bf54d1e5df04cee9, []int{3} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -115,6 +198,8 @@ func (m *QueryParamsResponse) GetParams() *v1.ConsensusParams { } func init() { + proto.RegisterType((*QueryGetCometInfoRequest)(nil), "cosmos.consensus.v1.QueryGetCometInfoRequest") + proto.RegisterType((*QueryGetCometInfoResponse)(nil), "cosmos.consensus.v1.QueryGetCometInfoResponse") proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.consensus.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.consensus.v1.QueryParamsResponse") } @@ -122,24 +207,29 @@ func init() { func init() { proto.RegisterFile("cosmos/consensus/v1/query.proto", fileDescriptor_bf54d1e5df04cee9) } var fileDescriptor_bf54d1e5df04cee9 = []byte{ - // 271 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xce, 0x2f, 0xce, - 0xcd, 0x2f, 0xd6, 0x4f, 0xce, 0xcf, 0x2b, 0x4e, 0xcd, 0x2b, 0x2e, 0x2d, 0xd6, 0x2f, 0x33, 0xd4, - 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0x28, 0xd0, - 0x83, 0x2b, 0xd0, 0x2b, 0x33, 0x94, 0x92, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c, - 0xc8, 0xd4, 0x4f, 0xcc, 0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, 0x68, 0x91, - 0x92, 0x4b, 0xce, 0xcf, 0x4d, 0x2d, 0x49, 0x4a, 0x2b, 0xd1, 0x2f, 0xa9, 0x2c, 0x48, 0x05, 0x9b, - 0x58, 0x90, 0x58, 0x94, 0x98, 0x0b, 0x95, 0x57, 0x12, 0xe1, 0x12, 0x0a, 0x04, 0xd9, 0x10, 0x00, - 0x16, 0x0c, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x51, 0x0a, 0xe4, 0x12, 0x46, 0x11, 0x2d, 0x2e, - 0x00, 0xd9, 0x28, 0x64, 0xc5, 0xc5, 0x06, 0xd1, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4, - 0xa4, 0x07, 0x33, 0x5d, 0x0f, 0x6c, 0xba, 0x5e, 0x99, 0xa1, 0x9e, 0x33, 0xcc, 0x6d, 0x50, 0xbd, - 0x50, 0x1d, 0x46, 0x5d, 0x8c, 0x5c, 0xac, 0x60, 0x33, 0x85, 0x1a, 0x18, 0xb9, 0xd8, 0x20, 0x92, - 0x42, 0xea, 0x7a, 0x58, 0x7c, 0xa4, 0x87, 0xe9, 0x20, 0x29, 0x0d, 0xc2, 0x0a, 0x21, 0x6e, 0x54, - 0x52, 0x6e, 0xba, 0xfc, 0x64, 0x32, 0x93, 0xac, 0x90, 0xb4, 0x3e, 0xb6, 0xd0, 0x84, 0x38, 0xc6, - 0xc9, 0xe2, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, - 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0xe4, 0x20, 0xba, 0x8a, - 0x53, 0xb2, 0xf5, 0x32, 0xf3, 0xf5, 0x2b, 0x90, 0x74, 0x83, 0x7d, 0x98, 0xc4, 0x06, 0x0e, 0x36, - 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0xcb, 0xf0, 0x2b, 0xac, 0x01, 0x00, 0x00, + // 342 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x4f, 0xc3, 0x30, + 0x10, 0x85, 0x6b, 0x24, 0x2a, 0x61, 0x98, 0x5c, 0x86, 0x12, 0xc0, 0xa0, 0x74, 0xa0, 0x0b, 0xb6, + 0x5a, 0x16, 0x84, 0xc4, 0x02, 0x03, 0x62, 0xa3, 0x8c, 0x5d, 0x50, 0x1a, 0xdc, 0x2a, 0x82, 0xf8, + 0xd2, 0xda, 0xad, 0xe8, 0x86, 0xf8, 0x05, 0x48, 0xfc, 0x29, 0xc6, 0x4a, 0x2c, 0x8c, 0x28, 0xe1, + 0x4f, 0xb0, 0xa1, 0xd8, 0x09, 0x2d, 0xc2, 0x08, 0xb6, 0x28, 0xf7, 0xee, 0xbd, 0xef, 0x5d, 0x82, + 0x77, 0x42, 0x50, 0x31, 0x28, 0x1e, 0x82, 0x54, 0x42, 0xaa, 0xb1, 0xe2, 0x93, 0x16, 0x1f, 0x8e, + 0xc5, 0x68, 0xca, 0x92, 0x11, 0x68, 0x20, 0x35, 0x2b, 0x60, 0x5f, 0x02, 0x36, 0x69, 0x79, 0x5b, + 0x03, 0x80, 0xc1, 0xad, 0xe0, 0x41, 0x12, 0xf1, 0x40, 0x4a, 0xd0, 0x81, 0x8e, 0x40, 0x2a, 0xbb, + 0xe2, 0xd1, 0x10, 0x62, 0xa1, 0x7b, 0x7d, 0xcd, 0xf5, 0x34, 0x11, 0xc6, 0x31, 0x09, 0x46, 0x41, + 0x5c, 0xce, 0x1b, 0xae, 0xcc, 0xb9, 0xbf, 0x11, 0xf9, 0x1e, 0xae, 0x77, 0x72, 0x8c, 0x33, 0xa1, + 0x4f, 0x73, 0xbb, 0x73, 0xd9, 0x87, 0x4b, 0x31, 0x1c, 0x0b, 0xa5, 0xfd, 0x2e, 0xde, 0x70, 0xcc, + 0x54, 0x92, 0x5b, 0x90, 0x63, 0x8c, 0x4d, 0xfe, 0x55, 0x24, 0xfb, 0x50, 0x47, 0xbb, 0xa8, 0xb9, + 0xda, 0xa6, 0xcc, 0xd1, 0x82, 0xcd, 0x77, 0x57, 0xc2, 0xf2, 0xd1, 0x5f, 0xc7, 0xc4, 0x78, 0x5f, + 0x18, 0xe2, 0x32, 0xb1, 0x83, 0x6b, 0xdf, 0xde, 0x16, 0x59, 0x47, 0xb8, 0x6a, 0x9b, 0x15, 0x39, + 0x3e, 0x2b, 0xab, 0x33, 0x53, 0xdd, 0xa6, 0x14, 0x91, 0xc5, 0x6e, 0xb1, 0xd1, 0xfe, 0x40, 0x78, + 0xd9, 0x78, 0x92, 0x7b, 0x84, 0xab, 0x76, 0x48, 0xf6, 0x9c, 0xa0, 0x3f, 0x81, 0xbc, 0xe6, 0xdf, + 0x42, 0xcb, 0xe8, 0x37, 0x1e, 0x5e, 0xde, 0x9f, 0x96, 0xb6, 0xc9, 0x26, 0x77, 0x9d, 0xdd, 0xc2, + 0x90, 0x18, 0xaf, 0x2d, 0x1e, 0x93, 0xec, 0xff, 0x6e, 0xef, 0xf8, 0x20, 0x1e, 0xfb, 0xaf, 0xdc, + 0x32, 0x9d, 0x1c, 0x3e, 0xa7, 0x14, 0xcd, 0x52, 0x8a, 0xde, 0x52, 0x8a, 0x1e, 0x33, 0x5a, 0x99, + 0x65, 0xb4, 0xf2, 0x9a, 0xd1, 0x4a, 0x97, 0x5a, 0x23, 0x75, 0x7d, 0xc3, 0x22, 0xe0, 0x77, 0x0b, + 0xb0, 0xe6, 0xa0, 0xbd, 0xaa, 0xf9, 0x3b, 0x0e, 0x3e, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xd8, + 0xe1, 0x00, 0xb8, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -156,6 +246,8 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Params queries the parameters of x/consensus module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // CometInfo queries the comet info of x/consensus module. + GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) } type queryClient struct { @@ -175,10 +267,21 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) GetCometInfo(ctx context.Context, in *QueryGetCometInfoRequest, opts ...grpc.CallOption) (*QueryGetCometInfoResponse, error) { + out := new(QueryGetCometInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Query/GetCometInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Params queries the parameters of x/consensus module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // CometInfo queries the comet info of x/consensus module. + GetCometInfo(context.Context, *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -188,6 +291,9 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (*UnimplementedQueryServer) GetCometInfo(ctx context.Context, req *QueryGetCometInfoRequest) (*QueryGetCometInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCometInfo not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -211,6 +317,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_GetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetCometInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetCometInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.consensus.v1.Query/GetCometInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetCometInfo(ctx, req.(*QueryGetCometInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.consensus.v1.Query", HandlerType: (*QueryServer)(nil), @@ -219,11 +343,73 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "GetCometInfo", + Handler: _Query_GetCometInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/query.proto", } +func (m *QueryGetCometInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetCometInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetCometInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryGetCometInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryGetCometInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetCometInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CometInfo != nil { + { + size, err := m.CometInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -293,6 +479,28 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *QueryGetCometInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryGetCometInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CometInfo != nil { + l = m.CometInfo.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 @@ -321,6 +529,142 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (m *QueryGetCometInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetCometInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetCometInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetCometInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryGetCometInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CometInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CometInfo == nil { + m.CometInfo = &CometInfo{} + } + if err := m.CometInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/consensus/types/tx.pb.go b/x/consensus/types/tx.pb.go index 1dab2f45eacc..ecf75a0e78ea 100644 --- a/x/consensus/types/tx.pb.go +++ b/x/consensus/types/tx.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + v11 "github.com/cometbft/cometbft/api/cometbft/abci/v1" v1 "github.com/cometbft/cometbft/api/cometbft/types/v1" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -170,47 +171,177 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo +// MsgCometInfo is the Msg/CometInfo request type. +type MsgSetCometInfo struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // evidence is the misbehaviour evidence to submit. + Evidence []*v11.Misbehavior `protobuf:"bytes,2,rep,name=evidence,proto3" json:"evidence,omitempty"` + // validators_hash is the hash of the current validator set. + ValidatorsHash []byte `protobuf:"bytes,3,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"` + // proposer_address is the address of the current proposer. + ProposerAddress []byte `protobuf:"bytes,4,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"` + // last_commit is the last commit info. + LastCommit *v11.CommitInfo `protobuf:"bytes,5,opt,name=last_commit,json=lastCommit,proto3" json:"last_commit,omitempty"` +} + +func (m *MsgSetCometInfo) Reset() { *m = MsgSetCometInfo{} } +func (m *MsgSetCometInfo) String() string { return proto.CompactTextString(m) } +func (*MsgSetCometInfo) ProtoMessage() {} +func (*MsgSetCometInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_2135c60575ab504d, []int{2} +} +func (m *MsgSetCometInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetCometInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetCometInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetCometInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetCometInfo.Merge(m, src) +} +func (m *MsgSetCometInfo) XXX_Size() int { + return m.Size() +} +func (m *MsgSetCometInfo) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetCometInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetCometInfo proto.InternalMessageInfo + +func (m *MsgSetCometInfo) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgSetCometInfo) GetEvidence() []*v11.Misbehavior { + if m != nil { + return m.Evidence + } + return nil +} + +func (m *MsgSetCometInfo) GetValidatorsHash() []byte { + if m != nil { + return m.ValidatorsHash + } + return nil +} + +func (m *MsgSetCometInfo) GetProposerAddress() []byte { + if m != nil { + return m.ProposerAddress + } + return nil +} + +func (m *MsgSetCometInfo) GetLastCommit() *v11.CommitInfo { + if m != nil { + return m.LastCommit + } + return nil +} + +// MsgCometInfoResponse defines the response +type MsgSetCometInfoResponse struct { +} + +func (m *MsgSetCometInfoResponse) Reset() { *m = MsgSetCometInfoResponse{} } +func (m *MsgSetCometInfoResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSetCometInfoResponse) ProtoMessage() {} +func (*MsgSetCometInfoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_2135c60575ab504d, []int{3} +} +func (m *MsgSetCometInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSetCometInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSetCometInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSetCometInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSetCometInfoResponse.Merge(m, src) +} +func (m *MsgSetCometInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSetCometInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSetCometInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSetCometInfoResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "cosmos.consensus.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cosmos.consensus.v1.MsgUpdateParamsResponse") + proto.RegisterType((*MsgSetCometInfo)(nil), "cosmos.consensus.v1.MsgSetCometInfo") + proto.RegisterType((*MsgSetCometInfoResponse)(nil), "cosmos.consensus.v1.MsgSetCometInfoResponse") } func init() { proto.RegisterFile("cosmos/consensus/v1/tx.proto", fileDescriptor_2135c60575ab504d) } var fileDescriptor_2135c60575ab504d = []byte{ - // 498 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x8b, 0xd3, 0x40, - 0x18, 0xc6, 0x1b, 0xb7, 0xdd, 0xb5, 0xa3, 0xb0, 0x98, 0x2a, 0x3b, 0x5b, 0x74, 0xa8, 0x45, 0x64, - 0x29, 0x76, 0xb2, 0xad, 0xeb, 0x5f, 0x10, 0xdc, 0x88, 0xa2, 0x87, 0x45, 0xc9, 0xb2, 0x1e, 0xbc, - 0xc8, 0x34, 0x99, 0xcd, 0x86, 0x6e, 0x32, 0x21, 0x33, 0x8d, 0xdb, 0x9b, 0x08, 0x5e, 0x3c, 0xf9, - 0x45, 0x84, 0x1e, 0xf6, 0x43, 0x88, 0xa7, 0xc5, 0x93, 0x78, 0x92, 0xf6, 0xd0, 0xaf, 0x21, 0x9d, - 0x99, 0x6c, 0xdc, 0x9a, 0xc2, 0x5e, 0x02, 0xc9, 0xf3, 0xfc, 0x9e, 0x27, 0xf3, 0xe6, 0x0d, 0xb8, - 0xee, 0x32, 0x1e, 0x32, 0x6e, 0xb9, 0x2c, 0xe2, 0x34, 0xe2, 0x03, 0x6e, 0xa5, 0x1d, 0x4b, 0x1c, - 0xe1, 0x38, 0x61, 0x82, 0x99, 0x35, 0xa5, 0xe2, 0x53, 0x15, 0xa7, 0x9d, 0xfa, 0x15, 0x12, 0x06, - 0x11, 0xb3, 0xe4, 0x55, 0xf9, 0xea, 0xeb, 0xca, 0xf7, 0x5e, 0xde, 0x59, 0x1a, 0x52, 0xd2, 0x9a, - 0x2e, 0x08, 0xb9, 0x3f, 0x8b, 0x0e, 0xb9, 0xaf, 0x05, 0xe4, 0xb2, 0x90, 0x8a, 0xde, 0xbe, 0xb0, - 0xc4, 0x30, 0xa6, 0xb2, 0x37, 0x26, 0x09, 0x09, 0x35, 0xd8, 0xfc, 0x56, 0x06, 0xab, 0x3b, 0xdc, - 0xdf, 0x8b, 0x3d, 0x22, 0xe8, 0x1b, 0xa9, 0x98, 0xf7, 0x41, 0x95, 0x0c, 0xc4, 0x01, 0x4b, 0x02, - 0x31, 0x84, 0x46, 0xc3, 0xd8, 0xa8, 0xda, 0xf0, 0xe7, 0x71, 0xfb, 0xaa, 0x6e, 0xdc, 0xf6, 0xbc, - 0x84, 0x72, 0xbe, 0x2b, 0x92, 0x20, 0xf2, 0x9d, 0xdc, 0x6a, 0x6e, 0x81, 0x4a, 0xef, 0x90, 0xb9, - 0x7d, 0x78, 0xa1, 0x61, 0x6c, 0x5c, 0xea, 0x22, 0x9c, 0x75, 0x63, 0xd9, 0x8d, 0xd3, 0x0e, 0xb6, - 0x67, 0xba, 0xaa, 0x71, 0x94, 0xd9, 0x7c, 0x02, 0x2e, 0xd2, 0x34, 0xf0, 0x68, 0xe4, 0x52, 0xb8, - 0x24, 0xc1, 0x9b, 0x05, 0xe0, 0x73, 0x6d, 0xd1, 0xec, 0x29, 0x62, 0x3e, 0x05, 0xd5, 0x94, 0x1c, - 0x06, 0x1e, 0x11, 0x2c, 0x81, 0x65, 0xc9, 0x37, 0x0b, 0xf8, 0xb7, 0x99, 0x47, 0x07, 0xe4, 0x90, - 0xf9, 0x12, 0x94, 0x49, 0xcf, 0x0d, 0x60, 0x45, 0xc2, 0x37, 0x0a, 0xe0, 0x6d, 0xfb, 0xd9, 0x2b, - 0xc5, 0xd9, 0xd7, 0x7e, 0x1f, 0xb7, 0x57, 0xd5, 0x20, 0xda, 0xdc, 0xeb, 0x37, 0x36, 0xf1, 0xbd, - 0x4d, 0x68, 0x38, 0x32, 0xc1, 0xdc, 0x03, 0x55, 0x3e, 0x8c, 0xdc, 0x83, 0x84, 0x45, 0x43, 0xb8, - 0xbc, 0xf0, 0x5d, 0x76, 0x33, 0x8f, 0xce, 0xac, 0xfd, 0x9f, 0xd9, 0x71, 0xf2, 0x24, 0xf3, 0x35, - 0x58, 0xd9, 0xa7, 0x44, 0x0c, 0x12, 0x0a, 0x57, 0x64, 0x68, 0xa3, 0x20, 0xf4, 0x85, 0x72, 0x2c, - 0x8e, 0xec, 0x3a, 0x59, 0xca, 0xe3, 0x47, 0x9f, 0xa6, 0xa3, 0x56, 0xfe, 0xe1, 0xbe, 0x4c, 0x47, - 0xad, 0xdb, 0xb9, 0xd9, 0x3a, 0xfa, 0x67, 0x4f, 0xe7, 0x76, 0xa3, 0xb9, 0x0e, 0xd6, 0xe6, 0x1e, - 0x39, 0x94, 0xc7, 0x33, 0x7b, 0xf7, 0xb3, 0x01, 0x96, 0x76, 0xb8, 0x6f, 0x7e, 0x00, 0x97, 0xcf, - 0xac, 0xd3, 0x2d, 0x5c, 0xb0, 0xdf, 0x78, 0x2e, 0xa5, 0x7e, 0xe7, 0x3c, 0xae, 0xac, 0xab, 0x59, - 0xfb, 0x31, 0x7f, 0xbe, 0xad, 0x07, 0xf5, 0xca, 0xc7, 0xe9, 0xa8, 0x65, 0xd8, 0x0f, 0xbf, 0x8f, - 0x91, 0x71, 0x32, 0x46, 0xc6, 0x9f, 0x31, 0x32, 0xbe, 0x4e, 0x50, 0xe9, 0x64, 0x82, 0x4a, 0xbf, - 0x26, 0xa8, 0xf4, 0x0e, 0x29, 0x82, 0x7b, 0x7d, 0x1c, 0xb0, 0x33, 0xc7, 0x94, 0x63, 0xec, 0x2d, - 0xcb, 0x7f, 0xe2, 0xee, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xb2, 0x37, 0x1a, 0xaf, 0x03, - 0x00, 0x00, + // 649 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x4f, 0xd4, 0x40, + 0x18, 0xa6, 0x7c, 0xba, 0xc3, 0xc6, 0xd5, 0x41, 0x43, 0xd9, 0x60, 0xb3, 0xae, 0x46, 0x91, 0x48, + 0xcb, 0x22, 0xa2, 0x90, 0x90, 0xc8, 0x12, 0x0d, 0x1c, 0x88, 0xa6, 0x04, 0x0f, 0x5e, 0x36, 0xd3, + 0x76, 0xd8, 0x36, 0xd0, 0x4e, 0xd3, 0x19, 0x2a, 0x7b, 0x33, 0x1e, 0x3d, 0xf9, 0x47, 0x4c, 0x38, + 0xf0, 0x23, 0x8c, 0x17, 0x89, 0x27, 0xe3, 0xc9, 0xec, 0x1e, 0x36, 0xfe, 0x0b, 0xd3, 0x99, 0x7e, + 0xec, 0x47, 0x37, 0x31, 0x5e, 0x9a, 0x74, 0xde, 0xe7, 0x79, 0xde, 0x77, 0x9e, 0xf7, 0x69, 0xc1, + 0xa2, 0x49, 0xa8, 0x4b, 0xa8, 0x66, 0x12, 0x8f, 0x62, 0x8f, 0x9e, 0x51, 0x2d, 0xac, 0x69, 0xec, + 0x5c, 0xf5, 0x03, 0xc2, 0x08, 0x9c, 0x13, 0x55, 0x35, 0xad, 0xaa, 0x61, 0xad, 0x7c, 0x13, 0xb9, + 0x8e, 0x47, 0x34, 0xfe, 0x14, 0xb8, 0xf2, 0x82, 0xc0, 0x35, 0xf8, 0x9b, 0x16, 0x93, 0x44, 0x69, + 0x3e, 0x6e, 0xe0, 0xd2, 0x66, 0x24, 0xed, 0xd2, 0x66, 0x5c, 0x50, 0x4c, 0xe2, 0x62, 0x66, 0x1c, + 0x33, 0x8d, 0xb5, 0x7c, 0xcc, 0xfb, 0xfa, 0x28, 0x40, 0x6e, 0x42, 0x5c, 0x4c, 0xeb, 0xc8, 0x30, + 0x1d, 0x3e, 0x56, 0x84, 0x13, 0xd5, 0xea, 0x97, 0x49, 0x50, 0x3a, 0xa0, 0xcd, 0x23, 0xdf, 0x42, + 0x0c, 0xbf, 0xe1, 0x3c, 0xb8, 0x01, 0x0a, 0xe8, 0x8c, 0xd9, 0x24, 0x70, 0x58, 0x4b, 0x96, 0x2a, + 0xd2, 0x52, 0xa1, 0x2e, 0xff, 0xb8, 0x5c, 0xb9, 0x15, 0xcf, 0xb3, 0x63, 0x59, 0x01, 0xa6, 0xf4, + 0x90, 0x05, 0x8e, 0xd7, 0xd4, 0x33, 0x28, 0x5c, 0x07, 0x53, 0xc6, 0x29, 0x31, 0x4f, 0xe4, 0xf1, + 0x8a, 0xb4, 0x34, 0xbb, 0xa6, 0xa8, 0x49, 0x67, 0x55, 0x74, 0x0c, 0x6b, 0x6a, 0x3d, 0xaa, 0x8b, + 0x36, 0xba, 0x00, 0xc3, 0x6d, 0x70, 0x0d, 0x87, 0x8e, 0x85, 0x3d, 0x13, 0xcb, 0x13, 0x9c, 0x78, + 0x37, 0x87, 0xf8, 0x32, 0x86, 0xc4, 0xdc, 0x94, 0x02, 0x5f, 0x80, 0x42, 0x88, 0x4e, 0x1d, 0x0b, + 0x31, 0x12, 0xc8, 0x93, 0x9c, 0x5f, 0xcd, 0xe1, 0xbf, 0x4d, 0x30, 0xb1, 0x40, 0x46, 0x82, 0x7b, + 0x60, 0x32, 0x72, 0x46, 0x9e, 0xe2, 0xe4, 0x3b, 0x39, 0xe4, 0x9d, 0xfa, 0xee, 0xbe, 0xe0, 0xd5, + 0x6f, 0xff, 0xba, 0x5c, 0x29, 0x09, 0x23, 0x56, 0xa8, 0x75, 0x52, 0x59, 0x55, 0x9f, 0xae, 0xca, + 0x92, 0xce, 0x15, 0xe0, 0x11, 0x28, 0xd0, 0x96, 0x67, 0xda, 0x01, 0xf1, 0x5a, 0xf2, 0xf4, 0xc8, + 0x59, 0x0e, 0x13, 0x4c, 0xac, 0x39, 0x37, 0xac, 0x59, 0xd3, 0x33, 0x25, 0xf8, 0x1a, 0xcc, 0x1c, + 0x63, 0xc4, 0xce, 0x02, 0x2c, 0xcf, 0x70, 0xd1, 0x4a, 0x8e, 0xe8, 0x2b, 0x81, 0x18, 0x2d, 0xb9, + 0xa6, 0x27, 0x2a, 0x5b, 0x9b, 0x1f, 0xbb, 0x17, 0xcb, 0xd9, 0xe2, 0x3e, 0x75, 0x2f, 0x96, 0x1f, + 0x64, 0x60, 0xed, 0xbc, 0x27, 0xc5, 0x03, 0xd9, 0xa8, 0x2e, 0x80, 0xf9, 0x81, 0x23, 0x1d, 0x53, + 0x3f, 0x82, 0x57, 0xbf, 0x8f, 0xf3, 0x28, 0x1d, 0x62, 0xb6, 0x1b, 0x4d, 0xb7, 0xef, 0x1d, 0x93, + 0xff, 0x8e, 0xd2, 0x66, 0x4f, 0x28, 0xc6, 0x2b, 0x13, 0xfd, 0x7b, 0x89, 0xbc, 0x8e, 0xae, 0x7c, + 0xe0, 0x50, 0x03, 0xdb, 0x28, 0x74, 0x48, 0xd0, 0x13, 0x88, 0x87, 0xa0, 0x94, 0xee, 0x96, 0x36, + 0x6c, 0x44, 0x6d, 0x1e, 0xab, 0xa2, 0x7e, 0x3d, 0x3b, 0xde, 0x43, 0xd4, 0x86, 0x8f, 0xc0, 0x0d, + 0x3f, 0x20, 0x3e, 0xa1, 0x38, 0x68, 0x20, 0x31, 0x08, 0x0f, 0x50, 0x51, 0x2f, 0x25, 0xe7, 0xf1, + 0x7c, 0x70, 0x1b, 0xcc, 0x9e, 0x22, 0xca, 0x1a, 0x26, 0x71, 0x5d, 0x87, 0xc5, 0x49, 0x59, 0x1c, + 0x9e, 0x68, 0x97, 0xd7, 0xa3, 0x9b, 0xeb, 0x20, 0x22, 0x88, 0xf7, 0xad, 0x8d, 0x61, 0xbf, 0xef, + 0x8d, 0xf6, 0x3b, 0x75, 0x2f, 0x36, 0xbb, 0xd7, 0xd0, 0xc4, 0xec, 0xb5, 0x3f, 0x12, 0x98, 0x38, + 0xa0, 0x4d, 0xf8, 0x1e, 0x14, 0xfb, 0xbe, 0xdd, 0xfb, 0x6a, 0xce, 0xaf, 0x46, 0x1d, 0x58, 0x59, + 0xf9, 0xf1, 0xbf, 0xa0, 0xd2, 0xc5, 0xce, 0x7d, 0x1b, 0x0c, 0xd3, 0xfa, 0x33, 0x68, 0x80, 0x62, + 0xdf, 0xa6, 0x47, 0x36, 0xee, 0x45, 0x8d, 0x6e, 0x9c, 0x77, 0xc9, 0xf2, 0xd4, 0x87, 0xee, 0xc5, + 0xb2, 0x54, 0x7f, 0xfe, 0xb5, 0xad, 0x48, 0x57, 0x6d, 0x45, 0xfa, 0xdd, 0x56, 0xa4, 0xcf, 0x1d, + 0x65, 0xec, 0xaa, 0xa3, 0x8c, 0xfd, 0xec, 0x28, 0x63, 0xef, 0x14, 0xa1, 0x46, 0xad, 0x13, 0xd5, + 0x21, 0x7d, 0x3e, 0xf2, 0xef, 0xc2, 0x98, 0xe6, 0x3f, 0xb9, 0x27, 0x7f, 0x03, 0x00, 0x00, 0xff, + 0xff, 0x65, 0xd1, 0xd8, 0x21, 0x9e, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -228,6 +359,8 @@ type MsgClient interface { // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // SetCometInfo defines how to set the comet info for the x/consensus module. + SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) } type msgClient struct { @@ -247,11 +380,22 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) SetCometInfo(ctx context.Context, in *MsgSetCometInfo, opts ...grpc.CallOption) (*MsgSetCometInfoResponse, error) { + out := new(MsgSetCometInfoResponse) + err := c.cc.Invoke(ctx, "/cosmos.consensus.v1.Msg/SetCometInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // UpdateParams defines a governance operation for updating the x/consensus module parameters. // The authority is defined in the keeper. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // SetCometInfo defines how to set the comet info for the x/consensus module. + SetCometInfo(context.Context, *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -261,6 +405,9 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (*UnimplementedMsgServer) SetCometInfo(ctx context.Context, req *MsgSetCometInfo) (*MsgSetCometInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetCometInfo not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -284,6 +431,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_SetCometInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSetCometInfo) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SetCometInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.consensus.v1.Msg/SetCometInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SetCometInfo(ctx, req.(*MsgSetCometInfo)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "cosmos.consensus.v1.Msg", HandlerType: (*MsgServer)(nil), @@ -292,6 +457,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "SetCometInfo", + Handler: _Msg_SetCometInfo_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "cosmos/consensus/v1/tx.proto", @@ -422,6 +591,99 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgSetCometInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetCometInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetCometInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.LastCommit != nil { + { + size, err := m.LastCommit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.ProposerAddress) > 0 { + i -= len(m.ProposerAddress) + copy(dAtA[i:], m.ProposerAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ProposerAddress))) + i-- + dAtA[i] = 0x22 + } + if len(m.ValidatorsHash) > 0 { + i -= len(m.ValidatorsHash) + copy(dAtA[i:], m.ValidatorsHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.ValidatorsHash))) + i-- + dAtA[i] = 0x1a + } + if len(m.Evidence) > 0 { + for iNdEx := len(m.Evidence) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Evidence[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSetCometInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgSetCometInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSetCometInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -479,6 +741,46 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } +func (m *MsgSetCometInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Evidence) > 0 { + for _, e := range m.Evidence { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + l = len(m.ValidatorsHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ProposerAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.LastCommit != nil { + l = m.LastCommit.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSetCometInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -833,6 +1135,276 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgSetCometInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetCometInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetCometInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Evidence = append(m.Evidence, &v11.Misbehavior{}) + if err := m.Evidence[len(m.Evidence)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ValidatorsHash = append(m.ValidatorsHash[:0], dAtA[iNdEx:postIndex]...) + if m.ValidatorsHash == nil { + m.ValidatorsHash = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ProposerAddress = append(m.ProposerAddress[:0], dAtA[iNdEx:postIndex]...) + if m.ProposerAddress == nil { + m.ProposerAddress = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LastCommit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LastCommit == nil { + m.LastCommit = &v11.CommitInfo{} + } + if err := m.LastCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSetCometInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSetCometInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSetCometInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0