From e0d8b29e2ff62a89c15cdc04d0f38d6234e6b71d Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Fri, 27 Oct 2023 18:39:35 +0800 Subject: [PATCH 1/5] add inturn relayer logic for crosschain OPBNB --- api/cosmos/oracle/v1/query.pulsar.go | 230 +++++++++++++----- baseapp/utils_test.go | 4 +- crypto/ledger/encode_test.go | 2 +- math/uint_test.go | 1 - orm/internal/testpb/bank.cosmos_orm.go | 1 + orm/internal/testpb/test_schema.cosmos_orm.go | 1 + proto/cosmos/oracle/v1/query.proto | 10 +- simapp/params/proto.go | 2 +- simapp/simd/cmd/root.go | 1 - simapp/test_helpers.go | 2 +- simapp/upgrades.go | 1 - snapshots/types/snapshot.pb.go | 1 + store/cachekv/benchmark_test.go | 1 + store/pruning/mock/db_mock.go | 2 +- store/streaming/constructor_test.go | 1 - tests/e2e/staking/suite.go | 1 - .../store/rootmulti/rollback_test.go | 2 +- testutil/testdata/tx.go | 2 +- testutil/testdata/unknonwnproto.pb.go | 9 + types/query/pagination.pb.go | 16 +- types/tx/signing/signing.pb.go | 1 + types/tx/tx.pb.go | 1 + x/auth/keeper/deterministic_test.go | 3 +- x/crosschain/keeper/keeper_test.go | 2 +- x/distribution/simulation/operations_test.go | 2 +- x/distribution/types/distribution.pb.go | 11 +- x/evidence/client/cli/query_test.go | 2 +- x/gashub/types/gashub.pb.go | 1 + x/gov/types/v1/gov.pb.go | 12 +- x/group/types.pb.go | 16 +- x/nft/client/cli/tx_test.go | 2 +- x/oracle/keeper/grpc_query.go | 2 +- x/oracle/keeper/keeper.go | 24 +- x/oracle/types/expected_keepers.go | 2 + x/oracle/types/query.pb.go | 118 +++++++-- x/oracle/types/query.pb.gw.go | 18 ++ x/staking/testutil/expected_keepers_mocks.go | 2 +- x/upgrade/client/cli/query_test.go | 2 +- 38 files changed, 371 insertions(+), 140 deletions(-) diff --git a/api/cosmos/oracle/v1/query.pulsar.go b/api/cosmos/oracle/v1/query.pulsar.go index 99b00ba5f4..8d4857b1bb 100644 --- a/api/cosmos/oracle/v1/query.pulsar.go +++ b/api/cosmos/oracle/v1/query.pulsar.go @@ -806,12 +806,14 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } var ( - md_QueryInturnRelayerRequest protoreflect.MessageDescriptor + md_QueryInturnRelayerRequest protoreflect.MessageDescriptor + fd_QueryInturnRelayerRequest_claim_src_chain protoreflect.FieldDescriptor ) func init() { file_cosmos_oracle_v1_query_proto_init() md_QueryInturnRelayerRequest = File_cosmos_oracle_v1_query_proto.Messages().ByName("QueryInturnRelayerRequest") + fd_QueryInturnRelayerRequest_claim_src_chain = md_QueryInturnRelayerRequest.Fields().ByName("claim_src_chain") } var _ protoreflect.Message = (*fastReflection_QueryInturnRelayerRequest)(nil) @@ -879,6 +881,12 @@ func (x *fastReflection_QueryInturnRelayerRequest) Interface() protoreflect.Prot // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryInturnRelayerRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ClaimSrcChain != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.ClaimSrcChain)) + if !f(fd_QueryInturnRelayerRequest_claim_src_chain, value) { + return + } + } } // Has reports whether a field is populated. @@ -894,6 +902,8 @@ func (x *fastReflection_QueryInturnRelayerRequest) Range(f func(protoreflect.Fie // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryInturnRelayerRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "cosmos.oracle.v1.QueryInturnRelayerRequest.claim_src_chain": + return x.ClaimSrcChain != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.oracle.v1.QueryInturnRelayerRequest")) @@ -910,6 +920,8 @@ func (x *fastReflection_QueryInturnRelayerRequest) Has(fd protoreflect.FieldDesc // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryInturnRelayerRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "cosmos.oracle.v1.QueryInturnRelayerRequest.claim_src_chain": + x.ClaimSrcChain = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.oracle.v1.QueryInturnRelayerRequest")) @@ -926,6 +938,9 @@ func (x *fastReflection_QueryInturnRelayerRequest) Clear(fd protoreflect.FieldDe // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryInturnRelayerRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "cosmos.oracle.v1.QueryInturnRelayerRequest.claim_src_chain": + value := x.ClaimSrcChain + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.oracle.v1.QueryInturnRelayerRequest")) @@ -946,6 +961,8 @@ func (x *fastReflection_QueryInturnRelayerRequest) Get(descriptor protoreflect.F // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryInturnRelayerRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "cosmos.oracle.v1.QueryInturnRelayerRequest.claim_src_chain": + x.ClaimSrcChain = (ClaimSrcChain)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.oracle.v1.QueryInturnRelayerRequest")) @@ -966,6 +983,8 @@ func (x *fastReflection_QueryInturnRelayerRequest) Set(fd protoreflect.FieldDesc // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryInturnRelayerRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.oracle.v1.QueryInturnRelayerRequest.claim_src_chain": + panic(fmt.Errorf("field claim_src_chain of message cosmos.oracle.v1.QueryInturnRelayerRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.oracle.v1.QueryInturnRelayerRequest")) @@ -979,6 +998,8 @@ func (x *fastReflection_QueryInturnRelayerRequest) Mutable(fd protoreflect.Field // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryInturnRelayerRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "cosmos.oracle.v1.QueryInturnRelayerRequest.claim_src_chain": + return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.oracle.v1.QueryInturnRelayerRequest")) @@ -1048,6 +1069,9 @@ func (x *fastReflection_QueryInturnRelayerRequest) ProtoMethods() *protoiface.Me var n int var l int _ = l + if x.ClaimSrcChain != 0 { + n += 1 + runtime.Sov(uint64(x.ClaimSrcChain)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -1077,6 +1101,11 @@ func (x *fastReflection_QueryInturnRelayerRequest) ProtoMethods() *protoiface.Me i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.ClaimSrcChain != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ClaimSrcChain)) + i-- + dAtA[i] = 0x8 + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -1126,6 +1155,25 @@ func (x *fastReflection_QueryInturnRelayerRequest) ProtoMethods() *protoiface.Me return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryInturnRelayerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ClaimSrcChain", wireType) + } + x.ClaimSrcChain = 0 + 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++ + x.ClaimSrcChain |= ClaimSrcChain(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1673,6 +1721,52 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type ClaimSrcChain int32 + +const ( + ClaimSrcChain_BSC ClaimSrcChain = 0 + ClaimSrcChain_OP_BNB ClaimSrcChain = 1 +) + +// Enum value maps for ClaimSrcChain. +var ( + ClaimSrcChain_name = map[int32]string{ + 0: "BSC", + 1: "OP_BNB", + } + ClaimSrcChain_value = map[string]int32{ + "BSC": 0, + "OP_BNB": 1, + } +) + +func (x ClaimSrcChain) Enum() *ClaimSrcChain { + p := new(ClaimSrcChain) + *p = x + return p +} + +func (x ClaimSrcChain) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ClaimSrcChain) Descriptor() protoreflect.EnumDescriptor { + return file_cosmos_oracle_v1_query_proto_enumTypes[0].Descriptor() +} + +func (ClaimSrcChain) Type() protoreflect.EnumType { + return &file_cosmos_oracle_v1_query_proto_enumTypes[0] +} + +func (x ClaimSrcChain) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ClaimSrcChain.Descriptor instead. +func (ClaimSrcChain) EnumDescriptor() ([]byte, []int) { + return file_cosmos_oracle_v1_query_proto_rawDescGZIP(), []int{0} +} + // QueryParamsRequest is the request type for the Query/Params RPC method. type QueryParamsRequest struct { state protoimpl.MessageState @@ -1742,6 +1836,8 @@ type QueryInturnRelayerRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + ClaimSrcChain ClaimSrcChain `protobuf:"varint,1,opt,name=claim_src_chain,json=claimSrcChain,proto3,enum=cosmos.oracle.v1.ClaimSrcChain" json:"claim_src_chain,omitempty"` } func (x *QueryInturnRelayerRequest) Reset() { @@ -1764,6 +1860,13 @@ func (*QueryInturnRelayerRequest) Descriptor() ([]byte, []int) { return file_cosmos_oracle_v1_query_proto_rawDescGZIP(), []int{2} } +func (x *QueryInturnRelayerRequest) GetClaimSrcChain() ClaimSrcChain { + if x != nil { + return x.ClaimSrcChain + } + return ClaimSrcChain_BSC +} + // QueryInturnRelayerResponse is the response type for the Query In-turn relayer RPC method. type QueryInturnRelayerResponse struct { state protoimpl.MessageState @@ -1825,47 +1928,54 @@ var file_cosmos_oracle_v1_query_proto_rawDesc = []byte{ 0x12, 0x36, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, + 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x64, 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, - 0x6e, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0b, 0x62, 0x6c, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x73, 0x50, 0x75, - 0x62, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x0d, 0x72, - 0x65, 0x6c, 0x61, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x32, 0x97, 0x02, 0x0a, - 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x77, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x94, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, - 0x72, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x75, 0x72, 0x6e, - 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x73, + 0x72, 0x63, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x6c, - 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x72, - 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0xb0, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, - 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, - 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, - 0x02, 0x10, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x10, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x72, 0x63, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, + 0x0d, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x72, 0x63, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x22, 0x84, + 0x01, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, + 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, + 0x0b, 0x62, 0x6c, 0x73, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x6c, 0x73, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x46, 0x0a, + 0x0e, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x2a, 0x2a, 0x0a, 0x0d, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x72, + 0x63, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x53, 0x43, 0x10, 0x00, 0x12, + 0x0a, 0x0a, 0x06, 0x4f, 0x50, 0x5f, 0x42, 0x4e, 0x42, 0x10, 0x01, 0x1a, 0x04, 0x88, 0xa3, 0x1e, + 0x00, 0x32, 0x97, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x77, 0x0a, 0x06, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x75, 0x72, 0x6e, 0x52, + 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, + 0x6e, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x75, + 0x72, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x74, + 0x75, 0x72, 0x6e, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0xb0, 0x01, 0x0a, 0x14, + 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, + 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1880,27 +1990,30 @@ func file_cosmos_oracle_v1_query_proto_rawDescGZIP() []byte { return file_cosmos_oracle_v1_query_proto_rawDescData } +var file_cosmos_oracle_v1_query_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_cosmos_oracle_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_cosmos_oracle_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: cosmos.oracle.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: cosmos.oracle.v1.QueryParamsResponse - (*QueryInturnRelayerRequest)(nil), // 2: cosmos.oracle.v1.QueryInturnRelayerRequest - (*QueryInturnRelayerResponse)(nil), // 3: cosmos.oracle.v1.QueryInturnRelayerResponse - (*Params)(nil), // 4: cosmos.oracle.v1.Params - (*RelayInterval)(nil), // 5: cosmos.oracle.v1.RelayInterval + (ClaimSrcChain)(0), // 0: cosmos.oracle.v1.ClaimSrcChain + (*QueryParamsRequest)(nil), // 1: cosmos.oracle.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 2: cosmos.oracle.v1.QueryParamsResponse + (*QueryInturnRelayerRequest)(nil), // 3: cosmos.oracle.v1.QueryInturnRelayerRequest + (*QueryInturnRelayerResponse)(nil), // 4: cosmos.oracle.v1.QueryInturnRelayerResponse + (*Params)(nil), // 5: cosmos.oracle.v1.Params + (*RelayInterval)(nil), // 6: cosmos.oracle.v1.RelayInterval } var file_cosmos_oracle_v1_query_proto_depIdxs = []int32{ - 4, // 0: cosmos.oracle.v1.QueryParamsResponse.params:type_name -> cosmos.oracle.v1.Params - 5, // 1: cosmos.oracle.v1.QueryInturnRelayerResponse.relay_interval:type_name -> cosmos.oracle.v1.RelayInterval - 0, // 2: cosmos.oracle.v1.Query.Params:input_type -> cosmos.oracle.v1.QueryParamsRequest - 2, // 3: cosmos.oracle.v1.Query.InturnRelayer:input_type -> cosmos.oracle.v1.QueryInturnRelayerRequest - 1, // 4: cosmos.oracle.v1.Query.Params:output_type -> cosmos.oracle.v1.QueryParamsResponse - 3, // 5: cosmos.oracle.v1.Query.InturnRelayer:output_type -> cosmos.oracle.v1.QueryInturnRelayerResponse - 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 + 5, // 0: cosmos.oracle.v1.QueryParamsResponse.params:type_name -> cosmos.oracle.v1.Params + 0, // 1: cosmos.oracle.v1.QueryInturnRelayerRequest.claim_src_chain:type_name -> cosmos.oracle.v1.ClaimSrcChain + 6, // 2: cosmos.oracle.v1.QueryInturnRelayerResponse.relay_interval:type_name -> cosmos.oracle.v1.RelayInterval + 1, // 3: cosmos.oracle.v1.Query.Params:input_type -> cosmos.oracle.v1.QueryParamsRequest + 3, // 4: cosmos.oracle.v1.Query.InturnRelayer:input_type -> cosmos.oracle.v1.QueryInturnRelayerRequest + 2, // 5: cosmos.oracle.v1.Query.Params:output_type -> cosmos.oracle.v1.QueryParamsResponse + 4, // 6: cosmos.oracle.v1.Query.InturnRelayer:output_type -> cosmos.oracle.v1.QueryInturnRelayerResponse + 5, // [5:7] is the sub-list for method output_type + 3, // [3:5] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_cosmos_oracle_v1_query_proto_init() } @@ -1964,13 +2077,14 @@ func file_cosmos_oracle_v1_query_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cosmos_oracle_v1_query_proto_rawDesc, - NumEnums: 0, + NumEnums: 1, NumMessages: 4, NumExtensions: 0, NumServices: 1, }, GoTypes: file_cosmos_oracle_v1_query_proto_goTypes, DependencyIndexes: file_cosmos_oracle_v1_query_proto_depIdxs, + EnumInfos: file_cosmos_oracle_v1_query_proto_enumTypes, MessageInfos: file_cosmos_oracle_v1_query_proto_msgTypes, }.Build() File_cosmos_oracle_v1_query_proto = out.File diff --git a/baseapp/utils_test.go b/baseapp/utils_test.go index 766b7926b8..f1e5007e26 100644 --- a/baseapp/utils_test.go +++ b/baseapp/utils_test.go @@ -61,9 +61,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) -var ( - ParamStoreKey = []byte("paramstore") -) +var ParamStoreKey = []byte("paramstore") func defaultLogger() log.Logger { if testing.Verbose() { diff --git a/crypto/ledger/encode_test.go b/crypto/ledger/encode_test.go index 388470daf6..7a60c3d147 100644 --- a/crypto/ledger/encode_test.go +++ b/crypto/ledger/encode_test.go @@ -28,7 +28,7 @@ func checkAminoJSON(t *testing.T, src interface{}, dst interface{}, isNil bool) require.Nil(t, err, "%+v", err) } -//nolint: govet +// nolint: govet func ExamplePrintRegisteredTypes() { _ = cdc.PrintTypes(os.Stdout) // | Type | Name | Prefix | Length | Notes | diff --git a/math/uint_test.go b/math/uint_test.go index ceb3e87d72..e39c8b2cf9 100644 --- a/math/uint_test.go +++ b/math/uint_test.go @@ -375,5 +375,4 @@ func (s *uintTestSuite) TestUintBigEndian() { u2 = u2.SetBytes(u1b) s.Require().Equal(u1, u2) - } diff --git a/orm/internal/testpb/bank.cosmos_orm.go b/orm/internal/testpb/bank.cosmos_orm.go index 0635179c20..51a36e5b80 100644 --- a/orm/internal/testpb/bank.cosmos_orm.go +++ b/orm/internal/testpb/bank.cosmos_orm.go @@ -4,6 +4,7 @@ package testpb import ( context "context" + ormlist "github.com/cosmos/cosmos-sdk/orm/model/ormlist" ormtable "github.com/cosmos/cosmos-sdk/orm/model/ormtable" ormerrors "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" diff --git a/orm/internal/testpb/test_schema.cosmos_orm.go b/orm/internal/testpb/test_schema.cosmos_orm.go index a5cf2a6fbd..0306c97c8c 100644 --- a/orm/internal/testpb/test_schema.cosmos_orm.go +++ b/orm/internal/testpb/test_schema.cosmos_orm.go @@ -4,6 +4,7 @@ package testpb import ( context "context" + ormlist "github.com/cosmos/cosmos-sdk/orm/model/ormlist" ormtable "github.com/cosmos/cosmos-sdk/orm/model/ormtable" ormerrors "github.com/cosmos/cosmos-sdk/orm/types/ormerrors" diff --git a/proto/cosmos/oracle/v1/query.proto b/proto/cosmos/oracle/v1/query.proto index 65d4b6a5ac..0c69cc33dd 100644 --- a/proto/cosmos/oracle/v1/query.proto +++ b/proto/cosmos/oracle/v1/query.proto @@ -29,8 +29,16 @@ message QueryParamsResponse { Params params = 1 [(gogoproto.nullable) = false]; } +enum ClaimSrcChain { + option (gogoproto.goproto_enum_prefix) = false; + BSC = 0; + OP_BNB = 1; +} + // QueryInturnRelayerRequest is the request type for the Query In-turn relayer RPC method. -message QueryInturnRelayerRequest {} +message QueryInturnRelayerRequest { + ClaimSrcChain claim_src_chain = 1; +} // QueryInturnRelayerResponse is the response type for the Query In-turn relayer RPC method. message QueryInturnRelayerResponse { diff --git a/simapp/params/proto.go b/simapp/params/proto.go index a795e6d108..ef0f5fd5fd 100644 --- a/simapp/params/proto.go +++ b/simapp/params/proto.go @@ -6,8 +6,8 @@ package params import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" - "github.com/cosmos/cosmos-sdk/x/auth/tx" signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing" + "github.com/cosmos/cosmos-sdk/x/auth/tx" ) // MakeTestEncodingConfig creates an EncodingConfig for a non-amino based test configuration. diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index 66c720a432..faee3be2f2 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -256,7 +256,6 @@ func newApp( serverCfg *serverconfig.Config, appOpts servertypes.AppOptions, ) servertypes.Application { - baseappOptions := server.DefaultBaseappOptions(appOpts) return simapp.NewSimApp( logger, db, traceStore, true, chainID, serverCfg, diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 83a41f147b..e7faff74e5 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -23,8 +23,8 @@ import ( "github.com/cosmos/cosmos-sdk/server" serverconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" - sdktestutil "github.com/cosmos/cosmos-sdk/testutil" pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" + sdktestutil "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/mock" "github.com/cosmos/cosmos-sdk/testutil/network" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" diff --git a/simapp/upgrades.go b/simapp/upgrades.go index 99880f0f92..4d29c2ce59 100644 --- a/simapp/upgrades.go +++ b/simapp/upgrades.go @@ -9,7 +9,6 @@ import ( ) func (app *SimApp) RegisterUpgradeHandlers(chainID string, serverCfg *serverconfig.Config) error { - // Register the plans from server config err := app.UpgradeKeeper.RegisterUpgradePlan(chainID, serverCfg.Upgrade) if err != nil { diff --git a/snapshots/types/snapshot.pb.go b/snapshots/types/snapshot.pb.go index 811e2b78c4..5821c91614 100644 --- a/snapshots/types/snapshot.pb.go +++ b/snapshots/types/snapshot.pb.go @@ -152,6 +152,7 @@ type SnapshotItem struct { // item is the specific type of snapshot item. // // Types that are valid to be assigned to Item: + // // *SnapshotItem_Store // *SnapshotItem_IAVL // *SnapshotItem_Extension diff --git a/store/cachekv/benchmark_test.go b/store/cachekv/benchmark_test.go index babc19c1d2..68ae3a8664 100644 --- a/store/cachekv/benchmark_test.go +++ b/store/cachekv/benchmark_test.go @@ -53,6 +53,7 @@ func BenchmarkDeepContextStack1(b *testing.B) { func BenchmarkDeepContextStack3(b *testing.B) { DoBenchmarkDeepContextStack(b, 3) } + func BenchmarkDeepContextStack10(b *testing.B) { DoBenchmarkDeepContextStack(b, 10) } diff --git a/store/pruning/mock/db_mock.go b/store/pruning/mock/db_mock.go index 72c8c99fda..29d554834a 100644 --- a/store/pruning/mock/db_mock.go +++ b/store/pruning/mock/db_mock.go @@ -7,8 +7,8 @@ package mock import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" db "github.com/cometbft/cometbft-db" + gomock "github.com/golang/mock/gomock" ) // MockDB is a mock of DB interface. diff --git a/store/streaming/constructor_test.go b/store/streaming/constructor_test.go index ea00c05bbc..7200734b68 100644 --- a/store/streaming/constructor_test.go +++ b/store/streaming/constructor_test.go @@ -24,7 +24,6 @@ type fakeOptions struct{} func (f *fakeOptions) Get(key string) interface{} { if key == "streamers.file.write_dir" { return "data/file_streamer" - } return nil } diff --git a/tests/e2e/staking/suite.go b/tests/e2e/staking/suite.go index 079cf2bfa6..f1cc5e2746 100644 --- a/tests/e2e/staking/suite.go +++ b/tests/e2e/staking/suite.go @@ -1345,7 +1345,6 @@ func (s *E2ETestSuite) TestBlockResults() { ) return nil - }, 10) } diff --git a/tests/integration/store/rootmulti/rollback_test.go b/tests/integration/store/rootmulti/rollback_test.go index a29aac6357..82103027da 100644 --- a/tests/integration/store/rootmulti/rollback_test.go +++ b/tests/integration/store/rootmulti/rollback_test.go @@ -11,9 +11,9 @@ import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" serverconfig "github.com/cosmos/cosmos-sdk/server/config" + sdktestutil "github.com/cosmos/cosmos-sdk/testutil" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/stretchr/testify/require" - sdktestutil "github.com/cosmos/cosmos-sdk/testutil" ) func TestRollback(t *testing.T) { diff --git a/testutil/testdata/tx.go b/testutil/testdata/tx.go index 2b6093fe77..b309f00ca5 100644 --- a/testutil/testdata/tx.go +++ b/testutil/testdata/tx.go @@ -6,13 +6,13 @@ import ( "github.com/stretchr/testify/require" "pgregory.net/rapid" + "github.com/cosmos/cosmos-sdk/crypto/keys/eth/ethsecp256k1" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" - "github.com/cosmos/cosmos-sdk/crypto/keys/eth/ethsecp256k1" ) // AddressGenerator creates and returns a random address generator using rapid. diff --git a/testutil/testdata/unknonwnproto.pb.go b/testutil/testdata/unknonwnproto.pb.go index fcffd26d8e..3522a72535 100644 --- a/testutil/testdata/unknonwnproto.pb.go +++ b/testutil/testdata/unknonwnproto.pb.go @@ -715,6 +715,7 @@ type Customer3 struct { Surcharge float32 `protobuf:"fixed32,4,opt,name=surcharge,proto3" json:"surcharge,omitempty"` Destination string `protobuf:"bytes,5,opt,name=destination,proto3" json:"destination,omitempty"` // Types that are valid to be assigned to Payment: + // // *Customer3_CreditCardNo // *Customer3_ChequeNo Payment isCustomer3_Payment `protobuf_oneof:"payment"` @@ -848,6 +849,7 @@ type TestVersion1 struct { C []*TestVersion1 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []TestVersion1 `protobuf:"bytes,5,rep,name=d,proto3" json:"d"` // Types that are valid to be assigned to Sum: + // // *TestVersion1_E // *TestVersion1_F Sum isTestVersion1_Sum `protobuf_oneof:"sum"` @@ -992,6 +994,7 @@ type TestVersion2 struct { C []*TestVersion2 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []*TestVersion2 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: + // // *TestVersion2_E // *TestVersion2_F Sum isTestVersion2_Sum `protobuf_oneof:"sum"` @@ -1144,6 +1147,7 @@ type TestVersion3 struct { C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: + // // *TestVersion3_E // *TestVersion3_F Sum isTestVersion3_Sum `protobuf_oneof:"sum"` @@ -1296,6 +1300,7 @@ type TestVersion3LoneOneOfValue struct { C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: + // // *TestVersion3LoneOneOfValue_E Sum isTestVersion3LoneOneOfValue_Sum `protobuf_oneof:"sum"` G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` @@ -1435,6 +1440,7 @@ type TestVersion3LoneNesting struct { C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: + // // *TestVersion3LoneNesting_F Sum isTestVersion3LoneNesting_Sum `protobuf_oneof:"sum"` G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` @@ -1822,6 +1828,7 @@ type TestVersion4LoneNesting struct { C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: + // // *TestVersion4LoneNesting_F Sum isTestVersion4LoneNesting_Sum `protobuf_oneof:"sum"` G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` @@ -2206,6 +2213,7 @@ type TestVersionFD1 struct { X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` // Types that are valid to be assigned to Sum: + // // *TestVersionFD1_E // *TestVersionFD1_F Sum isTestVersionFD1_Sum `protobuf_oneof:"sum"` @@ -2323,6 +2331,7 @@ type TestVersionFD1WithExtraAny struct { X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` // Types that are valid to be assigned to Sum: + // // *TestVersionFD1WithExtraAny_E // *TestVersionFD1WithExtraAny_F Sum isTestVersionFD1WithExtraAny_Sum `protobuf_oneof:"sum"` diff --git a/types/query/pagination.pb.go b/types/query/pagination.pb.go index 9680f298f4..cc37a25172 100644 --- a/types/query/pagination.pb.go +++ b/types/query/pagination.pb.go @@ -25,10 +25,10 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // PageRequest is to be embedded in gRPC request messages for efficient // pagination. Ex: // -// message SomeRequest { -// Foo some_parameter = 1; -// PageRequest pagination = 2; -// } +// message SomeRequest { +// Foo some_parameter = 1; +// PageRequest pagination = 2; +// } type PageRequest struct { // key is a value returned in PageResponse.next_key to begin // querying the next page most efficiently. Only one of offset or key @@ -123,10 +123,10 @@ func (m *PageRequest) GetReverse() bool { // PageResponse is to be embedded in gRPC response messages where the // corresponding request message has used PageRequest. // -// message SomeResponse { -// repeated Bar results = 1; -// PageResponse page = 2; -// } +// message SomeResponse { +// repeated Bar results = 1; +// PageResponse page = 2; +// } type PageResponse struct { // next_key is the key to be passed to PageRequest.key to // query the next page most efficiently. It will be empty if diff --git a/types/tx/signing/signing.pb.go b/types/tx/signing/signing.pb.go index 0be41d2029..885983f286 100644 --- a/types/tx/signing/signing.pb.go +++ b/types/tx/signing/signing.pb.go @@ -218,6 +218,7 @@ type SignatureDescriptor_Data struct { // sum is the one of that specifies whether this represents single or multi-signature data // // Types that are valid to be assigned to Sum: + // // *SignatureDescriptor_Data_Single_ // *SignatureDescriptor_Data_Multi_ Sum isSignatureDescriptor_Data_Sum `protobuf_oneof:"sum"` diff --git a/types/tx/tx.pb.go b/types/tx/tx.pb.go index cf1f47d451..4bc546be93 100644 --- a/types/tx/tx.pb.go +++ b/types/tx/tx.pb.go @@ -715,6 +715,7 @@ type ModeInfo struct { // multisig signer // // Types that are valid to be assigned to Sum: + // // *ModeInfo_Single_ // *ModeInfo_Multi_ Sum isModeInfo_Sum `protobuf_oneof:"sum"` diff --git a/x/auth/keeper/deterministic_test.go b/x/auth/keeper/deterministic_test.go index 306e1cce2d..ad82d17497 100644 --- a/x/auth/keeper/deterministic_test.go +++ b/x/auth/keeper/deterministic_test.go @@ -2,10 +2,11 @@ package keeper_test import ( "encoding/hex" - "github.com/cosmos/cosmos-sdk/types/query" "sort" "testing" + "github.com/cosmos/cosmos-sdk/types/query" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/stretchr/testify/suite" "pgregory.net/rapid" diff --git a/x/crosschain/keeper/keeper_test.go b/x/crosschain/keeper/keeper_test.go index ed30d11a38..1921415e93 100644 --- a/x/crosschain/keeper/keeper_test.go +++ b/x/crosschain/keeper/keeper_test.go @@ -118,7 +118,7 @@ func (s *TestSuite) TestUpdateChannelPermission() { s.crossChainKeeper.SetChannelSendPermission(s.ctx, sdk.ChainID(1), sdk.ChannelID(1), sdk.ChannelAllow) permissions := []*types.ChannelPermission{ - &types.ChannelPermission{ + { DestChainId: 1, ChannelId: 1, Permission: 0, diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index 3e76115324..f8674545b8 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -12,8 +12,8 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/runtime" - "github.com/cosmos/cosmos-sdk/testutil/configurator" sdktestutil "github.com/cosmos/cosmos-sdk/testutil" + "github.com/cosmos/cosmos-sdk/testutil/configurator" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" diff --git a/x/distribution/types/distribution.pb.go b/x/distribution/types/distribution.pb.go index 5a8295d590..03ce9ef5f4 100644 --- a/x/distribution/types/distribution.pb.go +++ b/x/distribution/types/distribution.pb.go @@ -85,11 +85,12 @@ func (m *Params) GetWithdrawAddrEnabled() bool { // The reference count indicates the number of objects // which might need to reference this historical entry at any point. // ReferenceCount = -// number of outstanding delegations which ended the associated period (and -// might need to read that record) -// + number of slashes which ended the associated period (and might need to -// read that record) -// + one per validator for the zeroeth period, set on initialization +// +// number of outstanding delegations which ended the associated period (and +// might need to read that record) +// + number of slashes which ended the associated period (and might need to +// read that record) +// + one per validator for the zeroeth period, set on initialization type ValidatorHistoricalRewards struct { CumulativeRewardRatio github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=cumulative_reward_ratio,json=cumulativeRewardRatio,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"cumulative_reward_ratio"` ReferenceCount uint32 `protobuf:"varint,2,opt,name=reference_count,json=referenceCount,proto3" json:"reference_count,omitempty"` diff --git a/x/evidence/client/cli/query_test.go b/x/evidence/client/cli/query_test.go index 70a0d8e2ab..4e62747aeb 100644 --- a/x/evidence/client/cli/query_test.go +++ b/x/evidence/client/cli/query_test.go @@ -16,12 +16,12 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keyring" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + sdktestutil "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" sdk "github.com/cosmos/cosmos-sdk/types" testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/evidence" "github.com/cosmos/cosmos-sdk/x/evidence/client/cli" - sdktestutil "github.com/cosmos/cosmos-sdk/testutil" ) func TestGetQueryCmd(t *testing.T) { diff --git a/x/gashub/types/gashub.pb.go b/x/gashub/types/gashub.pb.go index ae6b6d354c..ac8079f797 100644 --- a/x/gashub/types/gashub.pb.go +++ b/x/gashub/types/gashub.pb.go @@ -85,6 +85,7 @@ type MsgGasParams struct { // gas_params is the oneof that represents either fixed_gas_params or dynamic_gas_params // // Types that are valid to be assigned to GasParams: + // // *MsgGasParams_FixedType // *MsgGasParams_GrantType // *MsgGasParams_MultiSendType diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 3dec8ec332..4a2b5d6e26 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -738,15 +738,15 @@ type Params struct { MaxDepositPeriod *time.Duration `protobuf:"bytes,2,opt,name=max_deposit_period,json=maxDepositPeriod,proto3,stdduration" json:"max_deposit_period,omitempty"` // Duration of the voting period. VotingPeriod *time.Duration `protobuf:"bytes,3,opt,name=voting_period,json=votingPeriod,proto3,stdduration" json:"voting_period,omitempty"` - // Minimum percentage of total stake needed to vote for a result to be - // considered valid. + // Minimum percentage of total stake needed to vote for a result to be + // considered valid. Quorum string `protobuf:"bytes,4,opt,name=quorum,proto3" json:"quorum,omitempty"` - // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. + // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. Threshold string `protobuf:"bytes,5,opt,name=threshold,proto3" json:"threshold,omitempty"` - // Minimum value of Veto votes to Total votes ratio for proposal to be - // vetoed. Default value: 1/3. + // Minimum value of Veto votes to Total votes ratio for proposal to be + // vetoed. Default value: 1/3. VetoThreshold string `protobuf:"bytes,6,opt,name=veto_threshold,json=vetoThreshold,proto3" json:"veto_threshold,omitempty"` - // The ratio representing the proportion of the deposit value that must be paid at proposal submission. + // The ratio representing the proportion of the deposit value that must be paid at proposal submission. MinInitialDepositRatio string `protobuf:"bytes,7,opt,name=min_initial_deposit_ratio,json=minInitialDepositRatio,proto3" json:"min_initial_deposit_ratio,omitempty"` // burn deposits if a proposal does not meet quorum BurnVoteQuorum bool `protobuf:"varint,13,opt,name=burn_vote_quorum,json=burnVoteQuorum,proto3" json:"burn_vote_quorum,omitempty"` diff --git a/x/group/types.pb.go b/x/group/types.pb.go index 16cb87020e..f375179d8d 100644 --- a/x/group/types.pb.go +++ b/x/group/types.pb.go @@ -298,10 +298,10 @@ func (m *MemberRequest) GetMetadata() string { // ThresholdDecisionPolicy is a decision policy where a proposal passes when it // satisfies the two following conditions: -// 1. The sum of all `YES` voter's weights is greater or equal than the defined -// `threshold`. -// 2. The voting and execution periods of the proposal respect the parameters -// given by `windows`. +// 1. The sum of all `YES` voter's weights is greater or equal than the defined +// `threshold`. +// 2. The voting and execution periods of the proposal respect the parameters +// given by `windows`. type ThresholdDecisionPolicy struct { // threshold is the minimum weighted sum of `YES` votes that must be met or // exceeded for a proposal to succeed. @@ -359,10 +359,10 @@ func (m *ThresholdDecisionPolicy) GetWindows() *DecisionPolicyWindows { // PercentageDecisionPolicy is a decision policy where a proposal passes when // it satisfies the two following conditions: -// 1. The percentage of all `YES` voters' weights out of the total group weight -// is greater or equal than the given `percentage`. -// 2. The voting and execution periods of the proposal respect the parameters -// given by `windows`. +// 1. The percentage of all `YES` voters' weights out of the total group weight +// is greater or equal than the given `percentage`. +// 2. The voting and execution periods of the proposal respect the parameters +// given by `windows`. type PercentageDecisionPolicy struct { // percentage is the minimum percentage of the weighted sum of `YES` votes must // meet for a proposal to succeed. diff --git a/x/nft/client/cli/tx_test.go b/x/nft/client/cli/tx_test.go index ba8159d442..511f38d971 100644 --- a/x/nft/client/cli/tx_test.go +++ b/x/nft/client/cli/tx_test.go @@ -23,9 +23,9 @@ import ( "github.com/cosmos/cosmos-sdk/x/nft" nftmodule "github.com/cosmos/cosmos-sdk/x/nft/module" + sdktestutil "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/x/nft/client/cli" nfttestutil "github.com/cosmos/cosmos-sdk/x/nft/testutil" - sdktestutil "github.com/cosmos/cosmos-sdk/testutil" ) const ( diff --git a/x/oracle/keeper/grpc_query.go b/x/oracle/keeper/grpc_query.go index 357b7c4658..b7e010fe89 100644 --- a/x/oracle/keeper/grpc_query.go +++ b/x/oracle/keeper/grpc_query.go @@ -18,5 +18,5 @@ func (k Keeper) InturnRelayer(c context.Context, req *types.QueryInturnRelayerRe } ctx := sdk.UnwrapSDKContext(c) _, relayerInterval := k.GetRelayerParams(ctx) - return k.GetInturnRelayer(ctx, relayerInterval) + return k.GetInturnRelayer(ctx, relayerInterval, req.ClaimSrcChain) } diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 8fad41b000..1e397f542d 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -4,6 +4,8 @@ import ( "bytes" "encoding/hex" + upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" + sdkerrors "cosmossdk.io/errors" "github.com/cometbft/cometbft/libs/log" storetypes "github.com/cosmos/cosmos-sdk/store/types" @@ -80,7 +82,7 @@ func (k Keeper) GetRelayerRewardShare(ctx sdk.Context) uint32 { } // IsRelayerValid returns true if the relayer is valid and allowed to send the claim message -func (k Keeper) IsRelayerValid(ctx sdk.Context, relayer sdk.AccAddress, validators []stakingtypes.Validator, claimTimestamp uint64) (bool, error) { +func (k Keeper) IsRelayerValid(ctx sdk.Context, relayer sdk.AccAddress, validators []stakingtypes.Validator, claimTimestamp uint64, claimSrcChain types.ClaimSrcChain) (bool, error) { var validatorIndex int64 = -1 var vldr stakingtypes.Validator for index, validator := range validators { @@ -98,7 +100,7 @@ func (k Keeper) IsRelayerValid(ctx sdk.Context, relayer sdk.AccAddress, validato inturnRelayerTimeout, relayerInterval := k.GetRelayerParams(ctx) // check whether submitter of msgClaim is an in-turn relayer - inturnRelayerBlsKey, _, err := k.getInturnRelayer(ctx, relayerInterval) + inturnRelayerBlsKey, _, err := k.getInturnRelayer(ctx, relayerInterval, claimSrcChain) if err != nil { return false, err } @@ -130,7 +132,14 @@ func (k Keeper) CheckClaim(ctx sdk.Context, claim *types.MsgClaim) (sdk.AccAddre } validators := historicalInfo.Valset - isValid, err := k.IsRelayerValid(ctx, relayer, validators, claim.Timestamp) + claimSrcChain := types.BSC + if ctx.IsUpgraded(upgradetypes.Pampas) { + if sdk.ChainID(claim.SrcChainId) == k.CrossChainKeeper.GetDestOpChainID() { + claimSrcChain = types.OP_BNB + } + } + + isValid, err := k.IsRelayerValid(ctx, relayer, validators, claim.Timestamp, claimSrcChain) if err != nil { return sdk.AccAddress{}, nil, err } @@ -190,7 +199,7 @@ func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { return params } -func (k Keeper) getInturnRelayer(ctx sdk.Context, relayerInterval uint64) ([]byte, *types.RelayInterval, error) { +func (k Keeper) getInturnRelayer(ctx sdk.Context, relayerInterval uint64, claimSrcChain types.ClaimSrcChain) ([]byte, *types.RelayInterval, error) { historicalInfo, ok := k.StakingKeeper.GetHistoricalInfo(ctx, ctx.BlockHeight()) if !ok { return nil, nil, sdkerrors.Wrapf(types.ErrValidatorSet, "get historical validators failed") @@ -211,6 +220,9 @@ func (k Keeper) getInturnRelayer(ctx sdk.Context, relayerInterval uint64) ([]byt start := curTimeStamp - (remainder - inTurnRelayerIndex*relayerInterval) end := start + relayerInterval + if claimSrcChain == types.OP_BNB { + inTurnRelayerIndex = (inTurnRelayerIndex + uint64(validatorsSize/2)) % uint64(validatorsSize) + } inturnRelayer := validators[inTurnRelayerIndex] return inturnRelayer.BlsKey, &types.RelayInterval{ @@ -219,8 +231,8 @@ func (k Keeper) getInturnRelayer(ctx sdk.Context, relayerInterval uint64) ([]byt }, nil } -func (k Keeper) GetInturnRelayer(ctx sdk.Context, relayerInterval uint64) (*types.QueryInturnRelayerResponse, error) { - blsKey, interval, err := k.getInturnRelayer(ctx, relayerInterval) +func (k Keeper) GetInturnRelayer(ctx sdk.Context, relayerInterval uint64, claimSrcChain types.ClaimSrcChain) (*types.QueryInturnRelayerResponse, error) { + blsKey, interval, err := k.getInturnRelayer(ctx, relayerInterval, claimSrcChain) if err != nil { return nil, err } diff --git a/x/oracle/types/expected_keepers.go b/x/oracle/types/expected_keepers.go index 6d751db32e..00142ef448 100644 --- a/x/oracle/types/expected_keepers.go +++ b/x/oracle/types/expected_keepers.go @@ -22,6 +22,8 @@ type CrossChainKeeper interface { IsDestChainSupported(chainID sdk.ChainID) bool GetReceiveSequence(ctx sdk.Context, chainId sdk.ChainID, channelID sdk.ChannelID) uint64 IncrReceiveSequence(ctx sdk.Context, chainId sdk.ChainID, channelID sdk.ChannelID) + GetDestBscChainID() sdk.ChainID + GetDestOpChainID() sdk.ChainID } type BankKeeper interface { diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index f68671491b..2a650efeb5 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -29,6 +29,31 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +type ClaimSrcChain int32 + +const ( + BSC ClaimSrcChain = 0 + OP_BNB ClaimSrcChain = 1 +) + +var ClaimSrcChain_name = map[int32]string{ + 0: "BSC", + 1: "OP_BNB", +} + +var ClaimSrcChain_value = map[string]int32{ + "BSC": 0, + "OP_BNB": 1, +} + +func (x ClaimSrcChain) String() string { + return proto.EnumName(ClaimSrcChain_name, int32(x)) +} + +func (ClaimSrcChain) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_9f804c4644f3aaef, []int{0} +} + // QueryParamsRequest is the request type for the Query/Params RPC method. type QueryParamsRequest struct { } @@ -114,6 +139,7 @@ func (m *QueryParamsResponse) GetParams() Params { // QueryInturnRelayerRequest is the request type for the Query In-turn relayer RPC method. type QueryInturnRelayerRequest struct { + ClaimSrcChain ClaimSrcChain `protobuf:"varint,1,opt,name=claim_src_chain,json=claimSrcChain,proto3,enum=cosmos.oracle.v1.ClaimSrcChain" json:"claim_src_chain,omitempty"` } func (m *QueryInturnRelayerRequest) Reset() { *m = QueryInturnRelayerRequest{} } @@ -149,6 +175,13 @@ func (m *QueryInturnRelayerRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryInturnRelayerRequest proto.InternalMessageInfo +func (m *QueryInturnRelayerRequest) GetClaimSrcChain() ClaimSrcChain { + if m != nil { + return m.ClaimSrcChain + } + return BSC +} + // QueryInturnRelayerResponse is the response type for the Query In-turn relayer RPC method. type QueryInturnRelayerResponse struct { BlsPubKey string `protobuf:"bytes,1,opt,name=bls_pub_key,json=blsPubKey,proto3" json:"bls_pub_key,omitempty"` @@ -203,6 +236,7 @@ func (m *QueryInturnRelayerResponse) GetRelayInterval() *RelayInterval { } func init() { + proto.RegisterEnum("cosmos.oracle.v1.ClaimSrcChain", ClaimSrcChain_name, ClaimSrcChain_value) proto.RegisterType((*QueryParamsRequest)(nil), "cosmos.oracle.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "cosmos.oracle.v1.QueryParamsResponse") proto.RegisterType((*QueryInturnRelayerRequest)(nil), "cosmos.oracle.v1.QueryInturnRelayerRequest") @@ -212,32 +246,37 @@ func init() { func init() { proto.RegisterFile("cosmos/oracle/v1/query.proto", fileDescriptor_9f804c4644f3aaef) } var fileDescriptor_9f804c4644f3aaef = []byte{ - // 400 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0x41, 0x6b, 0xe2, 0x40, - 0x18, 0x4d, 0x64, 0x57, 0x70, 0xc4, 0x65, 0x99, 0xf5, 0x90, 0xcd, 0xba, 0x51, 0xc2, 0x2e, 0x08, - 0xee, 0x66, 0xd0, 0x85, 0xfd, 0x01, 0x42, 0x0b, 0x52, 0x0a, 0x36, 0xc7, 0x5e, 0xc2, 0xc4, 0x0e, - 0x69, 0x30, 0x66, 0xe2, 0xcc, 0xc4, 0x36, 0xd7, 0xd2, 0x1f, 0x50, 0x68, 0xa1, 0x7f, 0xc9, 0xa3, - 0xd0, 0x4b, 0x4f, 0xa5, 0x68, 0x7f, 0x48, 0x71, 0x26, 0x42, 0x6d, 0x2c, 0xed, 0x29, 0xc9, 0xbc, - 0xf7, 0xbd, 0xf7, 0xbe, 0x97, 0x01, 0x8d, 0x11, 0xe5, 0x13, 0xca, 0x11, 0x65, 0x78, 0x14, 0x11, - 0x34, 0xeb, 0xa2, 0x69, 0x4a, 0x58, 0xe6, 0x24, 0x8c, 0x0a, 0x0a, 0xbf, 0x2a, 0xd4, 0x51, 0xa8, - 0x33, 0xeb, 0x9a, 0xf5, 0x80, 0x06, 0x54, 0x82, 0x68, 0xfd, 0xa6, 0x78, 0x66, 0x23, 0xa0, 0x34, - 0x88, 0x08, 0xc2, 0x49, 0x88, 0x70, 0x1c, 0x53, 0x81, 0x45, 0x48, 0x63, 0x9e, 0xa3, 0x3f, 0x0b, - 0x1e, 0xb9, 0x9e, 0x84, 0xed, 0x3a, 0x80, 0x47, 0x6b, 0xcf, 0x21, 0x66, 0x78, 0xc2, 0x5d, 0x32, - 0x4d, 0x09, 0x17, 0xf6, 0x21, 0xf8, 0xb6, 0x75, 0xca, 0x13, 0x1a, 0x73, 0x02, 0xff, 0x83, 0x72, - 0x22, 0x4f, 0x0c, 0xbd, 0xa5, 0xb7, 0xab, 0x3d, 0xc3, 0x79, 0x1d, 0xd1, 0x51, 0x13, 0xfd, 0x4f, - 0xf3, 0x87, 0xa6, 0xe6, 0xe6, 0x6c, 0xfb, 0x07, 0xf8, 0x2e, 0xe5, 0x06, 0xb1, 0x48, 0x59, 0xec, - 0x92, 0x08, 0x67, 0x84, 0x6d, 0xbc, 0x2e, 0x75, 0x60, 0xee, 0x42, 0x73, 0x4f, 0x0b, 0x54, 0xfd, - 0x88, 0x7b, 0x49, 0xea, 0x7b, 0x63, 0x92, 0x49, 0xe3, 0x8a, 0x5b, 0xf1, 0x23, 0x3e, 0x4c, 0xfd, - 0x03, 0x92, 0xc1, 0x7d, 0xf0, 0x85, 0xad, 0x47, 0xbc, 0x30, 0x16, 0x84, 0xcd, 0x70, 0x64, 0x94, - 0x64, 0xb6, 0x66, 0x31, 0x9b, 0x94, 0x1e, 0xe4, 0x34, 0xb7, 0xc6, 0x5e, 0x7e, 0xf6, 0x6e, 0x4b, - 0xe0, 0xb3, 0x8c, 0x01, 0xcf, 0x40, 0x59, 0x6d, 0x01, 0x7f, 0x15, 0x35, 0x8a, 0x65, 0x99, 0xbf, - 0xdf, 0x61, 0xa9, 0x45, 0xec, 0xd6, 0xc5, 0xdd, 0xd3, 0x75, 0xc9, 0x84, 0x06, 0x2a, 0xfc, 0x11, - 0x55, 0x13, 0xbc, 0xd1, 0x41, 0x6d, 0xab, 0x04, 0xd8, 0x79, 0x43, 0x7a, 0x57, 0x91, 0xe6, 0x9f, - 0x8f, 0x91, 0xf3, 0x38, 0x6d, 0x19, 0xc7, 0x86, 0xad, 0x62, 0x9c, 0x50, 0x0e, 0x78, 0x4c, 0x4d, - 0xf4, 0xf7, 0xe6, 0x4b, 0x4b, 0x5f, 0x2c, 0x2d, 0xfd, 0x71, 0x69, 0xe9, 0x57, 0x2b, 0x4b, 0x5b, - 0xac, 0x2c, 0xed, 0x7e, 0x65, 0x69, 0xc7, 0x9d, 0x20, 0x14, 0xa7, 0xa9, 0xef, 0x8c, 0xe8, 0x64, - 0xa3, 0xa2, 0x1e, 0x7f, 0xf9, 0xc9, 0x18, 0x9d, 0x6f, 0x24, 0x45, 0x96, 0x10, 0xee, 0x97, 0xe5, - 0x85, 0xfb, 0xf7, 0x1c, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x7d, 0x7d, 0x85, 0xf5, 0x02, 0x00, 0x00, + // 465 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcf, 0x6a, 0xd4, 0x40, + 0x18, 0x4f, 0xd6, 0xba, 0xd2, 0xaf, 0x6c, 0x5d, 0xc6, 0x1e, 0xd6, 0x50, 0xd3, 0x25, 0x28, 0x94, + 0x56, 0x13, 0xba, 0x82, 0x0f, 0x90, 0x45, 0xa5, 0x88, 0xba, 0xa6, 0x37, 0x2f, 0x61, 0x32, 0x1d, + 0xd2, 0xd0, 0xec, 0x4c, 0x3a, 0x33, 0x59, 0xcd, 0x55, 0x3c, 0x78, 0x14, 0x14, 0x7c, 0x00, 0x5f, + 0xa6, 0xc7, 0x82, 0x17, 0x4f, 0x22, 0xbb, 0x3e, 0x88, 0x64, 0x26, 0x85, 0xae, 0x59, 0xd1, 0x53, + 0x32, 0xf3, 0xfb, 0x3b, 0xf3, 0x0d, 0x6c, 0x13, 0x2e, 0xa7, 0x5c, 0x06, 0x5c, 0x60, 0x92, 0xd3, + 0x60, 0x76, 0x10, 0x9c, 0x95, 0x54, 0x54, 0x7e, 0x21, 0xb8, 0xe2, 0xa8, 0x6f, 0x50, 0xdf, 0xa0, + 0xfe, 0xec, 0xc0, 0xd9, 0x4a, 0x79, 0xca, 0x35, 0x18, 0xd4, 0x7f, 0x86, 0xe7, 0x6c, 0xa7, 0x9c, + 0xa7, 0x39, 0x0d, 0x70, 0x91, 0x05, 0x98, 0x31, 0xae, 0xb0, 0xca, 0x38, 0x93, 0x0d, 0x7a, 0xa7, + 0x95, 0xd1, 0xf8, 0x69, 0xd8, 0xdb, 0x02, 0xf4, 0xaa, 0xce, 0x9c, 0x60, 0x81, 0xa7, 0x32, 0xa2, + 0x67, 0x25, 0x95, 0xca, 0x7b, 0x0e, 0xb7, 0x96, 0x76, 0x65, 0xc1, 0x99, 0xa4, 0xe8, 0x11, 0x74, + 0x0b, 0xbd, 0x33, 0xb0, 0x87, 0xf6, 0xee, 0xc6, 0x68, 0xe0, 0xff, 0x59, 0xd1, 0x37, 0x8a, 0x70, + 0xed, 0xfc, 0xc7, 0x8e, 0x15, 0x35, 0x6c, 0xef, 0x18, 0x6e, 0x6b, 0xbb, 0x43, 0xa6, 0x4a, 0xc1, + 0x22, 0x9a, 0xe3, 0x8a, 0x8a, 0x26, 0x0b, 0x3d, 0x85, 0x9b, 0x24, 0xc7, 0xd9, 0x34, 0x96, 0x82, + 0xc4, 0xe4, 0x04, 0x67, 0x4c, 0xbb, 0x6f, 0x8e, 0x76, 0xda, 0xee, 0xe3, 0x9a, 0x78, 0x24, 0xc8, + 0xb8, 0xa6, 0x45, 0x3d, 0x72, 0x75, 0xe9, 0xbd, 0xb7, 0xc1, 0x59, 0x15, 0xd3, 0x94, 0x77, 0x61, + 0x23, 0xc9, 0x65, 0x5c, 0x94, 0x49, 0x7c, 0x4a, 0x2b, 0x9d, 0xb1, 0x1e, 0xad, 0x27, 0xb9, 0x9c, + 0x94, 0xc9, 0x33, 0x5a, 0xa1, 0x27, 0xb0, 0x29, 0x6a, 0x49, 0x9c, 0x31, 0x45, 0xc5, 0x0c, 0xe7, + 0x83, 0x8e, 0x3e, 0xe4, 0x8a, 0x1a, 0xda, 0xfa, 0xb0, 0xa1, 0x45, 0x3d, 0x71, 0x75, 0xb9, 0xb7, + 0x07, 0xbd, 0xa5, 0x9a, 0xe8, 0x06, 0x5c, 0x0b, 0x8f, 0xc6, 0x7d, 0x0b, 0x01, 0x74, 0x5f, 0x4e, + 0xe2, 0xf0, 0x45, 0xd8, 0xb7, 0x9d, 0xb5, 0x0f, 0x5f, 0x5d, 0x6b, 0xf4, 0xa5, 0x03, 0xd7, 0x75, + 0x65, 0xf4, 0x06, 0xba, 0xe6, 0xea, 0xd0, 0xdd, 0x76, 0x5e, 0x7b, 0x42, 0xce, 0xbd, 0x7f, 0xb0, + 0xcc, 0xa1, 0xbd, 0xe1, 0xbb, 0x6f, 0xbf, 0x3e, 0x75, 0x1c, 0x34, 0x08, 0x5a, 0xcf, 0xc0, 0xcc, + 0x06, 0x7d, 0xb6, 0xa1, 0xb7, 0x74, 0x61, 0x68, 0xff, 0x2f, 0xd6, 0xab, 0xa6, 0xe7, 0xdc, 0xff, + 0x3f, 0x72, 0x53, 0x67, 0x57, 0xd7, 0xf1, 0xd0, 0xb0, 0x5d, 0x27, 0xd3, 0x82, 0x58, 0x18, 0x45, + 0xf8, 0xf8, 0x7c, 0xee, 0xda, 0x17, 0x73, 0xd7, 0xfe, 0x39, 0x77, 0xed, 0x8f, 0x0b, 0xd7, 0xba, + 0x58, 0xb8, 0xd6, 0xf7, 0x85, 0x6b, 0xbd, 0xde, 0x4f, 0x33, 0x75, 0x52, 0x26, 0x3e, 0xe1, 0xd3, + 0x4b, 0x17, 0xf3, 0x79, 0x20, 0x8f, 0x4f, 0x83, 0xb7, 0x97, 0x96, 0xaa, 0x2a, 0xa8, 0x4c, 0xba, + 0xfa, 0x95, 0x3f, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xa6, 0x4e, 0xc9, 0x08, 0x6a, 0x03, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -436,6 +475,11 @@ func (m *QueryInturnRelayerRequest) MarshalToSizedBuffer(dAtA []byte) (int, erro _ = i var l int _ = l + if m.ClaimSrcChain != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.ClaimSrcChain)) + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } @@ -518,6 +562,9 @@ func (m *QueryInturnRelayerRequest) Size() (n int) { } var l int _ = l + if m.ClaimSrcChain != 0 { + n += 1 + sovQuery(uint64(m.ClaimSrcChain)) + } return n } @@ -706,6 +753,25 @@ func (m *QueryInturnRelayerRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: QueryInturnRelayerRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClaimSrcChain", wireType) + } + m.ClaimSrcChain = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ClaimSrcChain |= ClaimSrcChain(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) diff --git a/x/oracle/types/query.pb.gw.go b/x/oracle/types/query.pb.gw.go index a882e7a39f..18ce835a69 100644 --- a/x/oracle/types/query.pb.gw.go +++ b/x/oracle/types/query.pb.gw.go @@ -51,10 +51,21 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +var ( + filter_Query_InturnRelayer_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + func request_Query_InturnRelayer_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryInturnRelayerRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_InturnRelayer_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.InturnRelayer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err @@ -64,6 +75,13 @@ func local_request_Query_InturnRelayer_0(ctx context.Context, marshaler runtime. var protoReq QueryInturnRelayerRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_InturnRelayer_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.InturnRelayer(ctx, &protoReq) return msg, metadata, err diff --git a/x/staking/testutil/expected_keepers_mocks.go b/x/staking/testutil/expected_keepers_mocks.go index a8ba76c8de..1a2a96d9e3 100644 --- a/x/staking/testutil/expected_keepers_mocks.go +++ b/x/staking/testutil/expected_keepers_mocks.go @@ -10,9 +10,9 @@ import ( math "cosmossdk.io/math" types "github.com/cosmos/cosmos-sdk/types" types0 "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/cosmos/cosmos-sdk/x/authz" types1 "github.com/cosmos/cosmos-sdk/x/staking/types" gomock "github.com/golang/mock/gomock" - "github.com/cosmos/cosmos-sdk/x/authz" ) // MockDistributionKeeper is a mock of DistributionKeeper interface. diff --git a/x/upgrade/client/cli/query_test.go b/x/upgrade/client/cli/query_test.go index 7d1ece08b2..5eb641e7d8 100644 --- a/x/upgrade/client/cli/query_test.go +++ b/x/upgrade/client/cli/query_test.go @@ -13,11 +13,11 @@ import ( "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/crypto/keyring" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + sdktestutil "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" testutilmod "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/x/upgrade" upgradecli "github.com/cosmos/cosmos-sdk/x/upgrade/client/cli" - sdktestutil "github.com/cosmos/cosmos-sdk/testutil" ) func TestGetCurrentPlanCmd(t *testing.T) { From 5e293e51d4d998dfcf66c4884199775277804742 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Fri, 27 Oct 2023 21:33:54 +0800 Subject: [PATCH 2/5] fix ci --- api/cosmos/oracle/v1/query.pulsar.go | 6 +++++- proto/cosmos/oracle/v1/query.proto | 4 ++++ x/oracle/types/query.pb.go | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/api/cosmos/oracle/v1/query.pulsar.go b/api/cosmos/oracle/v1/query.pulsar.go index 8d4857b1bb..101a9ad151 100644 --- a/api/cosmos/oracle/v1/query.pulsar.go +++ b/api/cosmos/oracle/v1/query.pulsar.go @@ -1721,10 +1721,13 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// ClaimSrcChain defines the src chain of a claim type ClaimSrcChain int32 const ( - ClaimSrcChain_BSC ClaimSrcChain = 0 + // BSC defines BSC source chain + ClaimSrcChain_BSC ClaimSrcChain = 0 + // OP_BNB defines OPBNB source chain ClaimSrcChain_OP_BNB ClaimSrcChain = 1 ) @@ -1837,6 +1840,7 @@ type QueryInturnRelayerRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // ClaimSrcChain defines the src chain of a claim ClaimSrcChain ClaimSrcChain `protobuf:"varint,1,opt,name=claim_src_chain,json=claimSrcChain,proto3,enum=cosmos.oracle.v1.ClaimSrcChain" json:"claim_src_chain,omitempty"` } diff --git a/proto/cosmos/oracle/v1/query.proto b/proto/cosmos/oracle/v1/query.proto index 0c69cc33dd..bcd21ee72d 100644 --- a/proto/cosmos/oracle/v1/query.proto +++ b/proto/cosmos/oracle/v1/query.proto @@ -29,14 +29,18 @@ message QueryParamsResponse { Params params = 1 [(gogoproto.nullable) = false]; } +// ClaimSrcChain defines the src chain of a claim enum ClaimSrcChain { option (gogoproto.goproto_enum_prefix) = false; + // BSC defines BSC source chain BSC = 0; + // OP_BNB defines OPBNB source chain OP_BNB = 1; } // QueryInturnRelayerRequest is the request type for the Query In-turn relayer RPC method. message QueryInturnRelayerRequest { + // ClaimSrcChain defines the src chain of a claim ClaimSrcChain claim_src_chain = 1; } diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index 2a650efeb5..7b4d0dc3ab 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -29,10 +29,13 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package +// ClaimSrcChain defines the src chain of a claim type ClaimSrcChain int32 const ( - BSC ClaimSrcChain = 0 + // BSC defines BSC source chain + BSC ClaimSrcChain = 0 + // OP_BNB defines OPBNB source chain OP_BNB ClaimSrcChain = 1 ) @@ -139,6 +142,7 @@ func (m *QueryParamsResponse) GetParams() Params { // QueryInturnRelayerRequest is the request type for the Query In-turn relayer RPC method. type QueryInturnRelayerRequest struct { + // ClaimSrcChain defines the src chain of a claim ClaimSrcChain ClaimSrcChain `protobuf:"varint,1,opt,name=claim_src_chain,json=claimSrcChain,proto3,enum=cosmos.oracle.v1.ClaimSrcChain" json:"claim_src_chain,omitempty"` } From d0ea92caf08777457663524e9df4152a244b0060 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Fri, 27 Oct 2023 22:03:12 +0800 Subject: [PATCH 3/5] fix ci --- api/cosmos/oracle/v1/query.pulsar.go | 92 ++++++++------- proto/cosmos/auth/v1beta1/auth.proto | 4 +- proto/cosmos/bank/v1beta1/query.proto | 1 - proto/cosmos/base/abci/v1beta1/abci.proto | 14 +-- .../base/store/v1beta1/commit_info.proto | 3 +- .../cosmos/base/store/v1beta1/listening.proto | 22 ++-- proto/cosmos/crosschain/v1/crosschain.proto | 6 +- proto/cosmos/crosschain/v1/query.proto | 2 +- .../cosmos/crypto/eth/ethsecp256k1/keys.proto | 4 +- proto/cosmos/distribution/v1beta1/tx.proto | 4 +- proto/cosmos/evidence/v1beta1/evidence.proto | 8 +- proto/cosmos/evidence/v1beta1/tx.proto | 4 +- proto/cosmos/gashub/v1beta1/gashub.proto | 4 +- proto/cosmos/gashub/v1beta1/query.proto | 1 - proto/cosmos/gashub/v1beta1/tx.proto | 3 +- proto/cosmos/gov/module/v1/module.proto | 2 +- proto/cosmos/gov/v1/gov.proto | 56 ++++----- proto/cosmos/gov/v1/tx.proto | 42 +++---- proto/cosmos/gov/v1beta1/gov.proto | 38 +++--- proto/cosmos/gov/v1beta1/tx.proto | 26 ++-- proto/cosmos/oracle/v1/query.proto | 12 +- proto/cosmos/oracle/v1/tx.proto | 16 +-- proto/cosmos/slashing/v1beta1/tx.proto | 4 +- proto/cosmos/staking/v1beta1/tx.proto | 8 +- proto/cosmos/vesting/v1beta1/tx.proto | 4 +- proto/cosmos/vesting/v1beta1/vesting.proto | 2 +- proto/tendermint/abci/types.proto | 111 ++++++++---------- proto/tendermint/types/evidence.proto | 2 +- proto/tendermint/types/params.proto | 5 +- proto/tendermint/types/types.proto | 44 ++++--- x/oracle/keeper/keeper.go | 6 +- x/oracle/types/query.pb.go | 86 +++++++------- 32 files changed, 318 insertions(+), 318 deletions(-) diff --git a/api/cosmos/oracle/v1/query.pulsar.go b/api/cosmos/oracle/v1/query.pulsar.go index 101a9ad151..be7db37a19 100644 --- a/api/cosmos/oracle/v1/query.pulsar.go +++ b/api/cosmos/oracle/v1/query.pulsar.go @@ -1725,21 +1725,25 @@ const ( type ClaimSrcChain int32 const ( - // BSC defines BSC source chain - ClaimSrcChain_BSC ClaimSrcChain = 0 - // OP_BNB defines OPBNB source chain - ClaimSrcChain_OP_BNB ClaimSrcChain = 1 + // CLAIM_SRC_CHAIN_UNSPECIFIED + ClaimSrcChain_CLAIM_SRC_CHAIN_UNSPECIFIED ClaimSrcChain = 0 + // CLAIM_SRC_CHAIN_BSC defines BSC source chain + ClaimSrcChain_CLAIM_SRC_CHAIN_BSC ClaimSrcChain = 1 + // CLAIM_SRC_CHAIN_OP_BNB defines OPBNB source chain + ClaimSrcChain_CLAIM_SRC_CHAIN_OP_BNB ClaimSrcChain = 2 ) // Enum value maps for ClaimSrcChain. var ( ClaimSrcChain_name = map[int32]string{ - 0: "BSC", - 1: "OP_BNB", + 0: "CLAIM_SRC_CHAIN_UNSPECIFIED", + 1: "CLAIM_SRC_CHAIN_BSC", + 2: "CLAIM_SRC_CHAIN_OP_BNB", } ClaimSrcChain_value = map[string]int32{ - "BSC": 0, - "OP_BNB": 1, + "CLAIM_SRC_CHAIN_UNSPECIFIED": 0, + "CLAIM_SRC_CHAIN_BSC": 1, + "CLAIM_SRC_CHAIN_OP_BNB": 2, } ) @@ -1868,7 +1872,7 @@ func (x *QueryInturnRelayerRequest) GetClaimSrcChain() ClaimSrcChain { if x != nil { return x.ClaimSrcChain } - return ClaimSrcChain_BSC + return ClaimSrcChain_CLAIM_SRC_CHAIN_UNSPECIFIED } // QueryInturnRelayerResponse is the response type for the Query In-turn relayer RPC method. @@ -1947,39 +1951,43 @@ var file_cosmos_oracle_v1_query_proto_rawDesc = []byte{ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x2a, 0x2a, 0x0a, 0x0d, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x72, - 0x63, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x42, 0x53, 0x43, 0x10, 0x00, 0x12, - 0x0a, 0x0a, 0x06, 0x4f, 0x50, 0x5f, 0x42, 0x4e, 0x42, 0x10, 0x01, 0x1a, 0x04, 0x88, 0xa3, 0x1e, - 0x00, 0x32, 0x97, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x77, 0x0a, 0x06, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x75, 0x72, 0x6e, 0x52, - 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, - 0x6e, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, - 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x74, 0x75, - 0x72, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, 0x74, - 0x75, 0x72, 0x6e, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0xb0, 0x01, 0x0a, 0x14, - 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, - 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4f, 0x72, - 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x43, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x2a, 0x6b, 0x0a, 0x0d, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x53, 0x72, + 0x63, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x5f, + 0x53, 0x52, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4c, 0x41, 0x49, 0x4d, + 0x5f, 0x53, 0x52, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x42, 0x53, 0x43, 0x10, 0x01, + 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x5f, 0x53, 0x52, 0x43, 0x5f, 0x43, 0x48, + 0x41, 0x49, 0x4e, 0x5f, 0x4f, 0x50, 0x5f, 0x42, 0x4e, 0x42, 0x10, 0x02, 0x1a, 0x04, 0x88, 0xa3, + 0x1e, 0x00, 0x32, 0x97, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x77, 0x0a, 0x06, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x24, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x94, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x75, 0x72, 0x6e, + 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x49, 0x6e, 0x74, 0x75, 0x72, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, + 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x74, + 0x75, 0x72, 0x6e, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6e, + 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x42, 0xb0, 0x01, 0x0a, + 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6f, 0x72, 0x61, 0x63, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x10, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x4f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/cosmos/auth/v1beta1/auth.proto b/proto/cosmos/auth/v1beta1/auth.proto index 0578453ccf..f09df38283 100644 --- a/proto/cosmos/auth/v1beta1/auth.proto +++ b/proto/cosmos/auth/v1beta1/auth.proto @@ -17,8 +17,8 @@ message BaseAccount { option (gogoproto.equal) = false; option (cosmos_proto.implements_interface) = "cosmos.auth.v1beta1.AccountI"; - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - google.protobuf.Any pub_key = 2 [(gogoproto.jsontag) = "public_key,omitempty", (amino.field_name) = "public_key"]; + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + google.protobuf.Any pub_key = 2 [(gogoproto.jsontag) = "public_key,omitempty", (amino.field_name) = "public_key"]; uint64 account_number = 3; uint64 sequence = 4; } diff --git a/proto/cosmos/bank/v1beta1/query.proto b/proto/cosmos/bank/v1beta1/query.proto index 7abc31bacb..679aa28a44 100644 --- a/proto/cosmos/bank/v1beta1/query.proto +++ b/proto/cosmos/bank/v1beta1/query.proto @@ -214,7 +214,6 @@ message QuerySpendableBalanceByDenomResponse { cosmos.base.v1beta1.Coin balance = 1; } - // QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC // method. message QueryTotalSupplyRequest { diff --git a/proto/cosmos/base/abci/v1beta1/abci.proto b/proto/cosmos/base/abci/v1beta1/abci.proto index da4c3aa94c..b2b9851d9e 100644 --- a/proto/cosmos/base/abci/v1beta1/abci.proto +++ b/proto/cosmos/base/abci/v1beta1/abci.proto @@ -5,7 +5,7 @@ import "gogoproto/gogo.proto"; import "tendermint/abci/types.proto"; import "google/protobuf/any.proto"; -option go_package = "github.com/cosmos/cosmos-sdk/types"; +option go_package = "github.com/cosmos/cosmos-sdk/types"; option (gogoproto.goproto_stringer_all) = false; // TxResponse defines a structure containing relevant tx data and metadata. The @@ -53,7 +53,7 @@ message ABCIMessageLog { option (gogoproto.stringer) = true; uint32 msg_index = 1 [(gogoproto.jsontag) = "msg_index"]; - string log = 2; + string log = 2; // Events contains a slice of Event objects that were emitted during some // execution. @@ -65,14 +65,14 @@ message ABCIMessageLog { message StringEvent { option (gogoproto.stringer) = true; - string type = 1; + string type = 1; repeated Attribute attributes = 2 [(gogoproto.nullable) = false]; } // Attribute defines an attribute wrapper where the key and value are // strings instead of raw bytes. message Attribute { - string key = 1; + string key = 1; string value = 2; } @@ -118,17 +118,17 @@ message Result { // successfully simulated. message SimulationResponse { GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - Result result = 2; + Result result = 2; } // MsgData defines the data returned in a Result object during message // execution. message MsgData { - option deprecated = true; + option deprecated = true; option (gogoproto.stringer) = true; string msg_type = 1; - bytes data = 2; + bytes data = 2; } // TxMsgData defines a list of MsgData. A transaction will have a MsgData object diff --git a/proto/cosmos/base/store/v1beta1/commit_info.proto b/proto/cosmos/base/store/v1beta1/commit_info.proto index 4625cdab22..ce300b7913 100644 --- a/proto/cosmos/base/store/v1beta1/commit_info.proto +++ b/proto/cosmos/base/store/v1beta1/commit_info.proto @@ -11,8 +11,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/store/types"; message CommitInfo { int64 version = 1; repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } // StoreInfo defines store-specific commit information. It contains a reference diff --git a/proto/cosmos/base/store/v1beta1/listening.proto b/proto/cosmos/base/store/v1beta1/listening.proto index 753f7c1655..d6f7128931 100644 --- a/proto/cosmos/base/store/v1beta1/listening.proto +++ b/proto/cosmos/base/store/v1beta1/listening.proto @@ -20,15 +20,15 @@ message StoreKVPair { // BlockMetadata contains all the abci event data of a block // the file streamer dump them into files together with the state changes. message BlockMetadata { - // DeliverTx encapulate deliver tx request and response. - message DeliverTx { - tendermint.abci.RequestDeliverTx request = 1; - tendermint.abci.ResponseDeliverTx response = 2; - } - tendermint.abci.RequestBeginBlock request_begin_block = 1; - tendermint.abci.ResponseBeginBlock response_begin_block = 2; - repeated DeliverTx deliver_txs = 3; - tendermint.abci.RequestEndBlock request_end_block = 4; - tendermint.abci.ResponseEndBlock response_end_block = 5; - tendermint.abci.ResponseCommit response_commit = 6; + // DeliverTx encapulate deliver tx request and response. + message DeliverTx { + tendermint.abci.RequestDeliverTx request = 1; + tendermint.abci.ResponseDeliverTx response = 2; + } + tendermint.abci.RequestBeginBlock request_begin_block = 1; + tendermint.abci.ResponseBeginBlock response_begin_block = 2; + repeated DeliverTx deliver_txs = 3; + tendermint.abci.RequestEndBlock request_end_block = 4; + tendermint.abci.ResponseEndBlock response_end_block = 5; + tendermint.abci.ResponseCommit response_commit = 6; } diff --git a/proto/cosmos/crosschain/v1/crosschain.proto b/proto/cosmos/crosschain/v1/crosschain.proto index 641f3ace6e..10d3b859af 100644 --- a/proto/cosmos/crosschain/v1/crosschain.proto +++ b/proto/cosmos/crosschain/v1/crosschain.proto @@ -9,13 +9,13 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/crosschain/types"; // Params holds parameters for the cross chain module. message Params { - option (amino.name) = "cosmos-sdk/x/crosschain/Params"; + option (amino.name) = "cosmos-sdk/x/crosschain/Params"; // initial balance to mint for crosschain module when the chain starts string init_module_balance = 1 [ - (cosmos_proto.scalar) = "cosmos.Int", + (cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false + (gogoproto.nullable) = false ]; } diff --git a/proto/cosmos/crosschain/v1/query.proto b/proto/cosmos/crosschain/v1/query.proto index c54115a0be..16a04359ec 100644 --- a/proto/cosmos/crosschain/v1/query.proto +++ b/proto/cosmos/crosschain/v1/query.proto @@ -46,7 +46,7 @@ message QueryCrossChainPackageRequest { // channel id of the cross chain package uint32 channel_id = 2; // sequence of the cross chain package - uint64 sequence = 3; + uint64 sequence = 3; } // QueryCrossChainPackageResponse is the response type for the Query/CrossChainPackage RPC method. diff --git a/proto/cosmos/crypto/eth/ethsecp256k1/keys.proto b/proto/cosmos/crypto/eth/ethsecp256k1/keys.proto index f2bd735771..b1e755d9ca 100644 --- a/proto/cosmos/crypto/eth/ethsecp256k1/keys.proto +++ b/proto/cosmos/crypto/eth/ethsecp256k1/keys.proto @@ -16,4 +16,6 @@ message PubKey { // PrivKey defines a type alias for an ecdsa.PrivateKey that implements // Tendermint's PrivateKey interface. -message PrivKey { bytes key = 1; } +message PrivKey { + bytes key = 1; +} diff --git a/proto/cosmos/distribution/v1beta1/tx.proto b/proto/cosmos/distribution/v1beta1/tx.proto index 957747cf43..b921879a16 100644 --- a/proto/cosmos/distribution/v1beta1/tx.proto +++ b/proto/cosmos/distribution/v1beta1/tx.proto @@ -162,8 +162,8 @@ message MsgCommunityPoolSpend { option (amino.name) = "cosmos-sdk/distr/MsgCommunityPoolSpend"; // authority is the address that controls the module (defaults to x/gov unless overwritten). - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string recipient = 2; + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string recipient = 2; repeated cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true, diff --git a/proto/cosmos/evidence/v1beta1/evidence.proto b/proto/cosmos/evidence/v1beta1/evidence.proto index 8dca3201d0..25879de192 100644 --- a/proto/cosmos/evidence/v1beta1/evidence.proto +++ b/proto/cosmos/evidence/v1beta1/evidence.proto @@ -18,14 +18,14 @@ message Equivocation { option (gogoproto.equal) = false; // height is the equivocation height. - int64 height = 1; + int64 height = 1; // time is the equivocation time. - google.protobuf.Timestamp time = 2 + google.protobuf.Timestamp time = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true, (gogoproto.stdtime) = true]; - + // power is the equivocation validator power. - int64 power = 3; + int64 power = 3; // consensus_address is the equivocation validator consensus address. string consensus_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/proto/cosmos/evidence/v1beta1/tx.proto b/proto/cosmos/evidence/v1beta1/tx.proto index f5646e2dec..9124cab555 100644 --- a/proto/cosmos/evidence/v1beta1/tx.proto +++ b/proto/cosmos/evidence/v1beta1/tx.proto @@ -29,8 +29,8 @@ message MsgSubmitEvidence { option (gogoproto.goproto_getters) = false; // submitter is the signer account address of evidence. - string submitter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string submitter = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // evidence defines the evidence of misbehavior. google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "cosmos.evidence.v1beta1.Evidence"]; } diff --git a/proto/cosmos/gashub/v1beta1/gashub.proto b/proto/cosmos/gashub/v1beta1/gashub.proto index 9a60f6cc73..b454855e48 100644 --- a/proto/cosmos/gashub/v1beta1/gashub.proto +++ b/proto/cosmos/gashub/v1beta1/gashub.proto @@ -8,7 +8,7 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/gashub/types"; // Params defines the parameters for the gashub module. message Params { - option (amino.name) = "cosmos-sdk/x/gashub/Params"; + option (amino.name) = "cosmos-sdk/x/gashub/Params"; option (gogoproto.equal) = true; // max_tx_size is the maximum size of a transaction's bytes. @@ -46,7 +46,7 @@ message MsgGasParams { option (gogoproto.equal) = true; // fixed_gas is the base gas cost for a dynamic type msg - uint64 fixed_gas = 1 [(gogoproto.customname) = "FixedGas"]; + uint64 fixed_gas = 1 [(gogoproto.customname) = "FixedGas"]; // gas_per_item is the gas cost for a dynamic type msg per item uint64 gas_per_item = 2 [(gogoproto.customname) = "GasPerItem"]; } diff --git a/proto/cosmos/gashub/v1beta1/query.proto b/proto/cosmos/gashub/v1beta1/query.proto index 6a6446023d..f9a218d9c6 100644 --- a/proto/cosmos/gashub/v1beta1/query.proto +++ b/proto/cosmos/gashub/v1beta1/query.proto @@ -26,7 +26,6 @@ service Query { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/cosmos/gashub/v1beta1/msg_gas_params"; } - } // QueryParamsRequest defines the request type for querying x/gashub parameters. diff --git a/proto/cosmos/gashub/v1beta1/tx.proto b/proto/cosmos/gashub/v1beta1/tx.proto index 5b424c8537..9466102f8b 100644 --- a/proto/cosmos/gashub/v1beta1/tx.proto +++ b/proto/cosmos/gashub/v1beta1/tx.proto @@ -21,7 +21,8 @@ service Msg { // on any number of msg types. Only the entries to add or update should be // included. Entries that already exist in the store, but that aren't // included in this message, will be left unchanged. - rpc SetMsgGasParams(MsgSetMsgGasParams) returns (MsgSetMsgGasParamsResponse);} + rpc SetMsgGasParams(MsgSetMsgGasParams) returns (MsgSetMsgGasParamsResponse); +} // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { diff --git a/proto/cosmos/gov/module/v1/module.proto b/proto/cosmos/gov/module/v1/module.proto index 9544cfe2b4..9cade9af01 100644 --- a/proto/cosmos/gov/module/v1/module.proto +++ b/proto/cosmos/gov/module/v1/module.proto @@ -10,7 +10,7 @@ message Module { go_import: "github.com/cosmos/cosmos-sdk/x/gov" }; - // max_metadata_len defines the maximum proposal metadata length. + // max_metadata_len defines the maximum proposal metadata length. // Defaults to 255 if not explicitly set. uint64 max_metadata_len = 1; diff --git a/proto/cosmos/gov/v1/gov.proto b/proto/cosmos/gov/v1/gov.proto index 5b8199d395..c2058e8ada 100644 --- a/proto/cosmos/gov/v1/gov.proto +++ b/proto/cosmos/gov/v1/gov.proto @@ -32,18 +32,18 @@ message WeightedVoteOption { VoteOption option = 1; // weight is the vote weight associated with the vote option. - string weight = 2 [(cosmos_proto.scalar) = "cosmos.Dec"]; + string weight = 2 [(cosmos_proto.scalar) = "cosmos.Dec"]; } // Deposit defines an amount deposited by an account address to an active // proposal. message Deposit { // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - + uint64 proposal_id = 1; + // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // amount to be deposited by depositor. repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } @@ -51,33 +51,33 @@ message Deposit { // Proposal defines the core field members of a governance proposal. message Proposal { // id defines the unique id of the proposal. - uint64 id = 1; + uint64 id = 1; // messages are the arbitrary messages to be executed if the proposal passes. repeated google.protobuf.Any messages = 2; // status defines the proposal status. - ProposalStatus status = 3; + ProposalStatus status = 3; // final_tally_result is the final tally result of the proposal. When // querying a proposal via gRPC, this field is not populated until the // proposal's voting period has ended. - TallyResult final_tally_result = 4; - + TallyResult final_tally_result = 4; + // submit_time is the time of proposal submission. - google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true]; - + google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true]; + // deposit_end_time is the end time for deposition. - google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true]; - + google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true]; + // total_deposit is the total deposit on the proposal. - repeated cosmos.base.v1beta1.Coin total_deposit = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - + repeated cosmos.base.v1beta1.Coin total_deposit = 7 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // voting_start_time is the starting time to vote on a proposal. - google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true]; - + google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true]; + // voting_end_time is the end time of voting on a proposal. - google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true]; + google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true]; // metadata is any arbitrary metadata attached to the proposal. string metadata = 10; @@ -96,7 +96,7 @@ message Proposal { // // Since: cosmos-sdk 0.47 string proposer = 13 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + // The reason of the failure proposal string failed_reason = 14; } @@ -125,11 +125,11 @@ enum ProposalStatus { // TallyResult defines a standard tally for a governance proposal. message TallyResult { // yes_count is the number of yes votes on a proposal. - string yes_count = 1 [(cosmos_proto.scalar) = "cosmos.Int"]; + string yes_count = 1 [(cosmos_proto.scalar) = "cosmos.Int"]; // abstain_count is the number of abstain votes on a proposal. - string abstain_count = 2 [(cosmos_proto.scalar) = "cosmos.Int"]; + string abstain_count = 2 [(cosmos_proto.scalar) = "cosmos.Int"]; // no_count is the number of no votes on a proposal. - string no_count = 3 [(cosmos_proto.scalar) = "cosmos.Int"]; + string no_count = 3 [(cosmos_proto.scalar) = "cosmos.Int"]; // no_with_veto_count is the number of no with veto votes on a proposal. string no_with_veto_count = 4 [(cosmos_proto.scalar) = "cosmos.Int"]; } @@ -141,8 +141,8 @@ message Vote { uint64 proposal_id = 1; // voter is the voter address of the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + reserved 3; // options is the weighted vote options. @@ -217,7 +217,7 @@ message Params { // burn deposits if the proposal does not enter voting period bool burn_proposal_deposit_prevote = 14; - + // burn deposits if quorum with vote type no_veto is met bool burn_vote_veto = 15; } @@ -225,9 +225,9 @@ message Params { // CrossChainParamsChange defines the parameter change or contract upgrade message CrossChainParamsChange { // parameter to be updated or 'upgrade' for contract upgrade - string key = 1; + string key = 1; // values is a new parameter or slice of new contract addresses in hex format - repeated string values = 2; + repeated string values = 2; // targets defines a slice of addresses string in hex format - repeated string targets = 3; + repeated string targets = 3; } diff --git a/proto/cosmos/gov/v1/tx.proto b/proto/cosmos/gov/v1/tx.proto index f9d4285407..32f86f2134 100644 --- a/proto/cosmos/gov/v1/tx.proto +++ b/proto/cosmos/gov/v1/tx.proto @@ -49,14 +49,14 @@ message MsgSubmitProposal { option (amino.name) = "cosmos-sdk/v1/MsgSubmitProposal"; // messages are the arbitrary messages to be executed if proposal passes. - repeated google.protobuf.Any messages = 1; + repeated google.protobuf.Any messages = 1; // initial_deposit is the deposit value that must be paid at proposal submission. repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - + // proposer is the account address of the proposer. - string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string proposer = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // metadata is any arbitrary metadata attached to the proposal. string metadata = 4; @@ -98,16 +98,16 @@ message MsgVote { option (amino.name) = "cosmos-sdk/v1/MsgVote"; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; + // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // option defines the vote option. - VoteOption option = 3; - + VoteOption option = 3; + // metadata is any arbitrary metadata attached to the Vote. - string metadata = 4; + string metadata = 4; } // MsgVoteResponse defines the Msg/Vote response type. @@ -119,16 +119,16 @@ message MsgVoteWeighted { option (amino.name) = "cosmos-sdk/v1/MsgVoteWeighted"; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; + // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // options defines the weighted vote options. - repeated WeightedVoteOption options = 3; + repeated WeightedVoteOption options = 3; // metadata is any arbitrary metadata attached to the VoteWeighted. - string metadata = 4; + string metadata = 4; } // MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. @@ -140,11 +140,11 @@ message MsgDeposit { option (amino.name) = "cosmos-sdk/v1/MsgDeposit"; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; + // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // amount to be deposited by depositor. repeated cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } diff --git a/proto/cosmos/gov/v1beta1/gov.proto b/proto/cosmos/gov/v1beta1/gov.proto index dc8fcfd33f..023905abec 100644 --- a/proto/cosmos/gov/v1beta1/gov.proto +++ b/proto/cosmos/gov/v1beta1/gov.proto @@ -38,8 +38,8 @@ message WeightedVoteOption { // option defines the valid vote options, it must not contain duplicate vote options. VoteOption option = 1; - // weight is the vote weight associated with the vote option. - string weight = 2 [ + // weight is the vote weight associated with the vote option. + string weight = 2 [ (cosmos_proto.scalar) = "cosmos.Dec", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false @@ -55,7 +55,7 @@ message TextProposal { option (gogoproto.equal) = true; // title of the proposal. - string title = 1; + string title = 1; // description associated with the proposal. string description = 2; @@ -68,11 +68,11 @@ message Deposit { option (gogoproto.equal) = false; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - + uint64 proposal_id = 1; + // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // amount to be deposited by depositor. repeated cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false, @@ -86,26 +86,26 @@ message Proposal { option (gogoproto.equal) = true; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; + uint64 proposal_id = 1; // content is the proposal's content. google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "cosmos.gov.v1beta1.Content"]; // status defines the proposal status. - ProposalStatus status = 3; - + ProposalStatus status = 3; + // final_tally_result is the final tally result of the proposal. When // querying a proposal via gRPC, this field is not populated until the // proposal's voting period has ended. - TallyResult final_tally_result = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - + TallyResult final_tally_result = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + // submit_time is the time of proposal submission. - google.protobuf.Timestamp submit_time = 5 + google.protobuf.Timestamp submit_time = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - + // deposit_end_time is the end time for deposition. google.protobuf.Timestamp deposit_end_time = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - + // total_deposit is the total deposit on the proposal. repeated cosmos.base.v1beta1.Coin total_deposit = 7 [ (gogoproto.nullable) = false, @@ -116,7 +116,7 @@ message Proposal { // voting_start_time is the starting time to vote on a proposal. google.protobuf.Timestamp voting_start_time = 8 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; - + // voting_end_time is the end time of voting on a proposal. google.protobuf.Timestamp voting_end_time = 9 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (amino.dont_omitempty) = true]; @@ -186,14 +186,14 @@ message Vote { // proposal_id defines the unique id of the proposal. uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (amino.field_name) = "id", (amino.dont_omitempty) = true]; - + // voter is the voter address of the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // Deprecated: Prefer to use `options` instead. This field is set in queries // if and only if `len(options) == 1` and that option has weight 1. In all // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. VoteOption option = 3 [deprecated = true]; - + // options is the weighted vote options. // // Since: cosmos-sdk 0.43 diff --git a/proto/cosmos/gov/v1beta1/tx.proto b/proto/cosmos/gov/v1beta1/tx.proto index 0afa1d5670..d59077df42 100644 --- a/proto/cosmos/gov/v1beta1/tx.proto +++ b/proto/cosmos/gov/v1beta1/tx.proto @@ -71,13 +71,13 @@ message MsgVote { option (gogoproto.goproto_getters) = false; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; + uint64 proposal_id = 1; // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // option defines the vote option. - VoteOption option = 3; + VoteOption option = 3; } // MsgVoteResponse defines the Msg/Vote response type. @@ -96,13 +96,13 @@ message MsgVoteWeighted { option (gogoproto.goproto_getters) = false; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; // voter is the voter address for the proposal. - string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // options defines the weighted vote options. - repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // options defines the weighted vote options. + repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } // MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. @@ -121,11 +121,11 @@ message MsgDeposit { option (gogoproto.goproto_getters) = false; // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; - + uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (amino.dont_omitempty) = true]; + // depositor defines the deposit addresses from the proposals. - string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + string depositor = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // amount to be deposited by depositor. repeated cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false, diff --git a/proto/cosmos/oracle/v1/query.proto b/proto/cosmos/oracle/v1/query.proto index bcd21ee72d..0a0b202262 100644 --- a/proto/cosmos/oracle/v1/query.proto +++ b/proto/cosmos/oracle/v1/query.proto @@ -32,16 +32,18 @@ message QueryParamsResponse { // ClaimSrcChain defines the src chain of a claim enum ClaimSrcChain { option (gogoproto.goproto_enum_prefix) = false; - // BSC defines BSC source chain - BSC = 0; - // OP_BNB defines OPBNB source chain - OP_BNB = 1; + // CLAIM_SRC_CHAIN_UNSPECIFIED + CLAIM_SRC_CHAIN_UNSPECIFIED = 0; + // CLAIM_SRC_CHAIN_BSC defines BSC source chain + CLAIM_SRC_CHAIN_BSC = 1; + // CLAIM_SRC_CHAIN_OP_BNB defines OPBNB source chain + CLAIM_SRC_CHAIN_OP_BNB = 2; } // QueryInturnRelayerRequest is the request type for the Query In-turn relayer RPC method. message QueryInturnRelayerRequest { // ClaimSrcChain defines the src chain of a claim - ClaimSrcChain claim_src_chain = 1; + ClaimSrcChain claim_src_chain = 1; } // QueryInturnRelayerResponse is the response type for the Query In-turn relayer RPC method. diff --git a/proto/cosmos/oracle/v1/tx.proto b/proto/cosmos/oracle/v1/tx.proto index 9578dca185..b1cb5a5fde 100644 --- a/proto/cosmos/oracle/v1/tx.proto +++ b/proto/cosmos/oracle/v1/tx.proto @@ -32,21 +32,21 @@ message MsgClaim { option (gogoproto.goproto_getters) = false; // sender address of the msg - string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string from_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // source chain id - uint32 src_chain_id = 2; + uint32 src_chain_id = 2; // destination chain id - uint32 dest_chain_id = 3; + uint32 dest_chain_id = 3; // sequence of the oracle channel - uint64 sequence = 4; + uint64 sequence = 4; // timestamp of the claim - uint64 timestamp = 5; + uint64 timestamp = 5; // payload of the claim - bytes payload = 6; + bytes payload = 6; // bit map of the voted validators repeated fixed64 vote_address_set = 7; // bls signature of the claim - bytes agg_signature = 8; + bytes agg_signature = 8; } // MsgClaimResponse defines the Msg/Claim response type @@ -56,7 +56,7 @@ message MsgClaimResponse {} message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; - option (gogoproto.equal) = false; + option (gogoproto.equal) = false; // authority is the address that controls the module (defaults to x/gov unless overwritten). string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; diff --git a/proto/cosmos/slashing/v1beta1/tx.proto b/proto/cosmos/slashing/v1beta1/tx.proto index b3d7f94166..120a9570f3 100644 --- a/proto/cosmos/slashing/v1beta1/tx.proto +++ b/proto/cosmos/slashing/v1beta1/tx.proto @@ -78,8 +78,8 @@ message MsgImpeach { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; - string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string from = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string validator_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; } // MsgImpeachResponse defines the Msg/Impeach response type. diff --git a/proto/cosmos/staking/v1beta1/tx.proto b/proto/cosmos/staking/v1beta1/tx.proto index 1c2997de17..f74d82db45 100644 --- a/proto/cosmos/staking/v1beta1/tx.proto +++ b/proto/cosmos/staking/v1beta1/tx.proto @@ -97,10 +97,10 @@ message MsgEditValidator { string min_self_delegation = 4 [(cosmos_proto.scalar) = "cosmos.Int", (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int"]; - string relayer_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string challenger_address = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string bls_key = 7; // The BLS pubkey for the authorized relayer/challenger - string bls_proof = 8; + string relayer_address = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string challenger_address = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string bls_key = 7; // The BLS pubkey for the authorized relayer/challenger + string bls_proof = 8; } // MsgEditValidatorResponse defines the Msg/EditValidator response type. diff --git a/proto/cosmos/vesting/v1beta1/tx.proto b/proto/cosmos/vesting/v1beta1/tx.proto index 42d3213f7b..30b726a659 100644 --- a/proto/cosmos/vesting/v1beta1/tx.proto +++ b/proto/cosmos/vesting/v1beta1/tx.proto @@ -86,8 +86,8 @@ message MsgCreatePeriodicVestingAccount { option (gogoproto.equal) = false; - string from_address = 1; - string to_address = 2; + string from_address = 1; + string to_address = 2; // start of vesting as unix time (in seconds). int64 start_time = 3; repeated Period vesting_periods = 4 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; diff --git a/proto/cosmos/vesting/v1beta1/vesting.proto b/proto/cosmos/vesting/v1beta1/vesting.proto index 7ab1fb797b..e772b18620 100644 --- a/proto/cosmos/vesting/v1beta1/vesting.proto +++ b/proto/cosmos/vesting/v1beta1/vesting.proto @@ -44,7 +44,7 @@ message ContinuousVestingAccount { BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; // Vesting start time, as unix timestamp (in seconds). - int64 start_time = 2; + int64 start_time = 2; } // DelayedVestingAccount implements the VestingAccount interface. It vests all diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index 1e05554ac8..f70c9b2fb9 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -56,8 +56,7 @@ message RequestInfo { } message RequestInitChain { - google.protobuf.Timestamp time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; string chain_id = 2; tendermint.types.ConsensusParams consensus_params = 3; repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; @@ -104,8 +103,8 @@ message RequestListSnapshots {} // offers a snapshot to the application message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height + Snapshot snapshot = 1; // snapshot offered by peers + bytes app_hash = 2; // light client-verified app hash for snapshot height } // loads a snapshot chunk @@ -212,8 +211,8 @@ message ResponseInitChain { message ResponseQuery { uint32 code = 1; // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 index = 5; bytes key = 6; bytes value = 7; @@ -223,22 +222,20 @@ message ResponseQuery { } message ResponseBeginBlock { - repeated Event events = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + repeated Event events = 1 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; } message ResponseCheckTx { uint32 code = 1; bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; - string sender = 9; - int64 priority = 10; + repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + string codespace = 8; + string sender = 9; + int64 priority = 10; // mempool_error is set by CometBFT. // ABCI applictions creating a ResponseCheckTX should not set mempool_error. @@ -248,22 +245,20 @@ message ResponseCheckTx { message ResponseDeliverTx { uint32 code = 1; bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic + string log = 3; // nondeterministic + string info = 4; // nondeterministic int64 gas_wanted = 5 [json_name = "gas_wanted"]; int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "events,omitempty" - ]; // nondeterministic + repeated Event events = 7 + [(gogoproto.nullable) = false, + (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic string codespace = 8; } message ResponseEndBlock { repeated ValidatorUpdate validator_updates = 1 [(gogoproto.nullable) = false]; tendermint.types.ConsensusParams consensus_param_updates = 2; - repeated Event events = 3 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; + repeated Event events = 3 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; } message ResponseCommit { @@ -280,12 +275,12 @@ message ResponseOfferSnapshot { Result result = 1; enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Snapshot accepted, apply chunks + ABORT = 2; // Abort all snapshot restoration + REJECT = 3; // Reject this specific snapshot, try others + REJECT_FORMAT = 4; // Reject all snapshots of this format, try others + REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others } } @@ -295,16 +290,16 @@ message ResponseLoadSnapshotChunk { message ResponseApplySnapshotChunk { Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban + repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply + repeated string reject_senders = 3; // Chunk senders to reject and ban enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others + UNKNOWN = 0; // Unknown result, abort all snapshot restoration + ACCEPT = 1; // Chunk successfully accepted + ABORT = 2; // Abort all snapshot restoration + RETRY = 3; // Retry chunk (combine with refetch and reject) + RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) + REJECT_SNAPSHOT = 5; // Reject this snapshot, try others } } @@ -322,11 +317,11 @@ message ResponseProcessProposal { } } -message ResponseEthQuery{ - uint32 code = 1; - string log = 2; - string codespace = 3; - bytes response = 4; +message ResponseEthQuery { + uint32 code = 1; + string log = 2; + string codespace = 3; + bytes response = 4; } //---------------------------------------- @@ -350,17 +345,14 @@ message ExtendedCommitInfo { // Later, transactions may be queried using these events. message Event { string type = 1; - repeated EventAttribute attributes = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "attributes,omitempty" - ]; + repeated EventAttribute attributes = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "attributes,omitempty"]; } // EventAttribute is a single key-value pair, associated with an event. message EventAttribute { string key = 1; string value = 2; - bool index = 3; // nondeterministic + bool index = 3; // nondeterministic } // TxResult contains results of executing the transaction. @@ -378,9 +370,9 @@ message TxResult { // Validator message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) + bytes address = 1; // The first 20 bytes of SHA256(public key) // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power + int64 power = 3; // The voting power } // ValidatorUpdate @@ -398,7 +390,7 @@ message VoteInfo { message ExtendedVoteInfo { Validator validator = 1 [(gogoproto.nullable) = false]; bool signed_last_block = 2; - bytes vote_extension = 3; // Reserved for future use + bytes vote_extension = 3; // Reserved for future use } enum MisbehaviorType { @@ -414,8 +406,7 @@ message Misbehavior { // The height when the offense occurred int64 height = 3; // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; // Total voting power of the validator set in case the ABCI application does // not store historical validators. // https://github.com/tendermint/tendermint/issues/4581 @@ -426,11 +417,11 @@ message Misbehavior { // State Sync Types message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata + uint64 height = 1; // The height at which the snapshot was taken + uint32 format = 2; // The application-specific snapshot format + uint32 chunks = 3; // Number of chunks in the snapshot + bytes hash = 4; // Arbitrary snapshot hash, equal only if identical + bytes metadata = 5; // Arbitrary application metadata } //---------------------------------------- @@ -449,10 +440,8 @@ service ABCIApplication { rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); - rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) - returns (ResponseLoadSnapshotChunk); - rpc ApplySnapshotChunk(RequestApplySnapshotChunk) - returns (ResponseApplySnapshotChunk); + rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); + rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); rpc PrepareProposal(RequestPrepareProposal) returns (ResponsePrepareProposal); rpc ProcessProposal(RequestProcessProposal) returns (ResponseProcessProposal); diff --git a/proto/tendermint/types/evidence.proto b/proto/tendermint/types/evidence.proto index 1f35049bdc..06f30ec2f5 100644 --- a/proto/tendermint/types/evidence.proto +++ b/proto/tendermint/types/evidence.proto @@ -30,7 +30,7 @@ message LightClientAttackEvidence { int64 common_height = 2; repeated tendermint.types.Validator byzantine_validators = 3; int64 total_voting_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; } message EvidenceList { diff --git a/proto/tendermint/types/params.proto b/proto/tendermint/types/params.proto index 66963eec4e..2a9c92973a 100644 --- a/proto/tendermint/types/params.proto +++ b/proto/tendermint/types/params.proto @@ -26,7 +26,7 @@ message BlockParams { // Note: must be greater or equal to -1 int64 max_gas = 2; - reserved 3; // was TimeIotaMs see https://github.com/cometbft/cometbft/pull/5792 + reserved 3; // was TimeIotaMs see https://github.com/cometbft/cometbft/pull/5792 } // EvidenceParams determine how we handle evidence of malfeasance. @@ -42,8 +42,7 @@ message EvidenceParams { // It should correspond with an app's "unbonding period" or other similar // mechanism for handling [Nothing-At-Stake // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - google.protobuf.Duration max_age_duration = 2 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; + google.protobuf.Duration max_age_duration = 2 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; // This sets the maximum size of total evidence in bytes that can be committed in a single block. // and should fall comfortably under the max block bytes. diff --git a/proto/tendermint/types/types.proto b/proto/tendermint/types/types.proto index 2864e63a85..8c65ad7799 100644 --- a/proto/tendermint/types/types.proto +++ b/proto/tendermint/types/types.proto @@ -66,19 +66,19 @@ message Header { BlockID last_block_id = 5 [(gogoproto.nullable) = false]; // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions + bytes last_commit_hash = 6; // commit from validators from the last block + bytes data_hash = 7; // transactions // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block + bytes validators_hash = 8; // validators for the current block + bytes next_validators_hash = 9; // validators for the next block + bytes consensus_hash = 10; // consensus params for current block + bytes app_hash = 11; // state after txs from the previous block + bytes last_results_hash = 12; // root hash of all results from the txs from the previous block // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block + bytes evidence_hash = 13; // evidence included in the block + bytes proposer_address = 14; // original proposer of the block } // Data contains the set of transactions included in the block @@ -95,13 +95,11 @@ message Vote { SignedMsgType type = 1; int64 height = 2; int32 round = 3; - BlockID block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; + BlockID block_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. + google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes validator_address = 6; + int32 validator_index = 7; + bytes signature = 8; } // Commit contains the evidence that a block was committed by a set of validators. @@ -116,9 +114,8 @@ message Commit { message CommitSig { BlockIDFlag block_id_flag = 1; bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; + google.protobuf.Timestamp timestamp = 3 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 4; } message Proposal { @@ -127,9 +124,8 @@ message Proposal { int32 round = 3; int32 pol_round = 4; BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; + google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; + bytes signature = 7; } message SignedHeader { @@ -158,6 +154,6 @@ message TxProof { // Reveal represents randao reveal from block proposer. message Reveal { - int64 height = 1; - bytes signature = 2; + int64 height = 1; + bytes signature = 2; } diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index 1e397f542d..edffa9b852 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -132,10 +132,10 @@ func (k Keeper) CheckClaim(ctx sdk.Context, claim *types.MsgClaim) (sdk.AccAddre } validators := historicalInfo.Valset - claimSrcChain := types.BSC + claimSrcChain := types.CLAIM_SRC_CHAIN_BSC if ctx.IsUpgraded(upgradetypes.Pampas) { if sdk.ChainID(claim.SrcChainId) == k.CrossChainKeeper.GetDestOpChainID() { - claimSrcChain = types.OP_BNB + claimSrcChain = types.CLAIM_SRC_CHAIN_OP_BNB } } @@ -220,7 +220,7 @@ func (k Keeper) getInturnRelayer(ctx sdk.Context, relayerInterval uint64, claimS start := curTimeStamp - (remainder - inTurnRelayerIndex*relayerInterval) end := start + relayerInterval - if claimSrcChain == types.OP_BNB { + if claimSrcChain == types.CLAIM_SRC_CHAIN_OP_BNB { inTurnRelayerIndex = (inTurnRelayerIndex + uint64(validatorsSize/2)) % uint64(validatorsSize) } inturnRelayer := validators[inTurnRelayerIndex] diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index 7b4d0dc3ab..7f8d31658e 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -33,20 +33,24 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type ClaimSrcChain int32 const ( - // BSC defines BSC source chain - BSC ClaimSrcChain = 0 - // OP_BNB defines OPBNB source chain - OP_BNB ClaimSrcChain = 1 + // CLAIM_SRC_CHAIN_UNSPECIFIED + CLAIM_SRC_CHAIN_UNSPECIFIED ClaimSrcChain = 0 + // CLAIM_SRC_CHAIN_BSC defines BSC source chain + CLAIM_SRC_CHAIN_BSC ClaimSrcChain = 1 + // CLAIM_SRC_CHAIN_OP_BNB defines OPBNB source chain + CLAIM_SRC_CHAIN_OP_BNB ClaimSrcChain = 2 ) var ClaimSrcChain_name = map[int32]string{ - 0: "BSC", - 1: "OP_BNB", + 0: "CLAIM_SRC_CHAIN_UNSPECIFIED", + 1: "CLAIM_SRC_CHAIN_BSC", + 2: "CLAIM_SRC_CHAIN_OP_BNB", } var ClaimSrcChain_value = map[string]int32{ - "BSC": 0, - "OP_BNB": 1, + "CLAIM_SRC_CHAIN_UNSPECIFIED": 0, + "CLAIM_SRC_CHAIN_BSC": 1, + "CLAIM_SRC_CHAIN_OP_BNB": 2, } func (x ClaimSrcChain) String() string { @@ -183,7 +187,7 @@ func (m *QueryInturnRelayerRequest) GetClaimSrcChain() ClaimSrcChain { if m != nil { return m.ClaimSrcChain } - return BSC + return CLAIM_SRC_CHAIN_UNSPECIFIED } // QueryInturnRelayerResponse is the response type for the Query In-turn relayer RPC method. @@ -250,37 +254,39 @@ func init() { func init() { proto.RegisterFile("cosmos/oracle/v1/query.proto", fileDescriptor_9f804c4644f3aaef) } var fileDescriptor_9f804c4644f3aaef = []byte{ - // 465 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xcf, 0x6a, 0xd4, 0x40, - 0x18, 0x4f, 0xd6, 0xba, 0xd2, 0xaf, 0x6c, 0x5d, 0xc6, 0x1e, 0xd6, 0x50, 0xd3, 0x25, 0x28, 0x94, - 0x56, 0x13, 0xba, 0x82, 0x0f, 0x90, 0x45, 0xa5, 0x88, 0xba, 0xa6, 0x37, 0x2f, 0x61, 0x32, 0x1d, - 0xd2, 0xd0, 0xec, 0x4c, 0x3a, 0x33, 0x59, 0xcd, 0x55, 0x3c, 0x78, 0x14, 0x14, 0x7c, 0x00, 0x5f, - 0xa6, 0xc7, 0x82, 0x17, 0x4f, 0x22, 0xbb, 0x3e, 0x88, 0x64, 0x26, 0x85, 0xae, 0x59, 0xd1, 0x53, - 0x32, 0xf3, 0xfb, 0x3b, 0xf3, 0x0d, 0x6c, 0x13, 0x2e, 0xa7, 0x5c, 0x06, 0x5c, 0x60, 0x92, 0xd3, - 0x60, 0x76, 0x10, 0x9c, 0x95, 0x54, 0x54, 0x7e, 0x21, 0xb8, 0xe2, 0xa8, 0x6f, 0x50, 0xdf, 0xa0, - 0xfe, 0xec, 0xc0, 0xd9, 0x4a, 0x79, 0xca, 0x35, 0x18, 0xd4, 0x7f, 0x86, 0xe7, 0x6c, 0xa7, 0x9c, - 0xa7, 0x39, 0x0d, 0x70, 0x91, 0x05, 0x98, 0x31, 0xae, 0xb0, 0xca, 0x38, 0x93, 0x0d, 0x7a, 0xa7, - 0x95, 0xd1, 0xf8, 0x69, 0xd8, 0xdb, 0x02, 0xf4, 0xaa, 0xce, 0x9c, 0x60, 0x81, 0xa7, 0x32, 0xa2, - 0x67, 0x25, 0x95, 0xca, 0x7b, 0x0e, 0xb7, 0x96, 0x76, 0x65, 0xc1, 0x99, 0xa4, 0xe8, 0x11, 0x74, - 0x0b, 0xbd, 0x33, 0xb0, 0x87, 0xf6, 0xee, 0xc6, 0x68, 0xe0, 0xff, 0x59, 0xd1, 0x37, 0x8a, 0x70, - 0xed, 0xfc, 0xc7, 0x8e, 0x15, 0x35, 0x6c, 0xef, 0x18, 0x6e, 0x6b, 0xbb, 0x43, 0xa6, 0x4a, 0xc1, - 0x22, 0x9a, 0xe3, 0x8a, 0x8a, 0x26, 0x0b, 0x3d, 0x85, 0x9b, 0x24, 0xc7, 0xd9, 0x34, 0x96, 0x82, - 0xc4, 0xe4, 0x04, 0x67, 0x4c, 0xbb, 0x6f, 0x8e, 0x76, 0xda, 0xee, 0xe3, 0x9a, 0x78, 0x24, 0xc8, - 0xb8, 0xa6, 0x45, 0x3d, 0x72, 0x75, 0xe9, 0xbd, 0xb7, 0xc1, 0x59, 0x15, 0xd3, 0x94, 0x77, 0x61, - 0x23, 0xc9, 0x65, 0x5c, 0x94, 0x49, 0x7c, 0x4a, 0x2b, 0x9d, 0xb1, 0x1e, 0xad, 0x27, 0xb9, 0x9c, - 0x94, 0xc9, 0x33, 0x5a, 0xa1, 0x27, 0xb0, 0x29, 0x6a, 0x49, 0x9c, 0x31, 0x45, 0xc5, 0x0c, 0xe7, - 0x83, 0x8e, 0x3e, 0xe4, 0x8a, 0x1a, 0xda, 0xfa, 0xb0, 0xa1, 0x45, 0x3d, 0x71, 0x75, 0xb9, 0xb7, - 0x07, 0xbd, 0xa5, 0x9a, 0xe8, 0x06, 0x5c, 0x0b, 0x8f, 0xc6, 0x7d, 0x0b, 0x01, 0x74, 0x5f, 0x4e, - 0xe2, 0xf0, 0x45, 0xd8, 0xb7, 0x9d, 0xb5, 0x0f, 0x5f, 0x5d, 0x6b, 0xf4, 0xa5, 0x03, 0xd7, 0x75, - 0x65, 0xf4, 0x06, 0xba, 0xe6, 0xea, 0xd0, 0xdd, 0x76, 0x5e, 0x7b, 0x42, 0xce, 0xbd, 0x7f, 0xb0, - 0xcc, 0xa1, 0xbd, 0xe1, 0xbb, 0x6f, 0xbf, 0x3e, 0x75, 0x1c, 0x34, 0x08, 0x5a, 0xcf, 0xc0, 0xcc, - 0x06, 0x7d, 0xb6, 0xa1, 0xb7, 0x74, 0x61, 0x68, 0xff, 0x2f, 0xd6, 0xab, 0xa6, 0xe7, 0xdc, 0xff, - 0x3f, 0x72, 0x53, 0x67, 0x57, 0xd7, 0xf1, 0xd0, 0xb0, 0x5d, 0x27, 0xd3, 0x82, 0x58, 0x18, 0x45, - 0xf8, 0xf8, 0x7c, 0xee, 0xda, 0x17, 0x73, 0xd7, 0xfe, 0x39, 0x77, 0xed, 0x8f, 0x0b, 0xd7, 0xba, - 0x58, 0xb8, 0xd6, 0xf7, 0x85, 0x6b, 0xbd, 0xde, 0x4f, 0x33, 0x75, 0x52, 0x26, 0x3e, 0xe1, 0xd3, - 0x4b, 0x17, 0xf3, 0x79, 0x20, 0x8f, 0x4f, 0x83, 0xb7, 0x97, 0x96, 0xaa, 0x2a, 0xa8, 0x4c, 0xba, - 0xfa, 0x95, 0x3f, 0xfc, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xa6, 0x4e, 0xc9, 0x08, 0x6a, 0x03, 0x00, - 0x00, + // 504 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x41, 0x6b, 0xd4, 0x40, + 0x18, 0x4d, 0x96, 0x5a, 0xe8, 0x94, 0xad, 0xcb, 0xb4, 0xe8, 0x1a, 0x6b, 0x76, 0x09, 0x0a, 0xc5, + 0x6a, 0x42, 0x57, 0xf0, 0xde, 0xc4, 0xad, 0x06, 0xed, 0xba, 0x66, 0xf1, 0xe2, 0x65, 0x98, 0xa4, + 0x43, 0x1a, 0x36, 0x9b, 0x49, 0x67, 0x92, 0xd5, 0x5c, 0xc5, 0x83, 0x47, 0x41, 0xc1, 0x1f, 0xe0, + 0x9f, 0xe9, 0xb1, 0xe0, 0xc5, 0x93, 0xc8, 0xae, 0x3f, 0x44, 0x32, 0x93, 0x42, 0x77, 0xb3, 0xa2, + 0xa7, 0x64, 0xe6, 0xbd, 0xef, 0xbd, 0xf7, 0x7d, 0x5f, 0x02, 0x76, 0x03, 0xca, 0x27, 0x94, 0x5b, + 0x94, 0xe1, 0x20, 0x26, 0xd6, 0xf4, 0xc0, 0x3a, 0xcb, 0x09, 0x2b, 0xcc, 0x94, 0xd1, 0x8c, 0xc2, + 0x96, 0x44, 0x4d, 0x89, 0x9a, 0xd3, 0x03, 0x6d, 0x27, 0xa4, 0x21, 0x15, 0xa0, 0x55, 0xbe, 0x49, + 0x9e, 0xb6, 0x1b, 0x52, 0x1a, 0xc6, 0xc4, 0xc2, 0x69, 0x64, 0xe1, 0x24, 0xa1, 0x19, 0xce, 0x22, + 0x9a, 0xf0, 0x0a, 0xbd, 0x53, 0xf3, 0xa8, 0xf4, 0x04, 0x6c, 0xec, 0x00, 0xf8, 0xaa, 0xf4, 0x1c, + 0x62, 0x86, 0x27, 0xdc, 0x23, 0x67, 0x39, 0xe1, 0x99, 0x71, 0x0c, 0xb6, 0x17, 0x6e, 0x79, 0x4a, + 0x13, 0x4e, 0xe0, 0x63, 0xb0, 0x9e, 0x8a, 0x9b, 0xb6, 0xda, 0x55, 0xf7, 0x36, 0x7b, 0x6d, 0x73, + 0x39, 0xa2, 0x29, 0x2b, 0xec, 0xb5, 0xf3, 0x9f, 0x1d, 0xc5, 0xab, 0xd8, 0xc6, 0x09, 0xb8, 0x25, + 0xe4, 0xdc, 0x24, 0xcb, 0x59, 0xe2, 0x91, 0x18, 0x17, 0x84, 0x55, 0x5e, 0xf0, 0x29, 0xb8, 0x1e, + 0xc4, 0x38, 0x9a, 0x20, 0xce, 0x02, 0x14, 0x9c, 0xe2, 0x28, 0x11, 0xea, 0x5b, 0xbd, 0x4e, 0x5d, + 0xdd, 0x29, 0x89, 0x23, 0x16, 0x38, 0x25, 0xcd, 0x6b, 0x06, 0x57, 0x8f, 0xc6, 0x07, 0x15, 0x68, + 0xab, 0x6c, 0xaa, 0xf0, 0x3a, 0xd8, 0xf4, 0x63, 0x8e, 0xd2, 0xdc, 0x47, 0x63, 0x52, 0x08, 0x8f, + 0x0d, 0x6f, 0xc3, 0x8f, 0xf9, 0x30, 0xf7, 0x9f, 0x93, 0x02, 0x1e, 0x81, 0x2d, 0x56, 0x96, 0xa0, + 0x28, 0xc9, 0x08, 0x9b, 0xe2, 0xb8, 0xdd, 0x10, 0x4d, 0xae, 0x88, 0x21, 0xa4, 0xdd, 0x8a, 0xe6, + 0x35, 0xd9, 0xd5, 0xe3, 0xfd, 0x31, 0x68, 0x2e, 0xc4, 0x84, 0x1d, 0x70, 0xdb, 0x79, 0x71, 0xe8, + 0x1e, 0xa3, 0x91, 0xe7, 0x20, 0xe7, 0xd9, 0xa1, 0x3b, 0x40, 0xaf, 0x07, 0xa3, 0x61, 0xdf, 0x71, + 0x8f, 0xdc, 0xfe, 0x93, 0x96, 0x02, 0x6f, 0x82, 0xed, 0x65, 0x82, 0x3d, 0x72, 0x5a, 0x2a, 0xd4, + 0xc0, 0x8d, 0x65, 0xe0, 0xe5, 0x10, 0xd9, 0x03, 0xbb, 0xd5, 0xd0, 0xd6, 0x3e, 0x7e, 0xd3, 0x95, + 0xde, 0xd7, 0x06, 0xb8, 0x26, 0x7a, 0x86, 0x6f, 0xc1, 0xba, 0x9c, 0x3d, 0xbc, 0x5b, 0x0f, 0x5c, + 0x5f, 0xb1, 0x76, 0xef, 0x1f, 0x2c, 0x39, 0x35, 0xa3, 0xfb, 0xfe, 0xfb, 0xef, 0xcf, 0x0d, 0x0d, + 0xb6, 0xad, 0xda, 0x77, 0x24, 0x97, 0x0b, 0xbf, 0xa8, 0xa0, 0xb9, 0x30, 0x71, 0xb8, 0xff, 0x17, + 0xe9, 0x55, 0xeb, 0xd7, 0x1e, 0xfc, 0x1f, 0xb9, 0x8a, 0xb3, 0x27, 0xe2, 0x18, 0xb0, 0x5b, 0x8f, + 0x13, 0x89, 0x02, 0xc4, 0x64, 0x85, 0xdd, 0x3f, 0x9f, 0xe9, 0xea, 0xc5, 0x4c, 0x57, 0x7f, 0xcd, + 0x74, 0xf5, 0xd3, 0x5c, 0x57, 0x2e, 0xe6, 0xba, 0xf2, 0x63, 0xae, 0x2b, 0x6f, 0xf6, 0xc3, 0x28, + 0x3b, 0xcd, 0x7d, 0x33, 0xa0, 0x93, 0x4b, 0x15, 0xf9, 0x78, 0xc8, 0x4f, 0xc6, 0xd6, 0xbb, 0x4b, + 0xc9, 0xac, 0x48, 0x09, 0xf7, 0xd7, 0xc5, 0x6f, 0xf2, 0xe8, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0x3f, 0x98, 0x40, 0xe8, 0xab, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From ff24663675f5e29054d58b211b6394c70aadb171 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 30 Oct 2023 11:00:33 +0800 Subject: [PATCH 4/5] fix ci --- x/gov/testutil/expected_keepers.go | 5 ++++- x/gov/testutil/expected_keepers_mocks.go | 16 +++++++++++++++- x/oracle/keeper/keeper.go | 6 ++---- x/staking/testutil/expected_keepers_mocks.go | 2 +- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/x/gov/testutil/expected_keepers.go b/x/gov/testutil/expected_keepers.go index 9adda8969b..8a3d7b33ca 100644 --- a/x/gov/testutil/expected_keepers.go +++ b/x/gov/testutil/expected_keepers.go @@ -38,7 +38,6 @@ type StakingKeeper interface { // CrossChainKeeper defines the expected crossChain keeper type CrossChainKeeper interface { - GetDestBscChainID() sdk.ChainID CreateRawIBCPackageWithFee(ctx sdk.Context, destChainId sdk.ChainID, channelID sdk.ChannelID, packageType sdk.CrossChainPackageType, packageLoad []byte, relayerFee, ackRelayerFee *big.Int, ) (uint64, error) @@ -50,4 +49,8 @@ type CrossChainKeeper interface { GetReceiveSequence(ctx sdk.Context, destChainId sdk.ChainID, channelID sdk.ChannelID) uint64 IsDestChainSupported(chainID sdk.ChainID) bool + + GetDestBscChainID() sdk.ChainID + + GetDestOpChainID() sdk.ChainID } diff --git a/x/gov/testutil/expected_keepers_mocks.go b/x/gov/testutil/expected_keepers_mocks.go index 9bb5fbfb85..bbf4110aac 100644 --- a/x/gov/testutil/expected_keepers_mocks.go +++ b/x/gov/testutil/expected_keepers_mocks.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: expected_keepers.go +// Source: x/gov/testutil/expected_keepers.go // Package testutil is a generated GoMock package. package testutil @@ -1089,6 +1089,20 @@ func (mr *MockCrossChainKeeperMockRecorder) GetDestBscChainID() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDestBscChainID", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetDestBscChainID)) } +// GetDestOpChainID mocks base method. +func (m *MockCrossChainKeeper) GetDestOpChainID() types.ChainID { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDestOpChainID") + ret0, _ := ret[0].(types.ChainID) + return ret0 +} + +// GetDestOpChainID indicates an expected call of GetDestOpChainID. +func (mr *MockCrossChainKeeperMockRecorder) GetDestOpChainID() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDestOpChainID", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetDestOpChainID)) +} + // GetReceiveSequence mocks base method. func (m *MockCrossChainKeeper) GetReceiveSequence(ctx types.Context, destChainId types.ChainID, channelID types.ChannelID) uint64 { m.ctrl.T.Helper() diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index edffa9b852..e6938093eb 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -133,10 +133,8 @@ func (k Keeper) CheckClaim(ctx sdk.Context, claim *types.MsgClaim) (sdk.AccAddre validators := historicalInfo.Valset claimSrcChain := types.CLAIM_SRC_CHAIN_BSC - if ctx.IsUpgraded(upgradetypes.Pampas) { - if sdk.ChainID(claim.SrcChainId) == k.CrossChainKeeper.GetDestOpChainID() { - claimSrcChain = types.CLAIM_SRC_CHAIN_OP_BNB - } + if ctx.IsUpgraded(upgradetypes.Pampas) && sdk.ChainID(claim.SrcChainId) == k.CrossChainKeeper.GetDestOpChainID() { + claimSrcChain = types.CLAIM_SRC_CHAIN_OP_BNB } isValid, err := k.IsRelayerValid(ctx, relayer, validators, claim.Timestamp, claimSrcChain) diff --git a/x/staking/testutil/expected_keepers_mocks.go b/x/staking/testutil/expected_keepers_mocks.go index 1a2a96d9e3..17b49f7b9a 100644 --- a/x/staking/testutil/expected_keepers_mocks.go +++ b/x/staking/testutil/expected_keepers_mocks.go @@ -10,7 +10,7 @@ import ( math "cosmossdk.io/math" types "github.com/cosmos/cosmos-sdk/types" types0 "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/cosmos/cosmos-sdk/x/authz" + authz "github.com/cosmos/cosmos-sdk/x/authz" types1 "github.com/cosmos/cosmos-sdk/x/staking/types" gomock "github.com/golang/mock/gomock" ) From ea0069c8517fd24288d4081f412eca922cbecca2 Mon Sep 17 00:00:00 2001 From: Alexgao001 Date: Mon, 30 Oct 2023 11:25:43 +0800 Subject: [PATCH 5/5] fix test due to pagination counting total is disabled --- tests/e2e/bank/grpc.go | 10 +++------ tests/e2e/bank/suite.go | 2 +- tests/e2e/slashing/grpc.go | 4 +--- tests/e2e/staking/grpc.go | 5 ++--- x/oracle/keeper/keeper_test.go | 2 +- x/oracle/types/expected_keeper_mocks.go | 28 +++++++++++++++++++++++++ 6 files changed, 36 insertions(+), 15 deletions(-) diff --git a/tests/e2e/bank/grpc.go b/tests/e2e/bank/grpc.go index 8bc393d306..7101b3987c 100644 --- a/tests/e2e/bank/grpc.go +++ b/tests/e2e/bank/grpc.go @@ -37,9 +37,7 @@ func (s *E2ETestSuite) TestTotalSupplyGRPCHandler() { sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), s.cfg.AccountTokens), sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Add(sdk.NewInt(10))), ), - Pagination: &query.PageResponse{ - Total: 2, - }, + Pagination: &query.PageResponse{}, }, }, { @@ -160,7 +158,7 @@ func (s *E2ETestSuite) TestDenomMetadataGRPCHandler() { Display: "eth", }, }, - Pagination: &query.PageResponse{Total: 2}, + Pagination: &query.PageResponse{}, }, }, { @@ -244,9 +242,7 @@ func (s *E2ETestSuite) TestBalancesGRPCHandler() { sdk.NewCoin(fmt.Sprintf("%stoken", val.Moniker), s.cfg.AccountTokens), sdk.NewCoin(s.cfg.BondDenom, s.cfg.StakingTokens.Sub(s.cfg.BondedTokens)), ), - Pagination: &query.PageResponse{ - Total: 2, - }, + Pagination: &query.PageResponse{}, }, }, { diff --git a/tests/e2e/bank/suite.go b/tests/e2e/bank/suite.go index 399c82d85e..79b21ee88f 100644 --- a/tests/e2e/bank/suite.go +++ b/tests/e2e/bank/suite.go @@ -296,7 +296,7 @@ func (s *E2ETestSuite) TestGetCmdQueryDenomsMetadata() { Display: "eth", }, }, - Pagination: &query.PageResponse{Total: 2}, + Pagination: &query.PageResponse{}, }, }, { diff --git a/tests/e2e/slashing/grpc.go b/tests/e2e/slashing/grpc.go index efea63187d..58d41b77f7 100644 --- a/tests/e2e/slashing/grpc.go +++ b/tests/e2e/slashing/grpc.go @@ -42,9 +42,7 @@ func (s *E2ETestSuite) TestGRPCQueries() { JailedUntil: time.Unix(0, 0), }, }, - Pagination: &query.PageResponse{ - Total: uint64(1), - }, + Pagination: &query.PageResponse{}, }, }, { diff --git a/tests/e2e/staking/grpc.go b/tests/e2e/staking/grpc.go index ef625af91d..45b52257bb 100644 --- a/tests/e2e/staking/grpc.go +++ b/tests/e2e/staking/grpc.go @@ -400,7 +400,7 @@ func (s *E2ETestSuite) TestGRPCQueryDelegatorDelegations() { DelegationResponses: types.DelegationResponses{ types.NewDelegationResp(val.Address, val.ValAddress, sdk.NewDecFromInt(cli.DefaultTokens), sdk.NewCoin(sdk.DefaultBondDenom, cli.DefaultTokens)), }, - Pagination: &query.PageResponse{Total: 1}, + Pagination: &query.PageResponse{}, }, }, { @@ -413,7 +413,7 @@ func (s *E2ETestSuite) TestGRPCQueryDelegatorDelegations() { &types.QueryDelegatorDelegationsResponse{}, &types.QueryDelegatorDelegationsResponse{ DelegationResponses: types.DelegationResponses{}, - Pagination: &query.PageResponse{Total: 0}, + Pagination: &query.PageResponse{}, }, }, } @@ -592,7 +592,6 @@ func (s *E2ETestSuite) TestGRPCQueryDelegatorValidators() { } else { s.Require().NoError(err) s.Require().Len(validators.Validators, len(s.network.Validators)) - s.Require().Equal(int(validators.Pagination.Total), len(s.network.Validators)) } }) } diff --git a/x/oracle/keeper/keeper_test.go b/x/oracle/keeper/keeper_test.go index 98d948dff5..1918739abe 100644 --- a/x/oracle/keeper/keeper_test.go +++ b/x/oracle/keeper/keeper_test.go @@ -256,7 +256,7 @@ func (s *TestSuite) TestKeeper_IsRelayerValid() { for idx, test := range tests { s.ctx = s.ctx.WithBlockTime(time.Unix(test.blockTime, 0)) relayer := sdk.MustAccAddressFromHex(test.claimMsg.FromAddress) - isValid, err := s.oracleKeeper.IsRelayerValid(s.ctx, relayer, vals, test.claimMsg.Timestamp) + isValid, err := s.oracleKeeper.IsRelayerValid(s.ctx, relayer, vals, test.claimMsg.Timestamp, types.CLAIM_SRC_CHAIN_BSC) if test.expectedPass { s.Require().Nil(err) diff --git a/x/oracle/types/expected_keeper_mocks.go b/x/oracle/types/expected_keeper_mocks.go index d63d1ffe3d..008f103001 100644 --- a/x/oracle/types/expected_keeper_mocks.go +++ b/x/oracle/types/expected_keeper_mocks.go @@ -131,6 +131,34 @@ func (mr *MockCrossChainKeeperMockRecorder) GetCrossChainApp(channelID interface return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetCrossChainApp", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetCrossChainApp), channelID) } +// GetDestBscChainID mocks base method. +func (m *MockCrossChainKeeper) GetDestBscChainID() types.ChainID { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDestBscChainID") + ret0, _ := ret[0].(types.ChainID) + return ret0 +} + +// GetDestBscChainID indicates an expected call of GetDestBscChainID. +func (mr *MockCrossChainKeeperMockRecorder) GetDestBscChainID() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDestBscChainID", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetDestBscChainID)) +} + +// GetDestOpChainID mocks base method. +func (m *MockCrossChainKeeper) GetDestOpChainID() types.ChainID { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetDestOpChainID") + ret0, _ := ret[0].(types.ChainID) + return ret0 +} + +// GetDestOpChainID indicates an expected call of GetDestOpChainID. +func (mr *MockCrossChainKeeperMockRecorder) GetDestOpChainID() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetDestOpChainID", reflect.TypeOf((*MockCrossChainKeeper)(nil).GetDestOpChainID)) +} + // GetReceiveSequence mocks base method. func (m *MockCrossChainKeeper) GetReceiveSequence(ctx types.Context, chainId types.ChainID, channelID types.ChannelID) uint64 { m.ctrl.T.Helper()