From 8200ab31997e96c1660d42630b67ed7ebaa71b6c Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Fri, 10 May 2024 15:19:14 +0200 Subject: [PATCH 01/20] limit gas execution --- x/gov/keeper/abci.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index 1a5f9fa03385..0d944511ae41 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -11,6 +11,7 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/core/event" "cosmossdk.io/core/router" + consensustypes "cosmossdk.io/x/consensus/types" "cosmossdk.io/x/gov/types" v1 "cosmossdk.io/x/gov/types/v1" @@ -75,11 +76,16 @@ func (k Keeper) EndBlocker(ctx context.Context) error { return err } + var res consensustypes.QueryParamsResponse + + k.RouterService.QueryRouterService().InvokeTyped(ctx, &consensustypes.QueryParamsRequest{}, &res) + // called when proposal become inactive // call hook when proposal become inactive - if err := k.BranchService.Execute(ctx, func(ctx context.Context) error { + _, err = k.BranchService.ExecuteWithGasLimit(ctx, uint64(res.Params.Block.MaxGas), func(ctx context.Context) error { return k.Hooks().AfterProposalFailedMinDeposit(ctx, proposal.Id) - }); err != nil { + }) + if err != nil { // purposely ignoring the error here not to halt the chain if the hook fails k.Logger.Error("failed to execute AfterProposalFailedMinDeposit hook", "error", err) } From 69a489d4b36c2554283e65596bb312cb998b4def Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Fri, 10 May 2024 15:24:09 +0200 Subject: [PATCH 02/20] add info to readme --- x/gov/README.md | 6 ++++++ x/gov/keeper/abci.go | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/x/gov/README.md b/x/gov/README.md index b8bf1383e689..715d0375a17f 100644 --- a/x/gov/README.md +++ b/x/gov/README.md @@ -278,6 +278,12 @@ There are three parameters that define if the deposit of a proposal should be bu > Note: These parameters are modifiable via governance. +#### Execution + +Execution is the process of executing the messages contained in a proposal. The execution phase will commence after the proposal has been accepted by the network. The messages contained in the proposal will be executed in the order they were submitted. + +Execution has a upper limit on how many messages can be executed in a single block. This limit is defined by the `MaxMessagesPerProposal` parameter. We use the MaxBlockGas from the consensus engine, value stored in the consensus module, to calculate the limit of messages that can be executed in a block. + ## State ### Constitution diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index 0d944511ae41..455ccb32d6ed 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -78,7 +78,9 @@ func (k Keeper) EndBlocker(ctx context.Context) error { var res consensustypes.QueryParamsResponse - k.RouterService.QueryRouterService().InvokeTyped(ctx, &consensustypes.QueryParamsRequest{}, &res) + if err := k.RouterService.QueryRouterService().InvokeTyped(ctx, &consensustypes.QueryParamsRequest{}, &res); err != nil { + return err + } // called when proposal become inactive // call hook when proposal become inactive From 122e73385300e9e0a578e84bf0827d83ce3a02bd Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Mon, 13 May 2024 12:23:41 +0200 Subject: [PATCH 03/20] move withgaslimit to the corret location --- x/gov/go.mod | 4 ++-- x/gov/keeper/abci.go | 19 ++++++++++--------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/x/gov/go.mod b/x/gov/go.mod index 08ca74e20e98..21dbdcbb7cbb 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -13,7 +13,9 @@ require ( cosmossdk.io/math v1.3.0 cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 // indirect + cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 + cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 github.com/chzyer/readline v1.5.1 @@ -39,8 +41,6 @@ require ( require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.0-20240312114316-c0d3497e35d6.1 // indirect cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 // indirect - cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 - cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.3 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index 455ccb32d6ed..c7c76d30934f 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -76,15 +76,9 @@ func (k Keeper) EndBlocker(ctx context.Context) error { return err } - var res consensustypes.QueryParamsResponse - - if err := k.RouterService.QueryRouterService().InvokeTyped(ctx, &consensustypes.QueryParamsRequest{}, &res); err != nil { - return err - } - // called when proposal become inactive // call hook when proposal become inactive - _, err = k.BranchService.ExecuteWithGasLimit(ctx, uint64(res.Params.Block.MaxGas), func(ctx context.Context) error { + err = k.BranchService.Execute(ctx, func(ctx context.Context) error { return k.Hooks().AfterProposalFailedMinDeposit(ctx, proposal.Id) }) if err != nil { @@ -197,11 +191,17 @@ func (k Keeper) EndBlocker(ctx context.Context) error { break } + var res consensustypes.QueryParamsResponse + + if err := k.RouterService.QueryRouterService().InvokeTyped(ctx, &consensustypes.QueryParamsRequest{}, &res); err != nil { + return err + } + // attempt to execute all messages within the passed proposal // Messages may mutate state thus we use a cached context. If one of // the handlers fails, no state mutation is written and the error // message is logged. - if err := k.BranchService.Execute(ctx, func(ctx context.Context) error { + _, err = k.BranchService.ExecuteWithGasLimit(ctx, uint64(res.Params.Block.MaxGas), func(ctx context.Context) error { // execute all messages for idx, msg = range messages { if _, err := safeExecuteHandler(ctx, msg, k.RouterService.MessageRouterService()); err != nil { @@ -220,7 +220,8 @@ func (k Keeper) EndBlocker(ctx context.Context) error { logMsg = "passed" return nil - }); err != nil { + }) + if err != nil { break // We do not anything with the error. Returning an error halts the chain, and proposal struct is already updated. } case !burnDeposits && (proposal.ProposalType == v1.ProposalType_PROPOSAL_TYPE_EXPEDITED || From b17c74ef58ea44d58b67e507bb824cd30e6a2bd0 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Tue, 21 May 2024 16:46:27 +0200 Subject: [PATCH 04/20] remove usage of router in favor of a param --- api/cosmos/app/runtime/v2/module.pulsar.go | 2 +- api/cosmos/gov/v1/gov.pulsar.go | 209 +- api/cosmos/streaming/v1/grpc.pulsar.go | 5365 +++++++++++++++++ api/cosmos/streaming/v1/grpc_grpc.pb.go | 150 + cosmossdk.io/server/v2/streaming/grpc.pb.go | 2414 ++++++++ .../store/snapshots/types/snapshot.pb.go | 2008 ++++++ cosmossdk.io/store/streaming/abci/grpc.pb.go | 1050 ++++ cosmossdk.io/store/types/commit_info.pb.go | 864 +++ cosmossdk.io/store/types/listening.pb.go | 785 +++ .../x/consensus/types/consensus.pb.go | 824 +++ x/gov/keeper/abci.go | 13 +- x/gov/proto/cosmos/gov/v1/gov.proto | 4 +- x/gov/types/v1/gov.pb.go | 291 +- 13 files changed, 13770 insertions(+), 209 deletions(-) create mode 100644 api/cosmos/streaming/v1/grpc.pulsar.go create mode 100644 api/cosmos/streaming/v1/grpc_grpc.pb.go create mode 100644 cosmossdk.io/server/v2/streaming/grpc.pb.go create mode 100644 cosmossdk.io/store/snapshots/types/snapshot.pb.go create mode 100644 cosmossdk.io/store/streaming/abci/grpc.pb.go create mode 100644 cosmossdk.io/store/types/commit_info.pb.go create mode 100644 cosmossdk.io/store/types/listening.pb.go create mode 100644 cosmossdk.io/x/consensus/types/consensus.pb.go diff --git a/api/cosmos/app/runtime/v2/module.pulsar.go b/api/cosmos/app/runtime/v2/module.pulsar.go index e65b4cc69026..1105330ae7fd 100644 --- a/api/cosmos/app/runtime/v2/module.pulsar.go +++ b/api/cosmos/app/runtime/v2/module.pulsar.go @@ -2547,7 +2547,7 @@ type Module struct { // if it is specified. ExportGenesis []string `protobuf:"bytes,7,rep,name=export_genesis,json=exportGenesis,proto3" json:"export_genesis,omitempty"` // order_migrations defines the order in which module migrations are performed. - // If this is left empty, it uses the default migration order (alphabeticaly). + // If this is left empty, it uses the default migration order (alphabetically). OrderMigrations []string `protobuf:"bytes,8,rep,name=order_migrations,json=orderMigrations,proto3" json:"order_migrations,omitempty"` // GasConfig is the config object for gas limits. GasConfig *GasConfig `protobuf:"bytes,9,opt,name=gas_config,json=gasConfig,proto3" json:"gas_config,omitempty"` diff --git a/api/cosmos/gov/v1/gov.pulsar.go b/api/cosmos/gov/v1/gov.pulsar.go index 3539071c3e73..3fb4403feafe 100644 --- a/api/cosmos/gov/v1/gov.pulsar.go +++ b/api/cosmos/gov/v1/gov.pulsar.go @@ -6645,6 +6645,7 @@ var ( fd_Params_optimistic_rejected_threshold protoreflect.FieldDescriptor fd_Params_yes_quorum protoreflect.FieldDescriptor fd_Params_expedited_quorum protoreflect.FieldDescriptor + fd_Params_proposal_execution_gas protoreflect.FieldDescriptor ) func init() { @@ -6671,6 +6672,7 @@ func init() { fd_Params_optimistic_rejected_threshold = md_Params.Fields().ByName("optimistic_rejected_threshold") fd_Params_yes_quorum = md_Params.Fields().ByName("yes_quorum") fd_Params_expedited_quorum = md_Params.Fields().ByName("expedited_quorum") + fd_Params_proposal_execution_gas = md_Params.Fields().ByName("proposal_execution_gas") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -6864,6 +6866,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.ProposalExecutionGas != uint64(0) { + value := protoreflect.ValueOfUint64(x.ProposalExecutionGas) + if !f(fd_Params_proposal_execution_gas, value) { + return + } + } } // Has reports whether a field is populated. @@ -6921,6 +6929,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return x.YesQuorum != "" case "cosmos.gov.v1.Params.expedited_quorum": return x.ExpeditedQuorum != "" + case "cosmos.gov.v1.Params.proposal_execution_gas": + return x.ProposalExecutionGas != uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -6979,6 +6989,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.YesQuorum = "" case "cosmos.gov.v1.Params.expedited_quorum": x.ExpeditedQuorum = "" + case "cosmos.gov.v1.Params.proposal_execution_gas": + x.ProposalExecutionGas = uint64(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -7067,6 +7079,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro case "cosmos.gov.v1.Params.expedited_quorum": value := x.ExpeditedQuorum return protoreflect.ValueOfString(value) + case "cosmos.gov.v1.Params.proposal_execution_gas": + value := x.ProposalExecutionGas + return protoreflect.ValueOfUint64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -7135,6 +7150,8 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto x.YesQuorum = value.Interface().(string) case "cosmos.gov.v1.Params.expedited_quorum": x.ExpeditedQuorum = value.Interface().(string) + case "cosmos.gov.v1.Params.proposal_execution_gas": + x.ProposalExecutionGas = value.Uint() default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -7218,6 +7235,8 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore panic(fmt.Errorf("field yes_quorum of message cosmos.gov.v1.Params is not mutable")) case "cosmos.gov.v1.Params.expedited_quorum": panic(fmt.Errorf("field expedited_quorum of message cosmos.gov.v1.Params is not mutable")) + case "cosmos.gov.v1.Params.proposal_execution_gas": + panic(fmt.Errorf("field proposal_execution_gas of message cosmos.gov.v1.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -7279,6 +7298,8 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor return protoreflect.ValueOfString("") case "cosmos.gov.v1.Params.expedited_quorum": return protoreflect.ValueOfString("") + case "cosmos.gov.v1.Params.proposal_execution_gas": + return protoreflect.ValueOfUint64(uint64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.gov.v1.Params")) @@ -7435,6 +7456,9 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if l > 0 { n += 2 + l + runtime.Sov(uint64(l)) } + if x.ProposalExecutionGas != 0 { + n += 2 + runtime.Sov(uint64(x.ProposalExecutionGas)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -7464,6 +7488,13 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.ProposalExecutionGas != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ProposalExecutionGas)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 + } if len(x.ExpeditedQuorum) > 0 { i -= len(x.ExpeditedQuorum) copy(dAtA[i:], x.ExpeditedQuorum) @@ -8374,6 +8405,25 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } x.ExpeditedQuorum = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 22: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ProposalExecutionGas", wireType) + } + x.ProposalExecutionGas = 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.ProposalExecutionGas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -10084,7 +10134,8 @@ type Params struct { YesQuorum string `protobuf:"bytes,20,opt,name=yes_quorum,json=yesQuorum,proto3" json:"yes_quorum,omitempty"` // Minimum percentage of total stake needed to vote for a result to be // considered valid for an expedited proposal. - ExpeditedQuorum string `protobuf:"bytes,21,opt,name=expedited_quorum,json=expeditedQuorum,proto3" json:"expedited_quorum,omitempty"` + ExpeditedQuorum string `protobuf:"bytes,21,opt,name=expedited_quorum,json=expeditedQuorum,proto3" json:"expedited_quorum,omitempty"` + ProposalExecutionGas uint64 `protobuf:"varint,22,opt,name=proposal_execution_gas,json=proposalExecutionGas,proto3" json:"proposal_execution_gas,omitempty"` } func (x *Params) Reset() { @@ -10254,6 +10305,13 @@ func (x *Params) GetExpeditedQuorum() string { return "" } +func (x *Params) GetProposalExecutionGas() uint64 { + if x != nil { + return x.ProposalExecutionGas + } + return 0 +} + // MessageBasedParams defines the parameters of specific messages in a proposal. // It is used to define the parameters of a proposal that is based on a specific message. // Once a message has message based params, it only supports a standard proposal type. @@ -10511,7 +10569,7 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x02, 0x18, 0x01, - 0x22, 0xff, 0x0c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x6d, + 0x22, 0xc7, 0x0d, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x45, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, @@ -10613,77 +10671,82 @@ var file_cosmos_gov_v1_gov_proto_rawDesc = []byte{ 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0xda, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x52, 0x0f, 0x65, 0x78, - 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x3a, 0x13, 0xd2, - 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, - 0x34, 0x37, 0x22, 0xa8, 0x02, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x61, - 0x73, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, - 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, - 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, - 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, - 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2d, 0x0a, 0x0a, 0x79, 0x65, 0x73, 0x5f, 0x71, - 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x14, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, - 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x79, 0x65, 0x73, - 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, - 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, - 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, - 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, - 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x3a, 0x10, 0xd2, 0xb4, 0x2d, - 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2a, 0xa7, 0x01, - 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, - 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, - 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, - 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, - 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, - 0x50, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x50, - 0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52, - 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x45, - 0x44, 0x49, 0x54, 0x45, 0x44, 0x10, 0x04, 0x2a, 0xfa, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, - 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, - 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, - 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x57, 0x4f, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56, - 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, - 0x15, 0x0a, 0x11, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, - 0x48, 0x52, 0x45, 0x45, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, - 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, - 0x54, 0x4f, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x55, 0x52, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, - 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x50, 0x41, 0x4d, 0x10, 0x05, - 0x1a, 0x02, 0x10, 0x01, 0x2a, 0xce, 0x01, 0x0a, 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, - 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, - 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, - 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, - 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, - 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, - 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, - 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, - 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, - 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, - 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, - 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, 0x99, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x46, 0x0a, + 0x16, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x16, 0x20, 0x01, 0x28, 0x04, 0x42, 0x10, 0xda, + 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x52, + 0x14, 0x70, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x47, 0x61, 0x73, 0x3a, 0x13, 0xd2, 0xb4, 0x2d, 0x0f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x20, 0x30, 0x2e, 0x34, 0x37, 0x22, 0xa8, 0x02, 0x0a, 0x12, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x61, 0x73, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x44, 0x0a, 0x0d, 0x76, 0x6f, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, + 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x04, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0c, 0x76, 0x6f, 0x74, 0x69, 0x6e, + 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x26, 0x0a, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, + 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, 0x63, 0x52, 0x06, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, + 0x2d, 0x0a, 0x0a, 0x79, 0x65, 0x73, 0x5f, 0x71, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x18, 0x14, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x44, 0x65, 0x63, 0x52, 0x09, 0x79, 0x65, 0x73, 0x51, 0x75, 0x6f, 0x72, 0x75, 0x6d, 0x12, 0x2c, + 0x0a, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x44, 0x65, + 0x63, 0x52, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x35, 0x0a, 0x0e, + 0x76, 0x65, 0x74, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x0e, 0xd2, 0xb4, 0x2d, 0x0a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x76, 0x65, 0x74, 0x6f, 0x54, 0x68, 0x72, 0x65, 0x73, 0x68, + 0x6f, 0x6c, 0x64, 0x3a, 0x10, 0xd2, 0xb4, 0x2d, 0x0c, 0x78, 0x2f, 0x67, 0x6f, 0x76, 0x20, 0x76, + 0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2a, 0xa7, 0x01, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, + 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, + 0x41, 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, + 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, + 0x4c, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x10, + 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x43, 0x48, 0x4f, 0x49, + 0x43, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4d, 0x49, 0x53, 0x54, 0x49, 0x43, + 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x54, + 0x59, 0x50, 0x45, 0x5f, 0x45, 0x58, 0x50, 0x45, 0x44, 0x49, 0x54, 0x45, 0x44, 0x10, 0x04, 0x2a, + 0xfa, 0x01, 0x0a, 0x0a, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, + 0x0a, 0x17, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x56, + 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x59, 0x45, 0x53, 0x10, 0x01, + 0x12, 0x13, 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, + 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x53, 0x54, 0x41, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x13, + 0x0a, 0x0f, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x57, + 0x4f, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, + 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x56, 0x4f, 0x54, 0x45, 0x5f, + 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x48, 0x52, 0x45, 0x45, 0x10, 0x03, 0x12, 0x1c, + 0x0a, 0x18, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, + 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x56, 0x45, 0x54, 0x4f, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, + 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x46, 0x4f, 0x55, 0x52, + 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, 0x56, 0x4f, 0x54, 0x45, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, + 0x4e, 0x5f, 0x53, 0x50, 0x41, 0x4d, 0x10, 0x05, 0x1a, 0x02, 0x10, 0x01, 0x2a, 0xce, 0x01, 0x0a, + 0x0e, 0x50, 0x72, 0x6f, 0x70, 0x6f, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x1f, 0x0a, 0x1b, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x5f, 0x50, 0x45, 0x52, 0x49, + 0x4f, 0x44, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x4f, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, + 0x45, 0x52, 0x49, 0x4f, 0x44, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, + 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x50, 0x41, 0x53, 0x53, 0x45, + 0x44, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x45, 0x44, 0x10, + 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x4f, 0x50, 0x4f, 0x53, 0x41, 0x4c, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x42, 0x99, 0x01, + 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x67, 0x6f, 0x76, + 0x2e, 0x76, 0x31, 0x42, 0x08, 0x47, 0x6f, 0x76, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x24, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x67, 0x6f, 0x76, 0x2f, 0x76, 0x31, 0x3b, + 0x67, 0x6f, 0x76, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x47, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x47, 0x6f, 0x76, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x43, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x47, 0x6f, 0x76, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x3a, 0x3a, 0x47, 0x6f, 0x76, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/api/cosmos/streaming/v1/grpc.pulsar.go b/api/cosmos/streaming/v1/grpc.pulsar.go new file mode 100644 index 000000000000..76b76b8c89b3 --- /dev/null +++ b/api/cosmos/streaming/v1/grpc.pulsar.go @@ -0,0 +1,5365 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package streamingv1 + +import ( + fmt "fmt" + runtime "github.com/cosmos/cosmos-proto/runtime" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoiface "google.golang.org/protobuf/runtime/protoiface" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + io "io" + reflect "reflect" + sync "sync" +) + +var _ protoreflect.List = (*_ListenDeliverBlockRequest_2_list)(nil) + +type _ListenDeliverBlockRequest_2_list struct { + list *[][]byte +} + +func (x *_ListenDeliverBlockRequest_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListenDeliverBlockRequest_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_ListenDeliverBlockRequest_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_ListenDeliverBlockRequest_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListenDeliverBlockRequest_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message ListenDeliverBlockRequest at list field Txs as it is not of Message kind")) +} + +func (x *_ListenDeliverBlockRequest_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_ListenDeliverBlockRequest_2_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_ListenDeliverBlockRequest_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_ListenDeliverBlockRequest_3_list)(nil) + +type _ListenDeliverBlockRequest_3_list struct { + list *[]*Event +} + +func (x *_ListenDeliverBlockRequest_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListenDeliverBlockRequest_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Event) + (*x.list)[i] = concreteValue +} + +func (x *_ListenDeliverBlockRequest_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Event) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListenDeliverBlockRequest_3_list) AppendMutable() protoreflect.Value { + v := new(Event) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ListenDeliverBlockRequest_3_list) NewElement() protoreflect.Value { + v := new(Event) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_ListenDeliverBlockRequest_4_list)(nil) + +type _ListenDeliverBlockRequest_4_list struct { + list *[]*ExecTxResult +} + +func (x *_ListenDeliverBlockRequest_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListenDeliverBlockRequest_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ExecTxResult) + (*x.list)[i] = concreteValue +} + +func (x *_ListenDeliverBlockRequest_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ExecTxResult) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListenDeliverBlockRequest_4_list) AppendMutable() protoreflect.Value { + v := new(ExecTxResult) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ListenDeliverBlockRequest_4_list) NewElement() protoreflect.Value { + v := new(ExecTxResult) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenDeliverBlockRequest_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ListenDeliverBlockRequest protoreflect.MessageDescriptor + fd_ListenDeliverBlockRequest_block_height protoreflect.FieldDescriptor + fd_ListenDeliverBlockRequest_txs protoreflect.FieldDescriptor + fd_ListenDeliverBlockRequest_events protoreflect.FieldDescriptor + fd_ListenDeliverBlockRequest_tx_results protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_ListenDeliverBlockRequest = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenDeliverBlockRequest") + fd_ListenDeliverBlockRequest_block_height = md_ListenDeliverBlockRequest.Fields().ByName("block_height") + fd_ListenDeliverBlockRequest_txs = md_ListenDeliverBlockRequest.Fields().ByName("txs") + fd_ListenDeliverBlockRequest_events = md_ListenDeliverBlockRequest.Fields().ByName("events") + fd_ListenDeliverBlockRequest_tx_results = md_ListenDeliverBlockRequest.Fields().ByName("tx_results") +} + +var _ protoreflect.Message = (*fastReflection_ListenDeliverBlockRequest)(nil) + +type fastReflection_ListenDeliverBlockRequest ListenDeliverBlockRequest + +func (x *ListenDeliverBlockRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListenDeliverBlockRequest)(x) +} + +func (x *ListenDeliverBlockRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ListenDeliverBlockRequest_messageType fastReflection_ListenDeliverBlockRequest_messageType +var _ protoreflect.MessageType = fastReflection_ListenDeliverBlockRequest_messageType{} + +type fastReflection_ListenDeliverBlockRequest_messageType struct{} + +func (x fastReflection_ListenDeliverBlockRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListenDeliverBlockRequest)(nil) +} +func (x fastReflection_ListenDeliverBlockRequest_messageType) New() protoreflect.Message { + return new(fastReflection_ListenDeliverBlockRequest) +} +func (x fastReflection_ListenDeliverBlockRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListenDeliverBlockRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListenDeliverBlockRequest) Descriptor() protoreflect.MessageDescriptor { + return md_ListenDeliverBlockRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ListenDeliverBlockRequest) Type() protoreflect.MessageType { + return _fastReflection_ListenDeliverBlockRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListenDeliverBlockRequest) New() protoreflect.Message { + return new(fastReflection_ListenDeliverBlockRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListenDeliverBlockRequest) Interface() protoreflect.ProtoMessage { + return (*ListenDeliverBlockRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ListenDeliverBlockRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.BlockHeight) + if !f(fd_ListenDeliverBlockRequest_block_height, value) { + return + } + } + if len(x.Txs) != 0 { + value := protoreflect.ValueOfList(&_ListenDeliverBlockRequest_2_list{list: &x.Txs}) + if !f(fd_ListenDeliverBlockRequest_txs, value) { + return + } + } + if len(x.Events) != 0 { + value := protoreflect.ValueOfList(&_ListenDeliverBlockRequest_3_list{list: &x.Events}) + if !f(fd_ListenDeliverBlockRequest_events, value) { + return + } + } + if len(x.TxResults) != 0 { + value := protoreflect.ValueOfList(&_ListenDeliverBlockRequest_4_list{list: &x.TxResults}) + if !f(fd_ListenDeliverBlockRequest_tx_results, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ListenDeliverBlockRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + return x.BlockHeight != int64(0) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + return len(x.Txs) != 0 + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + return len(x.Events) != 0 + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + return len(x.TxResults) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenDeliverBlockRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + x.BlockHeight = int64(0) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + x.Txs = nil + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + x.Events = nil + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + x.TxResults = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ListenDeliverBlockRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + value := x.BlockHeight + return protoreflect.ValueOfInt64(value) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + if len(x.Txs) == 0 { + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_2_list{}) + } + listValue := &_ListenDeliverBlockRequest_2_list{list: &x.Txs} + return protoreflect.ValueOfList(listValue) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + if len(x.Events) == 0 { + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_3_list{}) + } + listValue := &_ListenDeliverBlockRequest_3_list{list: &x.Events} + return protoreflect.ValueOfList(listValue) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + if len(x.TxResults) == 0 { + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_4_list{}) + } + listValue := &_ListenDeliverBlockRequest_4_list{list: &x.TxResults} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenDeliverBlockRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + x.BlockHeight = value.Int() + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + lv := value.List() + clv := lv.(*_ListenDeliverBlockRequest_2_list) + x.Txs = *clv.list + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + lv := value.List() + clv := lv.(*_ListenDeliverBlockRequest_3_list) + x.Events = *clv.list + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + lv := value.List() + clv := lv.(*_ListenDeliverBlockRequest_4_list) + x.TxResults = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenDeliverBlockRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + if x.Txs == nil { + x.Txs = [][]byte{} + } + value := &_ListenDeliverBlockRequest_2_list{list: &x.Txs} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + if x.Events == nil { + x.Events = []*Event{} + } + value := &_ListenDeliverBlockRequest_3_list{list: &x.Events} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + if x.TxResults == nil { + x.TxResults = []*ExecTxResult{} + } + value := &_ListenDeliverBlockRequest_4_list{list: &x.TxResults} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + panic(fmt.Errorf("field block_height of message cosmos.streaming.v1.ListenDeliverBlockRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ListenDeliverBlockRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": + list := [][]byte{} + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_2_list{list: &list}) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": + list := []*Event{} + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_3_list{list: &list}) + case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": + list := []*ExecTxResult{} + return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ListenDeliverBlockRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenDeliverBlockRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ListenDeliverBlockRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenDeliverBlockRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ListenDeliverBlockRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ListenDeliverBlockRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListenDeliverBlockRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.BlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.BlockHeight)) + } + if len(x.Txs) > 0 { + for _, b := range x.Txs { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Events) > 0 { + for _, e := range x.Events { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.TxResults) > 0 { + for _, e := range x.TxResults { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ListenDeliverBlockRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.TxResults) > 0 { + for iNdEx := len(x.TxResults) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.TxResults[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.Events) > 0 { + for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Events[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.Txs) > 0 { + for iNdEx := len(x.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Txs[iNdEx]) + copy(dAtA[i:], x.Txs[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if x.BlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ListenDeliverBlockRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenDeliverBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenDeliverBlockRequest: 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 BlockHeight", wireType) + } + x.BlockHeight = 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.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Txs = append(x.Txs, make([]byte, postIndex-iNdEx)) + copy(x.Txs[len(x.Txs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Events = append(x.Events, &Event{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxResults", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.TxResults = append(x.TxResults, &ExecTxResult{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TxResults[len(x.TxResults)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ListenDeliverBlockResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_ListenDeliverBlockResponse = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenDeliverBlockResponse") +} + +var _ protoreflect.Message = (*fastReflection_ListenDeliverBlockResponse)(nil) + +type fastReflection_ListenDeliverBlockResponse ListenDeliverBlockResponse + +func (x *ListenDeliverBlockResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListenDeliverBlockResponse)(x) +} + +func (x *ListenDeliverBlockResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ListenDeliverBlockResponse_messageType fastReflection_ListenDeliverBlockResponse_messageType +var _ protoreflect.MessageType = fastReflection_ListenDeliverBlockResponse_messageType{} + +type fastReflection_ListenDeliverBlockResponse_messageType struct{} + +func (x fastReflection_ListenDeliverBlockResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListenDeliverBlockResponse)(nil) +} +func (x fastReflection_ListenDeliverBlockResponse_messageType) New() protoreflect.Message { + return new(fastReflection_ListenDeliverBlockResponse) +} +func (x fastReflection_ListenDeliverBlockResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListenDeliverBlockResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListenDeliverBlockResponse) Descriptor() protoreflect.MessageDescriptor { + return md_ListenDeliverBlockResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ListenDeliverBlockResponse) Type() protoreflect.MessageType { + return _fastReflection_ListenDeliverBlockResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListenDeliverBlockResponse) New() protoreflect.Message { + return new(fastReflection_ListenDeliverBlockResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListenDeliverBlockResponse) Interface() protoreflect.ProtoMessage { + return (*ListenDeliverBlockResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ListenDeliverBlockResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ListenDeliverBlockResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenDeliverBlockResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ListenDeliverBlockResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenDeliverBlockResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenDeliverBlockResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ListenDeliverBlockResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ListenDeliverBlockResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenDeliverBlockResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ListenDeliverBlockResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenDeliverBlockResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ListenDeliverBlockResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ListenDeliverBlockResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListenDeliverBlockResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ListenDeliverBlockResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ListenDeliverBlockResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenDeliverBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenDeliverBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ListenStateChangesRequest_2_list)(nil) + +type _ListenStateChangesRequest_2_list struct { + list *[]*StoreKVPair +} + +func (x *_ListenStateChangesRequest_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ListenStateChangesRequest_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ListenStateChangesRequest_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*StoreKVPair) + (*x.list)[i] = concreteValue +} + +func (x *_ListenStateChangesRequest_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*StoreKVPair) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ListenStateChangesRequest_2_list) AppendMutable() protoreflect.Value { + v := new(StoreKVPair) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenStateChangesRequest_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ListenStateChangesRequest_2_list) NewElement() protoreflect.Value { + v := new(StoreKVPair) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ListenStateChangesRequest_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ListenStateChangesRequest protoreflect.MessageDescriptor + fd_ListenStateChangesRequest_block_height protoreflect.FieldDescriptor + fd_ListenStateChangesRequest_change_set protoreflect.FieldDescriptor + fd_ListenStateChangesRequest_app_hash protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_ListenStateChangesRequest = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenStateChangesRequest") + fd_ListenStateChangesRequest_block_height = md_ListenStateChangesRequest.Fields().ByName("block_height") + fd_ListenStateChangesRequest_change_set = md_ListenStateChangesRequest.Fields().ByName("change_set") + fd_ListenStateChangesRequest_app_hash = md_ListenStateChangesRequest.Fields().ByName("app_hash") +} + +var _ protoreflect.Message = (*fastReflection_ListenStateChangesRequest)(nil) + +type fastReflection_ListenStateChangesRequest ListenStateChangesRequest + +func (x *ListenStateChangesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListenStateChangesRequest)(x) +} + +func (x *ListenStateChangesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ListenStateChangesRequest_messageType fastReflection_ListenStateChangesRequest_messageType +var _ protoreflect.MessageType = fastReflection_ListenStateChangesRequest_messageType{} + +type fastReflection_ListenStateChangesRequest_messageType struct{} + +func (x fastReflection_ListenStateChangesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListenStateChangesRequest)(nil) +} +func (x fastReflection_ListenStateChangesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_ListenStateChangesRequest) +} +func (x fastReflection_ListenStateChangesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListenStateChangesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListenStateChangesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_ListenStateChangesRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ListenStateChangesRequest) Type() protoreflect.MessageType { + return _fastReflection_ListenStateChangesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListenStateChangesRequest) New() protoreflect.Message { + return new(fastReflection_ListenStateChangesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListenStateChangesRequest) Interface() protoreflect.ProtoMessage { + return (*ListenStateChangesRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ListenStateChangesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BlockHeight != int64(0) { + value := protoreflect.ValueOfInt64(x.BlockHeight) + if !f(fd_ListenStateChangesRequest_block_height, value) { + return + } + } + if len(x.ChangeSet) != 0 { + value := protoreflect.ValueOfList(&_ListenStateChangesRequest_2_list{list: &x.ChangeSet}) + if !f(fd_ListenStateChangesRequest_change_set, value) { + return + } + } + if len(x.AppHash) != 0 { + value := protoreflect.ValueOfBytes(x.AppHash) + if !f(fd_ListenStateChangesRequest_app_hash, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ListenStateChangesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + return x.BlockHeight != int64(0) + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + return len(x.ChangeSet) != 0 + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + return len(x.AppHash) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenStateChangesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + x.BlockHeight = int64(0) + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + x.ChangeSet = nil + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + x.AppHash = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ListenStateChangesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + value := x.BlockHeight + return protoreflect.ValueOfInt64(value) + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + if len(x.ChangeSet) == 0 { + return protoreflect.ValueOfList(&_ListenStateChangesRequest_2_list{}) + } + listValue := &_ListenStateChangesRequest_2_list{list: &x.ChangeSet} + return protoreflect.ValueOfList(listValue) + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + value := x.AppHash + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenStateChangesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + x.BlockHeight = value.Int() + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + lv := value.List() + clv := lv.(*_ListenStateChangesRequest_2_list) + x.ChangeSet = *clv.list + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + x.AppHash = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenStateChangesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + if x.ChangeSet == nil { + x.ChangeSet = []*StoreKVPair{} + } + value := &_ListenStateChangesRequest_2_list{list: &x.ChangeSet} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + panic(fmt.Errorf("field block_height of message cosmos.streaming.v1.ListenStateChangesRequest is not mutable")) + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + panic(fmt.Errorf("field app_hash of message cosmos.streaming.v1.ListenStateChangesRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ListenStateChangesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": + list := []*StoreKVPair{} + return protoreflect.ValueOfList(&_ListenStateChangesRequest_2_list{list: &list}) + case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ListenStateChangesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenStateChangesRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ListenStateChangesRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenStateChangesRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ListenStateChangesRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ListenStateChangesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListenStateChangesRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.BlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.BlockHeight)) + } + if len(x.ChangeSet) > 0 { + for _, e := range x.ChangeSet { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.AppHash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ListenStateChangesRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.AppHash) > 0 { + i -= len(x.AppHash) + copy(dAtA[i:], x.AppHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AppHash))) + i-- + dAtA[i] = 0x1a + } + if len(x.ChangeSet) > 0 { + for iNdEx := len(x.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.ChangeSet[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if x.BlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ListenStateChangesRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenStateChangesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenStateChangesRequest: 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 BlockHeight", wireType) + } + x.BlockHeight = 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.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChangeSet = append(x.ChangeSet, &StoreKVPair{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ChangeSet[len(x.ChangeSet)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AppHash = append(x.AppHash[:0], dAtA[iNdEx:postIndex]...) + if x.AppHash == nil { + x.AppHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ListenStateChangesResponse protoreflect.MessageDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_ListenStateChangesResponse = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenStateChangesResponse") +} + +var _ protoreflect.Message = (*fastReflection_ListenStateChangesResponse)(nil) + +type fastReflection_ListenStateChangesResponse ListenStateChangesResponse + +func (x *ListenStateChangesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_ListenStateChangesResponse)(x) +} + +func (x *ListenStateChangesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ListenStateChangesResponse_messageType fastReflection_ListenStateChangesResponse_messageType +var _ protoreflect.MessageType = fastReflection_ListenStateChangesResponse_messageType{} + +type fastReflection_ListenStateChangesResponse_messageType struct{} + +func (x fastReflection_ListenStateChangesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_ListenStateChangesResponse)(nil) +} +func (x fastReflection_ListenStateChangesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_ListenStateChangesResponse) +} +func (x fastReflection_ListenStateChangesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ListenStateChangesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ListenStateChangesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_ListenStateChangesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ListenStateChangesResponse) Type() protoreflect.MessageType { + return _fastReflection_ListenStateChangesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ListenStateChangesResponse) New() protoreflect.Message { + return new(fastReflection_ListenStateChangesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ListenStateChangesResponse) Interface() protoreflect.ProtoMessage { + return (*ListenStateChangesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ListenStateChangesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ListenStateChangesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenStateChangesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ListenStateChangesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenStateChangesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenStateChangesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ListenStateChangesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ListenStateChangesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenStateChangesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ListenStateChangesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ListenStateChangesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ListenStateChangesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ListenStateChangesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ListenStateChangesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ListenStateChangesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ListenStateChangesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenStateChangesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenStateChangesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_StoreKVPair protoreflect.MessageDescriptor + fd_StoreKVPair_address protoreflect.FieldDescriptor + fd_StoreKVPair_key protoreflect.FieldDescriptor + fd_StoreKVPair_value protoreflect.FieldDescriptor + fd_StoreKVPair_delete protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_StoreKVPair = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("StoreKVPair") + fd_StoreKVPair_address = md_StoreKVPair.Fields().ByName("address") + fd_StoreKVPair_key = md_StoreKVPair.Fields().ByName("key") + fd_StoreKVPair_value = md_StoreKVPair.Fields().ByName("value") + fd_StoreKVPair_delete = md_StoreKVPair.Fields().ByName("delete") +} + +var _ protoreflect.Message = (*fastReflection_StoreKVPair)(nil) + +type fastReflection_StoreKVPair StoreKVPair + +func (x *StoreKVPair) ProtoReflect() protoreflect.Message { + return (*fastReflection_StoreKVPair)(x) +} + +func (x *StoreKVPair) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_StoreKVPair_messageType fastReflection_StoreKVPair_messageType +var _ protoreflect.MessageType = fastReflection_StoreKVPair_messageType{} + +type fastReflection_StoreKVPair_messageType struct{} + +func (x fastReflection_StoreKVPair_messageType) Zero() protoreflect.Message { + return (*fastReflection_StoreKVPair)(nil) +} +func (x fastReflection_StoreKVPair_messageType) New() protoreflect.Message { + return new(fastReflection_StoreKVPair) +} +func (x fastReflection_StoreKVPair_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_StoreKVPair +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_StoreKVPair) Descriptor() protoreflect.MessageDescriptor { + return md_StoreKVPair +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_StoreKVPair) Type() protoreflect.MessageType { + return _fastReflection_StoreKVPair_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_StoreKVPair) New() protoreflect.Message { + return new(fastReflection_StoreKVPair) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_StoreKVPair) Interface() protoreflect.ProtoMessage { + return (*StoreKVPair)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_StoreKVPair) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Address) != 0 { + value := protoreflect.ValueOfBytes(x.Address) + if !f(fd_StoreKVPair_address, value) { + return + } + } + if len(x.Key) != 0 { + value := protoreflect.ValueOfBytes(x.Key) + if !f(fd_StoreKVPair_key, value) { + return + } + } + if len(x.Value) != 0 { + value := protoreflect.ValueOfBytes(x.Value) + if !f(fd_StoreKVPair_value, value) { + return + } + } + if x.Delete != false { + value := protoreflect.ValueOfBool(x.Delete) + if !f(fd_StoreKVPair_delete, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_StoreKVPair) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + return len(x.Address) != 0 + case "cosmos.streaming.v1.StoreKVPair.key": + return len(x.Key) != 0 + case "cosmos.streaming.v1.StoreKVPair.value": + return len(x.Value) != 0 + case "cosmos.streaming.v1.StoreKVPair.delete": + return x.Delete != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_StoreKVPair) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + x.Address = nil + case "cosmos.streaming.v1.StoreKVPair.key": + x.Key = nil + case "cosmos.streaming.v1.StoreKVPair.value": + x.Value = nil + case "cosmos.streaming.v1.StoreKVPair.delete": + x.Delete = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_StoreKVPair) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + value := x.Address + return protoreflect.ValueOfBytes(value) + case "cosmos.streaming.v1.StoreKVPair.key": + value := x.Key + return protoreflect.ValueOfBytes(value) + case "cosmos.streaming.v1.StoreKVPair.value": + value := x.Value + return protoreflect.ValueOfBytes(value) + case "cosmos.streaming.v1.StoreKVPair.delete": + value := x.Delete + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_StoreKVPair) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + x.Address = value.Bytes() + case "cosmos.streaming.v1.StoreKVPair.key": + x.Key = value.Bytes() + case "cosmos.streaming.v1.StoreKVPair.value": + x.Value = value.Bytes() + case "cosmos.streaming.v1.StoreKVPair.delete": + x.Delete = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_StoreKVPair) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + panic(fmt.Errorf("field address of message cosmos.streaming.v1.StoreKVPair is not mutable")) + case "cosmos.streaming.v1.StoreKVPair.key": + panic(fmt.Errorf("field key of message cosmos.streaming.v1.StoreKVPair is not mutable")) + case "cosmos.streaming.v1.StoreKVPair.value": + panic(fmt.Errorf("field value of message cosmos.streaming.v1.StoreKVPair is not mutable")) + case "cosmos.streaming.v1.StoreKVPair.delete": + panic(fmt.Errorf("field delete of message cosmos.streaming.v1.StoreKVPair is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_StoreKVPair) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.StoreKVPair.address": + return protoreflect.ValueOfBytes(nil) + case "cosmos.streaming.v1.StoreKVPair.key": + return protoreflect.ValueOfBytes(nil) + case "cosmos.streaming.v1.StoreKVPair.value": + return protoreflect.ValueOfBytes(nil) + case "cosmos.streaming.v1.StoreKVPair.delete": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_StoreKVPair) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.StoreKVPair", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_StoreKVPair) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_StoreKVPair) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_StoreKVPair) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_StoreKVPair) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*StoreKVPair) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Key) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Value) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Delete { + n += 2 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*StoreKVPair) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Delete { + i-- + if x.Delete { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(x.Value) > 0 { + i -= len(x.Value) + copy(dAtA[i:], x.Value) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) + i-- + dAtA[i] = 0x1a + } + if len(x.Key) > 0 { + i -= len(x.Key) + copy(dAtA[i:], x.Key) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) + i-- + dAtA[i] = 0x12 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*StoreKVPair) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StoreKVPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Address = append(x.Address[:0], dAtA[iNdEx:postIndex]...) + if x.Address == nil { + x.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) + if x.Key == nil { + x.Key = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) + if x.Value == nil { + x.Value = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Delete = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_Event_2_list)(nil) + +type _Event_2_list struct { + list *[]*EventAttribute +} + +func (x *_Event_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Event_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Event_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*EventAttribute) + (*x.list)[i] = concreteValue +} + +func (x *_Event_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*EventAttribute) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Event_2_list) AppendMutable() protoreflect.Value { + v := new(EventAttribute) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Event_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Event_2_list) NewElement() protoreflect.Value { + v := new(EventAttribute) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Event_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Event protoreflect.MessageDescriptor + fd_Event_type protoreflect.FieldDescriptor + fd_Event_attributes protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_Event = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("Event") + fd_Event_type = md_Event.Fields().ByName("type") + fd_Event_attributes = md_Event.Fields().ByName("attributes") +} + +var _ protoreflect.Message = (*fastReflection_Event)(nil) + +type fastReflection_Event Event + +func (x *Event) ProtoReflect() protoreflect.Message { + return (*fastReflection_Event)(x) +} + +func (x *Event) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Event_messageType fastReflection_Event_messageType +var _ protoreflect.MessageType = fastReflection_Event_messageType{} + +type fastReflection_Event_messageType struct{} + +func (x fastReflection_Event_messageType) Zero() protoreflect.Message { + return (*fastReflection_Event)(nil) +} +func (x fastReflection_Event_messageType) New() protoreflect.Message { + return new(fastReflection_Event) +} +func (x fastReflection_Event_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Event +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Event) Descriptor() protoreflect.MessageDescriptor { + return md_Event +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Event) Type() protoreflect.MessageType { + return _fastReflection_Event_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Event) New() protoreflect.Message { + return new(fastReflection_Event) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Event) Interface() protoreflect.ProtoMessage { + return (*Event)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Event) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Type_ != "" { + value := protoreflect.ValueOfString(x.Type_) + if !f(fd_Event_type, value) { + return + } + } + if len(x.Attributes) != 0 { + value := protoreflect.ValueOfList(&_Event_2_list{list: &x.Attributes}) + if !f(fd_Event_attributes, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Event) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.Event.type": + return x.Type_ != "" + case "cosmos.streaming.v1.Event.attributes": + return len(x.Attributes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Event) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.Event.type": + x.Type_ = "" + case "cosmos.streaming.v1.Event.attributes": + x.Attributes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Event) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.Event.type": + value := x.Type_ + return protoreflect.ValueOfString(value) + case "cosmos.streaming.v1.Event.attributes": + if len(x.Attributes) == 0 { + return protoreflect.ValueOfList(&_Event_2_list{}) + } + listValue := &_Event_2_list{list: &x.Attributes} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Event) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.Event.type": + x.Type_ = value.Interface().(string) + case "cosmos.streaming.v1.Event.attributes": + lv := value.List() + clv := lv.(*_Event_2_list) + x.Attributes = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Event) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.Event.attributes": + if x.Attributes == nil { + x.Attributes = []*EventAttribute{} + } + value := &_Event_2_list{list: &x.Attributes} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.Event.type": + panic(fmt.Errorf("field type of message cosmos.streaming.v1.Event is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Event) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.Event.type": + return protoreflect.ValueOfString("") + case "cosmos.streaming.v1.Event.attributes": + list := []*EventAttribute{} + return protoreflect.ValueOfList(&_Event_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Event) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.Event", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Event) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Event) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Event) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Event) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Event) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Type_) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Attributes) > 0 { + for _, e := range x.Attributes { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Event) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Attributes) > 0 { + for iNdEx := len(x.Attributes) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Attributes[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Type_) > 0 { + i -= len(x.Type_) + copy(dAtA[i:], x.Type_) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Type_))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Event) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Type_ = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Attributes = append(x.Attributes, &EventAttribute{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Attributes[len(x.Attributes)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_EventAttribute protoreflect.MessageDescriptor + fd_EventAttribute_key protoreflect.FieldDescriptor + fd_EventAttribute_value protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_EventAttribute = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("EventAttribute") + fd_EventAttribute_key = md_EventAttribute.Fields().ByName("key") + fd_EventAttribute_value = md_EventAttribute.Fields().ByName("value") +} + +var _ protoreflect.Message = (*fastReflection_EventAttribute)(nil) + +type fastReflection_EventAttribute EventAttribute + +func (x *EventAttribute) ProtoReflect() protoreflect.Message { + return (*fastReflection_EventAttribute)(x) +} + +func (x *EventAttribute) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_EventAttribute_messageType fastReflection_EventAttribute_messageType +var _ protoreflect.MessageType = fastReflection_EventAttribute_messageType{} + +type fastReflection_EventAttribute_messageType struct{} + +func (x fastReflection_EventAttribute_messageType) Zero() protoreflect.Message { + return (*fastReflection_EventAttribute)(nil) +} +func (x fastReflection_EventAttribute_messageType) New() protoreflect.Message { + return new(fastReflection_EventAttribute) +} +func (x fastReflection_EventAttribute_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_EventAttribute +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_EventAttribute) Descriptor() protoreflect.MessageDescriptor { + return md_EventAttribute +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_EventAttribute) Type() protoreflect.MessageType { + return _fastReflection_EventAttribute_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_EventAttribute) New() protoreflect.Message { + return new(fastReflection_EventAttribute) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_EventAttribute) Interface() protoreflect.ProtoMessage { + return (*EventAttribute)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_EventAttribute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Key != "" { + value := protoreflect.ValueOfString(x.Key) + if !f(fd_EventAttribute_key, value) { + return + } + } + if x.Value != "" { + value := protoreflect.ValueOfString(x.Value) + if !f(fd_EventAttribute_value, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_EventAttribute) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + return x.Key != "" + case "cosmos.streaming.v1.EventAttribute.value": + return x.Value != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAttribute) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + x.Key = "" + case "cosmos.streaming.v1.EventAttribute.value": + x.Value = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_EventAttribute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + value := x.Key + return protoreflect.ValueOfString(value) + case "cosmos.streaming.v1.EventAttribute.value": + value := x.Value + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAttribute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + x.Key = value.Interface().(string) + case "cosmos.streaming.v1.EventAttribute.value": + x.Value = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAttribute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + panic(fmt.Errorf("field key of message cosmos.streaming.v1.EventAttribute is not mutable")) + case "cosmos.streaming.v1.EventAttribute.value": + panic(fmt.Errorf("field value of message cosmos.streaming.v1.EventAttribute is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_EventAttribute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.EventAttribute.key": + return protoreflect.ValueOfString("") + case "cosmos.streaming.v1.EventAttribute.value": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_EventAttribute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.EventAttribute", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_EventAttribute) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_EventAttribute) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_EventAttribute) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_EventAttribute) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*EventAttribute) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Key) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Value) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*EventAttribute) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Value) > 0 { + i -= len(x.Value) + copy(dAtA[i:], x.Value) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) + i-- + dAtA[i] = 0x12 + } + if len(x.Key) > 0 { + i -= len(x.Key) + copy(dAtA[i:], x.Key) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*EventAttribute) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAttribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ExecTxResult_7_list)(nil) + +type _ExecTxResult_7_list struct { + list *[]*Event +} + +func (x *_ExecTxResult_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ExecTxResult_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ExecTxResult_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Event) + (*x.list)[i] = concreteValue +} + +func (x *_ExecTxResult_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Event) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ExecTxResult_7_list) AppendMutable() protoreflect.Value { + v := new(Event) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ExecTxResult_7_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ExecTxResult_7_list) NewElement() protoreflect.Value { + v := new(Event) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ExecTxResult_7_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ExecTxResult protoreflect.MessageDescriptor + fd_ExecTxResult_code protoreflect.FieldDescriptor + fd_ExecTxResult_data protoreflect.FieldDescriptor + fd_ExecTxResult_log protoreflect.FieldDescriptor + fd_ExecTxResult_info protoreflect.FieldDescriptor + fd_ExecTxResult_gas_wanted protoreflect.FieldDescriptor + fd_ExecTxResult_gas_used protoreflect.FieldDescriptor + fd_ExecTxResult_events protoreflect.FieldDescriptor + fd_ExecTxResult_codespace protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_streaming_v1_grpc_proto_init() + md_ExecTxResult = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ExecTxResult") + fd_ExecTxResult_code = md_ExecTxResult.Fields().ByName("code") + fd_ExecTxResult_data = md_ExecTxResult.Fields().ByName("data") + fd_ExecTxResult_log = md_ExecTxResult.Fields().ByName("log") + fd_ExecTxResult_info = md_ExecTxResult.Fields().ByName("info") + fd_ExecTxResult_gas_wanted = md_ExecTxResult.Fields().ByName("gas_wanted") + fd_ExecTxResult_gas_used = md_ExecTxResult.Fields().ByName("gas_used") + fd_ExecTxResult_events = md_ExecTxResult.Fields().ByName("events") + fd_ExecTxResult_codespace = md_ExecTxResult.Fields().ByName("codespace") +} + +var _ protoreflect.Message = (*fastReflection_ExecTxResult)(nil) + +type fastReflection_ExecTxResult ExecTxResult + +func (x *ExecTxResult) ProtoReflect() protoreflect.Message { + return (*fastReflection_ExecTxResult)(x) +} + +func (x *ExecTxResult) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ExecTxResult_messageType fastReflection_ExecTxResult_messageType +var _ protoreflect.MessageType = fastReflection_ExecTxResult_messageType{} + +type fastReflection_ExecTxResult_messageType struct{} + +func (x fastReflection_ExecTxResult_messageType) Zero() protoreflect.Message { + return (*fastReflection_ExecTxResult)(nil) +} +func (x fastReflection_ExecTxResult_messageType) New() protoreflect.Message { + return new(fastReflection_ExecTxResult) +} +func (x fastReflection_ExecTxResult_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ExecTxResult +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ExecTxResult) Descriptor() protoreflect.MessageDescriptor { + return md_ExecTxResult +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ExecTxResult) Type() protoreflect.MessageType { + return _fastReflection_ExecTxResult_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ExecTxResult) New() protoreflect.Message { + return new(fastReflection_ExecTxResult) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ExecTxResult) Interface() protoreflect.ProtoMessage { + return (*ExecTxResult)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ExecTxResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Code != uint32(0) { + value := protoreflect.ValueOfUint32(x.Code) + if !f(fd_ExecTxResult_code, value) { + return + } + } + if len(x.Data) != 0 { + value := protoreflect.ValueOfBytes(x.Data) + if !f(fd_ExecTxResult_data, value) { + return + } + } + if x.Log != "" { + value := protoreflect.ValueOfString(x.Log) + if !f(fd_ExecTxResult_log, value) { + return + } + } + if x.Info != "" { + value := protoreflect.ValueOfString(x.Info) + if !f(fd_ExecTxResult_info, value) { + return + } + } + if x.GasWanted != int64(0) { + value := protoreflect.ValueOfInt64(x.GasWanted) + if !f(fd_ExecTxResult_gas_wanted, value) { + return + } + } + if x.GasUsed != int64(0) { + value := protoreflect.ValueOfInt64(x.GasUsed) + if !f(fd_ExecTxResult_gas_used, value) { + return + } + } + if len(x.Events) != 0 { + value := protoreflect.ValueOfList(&_ExecTxResult_7_list{list: &x.Events}) + if !f(fd_ExecTxResult_events, value) { + return + } + } + if x.Codespace != "" { + value := protoreflect.ValueOfString(x.Codespace) + if !f(fd_ExecTxResult_codespace, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ExecTxResult) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.streaming.v1.ExecTxResult.code": + return x.Code != uint32(0) + case "cosmos.streaming.v1.ExecTxResult.data": + return len(x.Data) != 0 + case "cosmos.streaming.v1.ExecTxResult.log": + return x.Log != "" + case "cosmos.streaming.v1.ExecTxResult.info": + return x.Info != "" + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + return x.GasWanted != int64(0) + case "cosmos.streaming.v1.ExecTxResult.gas_used": + return x.GasUsed != int64(0) + case "cosmos.streaming.v1.ExecTxResult.events": + return len(x.Events) != 0 + case "cosmos.streaming.v1.ExecTxResult.codespace": + return x.Codespace != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExecTxResult) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.streaming.v1.ExecTxResult.code": + x.Code = uint32(0) + case "cosmos.streaming.v1.ExecTxResult.data": + x.Data = nil + case "cosmos.streaming.v1.ExecTxResult.log": + x.Log = "" + case "cosmos.streaming.v1.ExecTxResult.info": + x.Info = "" + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + x.GasWanted = int64(0) + case "cosmos.streaming.v1.ExecTxResult.gas_used": + x.GasUsed = int64(0) + case "cosmos.streaming.v1.ExecTxResult.events": + x.Events = nil + case "cosmos.streaming.v1.ExecTxResult.codespace": + x.Codespace = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ExecTxResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.streaming.v1.ExecTxResult.code": + value := x.Code + return protoreflect.ValueOfUint32(value) + case "cosmos.streaming.v1.ExecTxResult.data": + value := x.Data + return protoreflect.ValueOfBytes(value) + case "cosmos.streaming.v1.ExecTxResult.log": + value := x.Log + return protoreflect.ValueOfString(value) + case "cosmos.streaming.v1.ExecTxResult.info": + value := x.Info + return protoreflect.ValueOfString(value) + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + value := x.GasWanted + return protoreflect.ValueOfInt64(value) + case "cosmos.streaming.v1.ExecTxResult.gas_used": + value := x.GasUsed + return protoreflect.ValueOfInt64(value) + case "cosmos.streaming.v1.ExecTxResult.events": + if len(x.Events) == 0 { + return protoreflect.ValueOfList(&_ExecTxResult_7_list{}) + } + listValue := &_ExecTxResult_7_list{list: &x.Events} + return protoreflect.ValueOfList(listValue) + case "cosmos.streaming.v1.ExecTxResult.codespace": + value := x.Codespace + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExecTxResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.streaming.v1.ExecTxResult.code": + x.Code = uint32(value.Uint()) + case "cosmos.streaming.v1.ExecTxResult.data": + x.Data = value.Bytes() + case "cosmos.streaming.v1.ExecTxResult.log": + x.Log = value.Interface().(string) + case "cosmos.streaming.v1.ExecTxResult.info": + x.Info = value.Interface().(string) + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + x.GasWanted = value.Int() + case "cosmos.streaming.v1.ExecTxResult.gas_used": + x.GasUsed = value.Int() + case "cosmos.streaming.v1.ExecTxResult.events": + lv := value.List() + clv := lv.(*_ExecTxResult_7_list) + x.Events = *clv.list + case "cosmos.streaming.v1.ExecTxResult.codespace": + x.Codespace = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExecTxResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ExecTxResult.events": + if x.Events == nil { + x.Events = []*Event{} + } + value := &_ExecTxResult_7_list{list: &x.Events} + return protoreflect.ValueOfList(value) + case "cosmos.streaming.v1.ExecTxResult.code": + panic(fmt.Errorf("field code of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.data": + panic(fmt.Errorf("field data of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.log": + panic(fmt.Errorf("field log of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.info": + panic(fmt.Errorf("field info of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + panic(fmt.Errorf("field gas_wanted of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.gas_used": + panic(fmt.Errorf("field gas_used of message cosmos.streaming.v1.ExecTxResult is not mutable")) + case "cosmos.streaming.v1.ExecTxResult.codespace": + panic(fmt.Errorf("field codespace of message cosmos.streaming.v1.ExecTxResult is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ExecTxResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.streaming.v1.ExecTxResult.code": + return protoreflect.ValueOfUint32(uint32(0)) + case "cosmos.streaming.v1.ExecTxResult.data": + return protoreflect.ValueOfBytes(nil) + case "cosmos.streaming.v1.ExecTxResult.log": + return protoreflect.ValueOfString("") + case "cosmos.streaming.v1.ExecTxResult.info": + return protoreflect.ValueOfString("") + case "cosmos.streaming.v1.ExecTxResult.gas_wanted": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.streaming.v1.ExecTxResult.gas_used": + return protoreflect.ValueOfInt64(int64(0)) + case "cosmos.streaming.v1.ExecTxResult.events": + list := []*Event{} + return protoreflect.ValueOfList(&_ExecTxResult_7_list{list: &list}) + case "cosmos.streaming.v1.ExecTxResult.codespace": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) + } + panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ExecTxResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ExecTxResult", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ExecTxResult) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExecTxResult) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ExecTxResult) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ExecTxResult) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ExecTxResult) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Code != 0 { + n += 1 + runtime.Sov(uint64(x.Code)) + } + l = len(x.Data) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Log) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Info) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.GasWanted != 0 { + n += 1 + runtime.Sov(uint64(x.GasWanted)) + } + if x.GasUsed != 0 { + n += 1 + runtime.Sov(uint64(x.GasUsed)) + } + if len(x.Events) > 0 { + for _, e := range x.Events { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Codespace) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ExecTxResult) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Codespace) > 0 { + i -= len(x.Codespace) + copy(dAtA[i:], x.Codespace) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Codespace))) + i-- + dAtA[i] = 0x42 + } + if len(x.Events) > 0 { + for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Events[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } + } + if x.GasUsed != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GasUsed)) + i-- + dAtA[i] = 0x30 + } + if x.GasWanted != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GasWanted)) + i-- + dAtA[i] = 0x28 + } + if len(x.Info) > 0 { + i -= len(x.Info) + copy(dAtA[i:], x.Info) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) + i-- + dAtA[i] = 0x22 + } + if len(x.Log) > 0 { + i -= len(x.Log) + copy(dAtA[i:], x.Log) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Log))) + i-- + dAtA[i] = 0x1a + } + if len(x.Data) > 0 { + i -= len(x.Data) + copy(dAtA[i:], x.Data) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) + i-- + dAtA[i] = 0x12 + } + if x.Code != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ExecTxResult) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExecTxResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExecTxResult: 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 Code", wireType) + } + x.Code = 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.Code |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) + if x.Data == nil { + x.Data = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Log = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Info = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) + } + x.GasWanted = 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.GasWanted |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + x.GasUsed = 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.GasUsed |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Events = append(x.Events, &Event{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Codespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/streaming/v1/grpc.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// ListenDeliverBlockRequest is the request type for the ListenDeliverBlock RPC method +type ListenDeliverBlockRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` + Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` + TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` +} + +func (x *ListenDeliverBlockRequest) Reset() { + *x = ListenDeliverBlockRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenDeliverBlockRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenDeliverBlockRequest) ProtoMessage() {} + +// Deprecated: Use ListenDeliverBlockRequest.ProtoReflect.Descriptor instead. +func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{0} +} + +func (x *ListenDeliverBlockRequest) GetBlockHeight() int64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (x *ListenDeliverBlockRequest) GetTxs() [][]byte { + if x != nil { + return x.Txs + } + return nil +} + +func (x *ListenDeliverBlockRequest) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +func (x *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult { + if x != nil { + return x.TxResults + } + return nil +} + +// ListenDeliverBlockResponse is the response type for the ListenDeliverBlock RPC method +type ListenDeliverBlockResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListenDeliverBlockResponse) Reset() { + *x = ListenDeliverBlockResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenDeliverBlockResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenDeliverBlockResponse) ProtoMessage() {} + +// Deprecated: Use ListenDeliverBlockResponse.ProtoReflect.Descriptor instead. +func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{1} +} + +// ListenStateChangesRequest is the request type for the ListenStateChanges RPC method +type ListenStateChangesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + ChangeSet []*StoreKVPair `protobuf:"bytes,2,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` + AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` +} + +func (x *ListenStateChangesRequest) Reset() { + *x = ListenStateChangesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenStateChangesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenStateChangesRequest) ProtoMessage() {} + +// Deprecated: Use ListenStateChangesRequest.ProtoReflect.Descriptor instead. +func (*ListenStateChangesRequest) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{2} +} + +func (x *ListenStateChangesRequest) GetBlockHeight() int64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (x *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair { + if x != nil { + return x.ChangeSet + } + return nil +} + +func (x *ListenStateChangesRequest) GetAppHash() []byte { + if x != nil { + return x.AppHash + } + return nil +} + +// ListenStateChangesResponse is the response type for the ListenStateChanges RPC method +type ListenStateChangesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListenStateChangesResponse) Reset() { + *x = ListenStateChangesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListenStateChangesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListenStateChangesResponse) ProtoMessage() {} + +// Deprecated: Use ListenStateChangesResponse.ProtoReflect.Descriptor instead. +func (*ListenStateChangesResponse) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{3} +} + +// StoreKVPair is a single key-value pair, associated with a store. +type StoreKVPair struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // address defines the address of the account the state changes are coming from. + // In case of modules you can expect a stringified + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // key defines the key of the address that changed. + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // value defines the value that changed, empty in case of removal. + Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + // delete defines if the key was removed. + Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"` // true indicates a delete operation, false indicates a set operation +} + +func (x *StoreKVPair) Reset() { + *x = StoreKVPair{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StoreKVPair) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StoreKVPair) ProtoMessage() {} + +// Deprecated: Use StoreKVPair.ProtoReflect.Descriptor instead. +func (*StoreKVPair) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{4} +} + +func (x *StoreKVPair) GetAddress() []byte { + if x != nil { + return x.Address + } + return nil +} + +func (x *StoreKVPair) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *StoreKVPair) GetValue() []byte { + if x != nil { + return x.Value + } + return nil +} + +func (x *StoreKVPair) GetDelete() bool { + if x != nil { + return x.Delete + } + return false +} + +// Event is a single event, associated with a transaction. +type Event struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type_ string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (x *Event) Reset() { + *x = Event{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Event) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Event) ProtoMessage() {} + +// Deprecated: Use Event.ProtoReflect.Descriptor instead. +func (*Event) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{5} +} + +func (x *Event) GetType_() string { + if x != nil { + return x.Type_ + } + return "" +} + +func (x *Event) GetAttributes() []*EventAttribute { + if x != nil { + return x.Attributes + } + return nil +} + +// EventAttribute is a single key-value pair, associated with an event. +type EventAttribute struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *EventAttribute) Reset() { + *x = EventAttribute{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *EventAttribute) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EventAttribute) ProtoMessage() {} + +// Deprecated: Use EventAttribute.ProtoReflect.Descriptor instead. +func (*EventAttribute) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{6} +} + +func (x *EventAttribute) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *EventAttribute) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + +// ExecTxResult contains results of executing one individual transaction. +type ExecTxResult struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` + GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` + GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` + Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` +} + +func (x *ExecTxResult) Reset() { + *x = ExecTxResult{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExecTxResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExecTxResult) ProtoMessage() {} + +// Deprecated: Use ExecTxResult.ProtoReflect.Descriptor instead. +func (*ExecTxResult) Descriptor() ([]byte, []int) { + return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{7} +} + +func (x *ExecTxResult) GetCode() uint32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ExecTxResult) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *ExecTxResult) GetLog() string { + if x != nil { + return x.Log + } + return "" +} + +func (x *ExecTxResult) GetInfo() string { + if x != nil { + return x.Info + } + return "" +} + +func (x *ExecTxResult) GetGasWanted() int64 { + if x != nil { + return x.GasWanted + } + return 0 +} + +func (x *ExecTxResult) GetGasUsed() int64 { + if x != nil { + return x.GasUsed + } + return 0 +} + +func (x *ExecTxResult) GetEvents() []*Event { + if x != nil { + return x.Events + } + return nil +} + +func (x *ExecTxResult) GetCodespace() string { + if x != nil { + return x.Codespace + } + return "" +} + +var File_cosmos_streaming_v1_grpc_proto protoreflect.FileDescriptor + +var file_cosmos_streaming_v1_grpc_proto_rawDesc = []byte{ + 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x22, 0xc6, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, + 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0a, + 0x74, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x54, 0x78, 0x52, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x52, 0x09, 0x74, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x1c, + 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, 0x01, 0x0a, + 0x19, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3f, 0x0a, + 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x56, 0x50, + 0x61, 0x69, 0x72, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x12, 0x19, + 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0x1c, 0x0a, 0x1a, 0x4c, 0x69, 0x73, + 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x65, + 0x4b, 0x56, 0x50, 0x61, 0x69, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x22, 0x60, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, + 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x22, 0x38, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe8, 0x01, 0x0a, + 0x0c, 0x45, 0x78, 0x65, 0x63, 0x54, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, + 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x67, + 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x67, 0x61, 0x73, 0x57, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, + 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x61, + 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, + 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x32, 0xff, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, + 0x65, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x12, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, + 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, + 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x75, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc4, 0x01, 0x0a, 0x17, 0x63, 0x6f, + 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x47, 0x72, 0x70, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, + 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_streaming_v1_grpc_proto_rawDescOnce sync.Once + file_cosmos_streaming_v1_grpc_proto_rawDescData = file_cosmos_streaming_v1_grpc_proto_rawDesc +) + +func file_cosmos_streaming_v1_grpc_proto_rawDescGZIP() []byte { + file_cosmos_streaming_v1_grpc_proto_rawDescOnce.Do(func() { + file_cosmos_streaming_v1_grpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_streaming_v1_grpc_proto_rawDescData) + }) + return file_cosmos_streaming_v1_grpc_proto_rawDescData +} + +var file_cosmos_streaming_v1_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_cosmos_streaming_v1_grpc_proto_goTypes = []interface{}{ + (*ListenDeliverBlockRequest)(nil), // 0: cosmos.streaming.v1.ListenDeliverBlockRequest + (*ListenDeliverBlockResponse)(nil), // 1: cosmos.streaming.v1.ListenDeliverBlockResponse + (*ListenStateChangesRequest)(nil), // 2: cosmos.streaming.v1.ListenStateChangesRequest + (*ListenStateChangesResponse)(nil), // 3: cosmos.streaming.v1.ListenStateChangesResponse + (*StoreKVPair)(nil), // 4: cosmos.streaming.v1.StoreKVPair + (*Event)(nil), // 5: cosmos.streaming.v1.Event + (*EventAttribute)(nil), // 6: cosmos.streaming.v1.EventAttribute + (*ExecTxResult)(nil), // 7: cosmos.streaming.v1.ExecTxResult +} +var file_cosmos_streaming_v1_grpc_proto_depIdxs = []int32{ + 5, // 0: cosmos.streaming.v1.ListenDeliverBlockRequest.events:type_name -> cosmos.streaming.v1.Event + 7, // 1: cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results:type_name -> cosmos.streaming.v1.ExecTxResult + 4, // 2: cosmos.streaming.v1.ListenStateChangesRequest.change_set:type_name -> cosmos.streaming.v1.StoreKVPair + 6, // 3: cosmos.streaming.v1.Event.attributes:type_name -> cosmos.streaming.v1.EventAttribute + 5, // 4: cosmos.streaming.v1.ExecTxResult.events:type_name -> cosmos.streaming.v1.Event + 0, // 5: cosmos.streaming.v1.ListenerService.ListenDeliverBlock:input_type -> cosmos.streaming.v1.ListenDeliverBlockRequest + 2, // 6: cosmos.streaming.v1.ListenerService.ListenStateChanges:input_type -> cosmos.streaming.v1.ListenStateChangesRequest + 1, // 7: cosmos.streaming.v1.ListenerService.ListenDeliverBlock:output_type -> cosmos.streaming.v1.ListenDeliverBlockResponse + 3, // 8: cosmos.streaming.v1.ListenerService.ListenStateChanges:output_type -> cosmos.streaming.v1.ListenStateChangesResponse + 7, // [7:9] is the sub-list for method output_type + 5, // [5:7] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name +} + +func init() { file_cosmos_streaming_v1_grpc_proto_init() } +func file_cosmos_streaming_v1_grpc_proto_init() { + if File_cosmos_streaming_v1_grpc_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_streaming_v1_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenDeliverBlockRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenDeliverBlockResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenStateChangesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListenStateChangesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StoreKVPair); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Event); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EventAttribute); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_streaming_v1_grpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExecTxResult); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_cosmos_streaming_v1_grpc_proto_rawDesc, + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_streaming_v1_grpc_proto_goTypes, + DependencyIndexes: file_cosmos_streaming_v1_grpc_proto_depIdxs, + MessageInfos: file_cosmos_streaming_v1_grpc_proto_msgTypes, + }.Build() + File_cosmos_streaming_v1_grpc_proto = out.File + file_cosmos_streaming_v1_grpc_proto_rawDesc = nil + file_cosmos_streaming_v1_grpc_proto_goTypes = nil + file_cosmos_streaming_v1_grpc_proto_depIdxs = nil +} diff --git a/api/cosmos/streaming/v1/grpc_grpc.pb.go b/api/cosmos/streaming/v1/grpc_grpc.pb.go new file mode 100644 index 000000000000..fad0b3a72eee --- /dev/null +++ b/api/cosmos/streaming/v1/grpc_grpc.pb.go @@ -0,0 +1,150 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: cosmos/streaming/v1/grpc.proto + +package streamingv1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ListenerService_ListenDeliverBlock_FullMethodName = "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock" + ListenerService_ListenStateChanges_FullMethodName = "/cosmos.streaming.v1.ListenerService/ListenStateChanges" +) + +// ListenerServiceClient is the client API for ListenerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ListenerServiceClient interface { + // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock + ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) + // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges + ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) +} + +type listenerServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewListenerServiceClient(cc grpc.ClientConnInterface) ListenerServiceClient { + return &listenerServiceClient{cc} +} + +func (c *listenerServiceClient) ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) { + out := new(ListenDeliverBlockResponse) + err := c.cc.Invoke(ctx, ListenerService_ListenDeliverBlock_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *listenerServiceClient) ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) { + out := new(ListenStateChangesResponse) + err := c.cc.Invoke(ctx, ListenerService_ListenStateChanges_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ListenerServiceServer is the server API for ListenerService service. +// All implementations must embed UnimplementedListenerServiceServer +// for forward compatibility +type ListenerServiceServer interface { + // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock + ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) + // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges + ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) + mustEmbedUnimplementedListenerServiceServer() +} + +// UnimplementedListenerServiceServer must be embedded to have forward compatible implementations. +type UnimplementedListenerServiceServer struct { +} + +func (UnimplementedListenerServiceServer) ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenDeliverBlock not implemented") +} +func (UnimplementedListenerServiceServer) ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenStateChanges not implemented") +} +func (UnimplementedListenerServiceServer) mustEmbedUnimplementedListenerServiceServer() {} + +// UnsafeListenerServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ListenerServiceServer will +// result in compilation errors. +type UnsafeListenerServiceServer interface { + mustEmbedUnimplementedListenerServiceServer() +} + +func RegisterListenerServiceServer(s grpc.ServiceRegistrar, srv ListenerServiceServer) { + s.RegisterService(&ListenerService_ServiceDesc, srv) +} + +func _ListenerService_ListenDeliverBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenDeliverBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ListenerService_ListenDeliverBlock_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, req.(*ListenDeliverBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ListenerService_ListenStateChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenStateChangesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerServiceServer).ListenStateChanges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ListenerService_ListenStateChanges_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerServiceServer).ListenStateChanges(ctx, req.(*ListenStateChangesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ListenerService_ServiceDesc is the grpc.ServiceDesc for ListenerService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ListenerService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.streaming.v1.ListenerService", + HandlerType: (*ListenerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListenDeliverBlock", + Handler: _ListenerService_ListenDeliverBlock_Handler, + }, + { + MethodName: "ListenStateChanges", + Handler: _ListenerService_ListenStateChanges_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/streaming/v1/grpc.proto", +} diff --git a/cosmossdk.io/server/v2/streaming/grpc.pb.go b/cosmossdk.io/server/v2/streaming/grpc.pb.go new file mode 100644 index 000000000000..4d2d15149c89 --- /dev/null +++ b/cosmossdk.io/server/v2/streaming/grpc.pb.go @@ -0,0 +1,2414 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/streaming/v1/grpc.proto + +package streaming + +import ( + context "context" + fmt "fmt" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ListenDeliverBlockRequest is the request type for the ListenDeliverBlock RPC method +type ListenDeliverBlockRequest struct { + BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` + Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` + TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` +} + +func (m *ListenDeliverBlockRequest) Reset() { *m = ListenDeliverBlockRequest{} } +func (m *ListenDeliverBlockRequest) String() string { return proto.CompactTextString(m) } +func (*ListenDeliverBlockRequest) ProtoMessage() {} +func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{0} +} +func (m *ListenDeliverBlockRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenDeliverBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenDeliverBlockRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListenDeliverBlockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenDeliverBlockRequest.Merge(m, src) +} +func (m *ListenDeliverBlockRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenDeliverBlockRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenDeliverBlockRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenDeliverBlockRequest proto.InternalMessageInfo + +func (m *ListenDeliverBlockRequest) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *ListenDeliverBlockRequest) GetTxs() [][]byte { + if m != nil { + return m.Txs + } + return nil +} + +func (m *ListenDeliverBlockRequest) GetEvents() []*Event { + if m != nil { + return m.Events + } + return nil +} + +func (m *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult { + if m != nil { + return m.TxResults + } + return nil +} + +// ListenDeliverBlockResponse is the response type for the ListenDeliverBlock RPC method +type ListenDeliverBlockResponse struct { +} + +func (m *ListenDeliverBlockResponse) Reset() { *m = ListenDeliverBlockResponse{} } +func (m *ListenDeliverBlockResponse) String() string { return proto.CompactTextString(m) } +func (*ListenDeliverBlockResponse) ProtoMessage() {} +func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{1} +} +func (m *ListenDeliverBlockResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenDeliverBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenDeliverBlockResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListenDeliverBlockResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenDeliverBlockResponse.Merge(m, src) +} +func (m *ListenDeliverBlockResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenDeliverBlockResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenDeliverBlockResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenDeliverBlockResponse proto.InternalMessageInfo + +// ListenStateChangesRequest is the request type for the ListenStateChanges RPC method +type ListenStateChangesRequest struct { + BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + ChangeSet []*StoreKVPair `protobuf:"bytes,2,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` + AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` +} + +func (m *ListenStateChangesRequest) Reset() { *m = ListenStateChangesRequest{} } +func (m *ListenStateChangesRequest) String() string { return proto.CompactTextString(m) } +func (*ListenStateChangesRequest) ProtoMessage() {} +func (*ListenStateChangesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{2} +} +func (m *ListenStateChangesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenStateChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenStateChangesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListenStateChangesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenStateChangesRequest.Merge(m, src) +} +func (m *ListenStateChangesRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenStateChangesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenStateChangesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenStateChangesRequest proto.InternalMessageInfo + +func (m *ListenStateChangesRequest) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair { + if m != nil { + return m.ChangeSet + } + return nil +} + +func (m *ListenStateChangesRequest) GetAppHash() []byte { + if m != nil { + return m.AppHash + } + return nil +} + +// ListenStateChangesResponse is the response type for the ListenStateChanges RPC method +type ListenStateChangesResponse struct { +} + +func (m *ListenStateChangesResponse) Reset() { *m = ListenStateChangesResponse{} } +func (m *ListenStateChangesResponse) String() string { return proto.CompactTextString(m) } +func (*ListenStateChangesResponse) ProtoMessage() {} +func (*ListenStateChangesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{3} +} +func (m *ListenStateChangesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenStateChangesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenStateChangesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListenStateChangesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenStateChangesResponse.Merge(m, src) +} +func (m *ListenStateChangesResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenStateChangesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenStateChangesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenStateChangesResponse proto.InternalMessageInfo + +// StoreKVPair is a single key-value pair, associated with a store. +type StoreKVPair struct { + // address defines the address of the account the state changes are coming from. + // In case of modules you can expect a stringified + Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // key defines the key of the address that changed. + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + // value defines the value that changed, empty in case of removal. + Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` + // delete defines if the key was removed. + Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"` +} + +func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } +func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } +func (*StoreKVPair) ProtoMessage() {} +func (*StoreKVPair) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{4} +} +func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoreKVPair.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StoreKVPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoreKVPair.Merge(m, src) +} +func (m *StoreKVPair) XXX_Size() int { + return m.Size() +} +func (m *StoreKVPair) XXX_DiscardUnknown() { + xxx_messageInfo_StoreKVPair.DiscardUnknown(m) +} + +var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo + +func (m *StoreKVPair) GetAddress() []byte { + if m != nil { + return m.Address + } + return nil +} + +func (m *StoreKVPair) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *StoreKVPair) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *StoreKVPair) GetDelete() bool { + if m != nil { + return m.Delete + } + return false +} + +// Event is a single event, associated with a transaction. +type Event struct { + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` +} + +func (m *Event) Reset() { *m = Event{} } +func (m *Event) String() string { return proto.CompactTextString(m) } +func (*Event) ProtoMessage() {} +func (*Event) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{5} +} +func (m *Event) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Event.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Event) XXX_Merge(src proto.Message) { + xxx_messageInfo_Event.Merge(m, src) +} +func (m *Event) XXX_Size() int { + return m.Size() +} +func (m *Event) XXX_DiscardUnknown() { + xxx_messageInfo_Event.DiscardUnknown(m) +} + +var xxx_messageInfo_Event proto.InternalMessageInfo + +func (m *Event) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Event) GetAttributes() []*EventAttribute { + if m != nil { + return m.Attributes + } + return nil +} + +// EventAttribute is a single key-value pair, associated with an event. +type EventAttribute struct { + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *EventAttribute) Reset() { *m = EventAttribute{} } +func (m *EventAttribute) String() string { return proto.CompactTextString(m) } +func (*EventAttribute) ProtoMessage() {} +func (*EventAttribute) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{6} +} +func (m *EventAttribute) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EventAttribute.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EventAttribute) XXX_Merge(src proto.Message) { + xxx_messageInfo_EventAttribute.Merge(m, src) +} +func (m *EventAttribute) XXX_Size() int { + return m.Size() +} +func (m *EventAttribute) XXX_DiscardUnknown() { + xxx_messageInfo_EventAttribute.DiscardUnknown(m) +} + +var xxx_messageInfo_EventAttribute proto.InternalMessageInfo + +func (m *EventAttribute) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *EventAttribute) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// ExecTxResult contains results of executing one individual transaction. +type ExecTxResult struct { + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` + Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` + GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` + GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` + Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` + Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` +} + +func (m *ExecTxResult) Reset() { *m = ExecTxResult{} } +func (m *ExecTxResult) String() string { return proto.CompactTextString(m) } +func (*ExecTxResult) ProtoMessage() {} +func (*ExecTxResult) Descriptor() ([]byte, []int) { + return fileDescriptor_3fc151d30622bb2a, []int{7} +} +func (m *ExecTxResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExecTxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExecTxResult.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExecTxResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecTxResult.Merge(m, src) +} +func (m *ExecTxResult) XXX_Size() int { + return m.Size() +} +func (m *ExecTxResult) XXX_DiscardUnknown() { + xxx_messageInfo_ExecTxResult.DiscardUnknown(m) +} + +var xxx_messageInfo_ExecTxResult proto.InternalMessageInfo + +func (m *ExecTxResult) GetCode() uint32 { + if m != nil { + return m.Code + } + return 0 +} + +func (m *ExecTxResult) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *ExecTxResult) GetLog() string { + if m != nil { + return m.Log + } + return "" +} + +func (m *ExecTxResult) GetInfo() string { + if m != nil { + return m.Info + } + return "" +} + +func (m *ExecTxResult) GetGasWanted() int64 { + if m != nil { + return m.GasWanted + } + return 0 +} + +func (m *ExecTxResult) GetGasUsed() int64 { + if m != nil { + return m.GasUsed + } + return 0 +} + +func (m *ExecTxResult) GetEvents() []*Event { + if m != nil { + return m.Events + } + return nil +} + +func (m *ExecTxResult) GetCodespace() string { + if m != nil { + return m.Codespace + } + return "" +} + +func init() { + proto.RegisterType((*ListenDeliverBlockRequest)(nil), "cosmos.streaming.v1.ListenDeliverBlockRequest") + proto.RegisterType((*ListenDeliverBlockResponse)(nil), "cosmos.streaming.v1.ListenDeliverBlockResponse") + proto.RegisterType((*ListenStateChangesRequest)(nil), "cosmos.streaming.v1.ListenStateChangesRequest") + proto.RegisterType((*ListenStateChangesResponse)(nil), "cosmos.streaming.v1.ListenStateChangesResponse") + proto.RegisterType((*StoreKVPair)(nil), "cosmos.streaming.v1.StoreKVPair") + proto.RegisterType((*Event)(nil), "cosmos.streaming.v1.Event") + proto.RegisterType((*EventAttribute)(nil), "cosmos.streaming.v1.EventAttribute") + proto.RegisterType((*ExecTxResult)(nil), "cosmos.streaming.v1.ExecTxResult") +} + +func init() { proto.RegisterFile("cosmos/streaming/v1/grpc.proto", fileDescriptor_3fc151d30622bb2a) } + +var fileDescriptor_3fc151d30622bb2a = []byte{ + // 599 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x40, + 0x10, 0xae, 0x9b, 0x36, 0xa9, 0x27, 0xe1, 0x47, 0x0b, 0x42, 0x6e, 0x55, 0x2c, 0x37, 0x5c, 0x72, + 0x72, 0xd4, 0x70, 0x41, 0x5c, 0x80, 0x16, 0xa4, 0x4a, 0x70, 0x40, 0x1b, 0x7e, 0x24, 0x2e, 0x61, + 0x6b, 0x0f, 0x8e, 0x55, 0xd7, 0x36, 0x3b, 0x6b, 0x93, 0xbe, 0x05, 0x67, 0x1e, 0x08, 0x71, 0xec, + 0x91, 0x23, 0x6a, 0x2f, 0xbc, 0x05, 0x68, 0xd7, 0x6e, 0x93, 0x0a, 0xb7, 0x2a, 0xb7, 0x6f, 0x7e, + 0xbf, 0x6f, 0x3c, 0xe3, 0x05, 0x37, 0xc8, 0xe8, 0x30, 0xa3, 0x21, 0x29, 0x89, 0xe2, 0x30, 0x4e, + 0xa3, 0x61, 0xb9, 0x3d, 0x8c, 0x64, 0x1e, 0xf8, 0xb9, 0xcc, 0x54, 0xc6, 0xee, 0x54, 0x71, 0xff, + 0x3c, 0xee, 0x97, 0xdb, 0xfd, 0xef, 0x16, 0xac, 0xbf, 0x8a, 0x49, 0x61, 0xfa, 0x1c, 0x93, 0xb8, + 0x44, 0xb9, 0x93, 0x64, 0xc1, 0x01, 0xc7, 0xcf, 0x05, 0x92, 0x62, 0x5b, 0xd0, 0xdb, 0xd7, 0xf6, + 0x64, 0x8a, 0x71, 0x34, 0x55, 0x8e, 0xe5, 0x59, 0x83, 0x16, 0xef, 0x1a, 0xdf, 0x9e, 0x71, 0xb1, + 0xdb, 0xd0, 0x52, 0x33, 0x72, 0x96, 0xbd, 0xd6, 0xa0, 0xc7, 0x35, 0x64, 0x23, 0x68, 0x63, 0x89, + 0xa9, 0x22, 0xa7, 0xe5, 0xb5, 0x06, 0xdd, 0xd1, 0x86, 0xdf, 0x40, 0xec, 0xbf, 0xd0, 0x29, 0xbc, + 0xce, 0x64, 0x4f, 0x01, 0xd4, 0x6c, 0x22, 0x91, 0x8a, 0x44, 0x91, 0xb3, 0x62, 0xea, 0xb6, 0x9a, + 0xeb, 0x66, 0x18, 0xbc, 0x99, 0x71, 0x93, 0xc9, 0x6d, 0x55, 0x23, 0xea, 0x6f, 0xc2, 0x46, 0xd3, + 0x1c, 0x94, 0x67, 0x29, 0x61, 0xff, 0xdb, 0xf9, 0x98, 0x63, 0x25, 0x14, 0xee, 0x4e, 0x45, 0x1a, + 0x21, 0xfd, 0xc7, 0x98, 0x4f, 0x00, 0x02, 0x53, 0x34, 0x21, 0x54, 0x66, 0xda, 0xee, 0xc8, 0x6b, + 0x14, 0x38, 0x56, 0x99, 0xc4, 0x97, 0xef, 0x5e, 0x8b, 0x58, 0x72, 0xbb, 0xaa, 0x19, 0xa3, 0x62, + 0xeb, 0xb0, 0x26, 0xf2, 0x7c, 0x32, 0x15, 0x34, 0x75, 0x5a, 0x9e, 0x35, 0xe8, 0xf1, 0x8e, 0xc8, + 0xf3, 0x3d, 0x41, 0xd3, 0xb9, 0xf4, 0x8b, 0xda, 0x6a, 0xe9, 0x11, 0x74, 0x17, 0x5a, 0x32, 0x07, + 0x3a, 0x22, 0x0c, 0x25, 0x12, 0x19, 0x99, 0xba, 0x4d, 0x65, 0xea, 0x4d, 0x1c, 0xe0, 0x91, 0xb3, + 0x6c, 0xbc, 0x1a, 0xb2, 0xbb, 0xb0, 0x5a, 0x8a, 0xa4, 0xc0, 0x9a, 0xb0, 0x32, 0xd8, 0x3d, 0x68, + 0x87, 0x98, 0xa0, 0x42, 0x67, 0xc5, 0xb3, 0x06, 0x6b, 0xbc, 0xb6, 0xfa, 0x1f, 0x61, 0xd5, 0x2c, + 0x85, 0x31, 0x58, 0x51, 0x47, 0x39, 0x9a, 0xfe, 0x36, 0x37, 0x98, 0xed, 0x02, 0x08, 0xa5, 0x64, + 0xbc, 0x5f, 0x28, 0xa4, 0x7a, 0xfe, 0x07, 0x97, 0x2f, 0xf6, 0xd9, 0x59, 0x2e, 0x5f, 0x28, 0xeb, + 0x3f, 0x82, 0x9b, 0x17, 0xa3, 0x67, 0x9a, 0x2b, 0xa6, 0x8b, 0x9a, 0x97, 0x8d, 0xaf, 0x32, 0xfa, + 0xbf, 0x2d, 0xe8, 0x2d, 0x6e, 0x5e, 0x6b, 0x0c, 0xb2, 0xb0, 0xd2, 0x78, 0x83, 0x1b, 0xac, 0x7d, + 0xa1, 0x50, 0xa2, 0xfe, 0x02, 0x06, 0x6b, 0x82, 0x24, 0x8b, 0xcc, 0x07, 0xb0, 0xb9, 0x86, 0x3a, + 0x2b, 0x4e, 0x3f, 0x65, 0x66, 0x78, 0x9b, 0x1b, 0xcc, 0xee, 0x03, 0x44, 0x82, 0x26, 0x5f, 0x44, + 0xaa, 0x30, 0x74, 0x56, 0xcd, 0xfa, 0xed, 0x48, 0xd0, 0x7b, 0xe3, 0xd0, 0xbb, 0xd3, 0xe1, 0x82, + 0x30, 0x74, 0xda, 0x26, 0xd8, 0x89, 0x04, 0xbd, 0x25, 0x0c, 0x17, 0x8e, 0xbd, 0x73, 0xed, 0x63, + 0xdf, 0x04, 0x5b, 0xeb, 0xa5, 0x5c, 0x04, 0xe8, 0xac, 0x19, 0x19, 0x73, 0xc7, 0xe8, 0x8f, 0x05, + 0xb7, 0xaa, 0x73, 0x40, 0x39, 0x46, 0x59, 0xc6, 0x01, 0xb2, 0x02, 0xd8, 0xbf, 0xc7, 0xcd, 0xfc, + 0x46, 0xae, 0x4b, 0xff, 0xe6, 0x8d, 0xe1, 0xb5, 0xf3, 0xab, 0xd3, 0x9b, 0xd3, 0x2e, 0x1e, 0xe6, + 0x95, 0xb4, 0x0d, 0x7f, 0xd7, 0x95, 0xb4, 0x4d, 0x17, 0xbf, 0xf3, 0xf8, 0xc7, 0x89, 0x6b, 0x1d, + 0x9f, 0xb8, 0xd6, 0xaf, 0x13, 0xd7, 0xfa, 0x7a, 0xea, 0x2e, 0x1d, 0x9f, 0xba, 0x4b, 0x3f, 0x4f, + 0xdd, 0xa5, 0x0f, 0x5e, 0xd5, 0x89, 0xc2, 0x03, 0x3f, 0xce, 0x86, 0x84, 0xb2, 0x44, 0x39, 0x2c, + 0x47, 0xf3, 0x27, 0x6f, 0xbf, 0x6d, 0xde, 0xba, 0x87, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3b, + 0xbd, 0x03, 0xda, 0x0d, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ListenerServiceClient is the client API for ListenerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ListenerServiceClient interface { + // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock + ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) + // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges + ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) +} + +type listenerServiceClient struct { + cc grpc1.ClientConn +} + +func NewListenerServiceClient(cc grpc1.ClientConn) ListenerServiceClient { + return &listenerServiceClient{cc} +} + +func (c *listenerServiceClient) ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) { + out := new(ListenDeliverBlockResponse) + err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *listenerServiceClient) ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) { + out := new(ListenStateChangesResponse) + err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenStateChanges", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ListenerServiceServer is the server API for ListenerService service. +type ListenerServiceServer interface { + // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock + ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) + // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges + ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) +} + +// UnimplementedListenerServiceServer can be embedded to have forward compatible implementations. +type UnimplementedListenerServiceServer struct { +} + +func (*UnimplementedListenerServiceServer) ListenDeliverBlock(ctx context.Context, req *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenDeliverBlock not implemented") +} +func (*UnimplementedListenerServiceServer) ListenStateChanges(ctx context.Context, req *ListenStateChangesRequest) (*ListenStateChangesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenStateChanges not implemented") +} + +func RegisterListenerServiceServer(s grpc1.Server, srv ListenerServiceServer) { + s.RegisterService(&_ListenerService_serviceDesc, srv) +} + +func _ListenerService_ListenDeliverBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenDeliverBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, req.(*ListenDeliverBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ListenerService_ListenStateChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenStateChangesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ListenerServiceServer).ListenStateChanges(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.streaming.v1.ListenerService/ListenStateChanges", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ListenerServiceServer).ListenStateChanges(ctx, req.(*ListenStateChangesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ListenerService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.streaming.v1.ListenerService", + HandlerType: (*ListenerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListenDeliverBlock", + Handler: _ListenerService_ListenDeliverBlock_Handler, + }, + { + MethodName: "ListenStateChanges", + Handler: _ListenerService_ListenStateChanges_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/streaming/v1/grpc.proto", +} + +func (m *ListenDeliverBlockRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListenDeliverBlockRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenDeliverBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.TxResults) > 0 { + for iNdEx := len(m.TxResults) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.TxResults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Txs) > 0 { + for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Txs[iNdEx]) + copy(dAtA[i:], m.Txs[iNdEx]) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Txs[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if m.BlockHeight != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ListenDeliverBlockResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListenDeliverBlockResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenDeliverBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ListenStateChangesRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListenStateChangesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenStateChangesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AppHash) > 0 { + i -= len(m.AppHash) + copy(dAtA[i:], m.AppHash) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.AppHash))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChangeSet) > 0 { + for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.BlockHeight != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ListenStateChangesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListenStateChangesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenStateChangesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *StoreKVPair) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Delete { + i-- + if m.Delete { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x1a + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Event) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Event) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Attributes) > 0 { + for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Type) > 0 { + i -= len(m.Type) + copy(dAtA[i:], m.Type) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Type))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EventAttribute) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EventAttribute) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExecTxResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecTxResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Codespace) > 0 { + i -= len(m.Codespace) + copy(dAtA[i:], m.Codespace) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Codespace))) + i-- + dAtA[i] = 0x42 + } + if len(m.Events) > 0 { + for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if m.GasUsed != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.GasUsed)) + i-- + dAtA[i] = 0x30 + } + if m.GasWanted != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.GasWanted)) + i-- + dAtA[i] = 0x28 + } + if len(m.Info) > 0 { + i -= len(m.Info) + copy(dAtA[i:], m.Info) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Info))) + i-- + dAtA[i] = 0x22 + } + if len(m.Log) > 0 { + i -= len(m.Log) + copy(dAtA[i:], m.Log) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Log))) + i-- + dAtA[i] = 0x1a + } + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintGrpc(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { + offset -= sovGrpc(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ListenDeliverBlockRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockHeight != 0 { + n += 1 + sovGrpc(uint64(m.BlockHeight)) + } + if len(m.Txs) > 0 { + for _, b := range m.Txs { + l = len(b) + n += 1 + l + sovGrpc(uint64(l)) + } + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + if len(m.TxResults) > 0 { + for _, e := range m.TxResults { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + return n +} + +func (m *ListenDeliverBlockResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ListenStateChangesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockHeight != 0 { + n += 1 + sovGrpc(uint64(m.BlockHeight)) + } + if len(m.ChangeSet) > 0 { + for _, e := range m.ChangeSet { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + l = len(m.AppHash) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func (m *ListenStateChangesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *StoreKVPair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + if m.Delete { + n += 2 + } + return n +} + +func (m *Event) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Type) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + return n +} + +func (m *EventAttribute) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func (m *ExecTxResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovGrpc(uint64(m.Code)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Log) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + l = len(m.Info) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + if m.GasWanted != 0 { + n += 1 + sovGrpc(uint64(m.GasWanted)) + } + if m.GasUsed != 0 { + n += 1 + sovGrpc(uint64(m.GasUsed)) + } + if len(m.Events) > 0 { + for _, e := range m.Events { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + l = len(m.Codespace) + if l > 0 { + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func sovGrpc(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGrpc(x uint64) (n int) { + return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ListenDeliverBlockRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListenDeliverBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenDeliverBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) + copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxResults", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxResults = append(m.TxResults, &ExecTxResult{}) + if err := m.TxResults[len(m.TxResults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenDeliverBlockResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListenDeliverBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenDeliverBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenStateChangesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListenStateChangesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenStateChangesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangeSet = append(m.ChangeSet, &StoreKVPair{}) + if err := m.ChangeSet[len(m.ChangeSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) + if m.AppHash == nil { + m.AppHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenStateChangesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListenStateChangesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenStateChangesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreKVPair) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreKVPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) + if m.Address == nil { + m.Address = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Delete = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Event) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Event: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, &EventAttribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EventAttribute) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EventAttribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecTxResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecTxResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecTxResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Log = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Info = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) + } + m.GasWanted = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasWanted |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) + } + m.GasUsed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.GasUsed |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Events = append(m.Events, &Event{}) + if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Codespace = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGrpc(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGrpc + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGrpc + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGrpc + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/snapshots/types/snapshot.pb.go b/cosmossdk.io/store/snapshots/types/snapshot.pb.go new file mode 100644 index 000000000000..e81660c4596e --- /dev/null +++ b/cosmossdk.io/store/snapshots/types/snapshot.pb.go @@ -0,0 +1,2008 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/snapshots/v1/snapshot.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Snapshot contains Tendermint state sync snapshot info. +type Snapshot struct { + Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` + Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` + Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` + Metadata Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata"` +} + +func (m *Snapshot) Reset() { *m = Snapshot{} } +func (m *Snapshot) String() string { return proto.CompactTextString(m) } +func (*Snapshot) ProtoMessage() {} +func (*Snapshot) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{0} +} +func (m *Snapshot) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Snapshot) XXX_Merge(src proto.Message) { + xxx_messageInfo_Snapshot.Merge(m, src) +} +func (m *Snapshot) XXX_Size() int { + return m.Size() +} +func (m *Snapshot) XXX_DiscardUnknown() { + xxx_messageInfo_Snapshot.DiscardUnknown(m) +} + +var xxx_messageInfo_Snapshot proto.InternalMessageInfo + +func (m *Snapshot) GetHeight() uint64 { + if m != nil { + return m.Height + } + return 0 +} + +func (m *Snapshot) GetFormat() uint32 { + if m != nil { + return m.Format + } + return 0 +} + +func (m *Snapshot) GetChunks() uint32 { + if m != nil { + return m.Chunks + } + return 0 +} + +func (m *Snapshot) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func (m *Snapshot) GetMetadata() Metadata { + if m != nil { + return m.Metadata + } + return Metadata{} +} + +// Metadata contains SDK-specific snapshot metadata. +type Metadata struct { + ChunkHashes [][]byte `protobuf:"bytes,1,rep,name=chunk_hashes,json=chunkHashes,proto3" json:"chunk_hashes,omitempty"` +} + +func (m *Metadata) Reset() { *m = Metadata{} } +func (m *Metadata) String() string { return proto.CompactTextString(m) } +func (*Metadata) ProtoMessage() {} +func (*Metadata) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{1} +} +func (m *Metadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Metadata.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Metadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_Metadata.Merge(m, src) +} +func (m *Metadata) XXX_Size() int { + return m.Size() +} +func (m *Metadata) XXX_DiscardUnknown() { + xxx_messageInfo_Metadata.DiscardUnknown(m) +} + +var xxx_messageInfo_Metadata proto.InternalMessageInfo + +func (m *Metadata) GetChunkHashes() [][]byte { + if m != nil { + return m.ChunkHashes + } + return nil +} + +// SnapshotItem is an item contained in a rootmulti.Store snapshot. +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 + // *SnapshotItem_ExtensionPayload + Item isSnapshotItem_Item `protobuf_oneof:"item"` +} + +func (m *SnapshotItem) Reset() { *m = SnapshotItem{} } +func (m *SnapshotItem) String() string { return proto.CompactTextString(m) } +func (*SnapshotItem) ProtoMessage() {} +func (*SnapshotItem) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{2} +} +func (m *SnapshotItem) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotItem.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SnapshotItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotItem.Merge(m, src) +} +func (m *SnapshotItem) XXX_Size() int { + return m.Size() +} +func (m *SnapshotItem) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotItem.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotItem proto.InternalMessageInfo + +type isSnapshotItem_Item interface { + isSnapshotItem_Item() + MarshalTo([]byte) (int, error) + Size() int +} + +type SnapshotItem_Store struct { + Store *SnapshotStoreItem `protobuf:"bytes,1,opt,name=store,proto3,oneof" json:"store,omitempty"` +} +type SnapshotItem_IAVL struct { + IAVL *SnapshotIAVLItem `protobuf:"bytes,2,opt,name=iavl,proto3,oneof" json:"iavl,omitempty"` +} +type SnapshotItem_Extension struct { + Extension *SnapshotExtensionMeta `protobuf:"bytes,3,opt,name=extension,proto3,oneof" json:"extension,omitempty"` +} +type SnapshotItem_ExtensionPayload struct { + ExtensionPayload *SnapshotExtensionPayload `protobuf:"bytes,4,opt,name=extension_payload,json=extensionPayload,proto3,oneof" json:"extension_payload,omitempty"` +} + +func (*SnapshotItem_Store) isSnapshotItem_Item() {} +func (*SnapshotItem_IAVL) isSnapshotItem_Item() {} +func (*SnapshotItem_Extension) isSnapshotItem_Item() {} +func (*SnapshotItem_ExtensionPayload) isSnapshotItem_Item() {} + +func (m *SnapshotItem) GetItem() isSnapshotItem_Item { + if m != nil { + return m.Item + } + return nil +} + +func (m *SnapshotItem) GetStore() *SnapshotStoreItem { + if x, ok := m.GetItem().(*SnapshotItem_Store); ok { + return x.Store + } + return nil +} + +func (m *SnapshotItem) GetIAVL() *SnapshotIAVLItem { + if x, ok := m.GetItem().(*SnapshotItem_IAVL); ok { + return x.IAVL + } + return nil +} + +func (m *SnapshotItem) GetExtension() *SnapshotExtensionMeta { + if x, ok := m.GetItem().(*SnapshotItem_Extension); ok { + return x.Extension + } + return nil +} + +func (m *SnapshotItem) GetExtensionPayload() *SnapshotExtensionPayload { + if x, ok := m.GetItem().(*SnapshotItem_ExtensionPayload); ok { + return x.ExtensionPayload + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*SnapshotItem) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*SnapshotItem_Store)(nil), + (*SnapshotItem_IAVL)(nil), + (*SnapshotItem_Extension)(nil), + (*SnapshotItem_ExtensionPayload)(nil), + } +} + +// SnapshotStoreItem contains metadata about a snapshotted store. +type SnapshotStoreItem struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *SnapshotStoreItem) Reset() { *m = SnapshotStoreItem{} } +func (m *SnapshotStoreItem) String() string { return proto.CompactTextString(m) } +func (*SnapshotStoreItem) ProtoMessage() {} +func (*SnapshotStoreItem) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{3} +} +func (m *SnapshotStoreItem) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotStoreItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotStoreItem.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SnapshotStoreItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotStoreItem.Merge(m, src) +} +func (m *SnapshotStoreItem) XXX_Size() int { + return m.Size() +} +func (m *SnapshotStoreItem) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotStoreItem.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotStoreItem proto.InternalMessageInfo + +func (m *SnapshotStoreItem) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// SnapshotIAVLItem is an exported IAVL node. +type SnapshotIAVLItem struct { + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // version is block height + Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + // height is depth of the tree. + Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` +} + +func (m *SnapshotIAVLItem) Reset() { *m = SnapshotIAVLItem{} } +func (m *SnapshotIAVLItem) String() string { return proto.CompactTextString(m) } +func (*SnapshotIAVLItem) ProtoMessage() {} +func (*SnapshotIAVLItem) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{4} +} +func (m *SnapshotIAVLItem) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotIAVLItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotIAVLItem.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SnapshotIAVLItem) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotIAVLItem.Merge(m, src) +} +func (m *SnapshotIAVLItem) XXX_Size() int { + return m.Size() +} +func (m *SnapshotIAVLItem) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotIAVLItem.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotIAVLItem proto.InternalMessageInfo + +func (m *SnapshotIAVLItem) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *SnapshotIAVLItem) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *SnapshotIAVLItem) GetVersion() int64 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *SnapshotIAVLItem) GetHeight() int32 { + if m != nil { + return m.Height + } + return 0 +} + +// SnapshotExtensionMeta contains metadata about an external snapshotter. +type SnapshotExtensionMeta struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` +} + +func (m *SnapshotExtensionMeta) Reset() { *m = SnapshotExtensionMeta{} } +func (m *SnapshotExtensionMeta) String() string { return proto.CompactTextString(m) } +func (*SnapshotExtensionMeta) ProtoMessage() {} +func (*SnapshotExtensionMeta) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{5} +} +func (m *SnapshotExtensionMeta) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotExtensionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotExtensionMeta.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SnapshotExtensionMeta) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotExtensionMeta.Merge(m, src) +} +func (m *SnapshotExtensionMeta) XXX_Size() int { + return m.Size() +} +func (m *SnapshotExtensionMeta) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotExtensionMeta.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotExtensionMeta proto.InternalMessageInfo + +func (m *SnapshotExtensionMeta) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *SnapshotExtensionMeta) GetFormat() uint32 { + if m != nil { + return m.Format + } + return 0 +} + +// SnapshotExtensionPayload contains payloads of an external snapshotter. +type SnapshotExtensionPayload struct { + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` +} + +func (m *SnapshotExtensionPayload) Reset() { *m = SnapshotExtensionPayload{} } +func (m *SnapshotExtensionPayload) String() string { return proto.CompactTextString(m) } +func (*SnapshotExtensionPayload) ProtoMessage() {} +func (*SnapshotExtensionPayload) Descriptor() ([]byte, []int) { + return fileDescriptor_3d5cca1aa5b69183, []int{6} +} +func (m *SnapshotExtensionPayload) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SnapshotExtensionPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SnapshotExtensionPayload.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SnapshotExtensionPayload) XXX_Merge(src proto.Message) { + xxx_messageInfo_SnapshotExtensionPayload.Merge(m, src) +} +func (m *SnapshotExtensionPayload) XXX_Size() int { + return m.Size() +} +func (m *SnapshotExtensionPayload) XXX_DiscardUnknown() { + xxx_messageInfo_SnapshotExtensionPayload.DiscardUnknown(m) +} + +var xxx_messageInfo_SnapshotExtensionPayload proto.InternalMessageInfo + +func (m *SnapshotExtensionPayload) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func init() { + proto.RegisterType((*Snapshot)(nil), "cosmos.store.snapshots.v1.Snapshot") + proto.RegisterType((*Metadata)(nil), "cosmos.store.snapshots.v1.Metadata") + proto.RegisterType((*SnapshotItem)(nil), "cosmos.store.snapshots.v1.SnapshotItem") + proto.RegisterType((*SnapshotStoreItem)(nil), "cosmos.store.snapshots.v1.SnapshotStoreItem") + proto.RegisterType((*SnapshotIAVLItem)(nil), "cosmos.store.snapshots.v1.SnapshotIAVLItem") + proto.RegisterType((*SnapshotExtensionMeta)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionMeta") + proto.RegisterType((*SnapshotExtensionPayload)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionPayload") +} + +func init() { + proto.RegisterFile("cosmos/store/snapshots/v1/snapshot.proto", fileDescriptor_3d5cca1aa5b69183) +} + +var fileDescriptor_3d5cca1aa5b69183 = []byte{ + // 538 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x6f, 0xd3, 0x3c, + 0x18, 0x8e, 0xd7, 0xb4, 0x5f, 0xf7, 0x26, 0x9f, 0xe8, 0xcc, 0x40, 0x61, 0x87, 0x2c, 0x84, 0x4b, + 0x24, 0x68, 0xba, 0x75, 0x88, 0x03, 0xda, 0x85, 0x8a, 0x49, 0xad, 0x00, 0x69, 0xf2, 0x24, 0x84, + 0xb8, 0x54, 0xde, 0x6a, 0x9a, 0xaa, 0x4d, 0x5d, 0xd5, 0x5e, 0x45, 0x8f, 0xfc, 0x03, 0xfe, 0x08, + 0x37, 0x7e, 0xc4, 0x8e, 0x13, 0x27, 0x4e, 0x13, 0x6a, 0xff, 0x02, 0x3f, 0x00, 0xd9, 0x4e, 0x0a, + 0xda, 0x52, 0x34, 0x6e, 0xef, 0xf3, 0xfa, 0x79, 0x1e, 0xfb, 0x7d, 0xec, 0x04, 0xa2, 0x33, 0x2e, + 0x52, 0x2e, 0x1a, 0x42, 0xf2, 0x29, 0x6b, 0x88, 0x31, 0x9d, 0x88, 0x84, 0x4b, 0xd1, 0x98, 0xed, + 0xaf, 0x40, 0x3c, 0x99, 0x72, 0xc9, 0xf1, 0x03, 0xc3, 0x8c, 0x35, 0x33, 0x5e, 0x31, 0xe3, 0xd9, + 0xfe, 0xce, 0x76, 0x9f, 0xf7, 0xb9, 0x66, 0x35, 0x54, 0x65, 0x04, 0x3b, 0x99, 0xa0, 0x6b, 0x16, + 0x32, 0xb5, 0x06, 0xe1, 0x17, 0x04, 0xd5, 0x93, 0xcc, 0x01, 0xdf, 0x87, 0x4a, 0xc2, 0x06, 0xfd, + 0x44, 0x7a, 0x28, 0x40, 0x91, 0x4d, 0x32, 0xa4, 0xfa, 0x1f, 0xf8, 0x34, 0xa5, 0xd2, 0xdb, 0x08, + 0x50, 0xf4, 0x3f, 0xc9, 0x90, 0xea, 0x9f, 0x25, 0xe7, 0xe3, 0xa1, 0xf0, 0x4a, 0xa6, 0x6f, 0x10, + 0xc6, 0x60, 0x27, 0x54, 0x24, 0x9e, 0x1d, 0xa0, 0xc8, 0x25, 0xba, 0xc6, 0x47, 0x50, 0x4d, 0x99, + 0xa4, 0x3d, 0x2a, 0xa9, 0x57, 0x0e, 0x50, 0xe4, 0x34, 0x1f, 0xc5, 0x6b, 0xe7, 0x88, 0xdf, 0x64, + 0xd4, 0x96, 0x7d, 0x71, 0xb5, 0x6b, 0x91, 0x95, 0x34, 0xac, 0x43, 0x35, 0x5f, 0xc3, 0x0f, 0xc1, + 0xd5, 0x1b, 0x76, 0xd5, 0x06, 0x4c, 0x78, 0x28, 0x28, 0x45, 0x2e, 0x71, 0x74, 0xaf, 0xad, 0x5b, + 0xe1, 0xcf, 0x0d, 0x70, 0xf3, 0xf1, 0x3a, 0x92, 0xa5, 0xf8, 0x25, 0x94, 0xf5, 0x76, 0x7a, 0x42, + 0xa7, 0xf9, 0xe4, 0x2f, 0x67, 0xc8, 0x75, 0x27, 0x6a, 0x49, 0x89, 0xdb, 0x16, 0x31, 0x62, 0xfc, + 0x0a, 0xec, 0x01, 0x9d, 0x8d, 0x74, 0x1c, 0x4e, 0xf3, 0xf1, 0x2d, 0x4c, 0x3a, 0x2f, 0xde, 0xbe, + 0x56, 0x1e, 0xad, 0xea, 0xe2, 0x6a, 0xd7, 0x56, 0xa8, 0x6d, 0x11, 0x6d, 0x82, 0x8f, 0x61, 0x93, + 0x7d, 0x94, 0x6c, 0x2c, 0x06, 0x7c, 0xac, 0x83, 0x74, 0x9a, 0x7b, 0xb7, 0x70, 0x3c, 0xca, 0x35, + 0x2a, 0x8f, 0xb6, 0x45, 0x7e, 0x9b, 0xe0, 0x53, 0xd8, 0x5a, 0x81, 0xee, 0x84, 0xce, 0x47, 0x9c, + 0xf6, 0xf4, 0x65, 0x38, 0xcd, 0x83, 0x7f, 0x71, 0x3e, 0x36, 0xd2, 0xb6, 0x45, 0x6a, 0xec, 0x5a, + 0xef, 0xf9, 0xdd, 0x6f, 0x5f, 0xeb, 0x77, 0x8c, 0x57, 0x5d, 0xf4, 0x86, 0xc1, 0x5e, 0xfc, 0xf4, + 0x59, 0xab, 0x02, 0xf6, 0x40, 0xb2, 0x34, 0x3c, 0x84, 0xad, 0x1b, 0xe9, 0xa9, 0x57, 0x31, 0xa6, + 0xa9, 0x49, 0x7e, 0x93, 0xe8, 0xba, 0xd0, 0x25, 0xfc, 0x84, 0xa0, 0x76, 0x3d, 0x37, 0x5c, 0x83, + 0xd2, 0x90, 0xcd, 0xb5, 0xd8, 0x25, 0xaa, 0xc4, 0xdb, 0x50, 0x9e, 0xd1, 0xd1, 0x39, 0xd3, 0xb7, + 0xe0, 0x12, 0x03, 0xb0, 0x07, 0xff, 0xcd, 0xd8, 0x74, 0x95, 0x65, 0x89, 0xe4, 0xf0, 0x8f, 0xd7, + 0xad, 0xa2, 0x28, 0xe7, 0xaf, 0xbb, 0xf8, 0x0c, 0xef, 0xe0, 0x5e, 0x61, 0xd0, 0x45, 0x53, 0xac, + 0xfb, 0x3e, 0x8a, 0x9d, 0x3b, 0xe0, 0xad, 0x0b, 0x5a, 0x1d, 0x3e, 0xbf, 0x2e, 0x33, 0x68, 0x0e, + 0x8b, 0xe3, 0x3e, 0xbc, 0x58, 0xf8, 0xe8, 0x72, 0xe1, 0xa3, 0x1f, 0x0b, 0x1f, 0x7d, 0x5e, 0xfa, + 0xd6, 0xe5, 0xd2, 0xb7, 0xbe, 0x2f, 0x7d, 0xeb, 0x7d, 0x68, 0xa8, 0xa2, 0x37, 0x8c, 0x07, 0xfc, + 0xc6, 0x2f, 0x45, 0xce, 0x27, 0x4c, 0x9c, 0x56, 0xf4, 0x1f, 0xe0, 0xe0, 0x57, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x57, 0xe2, 0xd5, 0x36, 0x79, 0x04, 0x00, 0x00, +} + +func (m *Snapshot) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x22 + } + if m.Chunks != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Chunks)) + i-- + dAtA[i] = 0x18 + } + if m.Format != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) + i-- + dAtA[i] = 0x10 + } + if m.Height != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Metadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ChunkHashes) > 0 { + for iNdEx := len(m.ChunkHashes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ChunkHashes[iNdEx]) + copy(dAtA[i:], m.ChunkHashes[iNdEx]) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.ChunkHashes[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SnapshotItem) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SnapshotItem) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Item != nil { + { + size := m.Item.Size() + i -= size + if _, err := m.Item.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *SnapshotItem_Store) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_Store) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Store != nil { + { + size, err := m.Store.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *SnapshotItem_IAVL) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_IAVL) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.IAVL != nil { + { + size, err := m.IAVL.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *SnapshotItem_Extension) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_Extension) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Extension != nil { + { + size, err := m.Extension.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + return len(dAtA) - i, nil +} +func (m *SnapshotItem_ExtensionPayload) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotItem_ExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.ExtensionPayload != nil { + { + size, err := m.ExtensionPayload.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSnapshot(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} +func (m *SnapshotStoreItem) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SnapshotStoreItem) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotStoreItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SnapshotIAVLItem) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SnapshotIAVLItem) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotIAVLItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Height != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) + i-- + dAtA[i] = 0x20 + } + if m.Version != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x18 + } + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x12 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SnapshotExtensionMeta) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SnapshotExtensionMeta) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotExtensionMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Format != 0 { + i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) + i-- + dAtA[i] = 0x10 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SnapshotExtensionPayload) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SnapshotExtensionPayload) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SnapshotExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int { + offset -= sovSnapshot(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Snapshot) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Height != 0 { + n += 1 + sovSnapshot(uint64(m.Height)) + } + if m.Format != 0 { + n += 1 + sovSnapshot(uint64(m.Format)) + } + if m.Chunks != 0 { + n += 1 + sovSnapshot(uint64(m.Chunks)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + l = m.Metadata.Size() + n += 1 + l + sovSnapshot(uint64(l)) + return n +} + +func (m *Metadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ChunkHashes) > 0 { + for _, b := range m.ChunkHashes { + l = len(b) + n += 1 + l + sovSnapshot(uint64(l)) + } + } + return n +} + +func (m *SnapshotItem) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Item != nil { + n += m.Item.Size() + } + return n +} + +func (m *SnapshotItem_Store) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Store != nil { + l = m.Store.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotItem_IAVL) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.IAVL != nil { + l = m.IAVL.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotItem_Extension) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Extension != nil { + l = m.Extension.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotItem_ExtensionPayload) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ExtensionPayload != nil { + l = m.ExtensionPayload.Size() + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} +func (m *SnapshotStoreItem) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} + +func (m *SnapshotIAVLItem) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + if m.Version != 0 { + n += 1 + sovSnapshot(uint64(m.Version)) + } + if m.Height != 0 { + n += 1 + sovSnapshot(uint64(m.Height)) + } + return n +} + +func (m *SnapshotExtensionMeta) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + if m.Format != 0 { + n += 1 + sovSnapshot(uint64(m.Format)) + } + return n +} + +func (m *SnapshotExtensionPayload) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovSnapshot(uint64(l)) + } + return n +} + +func sovSnapshot(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozSnapshot(x uint64) (n int) { + return sovSnapshot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Snapshot) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Snapshot: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) + } + m.Format = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Format |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) + } + m.Chunks = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Chunks |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Metadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Metadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChunkHashes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChunkHashes = append(m.ChunkHashes, make([]byte, postIndex-iNdEx)) + copy(m.ChunkHashes[len(m.ChunkHashes)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotItem) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SnapshotItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Store", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotStoreItem{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_Store{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IAVL", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotIAVLItem{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_IAVL{v} + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotExtensionMeta{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_Extension{v} + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExtensionPayload", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SnapshotExtensionPayload{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Item = &SnapshotItem_ExtensionPayload{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotStoreItem) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SnapshotStoreItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotStoreItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotIAVLItem) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SnapshotIAVLItem: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotIAVLItem: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) + } + m.Height = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Height |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotExtensionMeta) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SnapshotExtensionMeta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotExtensionMeta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) + } + m.Format = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Format |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SnapshotExtensionPayload) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SnapshotExtensionPayload: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SnapshotExtensionPayload: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSnapshot + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSnapshot + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSnapshot + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) + if m.Payload == nil { + m.Payload = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSnapshot(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSnapshot + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSnapshot(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSnapshot + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSnapshot + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSnapshot + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthSnapshot + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSnapshot + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthSnapshot + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSnapshot = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/streaming/abci/grpc.pb.go b/cosmossdk.io/store/streaming/abci/grpc.pb.go new file mode 100644 index 000000000000..b9a8e7622c53 --- /dev/null +++ b/cosmossdk.io/store/streaming/abci/grpc.pb.go @@ -0,0 +1,1050 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/streaming/abci/grpc.proto + +package abci + +import ( + context "context" + types "cosmossdk.io/store/types" + fmt "fmt" + v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ListenEndBlockRequest is the request type for the ListenEndBlock RPC method +type ListenFinalizeBlockRequest struct { + Req *v1.FinalizeBlockRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` + Res *v1.FinalizeBlockResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` +} + +func (m *ListenFinalizeBlockRequest) Reset() { *m = ListenFinalizeBlockRequest{} } +func (m *ListenFinalizeBlockRequest) String() string { return proto.CompactTextString(m) } +func (*ListenFinalizeBlockRequest) ProtoMessage() {} +func (*ListenFinalizeBlockRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{0} +} +func (m *ListenFinalizeBlockRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenFinalizeBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenFinalizeBlockRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListenFinalizeBlockRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenFinalizeBlockRequest.Merge(m, src) +} +func (m *ListenFinalizeBlockRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenFinalizeBlockRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenFinalizeBlockRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenFinalizeBlockRequest proto.InternalMessageInfo + +func (m *ListenFinalizeBlockRequest) GetReq() *v1.FinalizeBlockRequest { + if m != nil { + return m.Req + } + return nil +} + +func (m *ListenFinalizeBlockRequest) GetRes() *v1.FinalizeBlockResponse { + if m != nil { + return m.Res + } + return nil +} + +// ListenEndBlockResponse is the response type for the ListenEndBlock RPC method +type ListenFinalizeBlockResponse struct { +} + +func (m *ListenFinalizeBlockResponse) Reset() { *m = ListenFinalizeBlockResponse{} } +func (m *ListenFinalizeBlockResponse) String() string { return proto.CompactTextString(m) } +func (*ListenFinalizeBlockResponse) ProtoMessage() {} +func (*ListenFinalizeBlockResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{1} +} +func (m *ListenFinalizeBlockResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenFinalizeBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenFinalizeBlockResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListenFinalizeBlockResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenFinalizeBlockResponse.Merge(m, src) +} +func (m *ListenFinalizeBlockResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenFinalizeBlockResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenFinalizeBlockResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenFinalizeBlockResponse proto.InternalMessageInfo + +// ListenCommitRequest is the request type for the ListenCommit RPC method +type ListenCommitRequest struct { + // explicitly pass in block height as ResponseCommit does not contain this + // info + BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + Res *v1.CommitResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` + ChangeSet []*types.StoreKVPair `protobuf:"bytes,3,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` +} + +func (m *ListenCommitRequest) Reset() { *m = ListenCommitRequest{} } +func (m *ListenCommitRequest) String() string { return proto.CompactTextString(m) } +func (*ListenCommitRequest) ProtoMessage() {} +func (*ListenCommitRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{2} +} +func (m *ListenCommitRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenCommitRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListenCommitRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenCommitRequest.Merge(m, src) +} +func (m *ListenCommitRequest) XXX_Size() int { + return m.Size() +} +func (m *ListenCommitRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListenCommitRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenCommitRequest proto.InternalMessageInfo + +func (m *ListenCommitRequest) GetBlockHeight() int64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *ListenCommitRequest) GetRes() *v1.CommitResponse { + if m != nil { + return m.Res + } + return nil +} + +func (m *ListenCommitRequest) GetChangeSet() []*types.StoreKVPair { + if m != nil { + return m.ChangeSet + } + return nil +} + +// ListenCommitResponse is the response type for the ListenCommit RPC method +type ListenCommitResponse struct { +} + +func (m *ListenCommitResponse) Reset() { *m = ListenCommitResponse{} } +func (m *ListenCommitResponse) String() string { return proto.CompactTextString(m) } +func (*ListenCommitResponse) ProtoMessage() {} +func (*ListenCommitResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7b98083eb9315fb6, []int{3} +} +func (m *ListenCommitResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ListenCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ListenCommitResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ListenCommitResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListenCommitResponse.Merge(m, src) +} +func (m *ListenCommitResponse) XXX_Size() int { + return m.Size() +} +func (m *ListenCommitResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListenCommitResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListenCommitResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ListenFinalizeBlockRequest)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockRequest") + proto.RegisterType((*ListenFinalizeBlockResponse)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockResponse") + proto.RegisterType((*ListenCommitRequest)(nil), "cosmos.store.streaming.abci.ListenCommitRequest") + proto.RegisterType((*ListenCommitResponse)(nil), "cosmos.store.streaming.abci.ListenCommitResponse") +} + +func init() { + proto.RegisterFile("cosmos/store/streaming/abci/grpc.proto", fileDescriptor_7b98083eb9315fb6) +} + +var fileDescriptor_7b98083eb9315fb6 = []byte{ + // 414 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x8f, 0xd2, 0x40, + 0x18, 0xc6, 0x29, 0x4d, 0x4c, 0x1c, 0x38, 0x0d, 0xc6, 0x90, 0xa2, 0x0d, 0x34, 0x06, 0x39, 0x4d, + 0x6d, 0x3d, 0x88, 0xf1, 0xa2, 0x90, 0x18, 0x8d, 0x1e, 0x4c, 0x49, 0x3c, 0x78, 0x21, 0x6d, 0x7d, + 0x2d, 0x13, 0x68, 0xa7, 0xcc, 0x8c, 0x4d, 0xf4, 0x13, 0x78, 0x74, 0x0f, 0xfb, 0x35, 0xf6, 0x73, + 0xec, 0x91, 0xe3, 0x1e, 0x37, 0xf0, 0x45, 0x36, 0x9d, 0x59, 0x08, 0xcd, 0xb2, 0x7f, 0x38, 0xf6, + 0x9d, 0xe7, 0xf7, 0xbc, 0x4f, 0xe7, 0x7d, 0x07, 0xf5, 0x63, 0x26, 0x52, 0x26, 0x5c, 0x21, 0x19, + 0x07, 0x57, 0x48, 0x0e, 0x61, 0x4a, 0xb3, 0xc4, 0x0d, 0xa3, 0x98, 0xba, 0x09, 0xcf, 0x63, 0x92, + 0x73, 0x26, 0x19, 0xee, 0x68, 0x1d, 0x51, 0x3a, 0xb2, 0xd3, 0x91, 0x52, 0x67, 0x3d, 0x8b, 0x59, + 0x0a, 0x32, 0xfa, 0x25, 0x35, 0x56, 0x78, 0xae, 0xfc, 0x93, 0x83, 0xd0, 0xa8, 0xf5, 0xa2, 0xd2, + 0xa2, 0xf0, 0x22, 0x90, 0xa1, 0xe7, 0x2e, 0xa8, 0x90, 0x90, 0x95, 0x16, 0x4a, 0xe5, 0x9c, 0x18, + 0xc8, 0xfa, 0xaa, 0x6a, 0x1f, 0x69, 0x16, 0x2e, 0xe8, 0x5f, 0x18, 0x2d, 0x58, 0x3c, 0x0f, 0x60, + 0xf9, 0x1b, 0x84, 0xc4, 0x43, 0x64, 0x72, 0x58, 0xb6, 0x8d, 0xae, 0x31, 0x68, 0xf8, 0x7d, 0xb2, + 0x6d, 0xa8, 0xfa, 0x93, 0xc2, 0x23, 0x87, 0xa0, 0xa0, 0x44, 0xf0, 0xdb, 0x92, 0x14, 0xed, 0xba, + 0x22, 0x5f, 0xde, 0x4b, 0x8a, 0x9c, 0x65, 0x02, 0x4a, 0x54, 0x38, 0xcf, 0x51, 0xe7, 0x60, 0x24, + 0xad, 0x71, 0xce, 0x0c, 0xd4, 0xd2, 0xe7, 0x63, 0x96, 0xa6, 0x54, 0x6e, 0xb3, 0xf6, 0x50, 0x33, + 0x2a, 0x85, 0xd3, 0x19, 0xd0, 0x64, 0x26, 0x55, 0x68, 0x33, 0x68, 0xa8, 0xda, 0x27, 0x55, 0xc2, + 0xfe, 0x7e, 0xa8, 0xee, 0xcd, 0x50, 0x5b, 0xc3, 0xbd, 0x34, 0xf8, 0x3d, 0x42, 0xf1, 0x2c, 0xcc, + 0x12, 0x98, 0x0a, 0x90, 0x6d, 0xb3, 0x6b, 0x0e, 0x1a, 0x7e, 0x8f, 0x54, 0xe6, 0x72, 0x7d, 0xb9, + 0x64, 0x52, 0x7e, 0x7d, 0xf9, 0xfe, 0x2d, 0xa4, 0x3c, 0x78, 0xac, 0xa1, 0x09, 0x48, 0xe7, 0x29, + 0x7a, 0x52, 0xcd, 0xab, 0xed, 0xfd, 0xd3, 0x3a, 0x6a, 0x7d, 0x18, 0x8d, 0x3f, 0xeb, 0x43, 0xe0, + 0x13, 0xe0, 0x05, 0x8d, 0x01, 0xff, 0xdb, 0xfd, 0x60, 0xe5, 0x02, 0xf0, 0x1b, 0x72, 0xc7, 0x36, + 0x90, 0xdb, 0xa7, 0x68, 0x0d, 0x8f, 0x07, 0x75, 0x44, 0x2c, 0x50, 0x73, 0x3f, 0x3a, 0x7e, 0xf5, + 0x00, 0xa7, 0xca, 0x54, 0x2c, 0xef, 0x08, 0x42, 0x37, 0x1d, 0xbd, 0x3b, 0x5f, 0xdb, 0xc6, 0x6a, + 0x6d, 0x1b, 0x97, 0x6b, 0xdb, 0xf8, 0xbf, 0xb1, 0x6b, 0xab, 0x8d, 0x5d, 0xbb, 0xd8, 0xd8, 0xb5, + 0x1f, 0x3d, 0xed, 0x25, 0x7e, 0xce, 0x09, 0x65, 0x07, 0x1f, 0x4f, 0xf4, 0x48, 0xed, 0xf5, 0xeb, + 0xab, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xf4, 0x63, 0xc3, 0x62, 0x03, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// ABCIListenerServiceClient is the client API for ABCIListenerService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type ABCIListenerServiceClient interface { + // ListenFinalizeBlock is the corresponding endpoint for + // ABCIListener.ListenEndBlock + ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) + // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit + ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) +} + +type aBCIListenerServiceClient struct { + cc grpc1.ClientConn +} + +func NewABCIListenerServiceClient(cc grpc1.ClientConn) ABCIListenerServiceClient { + return &aBCIListenerServiceClient{cc} +} + +func (c *aBCIListenerServiceClient) ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) { + out := new(ListenFinalizeBlockResponse) + err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *aBCIListenerServiceClient) ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) { + out := new(ListenCommitResponse) + err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ABCIListenerServiceServer is the server API for ABCIListenerService service. +type ABCIListenerServiceServer interface { + // ListenFinalizeBlock is the corresponding endpoint for + // ABCIListener.ListenEndBlock + ListenFinalizeBlock(context.Context, *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) + // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit + ListenCommit(context.Context, *ListenCommitRequest) (*ListenCommitResponse, error) +} + +// UnimplementedABCIListenerServiceServer can be embedded to have forward compatible implementations. +type UnimplementedABCIListenerServiceServer struct { +} + +func (*UnimplementedABCIListenerServiceServer) ListenFinalizeBlock(ctx context.Context, req *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenFinalizeBlock not implemented") +} +func (*UnimplementedABCIListenerServiceServer) ListenCommit(ctx context.Context, req *ListenCommitRequest) (*ListenCommitResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListenCommit not implemented") +} + +func RegisterABCIListenerServiceServer(s grpc1.Server, srv ABCIListenerServiceServer) { + s.RegisterService(&_ABCIListenerService_serviceDesc, srv) +} + +func _ABCIListenerService_ListenFinalizeBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenFinalizeBlockRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, req.(*ListenFinalizeBlockRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ABCIListenerService_ListenCommit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListenCommitRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ABCIListenerServiceServer).ListenCommit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ABCIListenerServiceServer).ListenCommit(ctx, req.(*ListenCommitRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _ABCIListenerService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.store.streaming.abci.ABCIListenerService", + HandlerType: (*ABCIListenerServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListenFinalizeBlock", + Handler: _ABCIListenerService_ListenFinalizeBlock_Handler, + }, + { + MethodName: "ListenCommit", + Handler: _ABCIListenerService_ListenCommit_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/store/streaming/abci/grpc.proto", +} + +func (m *ListenFinalizeBlockRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListenFinalizeBlockRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenFinalizeBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Res != nil { + { + size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Req != nil { + { + size, err := m.Req.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ListenFinalizeBlockResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListenFinalizeBlockResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenFinalizeBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ListenCommitRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListenCommitRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ChangeSet) > 0 { + for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Res != nil { + { + size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGrpc(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.BlockHeight != 0 { + i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ListenCommitResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ListenCommitResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ListenCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { + offset -= sovGrpc(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ListenFinalizeBlockRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Req != nil { + l = m.Req.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + if m.Res != nil { + l = m.Res.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + return n +} + +func (m *ListenFinalizeBlockResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ListenCommitRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.BlockHeight != 0 { + n += 1 + sovGrpc(uint64(m.BlockHeight)) + } + if m.Res != nil { + l = m.Res.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + if len(m.ChangeSet) > 0 { + for _, e := range m.ChangeSet { + l = e.Size() + n += 1 + l + sovGrpc(uint64(l)) + } + } + return n +} + +func (m *ListenCommitResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovGrpc(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGrpc(x uint64) (n int) { + return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ListenFinalizeBlockRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListenFinalizeBlockRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenFinalizeBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Req == nil { + m.Req = &v1.FinalizeBlockRequest{} + } + if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Res == nil { + m.Res = &v1.FinalizeBlockResponse{} + } + if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenFinalizeBlockResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListenFinalizeBlockResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenFinalizeBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenCommitRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListenCommitRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenCommitRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + m.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.BlockHeight |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Res == nil { + m.Res = &v1.CommitResponse{} + } + if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGrpc + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGrpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChangeSet = append(m.ChangeSet, &types.StoreKVPair{}) + if err := m.ChangeSet[len(m.ChangeSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ListenCommitResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGrpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListenCommitResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListenCommitResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipGrpc(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGrpc + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGrpc(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGrpc + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGrpc + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGrpc + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/types/commit_info.pb.go b/cosmossdk.io/store/types/commit_info.pb.go new file mode 100644 index 000000000000..81220a79c236 --- /dev/null +++ b/cosmossdk.io/store/types/commit_info.pb.go @@ -0,0 +1,864 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/v1beta1/commit_info.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" + _ "google.golang.org/protobuf/types/known/timestamppb" + io "io" + math "math" + math_bits "math/bits" + time "time" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf +var _ = time.Kitchen + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// CommitInfo defines commit information used by the multi-store when committing +// a version/height. +type CommitInfo struct { + Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + StoreInfos []StoreInfo `protobuf:"bytes,2,rep,name=store_infos,json=storeInfos,proto3" json:"store_infos"` + Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` +} + +func (m *CommitInfo) Reset() { *m = CommitInfo{} } +func (m *CommitInfo) String() string { return proto.CompactTextString(m) } +func (*CommitInfo) ProtoMessage() {} +func (*CommitInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_5f8c656cdef8c524, []int{0} +} +func (m *CommitInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommitInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CommitInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitInfo.Merge(m, src) +} +func (m *CommitInfo) XXX_Size() int { + return m.Size() +} +func (m *CommitInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CommitInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitInfo proto.InternalMessageInfo + +func (m *CommitInfo) GetVersion() int64 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *CommitInfo) GetStoreInfos() []StoreInfo { + if m != nil { + return m.StoreInfos + } + return nil +} + +func (m *CommitInfo) GetTimestamp() time.Time { + if m != nil { + return m.Timestamp + } + return time.Time{} +} + +// StoreInfo defines store-specific commit information. It contains a reference +// between a store name and the commit ID. +type StoreInfo struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + CommitId CommitID `protobuf:"bytes,2,opt,name=commit_id,json=commitId,proto3" json:"commit_id"` +} + +func (m *StoreInfo) Reset() { *m = StoreInfo{} } +func (m *StoreInfo) String() string { return proto.CompactTextString(m) } +func (*StoreInfo) ProtoMessage() {} +func (*StoreInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_5f8c656cdef8c524, []int{1} +} +func (m *StoreInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoreInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoreInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StoreInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoreInfo.Merge(m, src) +} +func (m *StoreInfo) XXX_Size() int { + return m.Size() +} +func (m *StoreInfo) XXX_DiscardUnknown() { + xxx_messageInfo_StoreInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_StoreInfo proto.InternalMessageInfo + +func (m *StoreInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *StoreInfo) GetCommitId() CommitID { + if m != nil { + return m.CommitId + } + return CommitID{} +} + +// CommitID defines the commitment information when a specific store is +// committed. +type CommitID struct { + Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` +} + +func (m *CommitID) Reset() { *m = CommitID{} } +func (*CommitID) ProtoMessage() {} +func (*CommitID) Descriptor() ([]byte, []int) { + return fileDescriptor_5f8c656cdef8c524, []int{2} +} +func (m *CommitID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CommitID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CommitID.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *CommitID) XXX_Merge(src proto.Message) { + xxx_messageInfo_CommitID.Merge(m, src) +} +func (m *CommitID) XXX_Size() int { + return m.Size() +} +func (m *CommitID) XXX_DiscardUnknown() { + xxx_messageInfo_CommitID.DiscardUnknown(m) +} + +var xxx_messageInfo_CommitID proto.InternalMessageInfo + +func (m *CommitID) GetVersion() int64 { + if m != nil { + return m.Version + } + return 0 +} + +func (m *CommitID) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func init() { + proto.RegisterType((*CommitInfo)(nil), "cosmos.store.v1beta1.CommitInfo") + proto.RegisterType((*StoreInfo)(nil), "cosmos.store.v1beta1.StoreInfo") + proto.RegisterType((*CommitID)(nil), "cosmos.store.v1beta1.CommitID") +} + +func init() { + proto.RegisterFile("cosmos/store/v1beta1/commit_info.proto", fileDescriptor_5f8c656cdef8c524) +} + +var fileDescriptor_5f8c656cdef8c524 = []byte{ + // 336 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xf2, 0x50, + 0x14, 0xc7, 0x7b, 0xa1, 0xf9, 0x3e, 0x7a, 0x70, 0xba, 0x61, 0x68, 0x18, 0x6e, 0x09, 0x83, 0x61, + 0xba, 0x0d, 0xb8, 0x39, 0x98, 0x58, 0x8d, 0x09, 0x6b, 0x75, 0x72, 0x31, 0x2d, 0x5c, 0x4a, 0xa3, + 0xed, 0x21, 0xdc, 0x2b, 0x89, 0x6f, 0xc1, 0xe8, 0xe8, 0x33, 0xf8, 0x14, 0x8c, 0x8c, 0x4e, 0x6a, + 0xe0, 0x45, 0x4c, 0x4f, 0x5b, 0x5c, 0x88, 0xdb, 0x39, 0xed, 0xef, 0x9c, 0xff, 0xaf, 0xa7, 0x70, + 0x3a, 0x41, 0x9d, 0xa1, 0xf6, 0xb5, 0xc1, 0xa5, 0xf2, 0x57, 0xc3, 0x58, 0x99, 0x68, 0xe8, 0x4f, + 0x30, 0xcb, 0x52, 0xf3, 0x90, 0xe6, 0x33, 0x94, 0x8b, 0x25, 0x1a, 0xe4, 0x9d, 0x92, 0x93, 0xc4, + 0xc9, 0x8a, 0xeb, 0x76, 0x12, 0x4c, 0x90, 0x00, 0xbf, 0xa8, 0x4a, 0xb6, 0xeb, 0x25, 0x88, 0xc9, + 0x93, 0xf2, 0xa9, 0x8b, 0x9f, 0x67, 0xbe, 0x49, 0x33, 0xa5, 0x4d, 0x94, 0x2d, 0x4a, 0xa0, 0xff, + 0xce, 0x00, 0xae, 0x28, 0x62, 0x9c, 0xcf, 0x90, 0xbb, 0xf0, 0x7f, 0xa5, 0x96, 0x3a, 0xc5, 0xdc, + 0x65, 0x3d, 0x36, 0x68, 0x86, 0x75, 0xcb, 0x6f, 0xa0, 0x4d, 0x81, 0x64, 0xa2, 0xdd, 0x46, 0xaf, + 0x39, 0x68, 0x8f, 0x3c, 0x79, 0xcc, 0x45, 0xde, 0x16, 0x5d, 0xb1, 0x2f, 0xb0, 0x37, 0x9f, 0x9e, + 0x15, 0x82, 0xae, 0x1f, 0x68, 0x1e, 0x80, 0x73, 0x70, 0x70, 0x9b, 0x3d, 0x36, 0x68, 0x8f, 0xba, + 0xb2, 0xb4, 0x94, 0xb5, 0xa5, 0xbc, 0xab, 0x89, 0xa0, 0x55, 0x2c, 0x58, 0x7f, 0x79, 0x2c, 0xfc, + 0x1d, 0xeb, 0xc7, 0xe0, 0x1c, 0x22, 0x38, 0x07, 0x3b, 0x8f, 0x32, 0x45, 0xbe, 0x4e, 0x48, 0x35, + 0xbf, 0x04, 0xa7, 0xbe, 0xdb, 0xd4, 0x6d, 0x50, 0x88, 0x38, 0xae, 0x5a, 0x7d, 0xfb, 0x75, 0x65, + 0xda, 0x2a, 0xc7, 0xc6, 0xd3, 0xfe, 0x05, 0xb4, 0xea, 0x77, 0x7f, 0x5c, 0x85, 0x83, 0x3d, 0x8f, + 0xf4, 0x9c, 0x32, 0x4e, 0x42, 0xaa, 0xcf, 0xed, 0xd7, 0x37, 0xcf, 0x0a, 0x46, 0x9b, 0x9d, 0x60, + 0xdb, 0x9d, 0x60, 0xdf, 0x3b, 0xc1, 0xd6, 0x7b, 0x61, 0x6d, 0xf7, 0xc2, 0xfa, 0xd8, 0x0b, 0xeb, + 0xde, 0x2d, 0x45, 0xf4, 0xf4, 0x51, 0xa6, 0x58, 0xfd, 0x6d, 0xf3, 0xb2, 0x50, 0x3a, 0xfe, 0x47, + 0x07, 0x38, 0xfb, 0x09, 0x00, 0x00, 0xff, 0xff, 0x67, 0xb7, 0x0d, 0x59, 0x0a, 0x02, 0x00, 0x00, +} + +func (m *CommitInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommitInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) + if err1 != nil { + return 0, err1 + } + i -= n1 + i = encodeVarintCommitInfo(dAtA, i, uint64(n1)) + i-- + dAtA[i] = 0x1a + if len(m.StoreInfos) > 0 { + for iNdEx := len(m.StoreInfos) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.StoreInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommitInfo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Version != 0 { + i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StoreInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoreInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.CommitId.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCommitInfo(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *CommitID) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommitID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CommitID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x12 + } + if m.Version != 0 { + i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintCommitInfo(dAtA []byte, offset int, v uint64) int { + offset -= sovCommitInfo(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *CommitInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != 0 { + n += 1 + sovCommitInfo(uint64(m.Version)) + } + if len(m.StoreInfos) > 0 { + for _, e := range m.StoreInfos { + l = e.Size() + n += 1 + l + sovCommitInfo(uint64(l)) + } + } + l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) + n += 1 + l + sovCommitInfo(uint64(l)) + return n +} + +func (m *StoreInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovCommitInfo(uint64(l)) + } + l = m.CommitId.Size() + n += 1 + l + sovCommitInfo(uint64(l)) + return n +} + +func (m *CommitID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != 0 { + n += 1 + sovCommitInfo(uint64(m.Version)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovCommitInfo(uint64(l)) + } + return n +} + +func sovCommitInfo(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozCommitInfo(x uint64) (n int) { + return sovCommitInfo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *CommitInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommitInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StoreInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StoreInfos = append(m.StoreInfos, StoreInfo{}) + if err := m.StoreInfos[len(m.StoreInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommitInfo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommitInfo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CommitId", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CommitId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommitInfo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommitInfo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CommitID) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommitID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommitID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + m.Version = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Version |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthCommitInfo + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthCommitInfo + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) + if m.Hash == nil { + m.Hash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipCommitInfo(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthCommitInfo + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipCommitInfo(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowCommitInfo + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthCommitInfo + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupCommitInfo + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthCommitInfo + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthCommitInfo = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowCommitInfo = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupCommitInfo = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/store/types/listening.pb.go b/cosmossdk.io/store/types/listening.pb.go new file mode 100644 index 000000000000..1821ca474a6f --- /dev/null +++ b/cosmossdk.io/store/types/listening.pb.go @@ -0,0 +1,785 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/store/v1beta1/listening.proto + +package types + +import ( + fmt "fmt" + v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" + _ "github.com/cosmos/cosmos-proto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and +// Deletes) It optionally includes the StoreKey for the originating KVStore and +// a Boolean flag to distinguish between Sets and Deletes +type StoreKVPair struct { + StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"` + Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"` + Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` + Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` +} + +func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } +func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } +func (*StoreKVPair) ProtoMessage() {} +func (*StoreKVPair) Descriptor() ([]byte, []int) { + return fileDescriptor_b6caeb9d7b7c7c10, []int{0} +} +func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoreKVPair.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StoreKVPair) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoreKVPair.Merge(m, src) +} +func (m *StoreKVPair) XXX_Size() int { + return m.Size() +} +func (m *StoreKVPair) XXX_DiscardUnknown() { + xxx_messageInfo_StoreKVPair.DiscardUnknown(m) +} + +var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo + +func (m *StoreKVPair) GetStoreKey() string { + if m != nil { + return m.StoreKey + } + return "" +} + +func (m *StoreKVPair) GetDelete() bool { + if m != nil { + return m.Delete + } + return false +} + +func (m *StoreKVPair) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *StoreKVPair) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +// BlockMetadata contains all the abci event data of a block +// the file streamer dump them into files together with the state changes. +type BlockMetadata struct { + ResponseCommit *v1.CommitResponse `protobuf:"bytes,6,opt,name=response_commit,json=responseCommit,proto3" json:"response_commit,omitempty"` + RequestFinalizeBlock *v1.FinalizeBlockRequest `protobuf:"bytes,7,opt,name=request_finalize_block,json=requestFinalizeBlock,proto3" json:"request_finalize_block,omitempty"` + ResponseFinalizeBlock *v1.FinalizeBlockResponse `protobuf:"bytes,8,opt,name=response_finalize_block,json=responseFinalizeBlock,proto3" json:"response_finalize_block,omitempty"` +} + +func (m *BlockMetadata) Reset() { *m = BlockMetadata{} } +func (m *BlockMetadata) String() string { return proto.CompactTextString(m) } +func (*BlockMetadata) ProtoMessage() {} +func (*BlockMetadata) Descriptor() ([]byte, []int) { + return fileDescriptor_b6caeb9d7b7c7c10, []int{1} +} +func (m *BlockMetadata) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BlockMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BlockMetadata.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BlockMetadata) XXX_Merge(src proto.Message) { + xxx_messageInfo_BlockMetadata.Merge(m, src) +} +func (m *BlockMetadata) XXX_Size() int { + return m.Size() +} +func (m *BlockMetadata) XXX_DiscardUnknown() { + xxx_messageInfo_BlockMetadata.DiscardUnknown(m) +} + +var xxx_messageInfo_BlockMetadata proto.InternalMessageInfo + +func (m *BlockMetadata) GetResponseCommit() *v1.CommitResponse { + if m != nil { + return m.ResponseCommit + } + return nil +} + +func (m *BlockMetadata) GetRequestFinalizeBlock() *v1.FinalizeBlockRequest { + if m != nil { + return m.RequestFinalizeBlock + } + return nil +} + +func (m *BlockMetadata) GetResponseFinalizeBlock() *v1.FinalizeBlockResponse { + if m != nil { + return m.ResponseFinalizeBlock + } + return nil +} + +func init() { + proto.RegisterType((*StoreKVPair)(nil), "cosmos.store.v1beta1.StoreKVPair") + proto.RegisterType((*BlockMetadata)(nil), "cosmos.store.v1beta1.BlockMetadata") +} + +func init() { + proto.RegisterFile("cosmos/store/v1beta1/listening.proto", fileDescriptor_b6caeb9d7b7c7c10) +} + +var fileDescriptor_b6caeb9d7b7c7c10 = []byte{ + // 416 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0xeb, 0xd6, 0x2d, 0x9e, 0x07, 0x2c, 0x32, 0x65, 0x84, 0x81, 0xa2, 0x68, 0x42, 0xd0, + 0xcb, 0x1c, 0xba, 0x71, 0xe2, 0x38, 0x24, 0x24, 0x32, 0x21, 0xa1, 0x20, 0x71, 0x40, 0x48, 0x91, + 0x93, 0xbe, 0x21, 0xab, 0x69, 0x5c, 0x62, 0x2f, 0x52, 0xb9, 0xf0, 0x15, 0xf8, 0x30, 0x48, 0x7c, + 0x05, 0x8e, 0x13, 0x27, 0x8e, 0xa8, 0xfd, 0x22, 0x28, 0xb6, 0x8b, 0x34, 0x38, 0xec, 0x96, 0xff, + 0x7b, 0xff, 0xff, 0xcf, 0xcf, 0xf1, 0xa3, 0x8f, 0x4a, 0xa5, 0x17, 0x4a, 0x27, 0xda, 0xa8, 0x06, + 0x92, 0x76, 0x5a, 0x80, 0x11, 0xd3, 0xa4, 0x92, 0xda, 0x40, 0x2d, 0xeb, 0x8f, 0x7c, 0xd9, 0x28, + 0xa3, 0xd8, 0xd8, 0xb9, 0xb8, 0x75, 0x71, 0xef, 0x3a, 0x78, 0x58, 0xaa, 0x05, 0x98, 0xe2, 0xdc, + 0x24, 0xa2, 0x28, 0x65, 0xd2, 0x4e, 0x13, 0xb3, 0x5a, 0x82, 0x76, 0x99, 0x83, 0xfb, 0x2e, 0x93, + 0x5b, 0x95, 0x78, 0x80, 0x15, 0x87, 0x5f, 0xe8, 0xee, 0xdb, 0x8e, 0x74, 0xf6, 0xee, 0x8d, 0x90, + 0x0d, 0x7b, 0x40, 0x77, 0x2c, 0x38, 0x9f, 0xc3, 0x2a, 0x44, 0x31, 0x9a, 0xec, 0x64, 0xc4, 0x16, + 0xce, 0x60, 0xc5, 0xf6, 0xe9, 0x68, 0x06, 0x15, 0x18, 0x08, 0xfb, 0x31, 0x9a, 0x90, 0xcc, 0x2b, + 0x16, 0xd0, 0x41, 0x67, 0x1f, 0xc4, 0x68, 0x72, 0x33, 0xeb, 0x3e, 0xd9, 0x98, 0x0e, 0x5b, 0x51, + 0x5d, 0x40, 0x88, 0x6d, 0xcd, 0x89, 0xe7, 0x77, 0x7e, 0x7e, 0x3b, 0xda, 0x73, 0xa7, 0x1f, 0xe9, + 0xd9, 0x3c, 0x7e, 0xca, 0x9f, 0x9d, 0x1c, 0x7e, 0xef, 0xd3, 0x5b, 0xa7, 0x95, 0x2a, 0xe7, 0xaf, + 0xc1, 0x88, 0x99, 0x30, 0x82, 0xbd, 0xa2, 0x7b, 0x0d, 0xe8, 0xa5, 0xaa, 0x35, 0xe4, 0xa5, 0x5a, + 0x2c, 0xa4, 0x09, 0x47, 0x31, 0x9a, 0xec, 0x1e, 0xc7, 0x7c, 0x7b, 0x4b, 0xde, 0xdd, 0x92, 0xb7, + 0x53, 0xfe, 0xc2, 0xf6, 0x33, 0x6f, 0xcf, 0x6e, 0x6f, 0x83, 0xae, 0xce, 0x3e, 0xd0, 0xfd, 0x06, + 0x3e, 0x5d, 0x80, 0x36, 0xf9, 0xb9, 0xac, 0x45, 0x25, 0x3f, 0x43, 0x5e, 0x74, 0x87, 0x85, 0x37, + 0x2c, 0xf1, 0xf1, 0xff, 0xc4, 0x97, 0xde, 0x67, 0x67, 0xca, 0x5c, 0x38, 0x1b, 0x7b, 0xca, 0x95, + 0x26, 0xcb, 0xe9, 0xbd, 0xbf, 0x83, 0xfe, 0x83, 0x27, 0x16, 0xff, 0xe4, 0x5a, 0xbc, 0x9f, 0xfb, + 0xee, 0x96, 0x73, 0xa5, 0x9d, 0x62, 0x82, 0x82, 0x7e, 0x8a, 0x49, 0x3f, 0x18, 0xa4, 0x98, 0x0c, + 0x02, 0x9c, 0x62, 0x82, 0x83, 0x61, 0x8a, 0xc9, 0x30, 0x18, 0x9d, 0x1e, 0xff, 0x58, 0x47, 0xe8, + 0x72, 0x1d, 0xa1, 0xdf, 0xeb, 0x08, 0x7d, 0xdd, 0x44, 0xbd, 0xcb, 0x4d, 0xd4, 0xfb, 0xb5, 0x89, + 0x7a, 0xef, 0x43, 0xf7, 0x93, 0xf5, 0x6c, 0xce, 0xa5, 0xf2, 0xfb, 0x64, 0xf7, 0xa1, 0x18, 0xd9, + 0x57, 0x3f, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x98, 0x9f, 0x12, 0x13, 0x6c, 0x02, 0x00, 0x00, +} + +func (m *StoreKVPair) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Value) > 0 { + i -= len(m.Value) + copy(dAtA[i:], m.Value) + i = encodeVarintListening(dAtA, i, uint64(len(m.Value))) + i-- + dAtA[i] = 0x22 + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintListening(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x1a + } + if m.Delete { + i-- + if m.Delete { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.StoreKey) > 0 { + i -= len(m.StoreKey) + copy(dAtA[i:], m.StoreKey) + i = encodeVarintListening(dAtA, i, uint64(len(m.StoreKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BlockMetadata) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BlockMetadata) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BlockMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ResponseFinalizeBlock != nil { + { + size, err := m.ResponseFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintListening(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + if m.RequestFinalizeBlock != nil { + { + size, err := m.RequestFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintListening(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.ResponseCommit != nil { + { + size, err := m.ResponseCommit.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintListening(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + return len(dAtA) - i, nil +} + +func encodeVarintListening(dAtA []byte, offset int, v uint64) int { + offset -= sovListening(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *StoreKVPair) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StoreKey) + if l > 0 { + n += 1 + l + sovListening(uint64(l)) + } + if m.Delete { + n += 2 + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovListening(uint64(l)) + } + l = len(m.Value) + if l > 0 { + n += 1 + l + sovListening(uint64(l)) + } + return n +} + +func (m *BlockMetadata) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ResponseCommit != nil { + l = m.ResponseCommit.Size() + n += 1 + l + sovListening(uint64(l)) + } + if m.RequestFinalizeBlock != nil { + l = m.RequestFinalizeBlock.Size() + n += 1 + l + sovListening(uint64(l)) + } + if m.ResponseFinalizeBlock != nil { + l = m.ResponseFinalizeBlock.Size() + n += 1 + l + sovListening(uint64(l)) + } + return n +} + +func sovListening(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozListening(x uint64) (n int) { + return sovListening(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *StoreKVPair) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreKVPair: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StoreKey", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StoreKey = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Delete = bool(v != 0) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipListening(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthListening + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BlockMetadata) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BlockMetadata: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BlockMetadata: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseCommit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseCommit == nil { + m.ResponseCommit = &v1.CommitResponse{} + } + if err := m.ResponseCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequestFinalizeBlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RequestFinalizeBlock == nil { + m.RequestFinalizeBlock = &v1.FinalizeBlockRequest{} + } + if err := m.RequestFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseFinalizeBlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowListening + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthListening + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthListening + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResponseFinalizeBlock == nil { + m.ResponseFinalizeBlock = &v1.FinalizeBlockResponse{} + } + if err := m.ResponseFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipListening(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthListening + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipListening(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowListening + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowListening + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowListening + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthListening + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupListening + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthListening + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthListening = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowListening = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupListening = fmt.Errorf("proto: unexpected end of group") +) diff --git a/cosmossdk.io/x/consensus/types/consensus.pb.go b/cosmossdk.io/x/consensus/types/consensus.pb.go new file mode 100644 index 000000000000..3545af8cac9f --- /dev/null +++ b/cosmossdk.io/x/consensus/types/consensus.pb.go @@ -0,0 +1,824 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/consensus/v1/consensus.proto + +package types + +import ( + fmt "fmt" + v1 "github.com/cometbft/cometbft/api/cometbft/types/v1" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft. +type ConsensusMsgParams struct { + // params defines the x/consensus parameters to be passed from comet. + // + // NOTE: All parameters must be supplied. + Version *v1.VersionParams `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Block *v1.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` + Evidence *v1.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` + Validator *v1.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` + Abci *v1.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` // Deprecated: Do not use. + Synchrony *v1.SynchronyParams `protobuf:"bytes,6,opt,name=synchrony,proto3" json:"synchrony,omitempty"` + Feature *v1.FeatureParams `protobuf:"bytes,7,opt,name=feature,proto3" json:"feature,omitempty"` +} + +func (m *ConsensusMsgParams) Reset() { *m = ConsensusMsgParams{} } +func (m *ConsensusMsgParams) String() string { return proto.CompactTextString(m) } +func (*ConsensusMsgParams) ProtoMessage() {} +func (*ConsensusMsgParams) Descriptor() ([]byte, []int) { + return fileDescriptor_7ed86dd7d42fb61b, []int{0} +} +func (m *ConsensusMsgParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConsensusMsgParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConsensusMsgParams.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ConsensusMsgParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsensusMsgParams.Merge(m, src) +} +func (m *ConsensusMsgParams) XXX_Size() int { + return m.Size() +} +func (m *ConsensusMsgParams) XXX_DiscardUnknown() { + xxx_messageInfo_ConsensusMsgParams.DiscardUnknown(m) +} + +var xxx_messageInfo_ConsensusMsgParams proto.InternalMessageInfo + +func (m *ConsensusMsgParams) GetVersion() *v1.VersionParams { + if m != nil { + return m.Version + } + return nil +} + +func (m *ConsensusMsgParams) GetBlock() *v1.BlockParams { + if m != nil { + return m.Block + } + return nil +} + +func (m *ConsensusMsgParams) GetEvidence() *v1.EvidenceParams { + if m != nil { + return m.Evidence + } + return nil +} + +func (m *ConsensusMsgParams) GetValidator() *v1.ValidatorParams { + if m != nil { + return m.Validator + } + return nil +} + +// Deprecated: Do not use. +func (m *ConsensusMsgParams) GetAbci() *v1.ABCIParams { + if m != nil { + return m.Abci + } + return nil +} + +func (m *ConsensusMsgParams) GetSynchrony() *v1.SynchronyParams { + if m != nil { + return m.Synchrony + } + return nil +} + +func (m *ConsensusMsgParams) GetFeature() *v1.FeatureParams { + if m != nil { + return m.Feature + } + return nil +} + +// ConsensusMsgParamsResponse defines the response structure for executing a +// ConsensusMsgParams message. +type ConsensusMsgParamsResponse struct { +} + +func (m *ConsensusMsgParamsResponse) Reset() { *m = ConsensusMsgParamsResponse{} } +func (m *ConsensusMsgParamsResponse) String() string { return proto.CompactTextString(m) } +func (*ConsensusMsgParamsResponse) ProtoMessage() {} +func (*ConsensusMsgParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7ed86dd7d42fb61b, []int{1} +} +func (m *ConsensusMsgParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ConsensusMsgParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ConsensusMsgParamsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ConsensusMsgParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ConsensusMsgParamsResponse.Merge(m, src) +} +func (m *ConsensusMsgParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *ConsensusMsgParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ConsensusMsgParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ConsensusMsgParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ConsensusMsgParams)(nil), "cosmos.consensus.v1.ConsensusMsgParams") + proto.RegisterType((*ConsensusMsgParamsResponse)(nil), "cosmos.consensus.v1.ConsensusMsgParamsResponse") +} + +func init() { + proto.RegisterFile("cosmos/consensus/v1/consensus.proto", fileDescriptor_7ed86dd7d42fb61b) +} + +var fileDescriptor_7ed86dd7d42fb61b = []byte{ + // 340 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd2, 0xcb, 0x4a, 0x33, 0x31, + 0x14, 0x07, 0xf0, 0x4e, 0xaf, 0xdf, 0x17, 0x77, 0x71, 0x13, 0x8a, 0x86, 0x5a, 0x37, 0xae, 0x32, + 0xd4, 0x0b, 0x88, 0x20, 0xe8, 0x14, 0x05, 0x17, 0x82, 0x54, 0x70, 0xe1, 0x6e, 0x26, 0x4d, 0x75, + 0x68, 0x3b, 0x19, 0x92, 0x34, 0xd8, 0xb7, 0xf0, 0x81, 0x7c, 0x00, 0x97, 0x5d, 0xba, 0x94, 0xf6, + 0x45, 0x64, 0x72, 0x69, 0x05, 0xa7, 0xcb, 0x49, 0xfe, 0xbf, 0x73, 0x86, 0x93, 0x03, 0x0e, 0x29, + 0x97, 0x53, 0x2e, 0x43, 0xca, 0x33, 0xc9, 0x32, 0x39, 0x93, 0xa1, 0xee, 0x6d, 0x3e, 0x48, 0x2e, + 0xb8, 0xe2, 0x70, 0xd7, 0x86, 0xc8, 0xe6, 0x5c, 0xf7, 0xda, 0x98, 0xf2, 0x29, 0x53, 0xc9, 0x48, + 0x85, 0x6a, 0x9e, 0x33, 0xe3, 0xf2, 0x58, 0xc4, 0x53, 0x87, 0xba, 0x1f, 0x35, 0x00, 0xfb, 0x1e, + 0xdc, 0xcb, 0x97, 0x07, 0x73, 0x09, 0x2f, 0x40, 0x4b, 0x33, 0x21, 0x53, 0x9e, 0xa1, 0xa0, 0x13, + 0x1c, 0xed, 0x1c, 0x77, 0x88, 0x2f, 0x44, 0x4c, 0x21, 0xa2, 0x7b, 0xe4, 0xc9, 0x26, 0x2c, 0x19, + 0x78, 0x00, 0x4f, 0x41, 0x23, 0x99, 0x70, 0x3a, 0x46, 0x55, 0x23, 0x71, 0x89, 0x8c, 0x8a, 0x7b, + 0xe7, 0x6c, 0x18, 0x5e, 0x82, 0x7f, 0x4c, 0xa7, 0x43, 0x96, 0x51, 0x86, 0x6a, 0x06, 0x1e, 0x94, + 0xc0, 0x1b, 0x17, 0x71, 0x76, 0x4d, 0xe0, 0x15, 0xf8, 0xaf, 0xe3, 0x49, 0x3a, 0x8c, 0x15, 0x17, + 0xa8, 0x6e, 0x7c, 0xb7, 0xec, 0x97, 0x7d, 0xc6, 0x15, 0xd8, 0x20, 0x78, 0x06, 0xea, 0x71, 0x42, + 0x53, 0xd4, 0x30, 0x78, 0xbf, 0x04, 0x5f, 0x47, 0xfd, 0x3b, 0xeb, 0xa2, 0x2a, 0x0a, 0x06, 0x26, + 0x5e, 0x34, 0x96, 0xf3, 0x8c, 0xbe, 0x0a, 0x9e, 0xcd, 0x51, 0x73, 0x6b, 0xe3, 0x47, 0x9f, 0xf1, + 0x8d, 0xd7, 0xa8, 0x98, 0xf5, 0x88, 0xc5, 0x6a, 0x26, 0x18, 0x6a, 0x6d, 0x9d, 0xf5, 0xad, 0x4d, + 0xf8, 0x59, 0x3b, 0xd0, 0xdd, 0x03, 0xed, 0xbf, 0xaf, 0x37, 0x60, 0x32, 0x2f, 0x0e, 0xa3, 0xf3, + 0xcf, 0x25, 0x0e, 0x16, 0x4b, 0x1c, 0x7c, 0x2f, 0x71, 0xf0, 0xbe, 0xc2, 0x95, 0xc5, 0x0a, 0x57, + 0xbe, 0x56, 0xb8, 0xf2, 0x8c, 0xed, 0xae, 0xc8, 0xe1, 0x98, 0xa4, 0x3c, 0x7c, 0xfb, 0xb5, 0x58, + 0xa6, 0x63, 0xd2, 0x34, 0xdb, 0x71, 0xf2, 0x13, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x8f, 0x7e, 0x2c, + 0x79, 0x02, 0x00, 0x00, +} + +func (m *ConsensusMsgParams) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConsensusMsgParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConsensusMsgParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Feature != nil { + { + size, err := m.Feature.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintConsensus(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.Synchrony != nil { + { + size, err := m.Synchrony.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintConsensus(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.Abci != nil { + { + size, err := m.Abci.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintConsensus(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.Validator != nil { + { + size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintConsensus(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if m.Evidence != nil { + { + size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintConsensus(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Block != nil { + { + size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintConsensus(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Version != nil { + { + size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintConsensus(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ConsensusMsgParamsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ConsensusMsgParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ConsensusMsgParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintConsensus(dAtA []byte, offset int, v uint64) int { + offset -= sovConsensus(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ConsensusMsgParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Version != nil { + l = m.Version.Size() + n += 1 + l + sovConsensus(uint64(l)) + } + if m.Block != nil { + l = m.Block.Size() + n += 1 + l + sovConsensus(uint64(l)) + } + if m.Evidence != nil { + l = m.Evidence.Size() + n += 1 + l + sovConsensus(uint64(l)) + } + if m.Validator != nil { + l = m.Validator.Size() + n += 1 + l + sovConsensus(uint64(l)) + } + if m.Abci != nil { + l = m.Abci.Size() + n += 1 + l + sovConsensus(uint64(l)) + } + if m.Synchrony != nil { + l = m.Synchrony.Size() + n += 1 + l + sovConsensus(uint64(l)) + } + if m.Feature != nil { + l = m.Feature.Size() + n += 1 + l + sovConsensus(uint64(l)) + } + return n +} + +func (m *ConsensusMsgParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovConsensus(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozConsensus(x uint64) (n int) { + return sovConsensus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConsensusMsgParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConsensusMsgParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthConsensus + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthConsensus + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Version == nil { + m.Version = &v1.VersionParams{} + } + if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthConsensus + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthConsensus + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Block == nil { + m.Block = &v1.BlockParams{} + } + if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthConsensus + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthConsensus + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Evidence == nil { + m.Evidence = &v1.EvidenceParams{} + } + if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthConsensus + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthConsensus + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Validator == nil { + m.Validator = &v1.ValidatorParams{} + } + if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Abci", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthConsensus + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthConsensus + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Abci == nil { + m.Abci = &v1.ABCIParams{} + } + if err := m.Abci.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Synchrony", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthConsensus + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthConsensus + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Synchrony == nil { + m.Synchrony = &v1.SynchronyParams{} + } + if err := m.Synchrony.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Feature", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthConsensus + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthConsensus + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Feature == nil { + m.Feature = &v1.FeatureParams{} + } + if err := m.Feature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipConsensus(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthConsensus + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ConsensusMsgParamsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowConsensus + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ConsensusMsgParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ConsensusMsgParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipConsensus(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthConsensus + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipConsensus(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowConsensus + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowConsensus + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowConsensus + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthConsensus + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupConsensus + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthConsensus + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthConsensus = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowConsensus = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupConsensus = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index 01e2b1b4cf86..0d9aa5fd58b1 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -11,7 +11,6 @@ import ( "cosmossdk.io/collections" "cosmossdk.io/core/event" "cosmossdk.io/core/router" - consensustypes "cosmossdk.io/x/consensus/types" "cosmossdk.io/x/gov/types" v1 "cosmossdk.io/x/gov/types/v1" @@ -191,17 +190,15 @@ func (k Keeper) EndBlocker(ctx context.Context) error { break } - var res consensustypes.QueryParamsResponse - - if err := k.RouterService.QueryRouterService().InvokeTyped(ctx, &consensustypes.QueryParamsRequest{}, &res); err != nil { - return err - } - // attempt to execute all messages within the passed proposal // Messages may mutate state thus we use a cached context. If one of // the handlers fails, no state mutation is written and the error // message is logged. - _, err = k.BranchService.ExecuteWithGasLimit(ctx, uint64(res.Params.Block.MaxGas), func(ctx context.Context) error { + params, err := k.Params.Get(ctx) + if err != nil { + return err + } + _, err = k.BranchService.ExecuteWithGasLimit(ctx, uint64(params.ProposalExecutionGas), func(ctx context.Context) error { // execute all messages for idx, msg = range messages { if _, err := safeExecuteHandler(ctx, msg, k.MsgRouterService); err != nil { diff --git a/x/gov/proto/cosmos/gov/v1/gov.proto b/x/gov/proto/cosmos/gov/v1/gov.proto index b23243208763..0f1446023685 100644 --- a/x/gov/proto/cosmos/gov/v1/gov.proto +++ b/x/gov/proto/cosmos/gov/v1/gov.proto @@ -343,6 +343,8 @@ message Params { // Minimum percentage of total stake needed to vote for a result to be // considered valid for an expedited proposal. string expedited_quorum = 21 [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v1.0.0"]; + + uint64 proposal_execution_gas = 22 [(cosmos_proto.field_added_in) = "x/gov v1.0.0"]; } // MessageBasedParams defines the parameters of specific messages in a proposal. @@ -365,4 +367,4 @@ message MessageBasedParams { // Minimum value of Veto votes to Total votes ratio for proposal to be vetoed. string veto_threshold = 4 [(cosmos_proto.scalar) = "cosmos.Dec"]; -} \ No newline at end of file +} diff --git a/x/gov/types/v1/gov.pb.go b/x/gov/types/v1/gov.pb.go index 02accb41d0eb..00f34a0233f0 100644 --- a/x/gov/types/v1/gov.pb.go +++ b/x/gov/types/v1/gov.pb.go @@ -1003,7 +1003,8 @@ type Params struct { YesQuorum string `protobuf:"bytes,20,opt,name=yes_quorum,json=yesQuorum,proto3" json:"yes_quorum,omitempty"` // Minimum percentage of total stake needed to vote for a result to be // considered valid for an expedited proposal. - ExpeditedQuorum string `protobuf:"bytes,21,opt,name=expedited_quorum,json=expeditedQuorum,proto3" json:"expedited_quorum,omitempty"` + ExpeditedQuorum string `protobuf:"bytes,21,opt,name=expedited_quorum,json=expeditedQuorum,proto3" json:"expedited_quorum,omitempty"` + ProposalExecutionGas uint64 `protobuf:"varint,22,opt,name=proposal_execution_gas,json=proposalExecutionGas,proto3" json:"proposal_execution_gas,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -1186,6 +1187,13 @@ func (m *Params) GetExpeditedQuorum() string { return "" } +func (m *Params) GetProposalExecutionGas() uint64 { + if m != nil { + return m.ProposalExecutionGas + } + return 0 +} + // MessageBasedParams defines the parameters of specific messages in a proposal. // It is used to define the parameters of a proposal that is based on a specific message. // Once a message has message based params, it only supports a standard proposal type. @@ -1291,131 +1299,133 @@ func init() { func init() { proto.RegisterFile("cosmos/gov/v1/gov.proto", fileDescriptor_e05cb1c0d030febb) } var fileDescriptor_e05cb1c0d030febb = []byte{ - // 1971 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4d, 0x6f, 0x1b, 0xc7, - 0x19, 0xf6, 0x92, 0x14, 0x25, 0xbe, 0x22, 0xa9, 0xd5, 0x48, 0x8a, 0xd6, 0x52, 0x44, 0xc9, 0x44, - 0x11, 0xa8, 0x4e, 0x44, 0x4a, 0x49, 0xd5, 0xa6, 0x6e, 0x72, 0x20, 0xc5, 0x75, 0xbc, 0x86, 0x25, - 0xb2, 0xcb, 0xb5, 0x6c, 0xb7, 0x28, 0x16, 0x2b, 0xed, 0x58, 0xda, 0x84, 0xbb, 0xc3, 0xee, 0x0e, - 0xf5, 0xd1, 0x5f, 0x91, 0x63, 0x4f, 0x45, 0x6f, 0xcd, 0xb1, 0x07, 0xa3, 0xf7, 0xde, 0x82, 0x1e, - 0x8a, 0xc0, 0xa7, 0x22, 0x40, 0xdd, 0xc2, 0x3e, 0x14, 0xc8, 0x4f, 0x28, 0x0a, 0xb4, 0x98, 0xd9, - 0x59, 0xee, 0xf2, 0x43, 0x16, 0x15, 0xf4, 0x62, 0x53, 0xf3, 0x3e, 0xcf, 0x33, 0xef, 0xbc, 0x5f, - 0x33, 0x24, 0x2c, 0x1f, 0x93, 0xc0, 0x25, 0x41, 0xf5, 0x84, 0x9c, 0x55, 0xcf, 0x76, 0xd8, 0x7f, - 0x95, 0xae, 0x4f, 0x28, 0x41, 0x85, 0xd0, 0x50, 0x61, 0x2b, 0x67, 0x3b, 0x2b, 0x25, 0x81, 0x3b, - 0xb2, 0x02, 0x5c, 0x3d, 0xdb, 0x39, 0xc2, 0xd4, 0xda, 0xa9, 0x1e, 0x13, 0xc7, 0x0b, 0xe1, 0x2b, - 0x8b, 0x27, 0xe4, 0x84, 0xf0, 0x8f, 0x55, 0xf6, 0x49, 0xac, 0xae, 0x9f, 0x10, 0x72, 0xd2, 0xc1, - 0x55, 0xfe, 0xd7, 0x51, 0xef, 0x79, 0x95, 0x3a, 0x2e, 0x0e, 0xa8, 0xe5, 0x76, 0x05, 0xe0, 0xf6, - 0x30, 0xc0, 0xf2, 0x2e, 0x85, 0xa9, 0x34, 0x6c, 0xb2, 0x7b, 0xbe, 0x45, 0x1d, 0x12, 0xed, 0x78, - 0x3b, 0xf4, 0xc8, 0x0c, 0x37, 0x15, 0xde, 0x86, 0xa6, 0x79, 0xcb, 0x75, 0x3c, 0x52, 0xe5, 0xff, - 0x86, 0x4b, 0x65, 0x02, 0xe8, 0x09, 0x76, 0x4e, 0x4e, 0x29, 0xb6, 0x0f, 0x09, 0xc5, 0xcd, 0x2e, - 0x53, 0x42, 0x3b, 0x90, 0x25, 0xfc, 0x93, 0x22, 0x6d, 0x48, 0x9b, 0xc5, 0x0f, 0x6f, 0x57, 0x06, - 0x4e, 0x5d, 0x89, 0xa1, 0xba, 0x00, 0xa2, 0xf7, 0x20, 0x7b, 0xce, 0x85, 0x94, 0xd4, 0x86, 0xb4, - 0x99, 0xab, 0x17, 0x5f, 0xbe, 0xd8, 0x02, 0xc1, 0x6a, 0xe0, 0x63, 0x5d, 0x58, 0xcb, 0xbf, 0x97, - 0x60, 0xba, 0x81, 0xbb, 0x24, 0x70, 0x28, 0x5a, 0x87, 0xd9, 0xae, 0x4f, 0xba, 0x24, 0xb0, 0x3a, - 0xa6, 0x63, 0xf3, 0xbd, 0x32, 0x3a, 0x44, 0x4b, 0x9a, 0x8d, 0x7e, 0x0c, 0x39, 0x3b, 0xc4, 0x12, - 0x5f, 0xe8, 0x2a, 0x2f, 0x5f, 0x6c, 0x2d, 0x0a, 0xdd, 0x9a, 0x6d, 0xfb, 0x38, 0x08, 0xda, 0xd4, - 0x77, 0xbc, 0x13, 0x3d, 0x86, 0xa2, 0x4f, 0x20, 0x6b, 0xb9, 0xa4, 0xe7, 0x51, 0x25, 0xbd, 0x91, - 0xde, 0x9c, 0x8d, 0xfd, 0x67, 0x69, 0xaa, 0x88, 0x34, 0x55, 0xf6, 0x88, 0xe3, 0xd5, 0x73, 0x5f, - 0xbf, 0x5a, 0xbf, 0xf5, 0xd5, 0xbf, 0xfe, 0x78, 0x57, 0xd2, 0x05, 0xa7, 0xfc, 0xe7, 0x69, 0x98, - 0x69, 0x09, 0x27, 0x50, 0x11, 0x52, 0x7d, 0xd7, 0x52, 0x8e, 0x8d, 0xb6, 0x61, 0xc6, 0xc5, 0x41, - 0x60, 0x9d, 0xe0, 0x40, 0x49, 0x71, 0xf1, 0xc5, 0x4a, 0x98, 0x91, 0x4a, 0x94, 0x91, 0x4a, 0xcd, - 0xbb, 0xd4, 0xfb, 0x28, 0xb4, 0x0b, 0xd9, 0x80, 0x5a, 0xb4, 0x17, 0x28, 0x69, 0x1e, 0xcc, 0xb5, - 0xa1, 0x60, 0x46, 0x5b, 0xb5, 0x39, 0x48, 0x17, 0x60, 0xf4, 0x00, 0xd0, 0x73, 0xc7, 0xb3, 0x3a, - 0x26, 0xb5, 0x3a, 0x9d, 0x4b, 0xd3, 0xc7, 0x41, 0xaf, 0x43, 0x95, 0xcc, 0x86, 0xb4, 0x39, 0xfb, - 0xe1, 0xca, 0x90, 0x84, 0xc1, 0x20, 0x3a, 0x47, 0xe8, 0x32, 0x67, 0x25, 0x56, 0x50, 0x0d, 0x66, - 0x83, 0xde, 0x91, 0xeb, 0x50, 0x93, 0x95, 0x99, 0x32, 0x25, 0x24, 0x86, 0xbd, 0x36, 0xa2, 0x1a, - 0xac, 0x67, 0xbe, 0xfc, 0xc7, 0xba, 0xa4, 0x43, 0x48, 0x62, 0xcb, 0xe8, 0x21, 0xc8, 0x22, 0xba, - 0x26, 0xf6, 0xec, 0x50, 0x27, 0x3b, 0xa1, 0x4e, 0x51, 0x30, 0x55, 0xcf, 0xe6, 0x5a, 0x1a, 0x14, - 0x28, 0xa1, 0x56, 0xc7, 0x14, 0xeb, 0xca, 0xf4, 0x0d, 0x72, 0x94, 0xe7, 0xd4, 0xa8, 0x80, 0x1e, - 0xc1, 0xfc, 0x19, 0xa1, 0x8e, 0x77, 0x62, 0x06, 0xd4, 0xf2, 0xc5, 0xf9, 0x66, 0x26, 0xf4, 0x6b, - 0x2e, 0xa4, 0xb6, 0x19, 0x93, 0x3b, 0xf6, 0x00, 0xc4, 0x52, 0x7c, 0xc6, 0xdc, 0x84, 0x5a, 0x85, - 0x90, 0x18, 0x1d, 0x71, 0x85, 0x15, 0x09, 0xb5, 0x6c, 0x8b, 0x5a, 0x0a, 0xb0, 0xb2, 0xd5, 0xfb, - 0x7f, 0xa3, 0x1f, 0xc2, 0x14, 0x75, 0x68, 0x07, 0x2b, 0xb3, 0xbc, 0x9e, 0x17, 0xbe, 0x7d, 0xb1, - 0x35, 0x17, 0x9e, 0x7c, 0x2b, 0xb0, 0xbf, 0xd8, 0xd8, 0xae, 0xfc, 0xe8, 0x27, 0x7a, 0x88, 0x40, - 0x5b, 0x30, 0x1d, 0xf4, 0x5c, 0xd7, 0xf2, 0x2f, 0x95, 0xfc, 0xd5, 0xe0, 0x08, 0x83, 0x3e, 0x83, - 0x99, 0xb0, 0x77, 0xb0, 0xaf, 0x14, 0x38, 0xfe, 0xfd, 0xab, 0x9a, 0x65, 0x9c, 0x4e, 0x9f, 0x8c, - 0x3e, 0x82, 0x1c, 0xbe, 0xe8, 0x62, 0xdb, 0xa1, 0xd8, 0x56, 0x8a, 0x1b, 0xd2, 0xe6, 0x4c, 0x7d, - 0x69, 0x84, 0xb1, 0xbb, 0xad, 0x48, 0x7a, 0x8c, 0x43, 0x1f, 0x43, 0xe1, 0xb9, 0xe5, 0x74, 0xb0, - 0x6d, 0xfa, 0xd8, 0x0a, 0x88, 0xa7, 0xcc, 0x5d, 0xe1, 0xf2, 0xee, 0xb6, 0x9e, 0x0f, 0x91, 0x3a, - 0x07, 0x22, 0x1d, 0x0a, 0xfd, 0x31, 0x40, 0x2f, 0xbb, 0x58, 0x91, 0x79, 0x9f, 0xac, 0x5e, 0xd1, - 0x27, 0xc6, 0x65, 0x17, 0xd7, 0xe5, 0x6f, 0x5f, 0x6c, 0xe5, 0x2f, 0xd8, 0x5c, 0xde, 0x38, 0xdb, - 0xa9, 0x6c, 0x57, 0xb6, 0xf5, 0x7c, 0x37, 0x61, 0x2f, 0xff, 0x45, 0x82, 0x85, 0x88, 0x10, 0x4f, - 0xab, 0x00, 0xad, 0x01, 0x84, 0x03, 0xcb, 0x24, 0x1e, 0xe6, 0x6d, 0x9d, 0xd3, 0x73, 0xe1, 0x4a, - 0xd3, 0xc3, 0x09, 0x33, 0x3d, 0x27, 0xe1, 0xc4, 0x89, 0xcc, 0xc6, 0x39, 0x41, 0x77, 0x20, 0x1f, - 0x99, 0x4f, 0x7d, 0x8c, 0x79, 0x43, 0xe7, 0xf4, 0x59, 0x01, 0x60, 0x4b, 0x6c, 0xa6, 0x09, 0xc8, - 0x73, 0xd2, 0xf3, 0x79, 0xbf, 0xe6, 0x74, 0x21, 0x7a, 0x9f, 0xf4, 0xfc, 0x04, 0x20, 0xe8, 0x5a, - 0x2e, 0xef, 0xc6, 0x3e, 0xa0, 0xdd, 0xb5, 0xdc, 0x7b, 0xf2, 0xcb, 0xa1, 0xa3, 0x95, 0xff, 0x93, - 0x86, 0xd9, 0x64, 0x43, 0x6f, 0x41, 0xee, 0x12, 0x07, 0xe6, 0x31, 0x9f, 0x70, 0xfc, 0x0c, 0x75, - 0x39, 0x31, 0x6e, 0x35, 0xb6, 0xaa, 0xcf, 0x5c, 0xe2, 0x60, 0x8f, 0x21, 0xd0, 0x2e, 0x14, 0xac, - 0xa3, 0x80, 0x5a, 0x8e, 0x27, 0x28, 0xa9, 0x2b, 0x28, 0x79, 0x01, 0x0b, 0x69, 0xef, 0xc3, 0x8c, - 0x47, 0x04, 0x23, 0x7d, 0x05, 0x63, 0xda, 0x23, 0x21, 0xf8, 0x53, 0x40, 0x1e, 0x31, 0xcf, 0x1d, - 0x7a, 0x6a, 0x9e, 0x61, 0x1a, 0xd1, 0x32, 0x57, 0xd0, 0xe6, 0x3c, 0xf2, 0xc4, 0xa1, 0xa7, 0x87, - 0x98, 0x0a, 0xfa, 0xc7, 0x20, 0xc7, 0x69, 0x11, 0xe4, 0xa9, 0x91, 0x7b, 0x44, 0xf3, 0xa8, 0x5e, - 0xec, 0x27, 0x6b, 0x98, 0x49, 0xcf, 0xa3, 0x6d, 0xb3, 0x6f, 0x63, 0x1a, 0xe7, 0x62, 0xcf, 0x4f, - 0x00, 0x25, 0x93, 0x29, 0xb8, 0xd3, 0x63, 0xb9, 0x72, 0x22, 0xc5, 0x21, 0xfb, 0x1e, 0xcc, 0x27, - 0xf2, 0x2c, 0xc8, 0x33, 0x63, 0xc9, 0x73, 0x71, 0xf6, 0x43, 0xee, 0x16, 0x00, 0xcb, 0xbd, 0x20, - 0xe5, 0xc6, 0x92, 0x72, 0x0c, 0xc1, 0xe1, 0xe5, 0x3f, 0x49, 0x90, 0x61, 0x35, 0x7c, 0xfd, 0x7d, - 0x59, 0x81, 0xa9, 0x33, 0x42, 0xf1, 0xf5, 0x77, 0x65, 0x08, 0x43, 0x3f, 0x83, 0xe9, 0xd0, 0xb7, - 0x40, 0xc9, 0xf0, 0x21, 0x7c, 0x67, 0xa8, 0xe7, 0x46, 0xdf, 0x06, 0x7a, 0xc4, 0x18, 0x18, 0x72, - 0x53, 0x83, 0x43, 0xee, 0x61, 0x66, 0x26, 0x2d, 0x67, 0xca, 0x7f, 0x97, 0xa0, 0x20, 0x46, 0x75, - 0xcb, 0xf2, 0x2d, 0x37, 0x40, 0xcf, 0x60, 0xd6, 0x75, 0xbc, 0xfe, 0xe4, 0x97, 0xae, 0x9b, 0xfc, - 0x6b, 0x6c, 0xf2, 0x7f, 0xf7, 0x6a, 0x7d, 0x29, 0xc1, 0xfa, 0x80, 0xb8, 0x0e, 0xc5, 0x6e, 0x97, - 0x5e, 0xea, 0xe0, 0x3a, 0x5e, 0x74, 0x17, 0xb8, 0x80, 0x5c, 0xeb, 0x22, 0x02, 0x99, 0x5d, 0xec, - 0x3b, 0xc4, 0xe6, 0x81, 0x60, 0x3b, 0x0c, 0x0f, 0xf0, 0x86, 0x78, 0x34, 0xd5, 0x7f, 0xf0, 0xdd, - 0xab, 0xf5, 0x77, 0x47, 0x89, 0xf1, 0x26, 0xbf, 0x65, 0xf3, 0x5d, 0x76, 0xad, 0x8b, 0xe8, 0x24, - 0xdc, 0x7e, 0x2f, 0xa5, 0x48, 0xe5, 0xa7, 0x90, 0x3f, 0xe4, 0x73, 0x5f, 0x9c, 0xae, 0x01, 0xe2, - 0x1e, 0x88, 0x76, 0x97, 0xae, 0xdb, 0x3d, 0xc3, 0xd5, 0xf3, 0x21, 0x2b, 0xa1, 0xfc, 0x3b, 0x49, - 0x74, 0xbc, 0x50, 0x7e, 0x0f, 0xb2, 0xbf, 0xee, 0x11, 0xbf, 0xe7, 0x8a, 0x76, 0x1f, 0x79, 0x5d, - 0x85, 0x56, 0xf4, 0x01, 0xe4, 0x58, 0x31, 0x07, 0xa7, 0xa4, 0x63, 0x5f, 0xf1, 0x10, 0x8b, 0x01, - 0x68, 0x17, 0x8a, 0xbc, 0x59, 0x63, 0x4a, 0x7a, 0x2c, 0xa5, 0xc0, 0x50, 0x46, 0x04, 0xe2, 0x0e, - 0xfe, 0x37, 0x0f, 0x59, 0xe1, 0x9b, 0x7a, 0xc3, 0x9c, 0x26, 0x6e, 0xf3, 0x64, 0xfe, 0xf6, 0xbf, - 0x5f, 0xfe, 0x32, 0xe3, 0xf3, 0x33, 0x9a, 0x8b, 0xf4, 0xf7, 0xc8, 0x45, 0x22, 0xee, 0x99, 0xc9, - 0xe3, 0x3e, 0x75, 0xf3, 0xb8, 0x67, 0x27, 0x88, 0x3b, 0xd2, 0xe0, 0x36, 0x0b, 0xb4, 0xe3, 0x39, - 0xd4, 0x89, 0x9f, 0x4f, 0x26, 0x77, 0x7f, 0xcc, 0xdc, 0x62, 0x0a, 0xef, 0xb8, 0x8e, 0xa7, 0x85, - 0x78, 0x11, 0x1e, 0x9d, 0xa1, 0xd1, 0x63, 0x58, 0xea, 0x4f, 0x92, 0x63, 0xcb, 0x3b, 0xc6, 0x1d, - 0x21, 0x13, 0x4e, 0xb0, 0x3b, 0x83, 0x32, 0xe3, 0xae, 0xf0, 0x85, 0x88, 0xbf, 0xc7, 0xe9, 0xa1, - 0xec, 0xaf, 0x60, 0x71, 0x58, 0xd6, 0xc6, 0x41, 0x34, 0xe2, 0x26, 0x7f, 0x8d, 0xec, 0x6e, 0xeb, - 0x68, 0x50, 0xbf, 0x81, 0x03, 0x8a, 0x3e, 0x87, 0xe5, 0xfe, 0x7b, 0xc3, 0x1c, 0xcc, 0x2e, 0x5c, - 0x97, 0xdd, 0x65, 0x96, 0xdd, 0x71, 0x1b, 0x2d, 0xf5, 0x25, 0x0f, 0x93, 0x99, 0xd7, 0x61, 0x21, - 0xde, 0x2b, 0x4e, 0xd4, 0xec, 0xa4, 0xf1, 0x41, 0x7d, 0x76, 0x9c, 0xc0, 0xa7, 0x10, 0x6f, 0x66, - 0x26, 0x7b, 0x26, 0x7f, 0x83, 0x9e, 0x89, 0xdd, 0xda, 0x8f, 0x9b, 0xe7, 0x53, 0x90, 0x8f, 0x7a, - 0xbe, 0xc7, 0x82, 0x82, 0x4d, 0x51, 0xb1, 0x05, 0xfe, 0x70, 0x1b, 0xfb, 0x64, 0x2c, 0x32, 0x30, - 0x9b, 0xe9, 0x3f, 0x0f, 0xcb, 0xf7, 0x10, 0xd6, 0x38, 0xbd, 0x9f, 0xbc, 0x7e, 0x17, 0xfa, 0x98, - 0x49, 0x8a, 0x47, 0xe0, 0x58, 0xad, 0x15, 0xc6, 0x8c, 0x9e, 0x5a, 0x51, 0x0f, 0x86, 0x34, 0xf4, - 0x53, 0x28, 0xc6, 0x6e, 0xb1, 0x62, 0xe6, 0x8f, 0xc2, 0x2b, 0x84, 0xf2, 0x91, 0x53, 0xec, 0x59, - 0x80, 0xf6, 0x61, 0x3e, 0x11, 0x21, 0x51, 0x9d, 0xf2, 0xa4, 0xd1, 0x9f, 0x8b, 0x07, 0x4b, 0x58, - 0x99, 0xbf, 0x84, 0x95, 0xe1, 0xca, 0x64, 0xd3, 0x46, 0x54, 0xcf, 0x3c, 0xd7, 0x2d, 0x8d, 0xe8, - 0x0e, 0xbe, 0x30, 0x97, 0x07, 0x4b, 0x72, 0xdf, 0xba, 0x10, 0xb5, 0xd2, 0x85, 0x75, 0x76, 0x29, - 0xba, 0x4e, 0x40, 0x9d, 0x63, 0xd3, 0xea, 0xd1, 0x53, 0xe2, 0x3b, 0xbf, 0xc1, 0xb6, 0x69, 0x85, - 0x55, 0x8e, 0x03, 0x05, 0x6d, 0xa4, 0x37, 0x73, 0xf5, 0xcd, 0xb7, 0x74, 0xc0, 0xe0, 0x5e, 0x6b, - 0xb1, 0x60, 0xad, 0xaf, 0x57, 0x8b, 0xe4, 0xd0, 0x11, 0x24, 0x00, 0xa6, 0x8f, 0x3f, 0xc7, 0xc7, - 0x83, 0x75, 0xba, 0x30, 0xd1, 0x89, 0x56, 0x63, 0x11, 0x5d, 0x68, 0xc4, 0xd5, 0xfa, 0x29, 0x00, - 0x7b, 0x65, 0x8a, 0x6a, 0x5a, 0x9c, 0x48, 0x90, 0xbd, 0x4b, 0x45, 0x4d, 0x69, 0x20, 0xc7, 0xc5, - 0x2e, 0x44, 0x96, 0x26, 0x12, 0x99, 0xeb, 0xf3, 0x42, 0xa9, 0x7b, 0x0b, 0x2f, 0x47, 0xcb, 0xa5, - 0xfc, 0x55, 0x0a, 0xd0, 0x7e, 0xf8, 0x1d, 0xbb, 0x6e, 0x05, 0xd8, 0xfe, 0x7f, 0xde, 0xc1, 0x89, - 0xb9, 0x9f, 0x7a, 0xeb, 0xdc, 0xdf, 0x1a, 0x13, 0xa3, 0x91, 0xc1, 0x1f, 0xc7, 0x64, 0xe0, 0x9a, - 0x48, 0xdf, 0xfc, 0x9a, 0xc8, 0x4c, 0x72, 0x3d, 0x8f, 0x7c, 0x7f, 0xb8, 0xfb, 0x07, 0x09, 0xf2, - 0xc9, 0x6f, 0x4f, 0x68, 0x0d, 0x6e, 0xb7, 0xf4, 0x66, 0xab, 0xd9, 0xae, 0x3d, 0x32, 0x8d, 0x67, - 0x2d, 0xd5, 0x7c, 0x7c, 0xd0, 0x6e, 0xa9, 0x7b, 0xda, 0x7d, 0x4d, 0x6d, 0xc8, 0xb7, 0xd0, 0x0a, - 0xbc, 0x33, 0x68, 0x6e, 0x1b, 0xb5, 0x83, 0x46, 0x4d, 0x6f, 0xc8, 0x12, 0xba, 0x03, 0x6b, 0x83, - 0xb6, 0xfd, 0xc7, 0x8f, 0x0c, 0xad, 0xf5, 0x48, 0x35, 0xf7, 0x1e, 0x34, 0xb5, 0x3d, 0x55, 0x4e, - 0xa1, 0x77, 0x41, 0x19, 0x84, 0x34, 0x5b, 0x86, 0xb6, 0xaf, 0xb5, 0x0d, 0x6d, 0x4f, 0x4e, 0xa3, - 0x55, 0x58, 0x1e, 0xb4, 0xaa, 0x4f, 0x5b, 0x6a, 0x43, 0x33, 0xd4, 0x86, 0x9c, 0xb9, 0xfb, 0x6f, - 0x09, 0x20, 0xf1, 0x3b, 0xd4, 0x2a, 0x2c, 0x1f, 0x36, 0x8d, 0x50, 0xa0, 0x79, 0x30, 0xe4, 0xe5, - 0x02, 0xcc, 0x25, 0x8d, 0xcf, 0xd4, 0xb6, 0x2c, 0x0d, 0x2f, 0x36, 0x0f, 0x54, 0x59, 0x42, 0xcb, - 0xb0, 0x90, 0x5c, 0xac, 0xd5, 0xdb, 0x46, 0x4d, 0x3b, 0x90, 0x53, 0xc3, 0x68, 0xe3, 0x49, 0x53, - 0x4e, 0x21, 0x04, 0xc5, 0xe4, 0xe2, 0x41, 0x53, 0x4e, 0xa3, 0x25, 0x98, 0x1f, 0x00, 0x3e, 0xd0, - 0x55, 0x55, 0x4e, 0xb3, 0x93, 0x0e, 0x42, 0xcd, 0x27, 0x9a, 0xf1, 0xc0, 0x3c, 0x54, 0x8d, 0xa6, - 0x9c, 0x41, 0x8b, 0x20, 0x27, 0xad, 0xf7, 0x9b, 0x8f, 0xf5, 0xd1, 0xd5, 0x76, 0xab, 0xb6, 0x2f, - 0x4f, 0xad, 0xa4, 0x64, 0xe9, 0xee, 0x5f, 0x25, 0x28, 0x0e, 0xfe, 0x18, 0x84, 0xd6, 0x61, 0xb5, - 0x1f, 0xac, 0xb6, 0x51, 0x33, 0x1e, 0xb7, 0x87, 0x82, 0x50, 0x86, 0xd2, 0x30, 0xa0, 0xa1, 0xb6, - 0x9a, 0x6d, 0xcd, 0x30, 0x5b, 0xaa, 0xae, 0x35, 0x87, 0x53, 0x26, 0x30, 0x87, 0x4d, 0x43, 0x3b, - 0xf8, 0x2c, 0x82, 0xa4, 0x06, 0x32, 0x2e, 0x20, 0xad, 0x5a, 0xbb, 0xad, 0x36, 0xc2, 0x43, 0x0e, - 0xdb, 0x74, 0xf5, 0xa1, 0xba, 0xc7, 0x33, 0x36, 0x8e, 0x79, 0xbf, 0xa6, 0x3d, 0x52, 0x1b, 0xf2, - 0x54, 0x7d, 0xf7, 0xeb, 0xd7, 0x25, 0xe9, 0x9b, 0xd7, 0x25, 0xe9, 0x9f, 0xaf, 0x4b, 0xd2, 0x97, - 0x6f, 0x4a, 0xb7, 0xbe, 0x79, 0x53, 0xba, 0xf5, 0xb7, 0x37, 0xa5, 0x5b, 0xbf, 0x58, 0x0d, 0xcb, - 0x37, 0xb0, 0xbf, 0xa8, 0x38, 0xa4, 0xca, 0x8b, 0xb5, 0xca, 0xbe, 0xfa, 0x07, 0xd5, 0xb3, 0x9d, - 0xa3, 0x2c, 0xef, 0xd1, 0x8f, 0xfe, 0x17, 0x00, 0x00, 0xff, 0xff, 0xfc, 0x55, 0x4b, 0xa4, 0x84, - 0x15, 0x00, 0x00, + // 2001 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0x4d, 0x6f, 0xdb, 0xc8, + 0x19, 0x0e, 0x25, 0xf9, 0x43, 0xaf, 0x25, 0x99, 0x1e, 0xdb, 0x31, 0x63, 0xaf, 0x3f, 0x22, 0x14, + 0x0b, 0x37, 0xbb, 0x96, 0xec, 0xdd, 0xba, 0xdd, 0xa6, 0xbb, 0x07, 0xc9, 0x62, 0x12, 0x06, 0xb1, + 0xa5, 0x52, 0x8c, 0x93, 0xb4, 0x28, 0x08, 0xda, 0x9c, 0xc8, 0xdc, 0x15, 0x39, 0x2a, 0x39, 0xb2, + 0xad, 0xfe, 0x8a, 0x3d, 0xf6, 0x54, 0xf4, 0xd6, 0x3d, 0xf6, 0x10, 0xf4, 0xde, 0x53, 0x17, 0x3d, + 0x14, 0x8b, 0x9c, 0x8a, 0x05, 0x9a, 0x16, 0xc9, 0xa1, 0xc0, 0xfe, 0x84, 0xa2, 0x87, 0x62, 0x86, + 0x43, 0x91, 0xfa, 0x70, 0x22, 0x2f, 0x7a, 0x49, 0xe4, 0x99, 0xe7, 0x79, 0xe6, 0x9d, 0xf7, 0x6b, + 0x5e, 0x09, 0x56, 0x4e, 0x49, 0xe0, 0x92, 0xa0, 0xdc, 0x22, 0xe7, 0xe5, 0xf3, 0x3d, 0xf6, 0x5f, + 0xa9, 0xe3, 0x13, 0x4a, 0x50, 0x3e, 0xdc, 0x28, 0xb1, 0x95, 0xf3, 0xbd, 0xd5, 0x0d, 0x81, 0x3b, + 0xb1, 0x02, 0x5c, 0x3e, 0xdf, 0x3b, 0xc1, 0xd4, 0xda, 0x2b, 0x9f, 0x12, 0xc7, 0x0b, 0xe1, 0xab, + 0x4b, 0x2d, 0xd2, 0x22, 0xfc, 0x63, 0x99, 0x7d, 0x12, 0xab, 0x9b, 0x2d, 0x42, 0x5a, 0x6d, 0x5c, + 0xe6, 0x7f, 0x9d, 0x74, 0x9f, 0x97, 0xa9, 0xe3, 0xe2, 0x80, 0x5a, 0x6e, 0x47, 0x00, 0x6e, 0x0d, + 0x03, 0x2c, 0xaf, 0x27, 0xb6, 0x36, 0x86, 0xb7, 0xec, 0xae, 0x6f, 0x51, 0x87, 0x44, 0x27, 0xde, + 0x0a, 0x2d, 0x32, 0xc3, 0x43, 0x85, 0xb5, 0xe1, 0xd6, 0x82, 0xe5, 0x3a, 0x1e, 0x29, 0xf3, 0x7f, + 0xc3, 0xa5, 0x22, 0x01, 0xf4, 0x04, 0x3b, 0xad, 0x33, 0x8a, 0xed, 0x63, 0x42, 0x71, 0xbd, 0xc3, + 0x94, 0xd0, 0x1e, 0x4c, 0x13, 0xfe, 0x49, 0x91, 0xb6, 0xa4, 0xed, 0xc2, 0x47, 0xb7, 0x4a, 0x03, + 0xb7, 0x2e, 0xc5, 0x50, 0x5d, 0x00, 0xd1, 0xfb, 0x30, 0x7d, 0xc1, 0x85, 0x94, 0xd4, 0x96, 0xb4, + 0x9d, 0xad, 0x16, 0x5e, 0xbe, 0xd8, 0x01, 0xc1, 0xaa, 0xe1, 0x53, 0x5d, 0xec, 0x16, 0x7f, 0x2f, + 0xc1, 0x4c, 0x0d, 0x77, 0x48, 0xe0, 0x50, 0xb4, 0x09, 0x73, 0x1d, 0x9f, 0x74, 0x48, 0x60, 0xb5, + 0x4d, 0xc7, 0xe6, 0x67, 0x65, 0x74, 0x88, 0x96, 0x34, 0x1b, 0xfd, 0x18, 0xb2, 0x76, 0x88, 0x25, + 0xbe, 0xd0, 0x55, 0x5e, 0xbe, 0xd8, 0x59, 0x12, 0xba, 0x15, 0xdb, 0xf6, 0x71, 0x10, 0x34, 0xa9, + 0xef, 0x78, 0x2d, 0x3d, 0x86, 0xa2, 0x4f, 0x61, 0xda, 0x72, 0x49, 0xd7, 0xa3, 0x4a, 0x7a, 0x2b, + 0xbd, 0x3d, 0x17, 0xdb, 0xcf, 0xc2, 0x54, 0x12, 0x61, 0x2a, 0x1d, 0x10, 0xc7, 0xab, 0x66, 0xbf, + 0x7e, 0xb5, 0x79, 0xe3, 0xab, 0x7f, 0xff, 0xf1, 0x8e, 0xa4, 0x0b, 0x4e, 0xf1, 0xcf, 0x33, 0x30, + 0xdb, 0x10, 0x46, 0xa0, 0x02, 0xa4, 0xfa, 0xa6, 0xa5, 0x1c, 0x1b, 0xed, 0xc2, 0xac, 0x8b, 0x83, + 0xc0, 0x6a, 0xe1, 0x40, 0x49, 0x71, 0xf1, 0xa5, 0x52, 0x18, 0x91, 0x52, 0x14, 0x91, 0x52, 0xc5, + 0xeb, 0xe9, 0x7d, 0x14, 0xda, 0x87, 0xe9, 0x80, 0x5a, 0xb4, 0x1b, 0x28, 0x69, 0xee, 0xcc, 0xf5, + 0x21, 0x67, 0x46, 0x47, 0x35, 0x39, 0x48, 0x17, 0x60, 0xf4, 0x00, 0xd0, 0x73, 0xc7, 0xb3, 0xda, + 0x26, 0xb5, 0xda, 0xed, 0x9e, 0xe9, 0xe3, 0xa0, 0xdb, 0xa6, 0x4a, 0x66, 0x4b, 0xda, 0x9e, 0xfb, + 0x68, 0x75, 0x48, 0xc2, 0x60, 0x10, 0x9d, 0x23, 0x74, 0x99, 0xb3, 0x12, 0x2b, 0xa8, 0x02, 0x73, + 0x41, 0xf7, 0xc4, 0x75, 0xa8, 0xc9, 0xd2, 0x4c, 0x99, 0x12, 0x12, 0xc3, 0x56, 0x1b, 0x51, 0x0e, + 0x56, 0x33, 0x5f, 0xfe, 0x73, 0x53, 0xd2, 0x21, 0x24, 0xb1, 0x65, 0xf4, 0x10, 0x64, 0xe1, 0x5d, + 0x13, 0x7b, 0x76, 0xa8, 0x33, 0x3d, 0xa1, 0x4e, 0x41, 0x30, 0x55, 0xcf, 0xe6, 0x5a, 0x1a, 0xe4, + 0x29, 0xa1, 0x56, 0xdb, 0x14, 0xeb, 0xca, 0xcc, 0x35, 0x62, 0x94, 0xe3, 0xd4, 0x28, 0x81, 0x1e, + 0xc1, 0xc2, 0x39, 0xa1, 0x8e, 0xd7, 0x32, 0x03, 0x6a, 0xf9, 0xe2, 0x7e, 0xb3, 0x13, 0xda, 0x35, + 0x1f, 0x52, 0x9b, 0x8c, 0xc9, 0x0d, 0x7b, 0x00, 0x62, 0x29, 0xbe, 0x63, 0x76, 0x42, 0xad, 0x7c, + 0x48, 0x8c, 0xae, 0xb8, 0xca, 0x92, 0x84, 0x5a, 0xb6, 0x45, 0x2d, 0x05, 0x58, 0xda, 0xea, 0xfd, + 0xbf, 0xd1, 0x0f, 0x61, 0x8a, 0x3a, 0xb4, 0x8d, 0x95, 0x39, 0x9e, 0xcf, 0x8b, 0xdf, 0xbe, 0xd8, + 0x99, 0x0f, 0x6f, 0xbe, 0x13, 0xd8, 0x5f, 0x6c, 0xed, 0x96, 0x7e, 0xf4, 0x13, 0x3d, 0x44, 0xa0, + 0x1d, 0x98, 0x09, 0xba, 0xae, 0x6b, 0xf9, 0x3d, 0x25, 0x77, 0x35, 0x38, 0xc2, 0xa0, 0xfb, 0x30, + 0x1b, 0xd6, 0x0e, 0xf6, 0x95, 0x3c, 0xc7, 0x7f, 0x70, 0x55, 0xb1, 0x8c, 0xd3, 0xe9, 0x93, 0xd1, + 0xc7, 0x90, 0xc5, 0x97, 0x1d, 0x6c, 0x3b, 0x14, 0xdb, 0x4a, 0x61, 0x4b, 0xda, 0x9e, 0xad, 0x2e, + 0x8f, 0x30, 0xf6, 0x77, 0x15, 0x49, 0x8f, 0x71, 0xe8, 0x13, 0xc8, 0x3f, 0xb7, 0x9c, 0x36, 0xb6, + 0x4d, 0x1f, 0x5b, 0x01, 0xf1, 0x94, 0xf9, 0x2b, 0x4c, 0xde, 0xdf, 0xd5, 0x73, 0x21, 0x52, 0xe7, + 0x40, 0xa4, 0x43, 0xbe, 0xdf, 0x06, 0x68, 0xaf, 0x83, 0x15, 0x99, 0xd7, 0xc9, 0xda, 0x15, 0x75, + 0x62, 0xf4, 0x3a, 0xb8, 0x2a, 0x7f, 0xfb, 0x62, 0x27, 0x77, 0xc9, 0xfa, 0xf2, 0xd6, 0xf9, 0x5e, + 0x69, 0xb7, 0xb4, 0xab, 0xe7, 0x3a, 0x89, 0xfd, 0xe2, 0x5f, 0x25, 0x58, 0x8c, 0x08, 0x71, 0xb7, + 0x0a, 0xd0, 0x3a, 0x40, 0xd8, 0xb0, 0x4c, 0xe2, 0x61, 0x5e, 0xd6, 0x59, 0x3d, 0x1b, 0xae, 0xd4, + 0x3d, 0x9c, 0xd8, 0xa6, 0x17, 0x24, 0xec, 0x38, 0xd1, 0xb6, 0x71, 0x41, 0xd0, 0x6d, 0xc8, 0x45, + 0xdb, 0x67, 0x3e, 0xc6, 0xbc, 0xa0, 0xb3, 0xfa, 0x9c, 0x00, 0xb0, 0x25, 0xd6, 0xd3, 0x04, 0xe4, + 0x39, 0xe9, 0xfa, 0xbc, 0x5e, 0xb3, 0xba, 0x10, 0xbd, 0x47, 0xba, 0x7e, 0x02, 0x10, 0x74, 0x2c, + 0x97, 0x57, 0x63, 0x1f, 0xd0, 0xec, 0x58, 0xee, 0x5d, 0xf9, 0xe5, 0xd0, 0xd5, 0x8a, 0xff, 0x4d, + 0xc3, 0x5c, 0xb2, 0xa0, 0x77, 0x20, 0xdb, 0xc3, 0x81, 0x79, 0xca, 0x3b, 0x1c, 0xbf, 0x43, 0x55, + 0x4e, 0xb4, 0x5b, 0x8d, 0xad, 0xea, 0xb3, 0x3d, 0x1c, 0x1c, 0x30, 0x04, 0xda, 0x87, 0xbc, 0x75, + 0x12, 0x50, 0xcb, 0xf1, 0x04, 0x25, 0x75, 0x05, 0x25, 0x27, 0x60, 0x21, 0xed, 0x03, 0x98, 0xf5, + 0x88, 0x60, 0xa4, 0xaf, 0x60, 0xcc, 0x78, 0x24, 0x04, 0x7f, 0x06, 0xc8, 0x23, 0xe6, 0x85, 0x43, + 0xcf, 0xcc, 0x73, 0x4c, 0x23, 0x5a, 0xe6, 0x0a, 0xda, 0xbc, 0x47, 0x9e, 0x38, 0xf4, 0xec, 0x18, + 0x53, 0x41, 0xff, 0x04, 0xe4, 0x38, 0x2c, 0x82, 0x3c, 0x35, 0xf2, 0x8e, 0x68, 0x1e, 0xd5, 0x0b, + 0xfd, 0x60, 0x0d, 0x33, 0xe9, 0x45, 0x74, 0xec, 0xf4, 0xdb, 0x98, 0xc6, 0x85, 0x38, 0xf3, 0x53, + 0x40, 0xc9, 0x60, 0x0a, 0xee, 0xcc, 0x58, 0xae, 0x9c, 0x08, 0x71, 0xc8, 0xbe, 0x0b, 0x0b, 0x89, + 0x38, 0x0b, 0xf2, 0xec, 0x58, 0xf2, 0x7c, 0x1c, 0xfd, 0x90, 0xbb, 0x03, 0xc0, 0x62, 0x2f, 0x48, + 0xd9, 0xb1, 0xa4, 0x2c, 0x43, 0x70, 0x78, 0xf1, 0x4f, 0x12, 0x64, 0x58, 0x0e, 0xbf, 0xfb, 0xbd, + 0x2c, 0xc1, 0xd4, 0x39, 0xa1, 0xf8, 0xdd, 0x6f, 0x65, 0x08, 0x43, 0x3f, 0x83, 0x99, 0xd0, 0xb6, + 0x40, 0xc9, 0xf0, 0x26, 0x7c, 0x7b, 0xa8, 0xe6, 0x46, 0x67, 0x03, 0x3d, 0x62, 0x0c, 0x34, 0xb9, + 0xa9, 0xc1, 0x26, 0xf7, 0x30, 0x33, 0x9b, 0x96, 0x33, 0xc5, 0x7f, 0x48, 0x90, 0x17, 0xad, 0xba, + 0x61, 0xf9, 0x96, 0x1b, 0xa0, 0x67, 0x30, 0xe7, 0x3a, 0x5e, 0xbf, 0xf3, 0x4b, 0xef, 0xea, 0xfc, + 0xeb, 0xac, 0xf3, 0x7f, 0xf7, 0x6a, 0x73, 0x39, 0xc1, 0xfa, 0x90, 0xb8, 0x0e, 0xc5, 0x6e, 0x87, + 0xf6, 0x74, 0x70, 0x1d, 0x2f, 0x7a, 0x0b, 0x5c, 0x40, 0xae, 0x75, 0x19, 0x81, 0xcc, 0x0e, 0xf6, + 0x1d, 0x62, 0x73, 0x47, 0xb0, 0x13, 0x86, 0x1b, 0x78, 0x4d, 0x0c, 0x4d, 0xd5, 0x1f, 0x7c, 0xf7, + 0x6a, 0xf3, 0xbd, 0x51, 0x62, 0x7c, 0xc8, 0x6f, 0x59, 0x7f, 0x97, 0x5d, 0xeb, 0x32, 0xba, 0x09, + 0xdf, 0xbf, 0x9b, 0x52, 0xa4, 0xe2, 0x53, 0xc8, 0x1d, 0xf3, 0xbe, 0x2f, 0x6e, 0x57, 0x03, 0xf1, + 0x0e, 0x44, 0xa7, 0x4b, 0xef, 0x3a, 0x3d, 0xc3, 0xd5, 0x73, 0x21, 0x2b, 0xa1, 0xfc, 0x3b, 0x49, + 0x54, 0xbc, 0x50, 0x7e, 0x1f, 0xa6, 0x7f, 0xdd, 0x25, 0x7e, 0xd7, 0x15, 0xe5, 0x3e, 0x32, 0x5d, + 0x85, 0xbb, 0xe8, 0x43, 0xc8, 0xb2, 0x64, 0x0e, 0xce, 0x48, 0xdb, 0xbe, 0x62, 0x10, 0x8b, 0x01, + 0x68, 0x1f, 0x0a, 0xbc, 0x58, 0x63, 0x4a, 0x7a, 0x2c, 0x25, 0xcf, 0x50, 0x46, 0x04, 0xe2, 0x06, + 0xfe, 0x25, 0x0f, 0xd3, 0xc2, 0x36, 0xf5, 0x9a, 0x31, 0x4d, 0xbc, 0xe6, 0xc9, 0xf8, 0x1d, 0x7e, + 0xbf, 0xf8, 0x65, 0xc6, 0xc7, 0x67, 0x34, 0x16, 0xe9, 0xef, 0x11, 0x8b, 0x84, 0xdf, 0x33, 0x93, + 0xfb, 0x7d, 0xea, 0xfa, 0x7e, 0x9f, 0x9e, 0xc0, 0xef, 0x48, 0x83, 0x5b, 0xcc, 0xd1, 0x8e, 0xe7, + 0x50, 0x27, 0x1e, 0x9f, 0x4c, 0x6e, 0xfe, 0x98, 0xbe, 0xc5, 0x14, 0x6e, 0xba, 0x8e, 0xa7, 0x85, + 0x78, 0xe1, 0x1e, 0x9d, 0xa1, 0xd1, 0x63, 0x58, 0xee, 0x77, 0x92, 0x53, 0xcb, 0x3b, 0xc5, 0x6d, + 0x21, 0x13, 0x76, 0xb0, 0xdb, 0x83, 0x32, 0xe3, 0x9e, 0xf0, 0xc5, 0x88, 0x7f, 0xc0, 0xe9, 0xa1, + 0xec, 0xaf, 0x60, 0x69, 0x58, 0xd6, 0xc6, 0x41, 0xd4, 0xe2, 0x26, 0x9f, 0x46, 0xf6, 0x77, 0x75, + 0x34, 0xa8, 0x5f, 0xc3, 0x01, 0x45, 0x9f, 0xc3, 0x4a, 0x7f, 0xde, 0x30, 0x07, 0xa3, 0x0b, 0xef, + 0x8a, 0xee, 0x0a, 0x8b, 0xee, 0xb8, 0x83, 0x96, 0xfb, 0x92, 0xc7, 0xc9, 0xc8, 0xeb, 0xb0, 0x18, + 0x9f, 0x15, 0x07, 0x6a, 0x6e, 0x52, 0xff, 0xa0, 0x3e, 0x3b, 0x0e, 0xe0, 0x53, 0x88, 0x0f, 0x33, + 0x93, 0x35, 0x93, 0xbb, 0x46, 0xcd, 0xc4, 0x66, 0x1d, 0xc6, 0xc5, 0xf3, 0x19, 0xc8, 0x27, 0x5d, + 0xdf, 0x63, 0x4e, 0xc1, 0xa6, 0xc8, 0xd8, 0x3c, 0x1f, 0xdc, 0xc6, 0x8e, 0x8c, 0x05, 0x06, 0x66, + 0x3d, 0xfd, 0xe7, 0x61, 0xfa, 0x1e, 0xc3, 0x3a, 0xa7, 0xf7, 0x83, 0xd7, 0xaf, 0x42, 0x1f, 0x33, + 0x49, 0x31, 0x04, 0x8e, 0xd5, 0x5a, 0x65, 0xcc, 0x68, 0xd4, 0x8a, 0x6a, 0x30, 0xa4, 0xa1, 0x9f, + 0x42, 0x21, 0x36, 0x8b, 0x25, 0x33, 0x1f, 0x0a, 0xaf, 0x10, 0xca, 0x45, 0x46, 0xb1, 0xb1, 0x00, + 0x1d, 0xc2, 0x42, 0xc2, 0x43, 0x22, 0x3b, 0xe5, 0x49, 0xbd, 0x3f, 0x1f, 0x37, 0x96, 0x30, 0x33, + 0x7f, 0x09, 0xab, 0xc3, 0x99, 0xc9, 0xba, 0x8d, 0xc8, 0x9e, 0x05, 0xae, 0xbb, 0x31, 0xa2, 0x3b, + 0x38, 0x61, 0xae, 0x0c, 0xa6, 0xe4, 0xa1, 0x75, 0x29, 0x72, 0xa5, 0x03, 0x9b, 0xec, 0x51, 0x74, + 0x9d, 0x80, 0x3a, 0xa7, 0xa6, 0xd5, 0xa5, 0x67, 0xc4, 0x77, 0x7e, 0x83, 0x6d, 0xd3, 0x0a, 0xb3, + 0x1c, 0x07, 0x0a, 0xda, 0x4a, 0x6f, 0x67, 0xab, 0xdb, 0x6f, 0xa9, 0x80, 0xc1, 0xb3, 0xd6, 0x63, + 0xc1, 0x4a, 0x5f, 0xaf, 0x12, 0xc9, 0xa1, 0x13, 0x48, 0x00, 0x4c, 0x1f, 0x7f, 0x8e, 0x4f, 0x07, + 0xf3, 0x74, 0x71, 0xa2, 0x1b, 0xad, 0xc5, 0x22, 0xba, 0xd0, 0x88, 0xb3, 0xf5, 0x33, 0x00, 0x36, + 0x65, 0x8a, 0x6c, 0x5a, 0x9a, 0x48, 0x90, 0xcd, 0xa5, 0x22, 0xa7, 0x34, 0x90, 0xe3, 0x64, 0x17, + 0x22, 0xcb, 0x13, 0x89, 0xcc, 0xf7, 0x79, 0x42, 0xea, 0x1e, 0xdc, 0xec, 0x07, 0x0f, 0x5f, 0xe2, + 0xd3, 0x2e, 0x9f, 0xbb, 0x5a, 0x56, 0xa0, 0xdc, 0x64, 0x23, 0xd0, 0x98, 0x2f, 0x03, 0xfd, 0x36, + 0xa4, 0x46, 0xf0, 0xfb, 0x56, 0x70, 0x77, 0xf1, 0xe5, 0x68, 0xda, 0x15, 0xbf, 0x4a, 0x01, 0x3a, + 0x0c, 0xbf, 0xab, 0x57, 0xad, 0x00, 0xdb, 0xff, 0xcf, 0xb7, 0x3c, 0xf1, 0x7e, 0xa4, 0xde, 0xfa, + 0x7e, 0xec, 0x8c, 0xf1, 0xf5, 0xc8, 0x03, 0x12, 0xfb, 0x76, 0xe0, 0xb9, 0x49, 0x5f, 0xff, 0xb9, + 0xc9, 0x4c, 0xf2, 0xcc, 0x8f, 0x7c, 0x0f, 0xb9, 0xf3, 0x07, 0x09, 0x72, 0xc9, 0x6f, 0x61, 0x68, + 0x1d, 0x6e, 0x35, 0xf4, 0x7a, 0xa3, 0xde, 0xac, 0x3c, 0x32, 0x8d, 0x67, 0x0d, 0xd5, 0x7c, 0x7c, + 0xd4, 0x6c, 0xa8, 0x07, 0xda, 0x3d, 0x4d, 0xad, 0xc9, 0x37, 0xd0, 0x2a, 0xdc, 0x1c, 0xdc, 0x6e, + 0x1a, 0x95, 0xa3, 0x5a, 0x45, 0xaf, 0xc9, 0x12, 0xba, 0x0d, 0xeb, 0x83, 0x7b, 0x87, 0x8f, 0x1f, + 0x19, 0x5a, 0xe3, 0x91, 0x6a, 0x1e, 0x3c, 0xa8, 0x6b, 0x07, 0xaa, 0x9c, 0x42, 0xef, 0x81, 0x32, + 0x08, 0xa9, 0x37, 0x0c, 0xed, 0x50, 0x6b, 0x1a, 0xda, 0x81, 0x9c, 0x46, 0x6b, 0xb0, 0x32, 0xb8, + 0xab, 0x3e, 0x6d, 0xa8, 0x35, 0xcd, 0x50, 0x6b, 0x72, 0xe6, 0xce, 0x7f, 0x24, 0x80, 0xc4, 0xef, + 0x59, 0x6b, 0xb0, 0x72, 0x5c, 0x37, 0x42, 0x81, 0xfa, 0xd1, 0x90, 0x95, 0x8b, 0x30, 0x9f, 0xdc, + 0x7c, 0xa6, 0x36, 0x65, 0x69, 0x78, 0xb1, 0x7e, 0xa4, 0xca, 0x12, 0x5a, 0x81, 0xc5, 0xe4, 0x62, + 0xa5, 0xda, 0x34, 0x2a, 0xda, 0x91, 0x9c, 0x1a, 0x46, 0x1b, 0x4f, 0xea, 0x72, 0x0a, 0x21, 0x28, + 0x24, 0x17, 0x8f, 0xea, 0x72, 0x1a, 0x2d, 0xc3, 0xc2, 0x00, 0xf0, 0x81, 0xae, 0xaa, 0x72, 0x9a, + 0xdd, 0x74, 0x10, 0x6a, 0x3e, 0xd1, 0x8c, 0x07, 0xe6, 0xb1, 0x6a, 0xd4, 0xe5, 0x0c, 0x5a, 0x02, + 0x39, 0xb9, 0x7b, 0xaf, 0xfe, 0x58, 0x1f, 0x5d, 0x6d, 0x36, 0x2a, 0x87, 0xf2, 0xd4, 0x6a, 0x4a, + 0x96, 0xee, 0xfc, 0x4d, 0x82, 0xc2, 0xe0, 0x8f, 0x4a, 0x68, 0x13, 0xd6, 0xfa, 0xce, 0x6a, 0x1a, + 0x15, 0xe3, 0x71, 0x73, 0xc8, 0x09, 0x45, 0xd8, 0x18, 0x06, 0xd4, 0xd4, 0x46, 0xbd, 0xa9, 0x19, + 0x66, 0x43, 0xd5, 0xb5, 0xfa, 0x70, 0xc8, 0x04, 0xe6, 0xb8, 0x6e, 0x68, 0x47, 0xf7, 0x23, 0x48, + 0x6a, 0x20, 0xe2, 0x02, 0xd2, 0xa8, 0x34, 0x9b, 0x6a, 0x2d, 0xbc, 0xe4, 0xf0, 0x9e, 0xae, 0x3e, + 0x54, 0x0f, 0x78, 0xc4, 0xc6, 0x31, 0xef, 0x55, 0xb4, 0x47, 0x6a, 0x4d, 0x9e, 0xaa, 0xee, 0x7f, + 0xfd, 0x7a, 0x43, 0xfa, 0xe6, 0xf5, 0x86, 0xf4, 0xaf, 0xd7, 0x1b, 0xd2, 0x97, 0x6f, 0x36, 0x6e, + 0x7c, 0xf3, 0x66, 0xe3, 0xc6, 0xdf, 0xdf, 0x6c, 0xdc, 0xf8, 0xc5, 0x5a, 0x98, 0xbe, 0x81, 0xfd, + 0x45, 0xc9, 0x21, 0x65, 0x9e, 0xac, 0x65, 0xda, 0xeb, 0xe0, 0xa0, 0x7c, 0xbe, 0x77, 0x32, 0xcd, + 0x6b, 0xf4, 0xe3, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x59, 0x08, 0x35, 0x9e, 0xcc, 0x15, 0x00, + 0x00, } func (m *WeightedVoteOption) Marshal() (dAtA []byte, err error) { @@ -2011,6 +2021,13 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.ProposalExecutionGas != 0 { + i = encodeVarintGov(dAtA, i, uint64(m.ProposalExecutionGas)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb0 + } if len(m.ExpeditedQuorum) > 0 { i -= len(m.ExpeditedQuorum) copy(dAtA[i:], m.ExpeditedQuorum) @@ -2638,6 +2655,9 @@ func (m *Params) Size() (n int) { if l > 0 { n += 2 + l + sovGov(uint64(l)) } + if m.ProposalExecutionGas != 0 { + n += 2 + sovGov(uint64(m.ProposalExecutionGas)) + } return n } @@ -5195,6 +5215,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.ExpeditedQuorum = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalExecutionGas", wireType) + } + m.ProposalExecutionGas = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGov + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalExecutionGas |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipGov(dAtA[iNdEx:]) From 5aeec6b22bb25332590037d5bdfe05e7ed448b7b Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Tue, 21 May 2024 16:48:10 +0200 Subject: [PATCH 05/20] lint --- x/gov/keeper/abci.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index 0d9aa5fd58b1..c0b33228ae70 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -198,7 +198,7 @@ func (k Keeper) EndBlocker(ctx context.Context) error { if err != nil { return err } - _, err = k.BranchService.ExecuteWithGasLimit(ctx, uint64(params.ProposalExecutionGas), func(ctx context.Context) error { + _, err = k.BranchService.ExecuteWithGasLimit(ctx, params.ProposalExecutionGas, func(ctx context.Context) error { // execute all messages for idx, msg = range messages { if _, err := safeExecuteHandler(ctx, msg, k.MsgRouterService); err != nil { From 81637da44f1f4a798572350376172fcc943349d9 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Wed, 29 May 2024 15:41:59 +0200 Subject: [PATCH 06/20] add migration --- x/gov/migrations/v6/store.go | 3 ++- x/gov/simulation/genesis.go | 1 + x/gov/types/v1/params.go | 40 ++++++++++++++++++++---------------- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/x/gov/migrations/v6/store.go b/x/gov/migrations/v6/store.go index f45388e89aeb..7a05b6730447 100644 --- a/x/gov/migrations/v6/store.go +++ b/x/gov/migrations/v6/store.go @@ -11,7 +11,7 @@ import ( var votingPeriodProposalKeyPrefix = collections.NewPrefix(4) // VotingPeriodProposalKeyPrefix stores which proposals are on voting period. -// MigrateStore performs in-place store migrations from v5 (v0.50) to v6 (v0.51). The +// MigrateStore performs in-place store migrations from v5 (v0.50) to v6 (v0.52). The // migration includes: // // Addition of new field in params to store types of proposals that can be submitted. @@ -56,6 +56,7 @@ func MigrateStore(ctx context.Context, storeService corestoretypes.KVStoreServic govParams.OptimisticAuthorizedAddresses = defaultParams.OptimisticAuthorizedAddresses govParams.OptimisticRejectedThreshold = defaultParams.OptimisticRejectedThreshold govParams.ProposalCancelMaxPeriod = defaultParams.ProposalCancelMaxPeriod + govParams.ProposalExecutionGas = defaultParams.ProposalExecutionGas return paramsCollection.Set(ctx, govParams) } diff --git a/x/gov/simulation/genesis.go b/x/gov/simulation/genesis.go index f029f692f07d..6363a3a5548d 100644 --- a/x/gov/simulation/genesis.go +++ b/x/gov/simulation/genesis.go @@ -194,6 +194,7 @@ func RandomizedGenState(simState *module.SimulationState) { minDepositRatio.String(), optimisticRejectedThreshold.String(), []string{}, + 10_000_000, ), ) diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index 1f594e368cca..aa16eb0681c3 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -19,24 +19,25 @@ const ( // Default governance params var ( - DefaultMinDepositTokens = sdkmath.NewInt(10000000) - DefaultMinExpeditedDepositTokens = DefaultMinDepositTokens.Mul(sdkmath.NewInt(DefaultMinExpeditedDepositTokensRatio)) - DefaultQuorum = sdkmath.LegacyNewDecWithPrec(334, 3) - DefaultYesQuorum = sdkmath.LegacyNewDecWithPrec(0, 1) - DefaultExpeditedQuorum = sdkmath.LegacyNewDecWithPrec(500, 3) - DefaultThreshold = sdkmath.LegacyNewDecWithPrec(5, 1) - DefaultExpeditedThreshold = sdkmath.LegacyNewDecWithPrec(667, 3) - DefaultVetoThreshold = sdkmath.LegacyNewDecWithPrec(334, 3) - DefaultMinInitialDepositRatio = sdkmath.LegacyZeroDec() - DefaultProposalCancelRatio = sdkmath.LegacyMustNewDecFromStr("0.5") - DefaultProposalCancelDestAddress = "" - DefaultProposalCancelMaxPeriod = sdkmath.LegacyMustNewDecFromStr("0.5") - DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47) - DefaultBurnVoteQuorum = false // set to false to replicate behavior of when this change was made (0.47) - DefaultBurnVoteVeto = true // set to true to replicate behavior of when this change was made (0.47) - DefaultMinDepositRatio = sdkmath.LegacyMustNewDecFromStr("0.01") - DefaultOptimisticRejectedThreshold = sdkmath.LegacyMustNewDecFromStr("0.1") - DefaultOptimisticAuthorizedAddreses = []string(nil) + DefaultMinDepositTokens = sdkmath.NewInt(10000000) + DefaultMinExpeditedDepositTokens = DefaultMinDepositTokens.Mul(sdkmath.NewInt(DefaultMinExpeditedDepositTokensRatio)) + DefaultQuorum = sdkmath.LegacyNewDecWithPrec(334, 3) + DefaultYesQuorum = sdkmath.LegacyNewDecWithPrec(0, 1) + DefaultExpeditedQuorum = sdkmath.LegacyNewDecWithPrec(500, 3) + DefaultThreshold = sdkmath.LegacyNewDecWithPrec(5, 1) + DefaultExpeditedThreshold = sdkmath.LegacyNewDecWithPrec(667, 3) + DefaultVetoThreshold = sdkmath.LegacyNewDecWithPrec(334, 3) + DefaultMinInitialDepositRatio = sdkmath.LegacyZeroDec() + DefaultProposalCancelRatio = sdkmath.LegacyMustNewDecFromStr("0.5") + DefaultProposalCancelDestAddress = "" + DefaultProposalCancelMaxPeriod = sdkmath.LegacyMustNewDecFromStr("0.5") + DefaultBurnProposalPrevote = false // set to false to replicate behavior of when this change was made (0.47) + DefaultBurnVoteQuorum = false // set to false to replicate behavior of when this change was made (0.47) + DefaultBurnVoteVeto = true // set to true to replicate behavior of when this change was made (0.47) + DefaultMinDepositRatio = sdkmath.LegacyMustNewDecFromStr("0.01") + DefaultOptimisticRejectedThreshold = sdkmath.LegacyMustNewDecFromStr("0.1") + DefaultOptimisticAuthorizedAddreses = []string(nil) + DefaultProposalExecutionGas uint64 = 10_000_000 // ten million ) // NewParams creates a new Params instance with given values. @@ -47,6 +48,7 @@ func NewParams( burnProposalDeposit, burnVoteQuorum, burnVoteVeto bool, minDepositRatio, optimisticRejectedThreshold string, optimisticAuthorizedAddresses []string, + proposalExecutionGas uint64, ) Params { return Params{ MinDeposit: minDeposit, @@ -70,6 +72,7 @@ func NewParams( MinDepositRatio: minDepositRatio, OptimisticRejectedThreshold: optimisticRejectedThreshold, OptimisticAuthorizedAddresses: optimisticAuthorizedAddresses, + ProposalExecutionGas: proposalExecutionGas, } } @@ -97,6 +100,7 @@ func DefaultParams() Params { DefaultMinDepositRatio.String(), DefaultOptimisticRejectedThreshold.String(), DefaultOptimisticAuthorizedAddreses, + DefaultProposalExecutionGas, ) } From 016a8850707d0b3138c0df98ff230b120c7ec07b Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Wed, 29 May 2024 15:43:25 +0200 Subject: [PATCH 07/20] revert change --- x/gov/keeper/abci.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index c0b33228ae70..9713ff7aea92 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -77,10 +77,9 @@ func (k Keeper) EndBlocker(ctx context.Context) error { // called when proposal become inactive // call hook when proposal become inactive - err = k.BranchService.Execute(ctx, func(ctx context.Context) error { + if err = k.BranchService.Execute(ctx, func(ctx context.Context) error { return k.Hooks().AfterProposalFailedMinDeposit(ctx, proposal.Id) - }) - if err != nil { + }); err != nil { // purposely ignoring the error here not to halt the chain if the hook fails k.Logger.Error("failed to execute AfterProposalFailedMinDeposit hook", "error", err) } From b6ea844dc2063177d8c21ea1875af404077c7243 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Wed, 29 May 2024 15:45:47 +0200 Subject: [PATCH 08/20] update docs --- x/gov/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/gov/README.md b/x/gov/README.md index 715d0375a17f..6bde42c862f3 100644 --- a/x/gov/README.md +++ b/x/gov/README.md @@ -282,7 +282,7 @@ There are three parameters that define if the deposit of a proposal should be bu Execution is the process of executing the messages contained in a proposal. The execution phase will commence after the proposal has been accepted by the network. The messages contained in the proposal will be executed in the order they were submitted. -Execution has a upper limit on how many messages can be executed in a single block. This limit is defined by the `MaxMessagesPerProposal` parameter. We use the MaxBlockGas from the consensus engine, value stored in the consensus module, to calculate the limit of messages that can be executed in a block. +Execution has a upper limit on how much gas can be consumed in a single block. This limit is defined by the `ProposalExecutionGas` parameter. ## State From d60edd9943db7421eb7968cb41f819fb3ad0dfee Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Wed, 29 May 2024 15:47:04 +0200 Subject: [PATCH 09/20] go mod tidy --- simapp/gomod2nix.toml | 12 ++++++------ x/gov/go.mod | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/simapp/gomod2nix.toml b/simapp/gomod2nix.toml index a36853c06bb2..30d8ffdf7b00 100644 --- a/simapp/gomod2nix.toml +++ b/simapp/gomod2nix.toml @@ -171,8 +171,8 @@ schema = 3 version = "v1.6.2" hash = "sha256-X7aNKLKZ7pJBG/wdP+TWuQnlNLNdbUDd+kC5kF4uBtU=" [mod."github.com/fatih/color"] - version = "v1.16.0" - hash = "sha256-Aq/SM28aPJVzvapllQ64R/DM4aZ5CHPewcm/AUJPyJQ=" + version = "v1.17.0" + hash = "sha256-QsKMy3MsvjbYNcA9jP8w6c3wpmWDZ0079bybAEzmXR0=" [mod."github.com/felixge/httpsnoop"] version = "v1.0.4" hash = "sha256-c1JKoRSndwwOyOxq9ddCe+8qn7mG9uRq2o/822x5O/c=" @@ -282,8 +282,8 @@ schema = 3 version = "v0.5.3" hash = "sha256-5jQftEvEhL88yWeVnu+IZKzV5p9osZcgFmwP1zlrjzY=" [mod."github.com/hashicorp/go-plugin"] - version = "v1.6.0" - hash = "sha256-NeY86Z+qJwt0NPV4cNmWDiTryDPSiyKMkS1ivRX9ThE=" + version = "v1.6.1" + hash = "sha256-HEeJ8TV67PcAuUnGCOHphFpZ/BShvJo5B6Obu3P7t8M=" [mod."github.com/hashicorp/go-safetemp"] version = "v1.0.0" hash = "sha256-g5i9m7FSRInQzZ4iRpIsoUu685AY7fppUwjhuZCezT8=" @@ -553,8 +553,8 @@ schema = 3 version = "v0.0.0-20240415180920-8c6c420018be" hash = "sha256-0Bc66Utj1rydwYngQxTQoTyg1Td2D+nIxukc0zz7XFc=" [mod."google.golang.org/genproto/googleapis/rpc"] - version = "v0.0.0-20240513163218-0867130af1f8" - hash = "sha256-c+VNAAU3HTu/ZGfpiPnjnzgszcPhU4JOhTTcIdo/PPI=" + version = "v0.0.0-20240515191416-fc5f0ca64291" + hash = "sha256-hQjIHJdIBBAthdXMB19Xr3A2Wy6GV6Gjv4w4MZl7qy4=" [mod."google.golang.org/grpc"] version = "v1.64.0" hash = "sha256-04Noi8lrzr+4ac2BA7KNXUXN/xZL/A2SsEpC2Hern84=" diff --git a/x/gov/go.mod b/x/gov/go.mod index 68a2f8355387..3c51e5befa13 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -15,7 +15,7 @@ require ( cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 - cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 + cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 github.com/chzyer/readline v1.5.1 From ae845ba8dccafe1c1596ef99c122a89ebd4dfb1d Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Wed, 29 May 2024 15:47:28 +0200 Subject: [PATCH 10/20] remove extra proto files --- cosmossdk.io/server/v2/streaming/grpc.pb.go | 2414 ----------------- .../store/snapshots/types/snapshot.pb.go | 2008 -------------- cosmossdk.io/store/streaming/abci/grpc.pb.go | 1050 ------- cosmossdk.io/store/types/commit_info.pb.go | 864 ------ cosmossdk.io/store/types/listening.pb.go | 785 ------ .../x/consensus/types/consensus.pb.go | 824 ------ 6 files changed, 7945 deletions(-) delete mode 100644 cosmossdk.io/server/v2/streaming/grpc.pb.go delete mode 100644 cosmossdk.io/store/snapshots/types/snapshot.pb.go delete mode 100644 cosmossdk.io/store/streaming/abci/grpc.pb.go delete mode 100644 cosmossdk.io/store/types/commit_info.pb.go delete mode 100644 cosmossdk.io/store/types/listening.pb.go delete mode 100644 cosmossdk.io/x/consensus/types/consensus.pb.go diff --git a/cosmossdk.io/server/v2/streaming/grpc.pb.go b/cosmossdk.io/server/v2/streaming/grpc.pb.go deleted file mode 100644 index 4d2d15149c89..000000000000 --- a/cosmossdk.io/server/v2/streaming/grpc.pb.go +++ /dev/null @@ -1,2414 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/streaming/v1/grpc.proto - -package streaming - -import ( - context "context" - fmt "fmt" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ListenDeliverBlockRequest is the request type for the ListenDeliverBlock RPC method -type ListenDeliverBlockRequest struct { - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` - Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` - TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` -} - -func (m *ListenDeliverBlockRequest) Reset() { *m = ListenDeliverBlockRequest{} } -func (m *ListenDeliverBlockRequest) String() string { return proto.CompactTextString(m) } -func (*ListenDeliverBlockRequest) ProtoMessage() {} -func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{0} -} -func (m *ListenDeliverBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenDeliverBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenDeliverBlockRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListenDeliverBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenDeliverBlockRequest.Merge(m, src) -} -func (m *ListenDeliverBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenDeliverBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenDeliverBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenDeliverBlockRequest proto.InternalMessageInfo - -func (m *ListenDeliverBlockRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenDeliverBlockRequest) GetTxs() [][]byte { - if m != nil { - return m.Txs - } - return nil -} - -func (m *ListenDeliverBlockRequest) GetEvents() []*Event { - if m != nil { - return m.Events - } - return nil -} - -func (m *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult { - if m != nil { - return m.TxResults - } - return nil -} - -// ListenDeliverBlockResponse is the response type for the ListenDeliverBlock RPC method -type ListenDeliverBlockResponse struct { -} - -func (m *ListenDeliverBlockResponse) Reset() { *m = ListenDeliverBlockResponse{} } -func (m *ListenDeliverBlockResponse) String() string { return proto.CompactTextString(m) } -func (*ListenDeliverBlockResponse) ProtoMessage() {} -func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{1} -} -func (m *ListenDeliverBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenDeliverBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenDeliverBlockResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListenDeliverBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenDeliverBlockResponse.Merge(m, src) -} -func (m *ListenDeliverBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenDeliverBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenDeliverBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenDeliverBlockResponse proto.InternalMessageInfo - -// ListenStateChangesRequest is the request type for the ListenStateChanges RPC method -type ListenStateChangesRequest struct { - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - ChangeSet []*StoreKVPair `protobuf:"bytes,2,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` - AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` -} - -func (m *ListenStateChangesRequest) Reset() { *m = ListenStateChangesRequest{} } -func (m *ListenStateChangesRequest) String() string { return proto.CompactTextString(m) } -func (*ListenStateChangesRequest) ProtoMessage() {} -func (*ListenStateChangesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{2} -} -func (m *ListenStateChangesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenStateChangesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenStateChangesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListenStateChangesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenStateChangesRequest.Merge(m, src) -} -func (m *ListenStateChangesRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenStateChangesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenStateChangesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenStateChangesRequest proto.InternalMessageInfo - -func (m *ListenStateChangesRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair { - if m != nil { - return m.ChangeSet - } - return nil -} - -func (m *ListenStateChangesRequest) GetAppHash() []byte { - if m != nil { - return m.AppHash - } - return nil -} - -// ListenStateChangesResponse is the response type for the ListenStateChanges RPC method -type ListenStateChangesResponse struct { -} - -func (m *ListenStateChangesResponse) Reset() { *m = ListenStateChangesResponse{} } -func (m *ListenStateChangesResponse) String() string { return proto.CompactTextString(m) } -func (*ListenStateChangesResponse) ProtoMessage() {} -func (*ListenStateChangesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{3} -} -func (m *ListenStateChangesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenStateChangesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenStateChangesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListenStateChangesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenStateChangesResponse.Merge(m, src) -} -func (m *ListenStateChangesResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenStateChangesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenStateChangesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenStateChangesResponse proto.InternalMessageInfo - -// StoreKVPair is a single key-value pair, associated with a store. -type StoreKVPair struct { - // address defines the address of the account the state changes are coming from. - // In case of modules you can expect a stringified - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // key defines the key of the address that changed. - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // value defines the value that changed, empty in case of removal. - Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - // delete defines if the key was removed. - Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"` -} - -func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } -func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } -func (*StoreKVPair) ProtoMessage() {} -func (*StoreKVPair) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{4} -} -func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreKVPair.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StoreKVPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreKVPair.Merge(m, src) -} -func (m *StoreKVPair) XXX_Size() int { - return m.Size() -} -func (m *StoreKVPair) XXX_DiscardUnknown() { - xxx_messageInfo_StoreKVPair.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo - -func (m *StoreKVPair) GetAddress() []byte { - if m != nil { - return m.Address - } - return nil -} - -func (m *StoreKVPair) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *StoreKVPair) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *StoreKVPair) GetDelete() bool { - if m != nil { - return m.Delete - } - return false -} - -// Event is a single event, associated with a transaction. -type Event struct { - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (m *Event) Reset() { *m = Event{} } -func (m *Event) String() string { return proto.CompactTextString(m) } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{5} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Event.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *Event) GetType() string { - if m != nil { - return m.Type - } - return "" -} - -func (m *Event) GetAttributes() []*EventAttribute { - if m != nil { - return m.Attributes - } - return nil -} - -// EventAttribute is a single key-value pair, associated with an event. -type EventAttribute struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *EventAttribute) Reset() { *m = EventAttribute{} } -func (m *EventAttribute) String() string { return proto.CompactTextString(m) } -func (*EventAttribute) ProtoMessage() {} -func (*EventAttribute) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{6} -} -func (m *EventAttribute) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventAttribute) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EventAttribute.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EventAttribute) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventAttribute.Merge(m, src) -} -func (m *EventAttribute) XXX_Size() int { - return m.Size() -} -func (m *EventAttribute) XXX_DiscardUnknown() { - xxx_messageInfo_EventAttribute.DiscardUnknown(m) -} - -var xxx_messageInfo_EventAttribute proto.InternalMessageInfo - -func (m *EventAttribute) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *EventAttribute) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -// ExecTxResult contains results of executing one individual transaction. -type ExecTxResult struct { - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` - Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -func (m *ExecTxResult) Reset() { *m = ExecTxResult{} } -func (m *ExecTxResult) String() string { return proto.CompactTextString(m) } -func (*ExecTxResult) ProtoMessage() {} -func (*ExecTxResult) Descriptor() ([]byte, []int) { - return fileDescriptor_3fc151d30622bb2a, []int{7} -} -func (m *ExecTxResult) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExecTxResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExecTxResult.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExecTxResult) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExecTxResult.Merge(m, src) -} -func (m *ExecTxResult) XXX_Size() int { - return m.Size() -} -func (m *ExecTxResult) XXX_DiscardUnknown() { - xxx_messageInfo_ExecTxResult.DiscardUnknown(m) -} - -var xxx_messageInfo_ExecTxResult proto.InternalMessageInfo - -func (m *ExecTxResult) GetCode() uint32 { - if m != nil { - return m.Code - } - return 0 -} - -func (m *ExecTxResult) GetData() []byte { - if m != nil { - return m.Data - } - return nil -} - -func (m *ExecTxResult) GetLog() string { - if m != nil { - return m.Log - } - return "" -} - -func (m *ExecTxResult) GetInfo() string { - if m != nil { - return m.Info - } - return "" -} - -func (m *ExecTxResult) GetGasWanted() int64 { - if m != nil { - return m.GasWanted - } - return 0 -} - -func (m *ExecTxResult) GetGasUsed() int64 { - if m != nil { - return m.GasUsed - } - return 0 -} - -func (m *ExecTxResult) GetEvents() []*Event { - if m != nil { - return m.Events - } - return nil -} - -func (m *ExecTxResult) GetCodespace() string { - if m != nil { - return m.Codespace - } - return "" -} - -func init() { - proto.RegisterType((*ListenDeliverBlockRequest)(nil), "cosmos.streaming.v1.ListenDeliverBlockRequest") - proto.RegisterType((*ListenDeliverBlockResponse)(nil), "cosmos.streaming.v1.ListenDeliverBlockResponse") - proto.RegisterType((*ListenStateChangesRequest)(nil), "cosmos.streaming.v1.ListenStateChangesRequest") - proto.RegisterType((*ListenStateChangesResponse)(nil), "cosmos.streaming.v1.ListenStateChangesResponse") - proto.RegisterType((*StoreKVPair)(nil), "cosmos.streaming.v1.StoreKVPair") - proto.RegisterType((*Event)(nil), "cosmos.streaming.v1.Event") - proto.RegisterType((*EventAttribute)(nil), "cosmos.streaming.v1.EventAttribute") - proto.RegisterType((*ExecTxResult)(nil), "cosmos.streaming.v1.ExecTxResult") -} - -func init() { proto.RegisterFile("cosmos/streaming/v1/grpc.proto", fileDescriptor_3fc151d30622bb2a) } - -var fileDescriptor_3fc151d30622bb2a = []byte{ - // 599 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xae, 0x9b, 0x36, 0xa9, 0x27, 0xe1, 0x47, 0x0b, 0x42, 0x6e, 0x55, 0x2c, 0x37, 0x5c, 0x72, - 0x72, 0xd4, 0x70, 0x41, 0x5c, 0x80, 0x16, 0xa4, 0x4a, 0x70, 0x40, 0x1b, 0x7e, 0x24, 0x2e, 0x61, - 0x6b, 0x0f, 0x8e, 0x55, 0xd7, 0x36, 0x3b, 0x6b, 0x93, 0xbe, 0x05, 0x67, 0x1e, 0x08, 0x71, 0xec, - 0x91, 0x23, 0x6a, 0x2f, 0xbc, 0x05, 0x68, 0xd7, 0x6e, 0x93, 0x0a, 0xb7, 0x2a, 0xb7, 0x6f, 0x7e, - 0xbf, 0x6f, 0x3c, 0xe3, 0x05, 0x37, 0xc8, 0xe8, 0x30, 0xa3, 0x21, 0x29, 0x89, 0xe2, 0x30, 0x4e, - 0xa3, 0x61, 0xb9, 0x3d, 0x8c, 0x64, 0x1e, 0xf8, 0xb9, 0xcc, 0x54, 0xc6, 0xee, 0x54, 0x71, 0xff, - 0x3c, 0xee, 0x97, 0xdb, 0xfd, 0xef, 0x16, 0xac, 0xbf, 0x8a, 0x49, 0x61, 0xfa, 0x1c, 0x93, 0xb8, - 0x44, 0xb9, 0x93, 0x64, 0xc1, 0x01, 0xc7, 0xcf, 0x05, 0x92, 0x62, 0x5b, 0xd0, 0xdb, 0xd7, 0xf6, - 0x64, 0x8a, 0x71, 0x34, 0x55, 0x8e, 0xe5, 0x59, 0x83, 0x16, 0xef, 0x1a, 0xdf, 0x9e, 0x71, 0xb1, - 0xdb, 0xd0, 0x52, 0x33, 0x72, 0x96, 0xbd, 0xd6, 0xa0, 0xc7, 0x35, 0x64, 0x23, 0x68, 0x63, 0x89, - 0xa9, 0x22, 0xa7, 0xe5, 0xb5, 0x06, 0xdd, 0xd1, 0x86, 0xdf, 0x40, 0xec, 0xbf, 0xd0, 0x29, 0xbc, - 0xce, 0x64, 0x4f, 0x01, 0xd4, 0x6c, 0x22, 0x91, 0x8a, 0x44, 0x91, 0xb3, 0x62, 0xea, 0xb6, 0x9a, - 0xeb, 0x66, 0x18, 0xbc, 0x99, 0x71, 0x93, 0xc9, 0x6d, 0x55, 0x23, 0xea, 0x6f, 0xc2, 0x46, 0xd3, - 0x1c, 0x94, 0x67, 0x29, 0x61, 0xff, 0xdb, 0xf9, 0x98, 0x63, 0x25, 0x14, 0xee, 0x4e, 0x45, 0x1a, - 0x21, 0xfd, 0xc7, 0x98, 0x4f, 0x00, 0x02, 0x53, 0x34, 0x21, 0x54, 0x66, 0xda, 0xee, 0xc8, 0x6b, - 0x14, 0x38, 0x56, 0x99, 0xc4, 0x97, 0xef, 0x5e, 0x8b, 0x58, 0x72, 0xbb, 0xaa, 0x19, 0xa3, 0x62, - 0xeb, 0xb0, 0x26, 0xf2, 0x7c, 0x32, 0x15, 0x34, 0x75, 0x5a, 0x9e, 0x35, 0xe8, 0xf1, 0x8e, 0xc8, - 0xf3, 0x3d, 0x41, 0xd3, 0xb9, 0xf4, 0x8b, 0xda, 0x6a, 0xe9, 0x11, 0x74, 0x17, 0x5a, 0x32, 0x07, - 0x3a, 0x22, 0x0c, 0x25, 0x12, 0x19, 0x99, 0xba, 0x4d, 0x65, 0xea, 0x4d, 0x1c, 0xe0, 0x91, 0xb3, - 0x6c, 0xbc, 0x1a, 0xb2, 0xbb, 0xb0, 0x5a, 0x8a, 0xa4, 0xc0, 0x9a, 0xb0, 0x32, 0xd8, 0x3d, 0x68, - 0x87, 0x98, 0xa0, 0x42, 0x67, 0xc5, 0xb3, 0x06, 0x6b, 0xbc, 0xb6, 0xfa, 0x1f, 0x61, 0xd5, 0x2c, - 0x85, 0x31, 0x58, 0x51, 0x47, 0x39, 0x9a, 0xfe, 0x36, 0x37, 0x98, 0xed, 0x02, 0x08, 0xa5, 0x64, - 0xbc, 0x5f, 0x28, 0xa4, 0x7a, 0xfe, 0x07, 0x97, 0x2f, 0xf6, 0xd9, 0x59, 0x2e, 0x5f, 0x28, 0xeb, - 0x3f, 0x82, 0x9b, 0x17, 0xa3, 0x67, 0x9a, 0x2b, 0xa6, 0x8b, 0x9a, 0x97, 0x8d, 0xaf, 0x32, 0xfa, - 0xbf, 0x2d, 0xe8, 0x2d, 0x6e, 0x5e, 0x6b, 0x0c, 0xb2, 0xb0, 0xd2, 0x78, 0x83, 0x1b, 0xac, 0x7d, - 0xa1, 0x50, 0xa2, 0xfe, 0x02, 0x06, 0x6b, 0x82, 0x24, 0x8b, 0xcc, 0x07, 0xb0, 0xb9, 0x86, 0x3a, - 0x2b, 0x4e, 0x3f, 0x65, 0x66, 0x78, 0x9b, 0x1b, 0xcc, 0xee, 0x03, 0x44, 0x82, 0x26, 0x5f, 0x44, - 0xaa, 0x30, 0x74, 0x56, 0xcd, 0xfa, 0xed, 0x48, 0xd0, 0x7b, 0xe3, 0xd0, 0xbb, 0xd3, 0xe1, 0x82, - 0x30, 0x74, 0xda, 0x26, 0xd8, 0x89, 0x04, 0xbd, 0x25, 0x0c, 0x17, 0x8e, 0xbd, 0x73, 0xed, 0x63, - 0xdf, 0x04, 0x5b, 0xeb, 0xa5, 0x5c, 0x04, 0xe8, 0xac, 0x19, 0x19, 0x73, 0xc7, 0xe8, 0x8f, 0x05, - 0xb7, 0xaa, 0x73, 0x40, 0x39, 0x46, 0x59, 0xc6, 0x01, 0xb2, 0x02, 0xd8, 0xbf, 0xc7, 0xcd, 0xfc, - 0x46, 0xae, 0x4b, 0xff, 0xe6, 0x8d, 0xe1, 0xb5, 0xf3, 0xab, 0xd3, 0x9b, 0xd3, 0x2e, 0x1e, 0xe6, - 0x95, 0xb4, 0x0d, 0x7f, 0xd7, 0x95, 0xb4, 0x4d, 0x17, 0xbf, 0xf3, 0xf8, 0xc7, 0x89, 0x6b, 0x1d, - 0x9f, 0xb8, 0xd6, 0xaf, 0x13, 0xd7, 0xfa, 0x7a, 0xea, 0x2e, 0x1d, 0x9f, 0xba, 0x4b, 0x3f, 0x4f, - 0xdd, 0xa5, 0x0f, 0x5e, 0xd5, 0x89, 0xc2, 0x03, 0x3f, 0xce, 0x86, 0x84, 0xb2, 0x44, 0x39, 0x2c, - 0x47, 0xf3, 0x27, 0x6f, 0xbf, 0x6d, 0xde, 0xba, 0x87, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3b, - 0xbd, 0x03, 0xda, 0x0d, 0x05, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ListenerServiceClient is the client API for ListenerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ListenerServiceClient interface { - // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock - ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) - // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges - ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) -} - -type listenerServiceClient struct { - cc grpc1.ClientConn -} - -func NewListenerServiceClient(cc grpc1.ClientConn) ListenerServiceClient { - return &listenerServiceClient{cc} -} - -func (c *listenerServiceClient) ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) { - out := new(ListenDeliverBlockResponse) - err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *listenerServiceClient) ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) { - out := new(ListenStateChangesResponse) - err := c.cc.Invoke(ctx, "/cosmos.streaming.v1.ListenerService/ListenStateChanges", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ListenerServiceServer is the server API for ListenerService service. -type ListenerServiceServer interface { - // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock - ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) - // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges - ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) -} - -// UnimplementedListenerServiceServer can be embedded to have forward compatible implementations. -type UnimplementedListenerServiceServer struct { -} - -func (*UnimplementedListenerServiceServer) ListenDeliverBlock(ctx context.Context, req *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenDeliverBlock not implemented") -} -func (*UnimplementedListenerServiceServer) ListenStateChanges(ctx context.Context, req *ListenStateChangesRequest) (*ListenStateChangesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenStateChanges not implemented") -} - -func RegisterListenerServiceServer(s grpc1.Server, srv ListenerServiceServer) { - s.RegisterService(&_ListenerService_serviceDesc, srv) -} - -func _ListenerService_ListenDeliverBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenDeliverBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, req.(*ListenDeliverBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ListenerService_ListenStateChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenStateChangesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ListenerServiceServer).ListenStateChanges(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.streaming.v1.ListenerService/ListenStateChanges", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ListenerServiceServer).ListenStateChanges(ctx, req.(*ListenStateChangesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ListenerService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.streaming.v1.ListenerService", - HandlerType: (*ListenerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListenDeliverBlock", - Handler: _ListenerService_ListenDeliverBlock_Handler, - }, - { - MethodName: "ListenStateChanges", - Handler: _ListenerService_ListenStateChanges_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/streaming/v1/grpc.proto", -} - -func (m *ListenDeliverBlockRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListenDeliverBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenDeliverBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TxResults) > 0 { - for iNdEx := len(m.TxResults) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TxResults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Txs) > 0 { - for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Txs[iNdEx]) - copy(dAtA[i:], m.Txs[iNdEx]) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Txs[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenDeliverBlockResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListenDeliverBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenDeliverBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ListenStateChangesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListenStateChangesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenStateChangesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AppHash) > 0 { - i -= len(m.AppHash) - copy(dAtA[i:], m.AppHash) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.AppHash))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChangeSet) > 0 { - for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenStateChangesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListenStateChangesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenStateChangesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *StoreKVPair) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Delete { - i-- - if m.Delete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Event) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EventAttribute) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventAttribute) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EventAttribute) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExecTxResult) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExecTxResult) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExecTxResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Codespace) > 0 { - i -= len(m.Codespace) - copy(dAtA[i:], m.Codespace) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Codespace))) - i-- - dAtA[i] = 0x42 - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.GasUsed != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.GasUsed)) - i-- - dAtA[i] = 0x30 - } - if m.GasWanted != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.GasWanted)) - i-- - dAtA[i] = 0x28 - } - if len(m.Info) > 0 { - i -= len(m.Info) - copy(dAtA[i:], m.Info) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Info))) - i-- - dAtA[i] = 0x22 - } - if len(m.Log) > 0 { - i -= len(m.Log) - copy(dAtA[i:], m.Log) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Log))) - i-- - dAtA[i] = 0x1a - } - if len(m.Data) > 0 { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintGrpc(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x12 - } - if m.Code != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { - offset -= sovGrpc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ListenDeliverBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if len(m.Txs) > 0 { - for _, b := range m.Txs { - l = len(b) - n += 1 + l + sovGrpc(uint64(l)) - } - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - if len(m.TxResults) > 0 { - for _, e := range m.TxResults { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *ListenDeliverBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ListenStateChangesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if len(m.ChangeSet) > 0 { - for _, e := range m.ChangeSet { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - l = len(m.AppHash) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ListenStateChangesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *StoreKVPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if m.Delete { - n += 2 - } - return n -} - -func (m *Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *EventAttribute) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ExecTxResult) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovGrpc(uint64(m.Code)) - } - l = len(m.Data) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Log) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - l = len(m.Info) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - if m.GasWanted != 0 { - n += 1 + sovGrpc(uint64(m.GasWanted)) - } - if m.GasUsed != 0 { - n += 1 + sovGrpc(uint64(m.GasUsed)) - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - l = len(m.Codespace) - if l > 0 { - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func sovGrpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGrpc(x uint64) (n int) { - return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ListenDeliverBlockRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListenDeliverBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenDeliverBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Txs = append(m.Txs, make([]byte, postIndex-iNdEx)) - copy(m.Txs[len(m.Txs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxResults", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TxResults = append(m.TxResults, &ExecTxResult{}) - if err := m.TxResults[len(m.TxResults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenDeliverBlockResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListenDeliverBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenDeliverBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenStateChangesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListenStateChangesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenStateChangesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeSet = append(m.ChangeSet, &StoreKVPair{}) - if err := m.ChangeSet[len(m.ChangeSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppHash = append(m.AppHash[:0], dAtA[iNdEx:postIndex]...) - if m.AppHash == nil { - m.AppHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenStateChangesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListenStateChangesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenStateChangesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreKVPair) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StoreKVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = append(m.Address[:0], dAtA[iNdEx:postIndex]...) - if m.Address == nil { - m.Address = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Delete = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Event) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, &EventAttribute{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventAttribute) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventAttribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExecTxResult) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExecTxResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExecTxResult: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) - } - m.GasWanted = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasWanted |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - m.GasUsed = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GasUsed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGrpc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGrpc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGrpc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGrpc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/snapshots/types/snapshot.pb.go b/cosmossdk.io/store/snapshots/types/snapshot.pb.go deleted file mode 100644 index e81660c4596e..000000000000 --- a/cosmossdk.io/store/snapshots/types/snapshot.pb.go +++ /dev/null @@ -1,2008 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/snapshots/v1/snapshot.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Snapshot contains Tendermint state sync snapshot info. -type Snapshot struct { - Height uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` - Chunks uint32 `protobuf:"varint,3,opt,name=chunks,proto3" json:"chunks,omitempty"` - Hash []byte `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` - Metadata Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata"` -} - -func (m *Snapshot) Reset() { *m = Snapshot{} } -func (m *Snapshot) String() string { return proto.CompactTextString(m) } -func (*Snapshot) ProtoMessage() {} -func (*Snapshot) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{0} -} -func (m *Snapshot) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Snapshot) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Snapshot.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Snapshot) XXX_Merge(src proto.Message) { - xxx_messageInfo_Snapshot.Merge(m, src) -} -func (m *Snapshot) XXX_Size() int { - return m.Size() -} -func (m *Snapshot) XXX_DiscardUnknown() { - xxx_messageInfo_Snapshot.DiscardUnknown(m) -} - -var xxx_messageInfo_Snapshot proto.InternalMessageInfo - -func (m *Snapshot) GetHeight() uint64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *Snapshot) GetFormat() uint32 { - if m != nil { - return m.Format - } - return 0 -} - -func (m *Snapshot) GetChunks() uint32 { - if m != nil { - return m.Chunks - } - return 0 -} - -func (m *Snapshot) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func (m *Snapshot) GetMetadata() Metadata { - if m != nil { - return m.Metadata - } - return Metadata{} -} - -// Metadata contains SDK-specific snapshot metadata. -type Metadata struct { - ChunkHashes [][]byte `protobuf:"bytes,1,rep,name=chunk_hashes,json=chunkHashes,proto3" json:"chunk_hashes,omitempty"` -} - -func (m *Metadata) Reset() { *m = Metadata{} } -func (m *Metadata) String() string { return proto.CompactTextString(m) } -func (*Metadata) ProtoMessage() {} -func (*Metadata) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{1} -} -func (m *Metadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Metadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metadata.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Metadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metadata.Merge(m, src) -} -func (m *Metadata) XXX_Size() int { - return m.Size() -} -func (m *Metadata) XXX_DiscardUnknown() { - xxx_messageInfo_Metadata.DiscardUnknown(m) -} - -var xxx_messageInfo_Metadata proto.InternalMessageInfo - -func (m *Metadata) GetChunkHashes() [][]byte { - if m != nil { - return m.ChunkHashes - } - return nil -} - -// SnapshotItem is an item contained in a rootmulti.Store snapshot. -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 - // *SnapshotItem_ExtensionPayload - Item isSnapshotItem_Item `protobuf_oneof:"item"` -} - -func (m *SnapshotItem) Reset() { *m = SnapshotItem{} } -func (m *SnapshotItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotItem) ProtoMessage() {} -func (*SnapshotItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{2} -} -func (m *SnapshotItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotItem.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SnapshotItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotItem.Merge(m, src) -} -func (m *SnapshotItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotItem proto.InternalMessageInfo - -type isSnapshotItem_Item interface { - isSnapshotItem_Item() - MarshalTo([]byte) (int, error) - Size() int -} - -type SnapshotItem_Store struct { - Store *SnapshotStoreItem `protobuf:"bytes,1,opt,name=store,proto3,oneof" json:"store,omitempty"` -} -type SnapshotItem_IAVL struct { - IAVL *SnapshotIAVLItem `protobuf:"bytes,2,opt,name=iavl,proto3,oneof" json:"iavl,omitempty"` -} -type SnapshotItem_Extension struct { - Extension *SnapshotExtensionMeta `protobuf:"bytes,3,opt,name=extension,proto3,oneof" json:"extension,omitempty"` -} -type SnapshotItem_ExtensionPayload struct { - ExtensionPayload *SnapshotExtensionPayload `protobuf:"bytes,4,opt,name=extension_payload,json=extensionPayload,proto3,oneof" json:"extension_payload,omitempty"` -} - -func (*SnapshotItem_Store) isSnapshotItem_Item() {} -func (*SnapshotItem_IAVL) isSnapshotItem_Item() {} -func (*SnapshotItem_Extension) isSnapshotItem_Item() {} -func (*SnapshotItem_ExtensionPayload) isSnapshotItem_Item() {} - -func (m *SnapshotItem) GetItem() isSnapshotItem_Item { - if m != nil { - return m.Item - } - return nil -} - -func (m *SnapshotItem) GetStore() *SnapshotStoreItem { - if x, ok := m.GetItem().(*SnapshotItem_Store); ok { - return x.Store - } - return nil -} - -func (m *SnapshotItem) GetIAVL() *SnapshotIAVLItem { - if x, ok := m.GetItem().(*SnapshotItem_IAVL); ok { - return x.IAVL - } - return nil -} - -func (m *SnapshotItem) GetExtension() *SnapshotExtensionMeta { - if x, ok := m.GetItem().(*SnapshotItem_Extension); ok { - return x.Extension - } - return nil -} - -func (m *SnapshotItem) GetExtensionPayload() *SnapshotExtensionPayload { - if x, ok := m.GetItem().(*SnapshotItem_ExtensionPayload); ok { - return x.ExtensionPayload - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*SnapshotItem) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*SnapshotItem_Store)(nil), - (*SnapshotItem_IAVL)(nil), - (*SnapshotItem_Extension)(nil), - (*SnapshotItem_ExtensionPayload)(nil), - } -} - -// SnapshotStoreItem contains metadata about a snapshotted store. -type SnapshotStoreItem struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` -} - -func (m *SnapshotStoreItem) Reset() { *m = SnapshotStoreItem{} } -func (m *SnapshotStoreItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotStoreItem) ProtoMessage() {} -func (*SnapshotStoreItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{3} -} -func (m *SnapshotStoreItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotStoreItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotStoreItem.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SnapshotStoreItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotStoreItem.Merge(m, src) -} -func (m *SnapshotStoreItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotStoreItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotStoreItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotStoreItem proto.InternalMessageInfo - -func (m *SnapshotStoreItem) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -// SnapshotIAVLItem is an exported IAVL node. -type SnapshotIAVLItem struct { - Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // version is block height - Version int64 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - // height is depth of the tree. - Height int32 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *SnapshotIAVLItem) Reset() { *m = SnapshotIAVLItem{} } -func (m *SnapshotIAVLItem) String() string { return proto.CompactTextString(m) } -func (*SnapshotIAVLItem) ProtoMessage() {} -func (*SnapshotIAVLItem) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{4} -} -func (m *SnapshotIAVLItem) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotIAVLItem) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotIAVLItem.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SnapshotIAVLItem) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotIAVLItem.Merge(m, src) -} -func (m *SnapshotIAVLItem) XXX_Size() int { - return m.Size() -} -func (m *SnapshotIAVLItem) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotIAVLItem.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotIAVLItem proto.InternalMessageInfo - -func (m *SnapshotIAVLItem) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *SnapshotIAVLItem) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (m *SnapshotIAVLItem) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *SnapshotIAVLItem) GetHeight() int32 { - if m != nil { - return m.Height - } - return 0 -} - -// SnapshotExtensionMeta contains metadata about an external snapshotter. -type SnapshotExtensionMeta struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Format uint32 `protobuf:"varint,2,opt,name=format,proto3" json:"format,omitempty"` -} - -func (m *SnapshotExtensionMeta) Reset() { *m = SnapshotExtensionMeta{} } -func (m *SnapshotExtensionMeta) String() string { return proto.CompactTextString(m) } -func (*SnapshotExtensionMeta) ProtoMessage() {} -func (*SnapshotExtensionMeta) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{5} -} -func (m *SnapshotExtensionMeta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotExtensionMeta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotExtensionMeta.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SnapshotExtensionMeta) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotExtensionMeta.Merge(m, src) -} -func (m *SnapshotExtensionMeta) XXX_Size() int { - return m.Size() -} -func (m *SnapshotExtensionMeta) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotExtensionMeta.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotExtensionMeta proto.InternalMessageInfo - -func (m *SnapshotExtensionMeta) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *SnapshotExtensionMeta) GetFormat() uint32 { - if m != nil { - return m.Format - } - return 0 -} - -// SnapshotExtensionPayload contains payloads of an external snapshotter. -type SnapshotExtensionPayload struct { - Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` -} - -func (m *SnapshotExtensionPayload) Reset() { *m = SnapshotExtensionPayload{} } -func (m *SnapshotExtensionPayload) String() string { return proto.CompactTextString(m) } -func (*SnapshotExtensionPayload) ProtoMessage() {} -func (*SnapshotExtensionPayload) Descriptor() ([]byte, []int) { - return fileDescriptor_3d5cca1aa5b69183, []int{6} -} -func (m *SnapshotExtensionPayload) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SnapshotExtensionPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SnapshotExtensionPayload.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SnapshotExtensionPayload) XXX_Merge(src proto.Message) { - xxx_messageInfo_SnapshotExtensionPayload.Merge(m, src) -} -func (m *SnapshotExtensionPayload) XXX_Size() int { - return m.Size() -} -func (m *SnapshotExtensionPayload) XXX_DiscardUnknown() { - xxx_messageInfo_SnapshotExtensionPayload.DiscardUnknown(m) -} - -var xxx_messageInfo_SnapshotExtensionPayload proto.InternalMessageInfo - -func (m *SnapshotExtensionPayload) GetPayload() []byte { - if m != nil { - return m.Payload - } - return nil -} - -func init() { - proto.RegisterType((*Snapshot)(nil), "cosmos.store.snapshots.v1.Snapshot") - proto.RegisterType((*Metadata)(nil), "cosmos.store.snapshots.v1.Metadata") - proto.RegisterType((*SnapshotItem)(nil), "cosmos.store.snapshots.v1.SnapshotItem") - proto.RegisterType((*SnapshotStoreItem)(nil), "cosmos.store.snapshots.v1.SnapshotStoreItem") - proto.RegisterType((*SnapshotIAVLItem)(nil), "cosmos.store.snapshots.v1.SnapshotIAVLItem") - proto.RegisterType((*SnapshotExtensionMeta)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionMeta") - proto.RegisterType((*SnapshotExtensionPayload)(nil), "cosmos.store.snapshots.v1.SnapshotExtensionPayload") -} - -func init() { - proto.RegisterFile("cosmos/store/snapshots/v1/snapshot.proto", fileDescriptor_3d5cca1aa5b69183) -} - -var fileDescriptor_3d5cca1aa5b69183 = []byte{ - // 538 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x41, 0x6f, 0xd3, 0x3c, - 0x18, 0x8e, 0xd7, 0xb4, 0x5f, 0xf7, 0x26, 0x9f, 0xe8, 0xcc, 0x40, 0x61, 0x87, 0x2c, 0x84, 0x4b, - 0x24, 0x68, 0xba, 0x75, 0x88, 0x03, 0xda, 0x85, 0x8a, 0x49, 0xad, 0x00, 0x69, 0xf2, 0x24, 0x84, - 0xb8, 0x54, 0xde, 0x6a, 0x9a, 0xaa, 0x4d, 0x5d, 0xd5, 0x5e, 0x45, 0x8f, 0xfc, 0x03, 0xfe, 0x08, - 0x37, 0x7e, 0xc4, 0x8e, 0x13, 0x27, 0x4e, 0x13, 0x6a, 0xff, 0x02, 0x3f, 0x00, 0xd9, 0x4e, 0x0a, - 0xda, 0x52, 0x34, 0x6e, 0xef, 0xf3, 0xfa, 0x79, 0x1e, 0xfb, 0x7d, 0xec, 0x04, 0xa2, 0x33, 0x2e, - 0x52, 0x2e, 0x1a, 0x42, 0xf2, 0x29, 0x6b, 0x88, 0x31, 0x9d, 0x88, 0x84, 0x4b, 0xd1, 0x98, 0xed, - 0xaf, 0x40, 0x3c, 0x99, 0x72, 0xc9, 0xf1, 0x03, 0xc3, 0x8c, 0x35, 0x33, 0x5e, 0x31, 0xe3, 0xd9, - 0xfe, 0xce, 0x76, 0x9f, 0xf7, 0xb9, 0x66, 0x35, 0x54, 0x65, 0x04, 0x3b, 0x99, 0xa0, 0x6b, 0x16, - 0x32, 0xb5, 0x06, 0xe1, 0x17, 0x04, 0xd5, 0x93, 0xcc, 0x01, 0xdf, 0x87, 0x4a, 0xc2, 0x06, 0xfd, - 0x44, 0x7a, 0x28, 0x40, 0x91, 0x4d, 0x32, 0xa4, 0xfa, 0x1f, 0xf8, 0x34, 0xa5, 0xd2, 0xdb, 0x08, - 0x50, 0xf4, 0x3f, 0xc9, 0x90, 0xea, 0x9f, 0x25, 0xe7, 0xe3, 0xa1, 0xf0, 0x4a, 0xa6, 0x6f, 0x10, - 0xc6, 0x60, 0x27, 0x54, 0x24, 0x9e, 0x1d, 0xa0, 0xc8, 0x25, 0xba, 0xc6, 0x47, 0x50, 0x4d, 0x99, - 0xa4, 0x3d, 0x2a, 0xa9, 0x57, 0x0e, 0x50, 0xe4, 0x34, 0x1f, 0xc5, 0x6b, 0xe7, 0x88, 0xdf, 0x64, - 0xd4, 0x96, 0x7d, 0x71, 0xb5, 0x6b, 0x91, 0x95, 0x34, 0xac, 0x43, 0x35, 0x5f, 0xc3, 0x0f, 0xc1, - 0xd5, 0x1b, 0x76, 0xd5, 0x06, 0x4c, 0x78, 0x28, 0x28, 0x45, 0x2e, 0x71, 0x74, 0xaf, 0xad, 0x5b, - 0xe1, 0xcf, 0x0d, 0x70, 0xf3, 0xf1, 0x3a, 0x92, 0xa5, 0xf8, 0x25, 0x94, 0xf5, 0x76, 0x7a, 0x42, - 0xa7, 0xf9, 0xe4, 0x2f, 0x67, 0xc8, 0x75, 0x27, 0x6a, 0x49, 0x89, 0xdb, 0x16, 0x31, 0x62, 0xfc, - 0x0a, 0xec, 0x01, 0x9d, 0x8d, 0x74, 0x1c, 0x4e, 0xf3, 0xf1, 0x2d, 0x4c, 0x3a, 0x2f, 0xde, 0xbe, - 0x56, 0x1e, 0xad, 0xea, 0xe2, 0x6a, 0xd7, 0x56, 0xa8, 0x6d, 0x11, 0x6d, 0x82, 0x8f, 0x61, 0x93, - 0x7d, 0x94, 0x6c, 0x2c, 0x06, 0x7c, 0xac, 0x83, 0x74, 0x9a, 0x7b, 0xb7, 0x70, 0x3c, 0xca, 0x35, - 0x2a, 0x8f, 0xb6, 0x45, 0x7e, 0x9b, 0xe0, 0x53, 0xd8, 0x5a, 0x81, 0xee, 0x84, 0xce, 0x47, 0x9c, - 0xf6, 0xf4, 0x65, 0x38, 0xcd, 0x83, 0x7f, 0x71, 0x3e, 0x36, 0xd2, 0xb6, 0x45, 0x6a, 0xec, 0x5a, - 0xef, 0xf9, 0xdd, 0x6f, 0x5f, 0xeb, 0x77, 0x8c, 0x57, 0x5d, 0xf4, 0x86, 0xc1, 0x5e, 0xfc, 0xf4, - 0x59, 0xab, 0x02, 0xf6, 0x40, 0xb2, 0x34, 0x3c, 0x84, 0xad, 0x1b, 0xe9, 0xa9, 0x57, 0x31, 0xa6, - 0xa9, 0x49, 0x7e, 0x93, 0xe8, 0xba, 0xd0, 0x25, 0xfc, 0x84, 0xa0, 0x76, 0x3d, 0x37, 0x5c, 0x83, - 0xd2, 0x90, 0xcd, 0xb5, 0xd8, 0x25, 0xaa, 0xc4, 0xdb, 0x50, 0x9e, 0xd1, 0xd1, 0x39, 0xd3, 0xb7, - 0xe0, 0x12, 0x03, 0xb0, 0x07, 0xff, 0xcd, 0xd8, 0x74, 0x95, 0x65, 0x89, 0xe4, 0xf0, 0x8f, 0xd7, - 0xad, 0xa2, 0x28, 0xe7, 0xaf, 0xbb, 0xf8, 0x0c, 0xef, 0xe0, 0x5e, 0x61, 0xd0, 0x45, 0x53, 0xac, - 0xfb, 0x3e, 0x8a, 0x9d, 0x3b, 0xe0, 0xad, 0x0b, 0x5a, 0x1d, 0x3e, 0xbf, 0x2e, 0x33, 0x68, 0x0e, - 0x8b, 0xe3, 0x3e, 0xbc, 0x58, 0xf8, 0xe8, 0x72, 0xe1, 0xa3, 0x1f, 0x0b, 0x1f, 0x7d, 0x5e, 0xfa, - 0xd6, 0xe5, 0xd2, 0xb7, 0xbe, 0x2f, 0x7d, 0xeb, 0x7d, 0x68, 0xa8, 0xa2, 0x37, 0x8c, 0x07, 0xfc, - 0xc6, 0x2f, 0x45, 0xce, 0x27, 0x4c, 0x9c, 0x56, 0xf4, 0x1f, 0xe0, 0xe0, 0x57, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x57, 0xe2, 0xd5, 0x36, 0x79, 0x04, 0x00, 0x00, -} - -func (m *Snapshot) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Snapshot) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Snapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x22 - } - if m.Chunks != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Chunks)) - i-- - dAtA[i] = 0x18 - } - if m.Format != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if m.Height != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Metadata) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Metadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChunkHashes) > 0 { - for iNdEx := len(m.ChunkHashes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ChunkHashes[iNdEx]) - copy(dAtA[i:], m.ChunkHashes[iNdEx]) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.ChunkHashes[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SnapshotItem) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SnapshotItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Item != nil { - { - size := m.Item.Size() - i -= size - if _, err := m.Item.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *SnapshotItem_Store) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_Store) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Store != nil { - { - size, err := m.Store.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_IAVL) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_IAVL) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.IAVL != nil { - { - size, err := m.IAVL.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_Extension) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_Extension) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Extension != nil { - { - size, err := m.Extension.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *SnapshotItem_ExtensionPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotItem_ExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ExtensionPayload != nil { - { - size, err := m.ExtensionPayload.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSnapshot(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *SnapshotStoreItem) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SnapshotStoreItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotStoreItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotIAVLItem) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SnapshotIAVLItem) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotIAVLItem) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x20 - } - if m.Version != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x18 - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotExtensionMeta) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SnapshotExtensionMeta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotExtensionMeta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Format != 0 { - i = encodeVarintSnapshot(dAtA, i, uint64(m.Format)) - i-- - dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SnapshotExtensionPayload) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SnapshotExtensionPayload) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SnapshotExtensionPayload) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintSnapshot(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintSnapshot(dAtA []byte, offset int, v uint64) int { - offset -= sovSnapshot(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Snapshot) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovSnapshot(uint64(m.Height)) - } - if m.Format != 0 { - n += 1 + sovSnapshot(uint64(m.Format)) - } - if m.Chunks != 0 { - n += 1 + sovSnapshot(uint64(m.Chunks)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - l = m.Metadata.Size() - n += 1 + l + sovSnapshot(uint64(l)) - return n -} - -func (m *Metadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ChunkHashes) > 0 { - for _, b := range m.ChunkHashes { - l = len(b) - n += 1 + l + sovSnapshot(uint64(l)) - } - } - return n -} - -func (m *SnapshotItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Item != nil { - n += m.Item.Size() - } - return n -} - -func (m *SnapshotItem_Store) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Store != nil { - l = m.Store.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_IAVL) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.IAVL != nil { - l = m.IAVL.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_Extension) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Extension != nil { - l = m.Extension.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotItem_ExtensionPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ExtensionPayload != nil { - l = m.ExtensionPayload.Size() - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} -func (m *SnapshotStoreItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} - -func (m *SnapshotIAVLItem) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - if m.Version != 0 { - n += 1 + sovSnapshot(uint64(m.Version)) - } - if m.Height != 0 { - n += 1 + sovSnapshot(uint64(m.Height)) - } - return n -} - -func (m *SnapshotExtensionMeta) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - if m.Format != 0 { - n += 1 + sovSnapshot(uint64(m.Format)) - } - return n -} - -func (m *SnapshotExtensionPayload) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Payload) - if l > 0 { - n += 1 + l + sovSnapshot(uint64(l)) - } - return n -} - -func sovSnapshot(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSnapshot(x uint64) (n int) { - return sovSnapshot(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Snapshot) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Snapshot: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Snapshot: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) - } - m.Chunks = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Chunks |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Metadata) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Metadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Metadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChunkHashes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChunkHashes = append(m.ChunkHashes, make([]byte, postIndex-iNdEx)) - copy(m.ChunkHashes[len(m.ChunkHashes)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotItem) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SnapshotItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Store", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotStoreItem{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_Store{v} - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IAVL", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotIAVLItem{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_IAVL{v} - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotExtensionMeta{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_Extension{v} - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExtensionPayload", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &SnapshotExtensionPayload{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Item = &SnapshotItem_ExtensionPayload{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotStoreItem) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SnapshotStoreItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotStoreItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotIAVLItem) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SnapshotIAVLItem: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotIAVLItem: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotExtensionMeta) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SnapshotExtensionMeta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotExtensionMeta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - m.Format = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Format |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SnapshotExtensionPayload) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SnapshotExtensionPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SnapshotExtensionPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSnapshot - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSnapshot - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSnapshot - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSnapshot(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSnapshot - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSnapshot(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSnapshot - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSnapshot - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSnapshot - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSnapshot - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSnapshot = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSnapshot = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSnapshot = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/streaming/abci/grpc.pb.go b/cosmossdk.io/store/streaming/abci/grpc.pb.go deleted file mode 100644 index b9a8e7622c53..000000000000 --- a/cosmossdk.io/store/streaming/abci/grpc.pb.go +++ /dev/null @@ -1,1050 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/streaming/abci/grpc.proto - -package abci - -import ( - context "context" - types "cosmossdk.io/store/types" - fmt "fmt" - v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" - grpc1 "github.com/cosmos/gogoproto/grpc" - proto "github.com/cosmos/gogoproto/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ListenEndBlockRequest is the request type for the ListenEndBlock RPC method -type ListenFinalizeBlockRequest struct { - Req *v1.FinalizeBlockRequest `protobuf:"bytes,1,opt,name=req,proto3" json:"req,omitempty"` - Res *v1.FinalizeBlockResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` -} - -func (m *ListenFinalizeBlockRequest) Reset() { *m = ListenFinalizeBlockRequest{} } -func (m *ListenFinalizeBlockRequest) String() string { return proto.CompactTextString(m) } -func (*ListenFinalizeBlockRequest) ProtoMessage() {} -func (*ListenFinalizeBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{0} -} -func (m *ListenFinalizeBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenFinalizeBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenFinalizeBlockRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListenFinalizeBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenFinalizeBlockRequest.Merge(m, src) -} -func (m *ListenFinalizeBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenFinalizeBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenFinalizeBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenFinalizeBlockRequest proto.InternalMessageInfo - -func (m *ListenFinalizeBlockRequest) GetReq() *v1.FinalizeBlockRequest { - if m != nil { - return m.Req - } - return nil -} - -func (m *ListenFinalizeBlockRequest) GetRes() *v1.FinalizeBlockResponse { - if m != nil { - return m.Res - } - return nil -} - -// ListenEndBlockResponse is the response type for the ListenEndBlock RPC method -type ListenFinalizeBlockResponse struct { -} - -func (m *ListenFinalizeBlockResponse) Reset() { *m = ListenFinalizeBlockResponse{} } -func (m *ListenFinalizeBlockResponse) String() string { return proto.CompactTextString(m) } -func (*ListenFinalizeBlockResponse) ProtoMessage() {} -func (*ListenFinalizeBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{1} -} -func (m *ListenFinalizeBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenFinalizeBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenFinalizeBlockResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListenFinalizeBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenFinalizeBlockResponse.Merge(m, src) -} -func (m *ListenFinalizeBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenFinalizeBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenFinalizeBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenFinalizeBlockResponse proto.InternalMessageInfo - -// ListenCommitRequest is the request type for the ListenCommit RPC method -type ListenCommitRequest struct { - // explicitly pass in block height as ResponseCommit does not contain this - // info - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Res *v1.CommitResponse `protobuf:"bytes,2,opt,name=res,proto3" json:"res,omitempty"` - ChangeSet []*types.StoreKVPair `protobuf:"bytes,3,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` -} - -func (m *ListenCommitRequest) Reset() { *m = ListenCommitRequest{} } -func (m *ListenCommitRequest) String() string { return proto.CompactTextString(m) } -func (*ListenCommitRequest) ProtoMessage() {} -func (*ListenCommitRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{2} -} -func (m *ListenCommitRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenCommitRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenCommitRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListenCommitRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenCommitRequest.Merge(m, src) -} -func (m *ListenCommitRequest) XXX_Size() int { - return m.Size() -} -func (m *ListenCommitRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListenCommitRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenCommitRequest proto.InternalMessageInfo - -func (m *ListenCommitRequest) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *ListenCommitRequest) GetRes() *v1.CommitResponse { - if m != nil { - return m.Res - } - return nil -} - -func (m *ListenCommitRequest) GetChangeSet() []*types.StoreKVPair { - if m != nil { - return m.ChangeSet - } - return nil -} - -// ListenCommitResponse is the response type for the ListenCommit RPC method -type ListenCommitResponse struct { -} - -func (m *ListenCommitResponse) Reset() { *m = ListenCommitResponse{} } -func (m *ListenCommitResponse) String() string { return proto.CompactTextString(m) } -func (*ListenCommitResponse) ProtoMessage() {} -func (*ListenCommitResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7b98083eb9315fb6, []int{3} -} -func (m *ListenCommitResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ListenCommitResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListenCommitResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListenCommitResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListenCommitResponse.Merge(m, src) -} -func (m *ListenCommitResponse) XXX_Size() int { - return m.Size() -} -func (m *ListenCommitResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListenCommitResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListenCommitResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ListenFinalizeBlockRequest)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockRequest") - proto.RegisterType((*ListenFinalizeBlockResponse)(nil), "cosmos.store.streaming.abci.ListenFinalizeBlockResponse") - proto.RegisterType((*ListenCommitRequest)(nil), "cosmos.store.streaming.abci.ListenCommitRequest") - proto.RegisterType((*ListenCommitResponse)(nil), "cosmos.store.streaming.abci.ListenCommitResponse") -} - -func init() { - proto.RegisterFile("cosmos/store/streaming/abci/grpc.proto", fileDescriptor_7b98083eb9315fb6) -} - -var fileDescriptor_7b98083eb9315fb6 = []byte{ - // 414 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x4f, 0x8f, 0xd2, 0x40, - 0x18, 0xc6, 0x29, 0x4d, 0x4c, 0x1c, 0x38, 0x0d, 0xc6, 0x90, 0xa2, 0x0d, 0x34, 0x06, 0x39, 0x4d, - 0x6d, 0x3d, 0x88, 0xf1, 0xa2, 0x90, 0x18, 0x8d, 0x1e, 0x4c, 0x49, 0x3c, 0x78, 0x21, 0x6d, 0x7d, - 0x2d, 0x13, 0x68, 0xa7, 0xcc, 0x8c, 0x4d, 0xf4, 0x13, 0x78, 0x74, 0x0f, 0xfb, 0x35, 0xf6, 0x73, - 0xec, 0x91, 0xe3, 0x1e, 0x37, 0xf0, 0x45, 0x36, 0x9d, 0x59, 0x08, 0xcd, 0xb2, 0x7f, 0x38, 0xf6, - 0x9d, 0xe7, 0xf7, 0xbc, 0x4f, 0xe7, 0x7d, 0x07, 0xf5, 0x63, 0x26, 0x52, 0x26, 0x5c, 0x21, 0x19, - 0x07, 0x57, 0x48, 0x0e, 0x61, 0x4a, 0xb3, 0xc4, 0x0d, 0xa3, 0x98, 0xba, 0x09, 0xcf, 0x63, 0x92, - 0x73, 0x26, 0x19, 0xee, 0x68, 0x1d, 0x51, 0x3a, 0xb2, 0xd3, 0x91, 0x52, 0x67, 0x3d, 0x8b, 0x59, - 0x0a, 0x32, 0xfa, 0x25, 0x35, 0x56, 0x78, 0xae, 0xfc, 0x93, 0x83, 0xd0, 0xa8, 0xf5, 0xa2, 0xd2, - 0xa2, 0xf0, 0x22, 0x90, 0xa1, 0xe7, 0x2e, 0xa8, 0x90, 0x90, 0x95, 0x16, 0x4a, 0xe5, 0x9c, 0x18, - 0xc8, 0xfa, 0xaa, 0x6a, 0x1f, 0x69, 0x16, 0x2e, 0xe8, 0x5f, 0x18, 0x2d, 0x58, 0x3c, 0x0f, 0x60, - 0xf9, 0x1b, 0x84, 0xc4, 0x43, 0x64, 0x72, 0x58, 0xb6, 0x8d, 0xae, 0x31, 0x68, 0xf8, 0x7d, 0xb2, - 0x6d, 0xa8, 0xfa, 0x93, 0xc2, 0x23, 0x87, 0xa0, 0xa0, 0x44, 0xf0, 0xdb, 0x92, 0x14, 0xed, 0xba, - 0x22, 0x5f, 0xde, 0x4b, 0x8a, 0x9c, 0x65, 0x02, 0x4a, 0x54, 0x38, 0xcf, 0x51, 0xe7, 0x60, 0x24, - 0xad, 0x71, 0xce, 0x0c, 0xd4, 0xd2, 0xe7, 0x63, 0x96, 0xa6, 0x54, 0x6e, 0xb3, 0xf6, 0x50, 0x33, - 0x2a, 0x85, 0xd3, 0x19, 0xd0, 0x64, 0x26, 0x55, 0x68, 0x33, 0x68, 0xa8, 0xda, 0x27, 0x55, 0xc2, - 0xfe, 0x7e, 0xa8, 0xee, 0xcd, 0x50, 0x5b, 0xc3, 0xbd, 0x34, 0xf8, 0x3d, 0x42, 0xf1, 0x2c, 0xcc, - 0x12, 0x98, 0x0a, 0x90, 0x6d, 0xb3, 0x6b, 0x0e, 0x1a, 0x7e, 0x8f, 0x54, 0xe6, 0x72, 0x7d, 0xb9, - 0x64, 0x52, 0x7e, 0x7d, 0xf9, 0xfe, 0x2d, 0xa4, 0x3c, 0x78, 0xac, 0xa1, 0x09, 0x48, 0xe7, 0x29, - 0x7a, 0x52, 0xcd, 0xab, 0xed, 0xfd, 0xd3, 0x3a, 0x6a, 0x7d, 0x18, 0x8d, 0x3f, 0xeb, 0x43, 0xe0, - 0x13, 0xe0, 0x05, 0x8d, 0x01, 0xff, 0xdb, 0xfd, 0x60, 0xe5, 0x02, 0xf0, 0x1b, 0x72, 0xc7, 0x36, - 0x90, 0xdb, 0xa7, 0x68, 0x0d, 0x8f, 0x07, 0x75, 0x44, 0x2c, 0x50, 0x73, 0x3f, 0x3a, 0x7e, 0xf5, - 0x00, 0xa7, 0xca, 0x54, 0x2c, 0xef, 0x08, 0x42, 0x37, 0x1d, 0xbd, 0x3b, 0x5f, 0xdb, 0xc6, 0x6a, - 0x6d, 0x1b, 0x97, 0x6b, 0xdb, 0xf8, 0xbf, 0xb1, 0x6b, 0xab, 0x8d, 0x5d, 0xbb, 0xd8, 0xd8, 0xb5, - 0x1f, 0x3d, 0xed, 0x25, 0x7e, 0xce, 0x09, 0x65, 0x07, 0x1f, 0x4f, 0xf4, 0x48, 0xed, 0xf5, 0xeb, - 0xab, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb7, 0xf4, 0x63, 0xc3, 0x62, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ABCIListenerServiceClient is the client API for ABCIListenerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ABCIListenerServiceClient interface { - // ListenFinalizeBlock is the corresponding endpoint for - // ABCIListener.ListenEndBlock - ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) - // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit - ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) -} - -type aBCIListenerServiceClient struct { - cc grpc1.ClientConn -} - -func NewABCIListenerServiceClient(cc grpc1.ClientConn) ABCIListenerServiceClient { - return &aBCIListenerServiceClient{cc} -} - -func (c *aBCIListenerServiceClient) ListenFinalizeBlock(ctx context.Context, in *ListenFinalizeBlockRequest, opts ...grpc.CallOption) (*ListenFinalizeBlockResponse, error) { - out := new(ListenFinalizeBlockResponse) - err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aBCIListenerServiceClient) ListenCommit(ctx context.Context, in *ListenCommitRequest, opts ...grpc.CallOption) (*ListenCommitResponse, error) { - out := new(ListenCommitResponse) - err := c.cc.Invoke(ctx, "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ABCIListenerServiceServer is the server API for ABCIListenerService service. -type ABCIListenerServiceServer interface { - // ListenFinalizeBlock is the corresponding endpoint for - // ABCIListener.ListenEndBlock - ListenFinalizeBlock(context.Context, *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) - // ListenCommit is the corresponding endpoint for ABCIListener.ListenCommit - ListenCommit(context.Context, *ListenCommitRequest) (*ListenCommitResponse, error) -} - -// UnimplementedABCIListenerServiceServer can be embedded to have forward compatible implementations. -type UnimplementedABCIListenerServiceServer struct { -} - -func (*UnimplementedABCIListenerServiceServer) ListenFinalizeBlock(ctx context.Context, req *ListenFinalizeBlockRequest) (*ListenFinalizeBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenFinalizeBlock not implemented") -} -func (*UnimplementedABCIListenerServiceServer) ListenCommit(ctx context.Context, req *ListenCommitRequest) (*ListenCommitResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenCommit not implemented") -} - -func RegisterABCIListenerServiceServer(s grpc1.Server, srv ABCIListenerServiceServer) { - s.RegisterService(&_ABCIListenerService_serviceDesc, srv) -} - -func _ABCIListenerService_ListenFinalizeBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenFinalizeBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenFinalizeBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIListenerServiceServer).ListenFinalizeBlock(ctx, req.(*ListenFinalizeBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ABCIListenerService_ListenCommit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenCommitRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ABCIListenerServiceServer).ListenCommit(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/cosmos.store.streaming.abci.ABCIListenerService/ListenCommit", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ABCIListenerServiceServer).ListenCommit(ctx, req.(*ListenCommitRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ABCIListenerService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.store.streaming.abci.ABCIListenerService", - HandlerType: (*ABCIListenerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListenFinalizeBlock", - Handler: _ABCIListenerService_ListenFinalizeBlock_Handler, - }, - { - MethodName: "ListenCommit", - Handler: _ABCIListenerService_ListenCommit_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/store/streaming/abci/grpc.proto", -} - -func (m *ListenFinalizeBlockRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListenFinalizeBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenFinalizeBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Res != nil { - { - size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Req != nil { - { - size, err := m.Req.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ListenFinalizeBlockResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListenFinalizeBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenFinalizeBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *ListenCommitRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListenCommitRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenCommitRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ChangeSet) > 0 { - for iNdEx := len(m.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ChangeSet[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Res != nil { - { - size, err := m.Res.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGrpc(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.BlockHeight != 0 { - i = encodeVarintGrpc(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ListenCommitResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListenCommitResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListenCommitResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintGrpc(dAtA []byte, offset int, v uint64) int { - offset -= sovGrpc(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ListenFinalizeBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Req != nil { - l = m.Req.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - if m.Res != nil { - l = m.Res.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - return n -} - -func (m *ListenFinalizeBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *ListenCommitRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovGrpc(uint64(m.BlockHeight)) - } - if m.Res != nil { - l = m.Res.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - if len(m.ChangeSet) > 0 { - for _, e := range m.ChangeSet { - l = e.Size() - n += 1 + l + sovGrpc(uint64(l)) - } - } - return n -} - -func (m *ListenCommitResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovGrpc(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGrpc(x uint64) (n int) { - return sovGrpc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ListenFinalizeBlockRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListenFinalizeBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenFinalizeBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Req", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Req == nil { - m.Req = &v1.FinalizeBlockRequest{} - } - if err := m.Req.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Res == nil { - m.Res = &v1.FinalizeBlockResponse{} - } - if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenFinalizeBlockResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListenFinalizeBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenFinalizeBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenCommitRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListenCommitRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenCommitRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Res", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Res == nil { - m.Res = &v1.CommitResponse{} - } - if err := m.Res.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGrpc - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGrpc - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChangeSet = append(m.ChangeSet, &types.StoreKVPair{}) - if err := m.ChangeSet[len(m.ChangeSet)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListenCommitResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGrpc - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListenCommitResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListenCommitResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGrpc(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGrpc - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGrpc(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGrpc - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGrpc - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGrpc - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGrpc - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGrpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGrpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGrpc = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/types/commit_info.pb.go b/cosmossdk.io/store/types/commit_info.pb.go deleted file mode 100644 index 81220a79c236..000000000000 --- a/cosmossdk.io/store/types/commit_info.pb.go +++ /dev/null @@ -1,864 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/v1beta1/commit_info.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - math "math" - math_bits "math/bits" - time "time" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf -var _ = time.Kitchen - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// CommitInfo defines commit information used by the multi-store when committing -// a version/height. -type CommitInfo struct { - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - StoreInfos []StoreInfo `protobuf:"bytes,2,rep,name=store_infos,json=storeInfos,proto3" json:"store_infos"` - Timestamp time.Time `protobuf:"bytes,3,opt,name=timestamp,proto3,stdtime" json:"timestamp"` -} - -func (m *CommitInfo) Reset() { *m = CommitInfo{} } -func (m *CommitInfo) String() string { return proto.CompactTextString(m) } -func (*CommitInfo) ProtoMessage() {} -func (*CommitInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{0} -} -func (m *CommitInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CommitInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitInfo.Merge(m, src) -} -func (m *CommitInfo) XXX_Size() int { - return m.Size() -} -func (m *CommitInfo) XXX_DiscardUnknown() { - xxx_messageInfo_CommitInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitInfo proto.InternalMessageInfo - -func (m *CommitInfo) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *CommitInfo) GetStoreInfos() []StoreInfo { - if m != nil { - return m.StoreInfos - } - return nil -} - -func (m *CommitInfo) GetTimestamp() time.Time { - if m != nil { - return m.Timestamp - } - return time.Time{} -} - -// StoreInfo defines store-specific commit information. It contains a reference -// between a store name and the commit ID. -type StoreInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - CommitId CommitID `protobuf:"bytes,2,opt,name=commit_id,json=commitId,proto3" json:"commit_id"` -} - -func (m *StoreInfo) Reset() { *m = StoreInfo{} } -func (m *StoreInfo) String() string { return proto.CompactTextString(m) } -func (*StoreInfo) ProtoMessage() {} -func (*StoreInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{1} -} -func (m *StoreInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StoreInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreInfo.Merge(m, src) -} -func (m *StoreInfo) XXX_Size() int { - return m.Size() -} -func (m *StoreInfo) XXX_DiscardUnknown() { - xxx_messageInfo_StoreInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreInfo proto.InternalMessageInfo - -func (m *StoreInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *StoreInfo) GetCommitId() CommitID { - if m != nil { - return m.CommitId - } - return CommitID{} -} - -// CommitID defines the commitment information when a specific store is -// committed. -type CommitID struct { - Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *CommitID) Reset() { *m = CommitID{} } -func (*CommitID) ProtoMessage() {} -func (*CommitID) Descriptor() ([]byte, []int) { - return fileDescriptor_5f8c656cdef8c524, []int{2} -} -func (m *CommitID) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *CommitID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_CommitID.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *CommitID) XXX_Merge(src proto.Message) { - xxx_messageInfo_CommitID.Merge(m, src) -} -func (m *CommitID) XXX_Size() int { - return m.Size() -} -func (m *CommitID) XXX_DiscardUnknown() { - xxx_messageInfo_CommitID.DiscardUnknown(m) -} - -var xxx_messageInfo_CommitID proto.InternalMessageInfo - -func (m *CommitID) GetVersion() int64 { - if m != nil { - return m.Version - } - return 0 -} - -func (m *CommitID) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -func init() { - proto.RegisterType((*CommitInfo)(nil), "cosmos.store.v1beta1.CommitInfo") - proto.RegisterType((*StoreInfo)(nil), "cosmos.store.v1beta1.StoreInfo") - proto.RegisterType((*CommitID)(nil), "cosmos.store.v1beta1.CommitID") -} - -func init() { - proto.RegisterFile("cosmos/store/v1beta1/commit_info.proto", fileDescriptor_5f8c656cdef8c524) -} - -var fileDescriptor_5f8c656cdef8c524 = []byte{ - // 336 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xb1, 0x4e, 0xf2, 0x50, - 0x14, 0xc7, 0x7b, 0xa1, 0xf9, 0x3e, 0x7a, 0x70, 0xba, 0x61, 0x68, 0x18, 0x6e, 0x09, 0x83, 0x61, - 0xba, 0x0d, 0xb8, 0x39, 0x98, 0x58, 0x8d, 0x09, 0x6b, 0x75, 0x72, 0x31, 0x2d, 0x5c, 0x4a, 0xa3, - 0xed, 0x21, 0xdc, 0x2b, 0x89, 0x6f, 0xc1, 0xe8, 0xe8, 0x33, 0xf8, 0x14, 0x8c, 0x8c, 0x4e, 0x6a, - 0xe0, 0x45, 0x4c, 0x4f, 0x5b, 0x5c, 0x88, 0xdb, 0x39, 0xed, 0xef, 0x9c, 0xff, 0xaf, 0xa7, 0x70, - 0x3a, 0x41, 0x9d, 0xa1, 0xf6, 0xb5, 0xc1, 0xa5, 0xf2, 0x57, 0xc3, 0x58, 0x99, 0x68, 0xe8, 0x4f, - 0x30, 0xcb, 0x52, 0xf3, 0x90, 0xe6, 0x33, 0x94, 0x8b, 0x25, 0x1a, 0xe4, 0x9d, 0x92, 0x93, 0xc4, - 0xc9, 0x8a, 0xeb, 0x76, 0x12, 0x4c, 0x90, 0x00, 0xbf, 0xa8, 0x4a, 0xb6, 0xeb, 0x25, 0x88, 0xc9, - 0x93, 0xf2, 0xa9, 0x8b, 0x9f, 0x67, 0xbe, 0x49, 0x33, 0xa5, 0x4d, 0x94, 0x2d, 0x4a, 0xa0, 0xff, - 0xce, 0x00, 0xae, 0x28, 0x62, 0x9c, 0xcf, 0x90, 0xbb, 0xf0, 0x7f, 0xa5, 0x96, 0x3a, 0xc5, 0xdc, - 0x65, 0x3d, 0x36, 0x68, 0x86, 0x75, 0xcb, 0x6f, 0xa0, 0x4d, 0x81, 0x64, 0xa2, 0xdd, 0x46, 0xaf, - 0x39, 0x68, 0x8f, 0x3c, 0x79, 0xcc, 0x45, 0xde, 0x16, 0x5d, 0xb1, 0x2f, 0xb0, 0x37, 0x9f, 0x9e, - 0x15, 0x82, 0xae, 0x1f, 0x68, 0x1e, 0x80, 0x73, 0x70, 0x70, 0x9b, 0x3d, 0x36, 0x68, 0x8f, 0xba, - 0xb2, 0xb4, 0x94, 0xb5, 0xa5, 0xbc, 0xab, 0x89, 0xa0, 0x55, 0x2c, 0x58, 0x7f, 0x79, 0x2c, 0xfc, - 0x1d, 0xeb, 0xc7, 0xe0, 0x1c, 0x22, 0x38, 0x07, 0x3b, 0x8f, 0x32, 0x45, 0xbe, 0x4e, 0x48, 0x35, - 0xbf, 0x04, 0xa7, 0xbe, 0xdb, 0xd4, 0x6d, 0x50, 0x88, 0x38, 0xae, 0x5a, 0x7d, 0xfb, 0x75, 0x65, - 0xda, 0x2a, 0xc7, 0xc6, 0xd3, 0xfe, 0x05, 0xb4, 0xea, 0x77, 0x7f, 0x5c, 0x85, 0x83, 0x3d, 0x8f, - 0xf4, 0x9c, 0x32, 0x4e, 0x42, 0xaa, 0xcf, 0xed, 0xd7, 0x37, 0xcf, 0x0a, 0x46, 0x9b, 0x9d, 0x60, - 0xdb, 0x9d, 0x60, 0xdf, 0x3b, 0xc1, 0xd6, 0x7b, 0x61, 0x6d, 0xf7, 0xc2, 0xfa, 0xd8, 0x0b, 0xeb, - 0xde, 0x2d, 0x45, 0xf4, 0xf4, 0x51, 0xa6, 0x58, 0xfd, 0x6d, 0xf3, 0xb2, 0x50, 0x3a, 0xfe, 0x47, - 0x07, 0x38, 0xfb, 0x09, 0x00, 0x00, 0xff, 0xff, 0x67, 0xb7, 0x0d, 0x59, 0x0a, 0x02, 0x00, 0x00, -} - -func (m *CommitInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CommitInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - n1, err1 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.Timestamp, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp):]) - if err1 != nil { - return 0, err1 - } - i -= n1 - i = encodeVarintCommitInfo(dAtA, i, uint64(n1)) - i-- - dAtA[i] = 0x1a - if len(m.StoreInfos) > 0 { - for iNdEx := len(m.StoreInfos) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.StoreInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommitInfo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Version != 0 { - i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StoreInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StoreInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.CommitId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommitInfo(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CommitID) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CommitID) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommitID) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintCommitInfo(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x12 - } - if m.Version != 0 { - i = encodeVarintCommitInfo(dAtA, i, uint64(m.Version)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintCommitInfo(dAtA []byte, offset int, v uint64) int { - offset -= sovCommitInfo(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CommitInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != 0 { - n += 1 + sovCommitInfo(uint64(m.Version)) - } - if len(m.StoreInfos) > 0 { - for _, e := range m.StoreInfos { - l = e.Size() - n += 1 + l + sovCommitInfo(uint64(l)) - } - } - l = github_com_cosmos_gogoproto_types.SizeOfStdTime(m.Timestamp) - n += 1 + l + sovCommitInfo(uint64(l)) - return n -} - -func (m *StoreInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCommitInfo(uint64(l)) - } - l = m.CommitId.Size() - n += 1 + l + sovCommitInfo(uint64(l)) - return n -} - -func (m *CommitID) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != 0 { - n += 1 + sovCommitInfo(uint64(m.Version)) - } - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovCommitInfo(uint64(l)) - } - return n -} - -func sovCommitInfo(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCommitInfo(x uint64) (n int) { - return sovCommitInfo(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *CommitInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CommitInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StoreInfos", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StoreInfos = append(m.StoreInfos, StoreInfo{}) - if err := m.StoreInfos[len(m.StoreInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_cosmos_gogoproto_types.StdTimeUnmarshal(&m.Timestamp, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StoreInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StoreInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommitId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommitId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommitID) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CommitID: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommitID: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - m.Version = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Version |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCommitInfo - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCommitInfo - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommitInfo(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommitInfo - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCommitInfo(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommitInfo - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCommitInfo - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCommitInfo - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCommitInfo - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCommitInfo = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCommitInfo = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCommitInfo = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/store/types/listening.pb.go b/cosmossdk.io/store/types/listening.pb.go deleted file mode 100644 index 1821ca474a6f..000000000000 --- a/cosmossdk.io/store/types/listening.pb.go +++ /dev/null @@ -1,785 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/store/v1beta1/listening.proto - -package types - -import ( - fmt "fmt" - v1 "github.com/cometbft/cometbft/api/cometbft/abci/v1" - _ "github.com/cosmos/cosmos-proto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and -// Deletes) It optionally includes the StoreKey for the originating KVStore and -// a Boolean flag to distinguish between Sets and Deletes -type StoreKVPair struct { - StoreKey string `protobuf:"bytes,1,opt,name=store_key,json=storeKey,proto3" json:"store_key,omitempty"` - Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"` - Key []byte `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"` - Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *StoreKVPair) Reset() { *m = StoreKVPair{} } -func (m *StoreKVPair) String() string { return proto.CompactTextString(m) } -func (*StoreKVPair) ProtoMessage() {} -func (*StoreKVPair) Descriptor() ([]byte, []int) { - return fileDescriptor_b6caeb9d7b7c7c10, []int{0} -} -func (m *StoreKVPair) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *StoreKVPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StoreKVPair.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StoreKVPair) XXX_Merge(src proto.Message) { - xxx_messageInfo_StoreKVPair.Merge(m, src) -} -func (m *StoreKVPair) XXX_Size() int { - return m.Size() -} -func (m *StoreKVPair) XXX_DiscardUnknown() { - xxx_messageInfo_StoreKVPair.DiscardUnknown(m) -} - -var xxx_messageInfo_StoreKVPair proto.InternalMessageInfo - -func (m *StoreKVPair) GetStoreKey() string { - if m != nil { - return m.StoreKey - } - return "" -} - -func (m *StoreKVPair) GetDelete() bool { - if m != nil { - return m.Delete - } - return false -} - -func (m *StoreKVPair) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *StoreKVPair) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -// BlockMetadata contains all the abci event data of a block -// the file streamer dump them into files together with the state changes. -type BlockMetadata struct { - ResponseCommit *v1.CommitResponse `protobuf:"bytes,6,opt,name=response_commit,json=responseCommit,proto3" json:"response_commit,omitempty"` - RequestFinalizeBlock *v1.FinalizeBlockRequest `protobuf:"bytes,7,opt,name=request_finalize_block,json=requestFinalizeBlock,proto3" json:"request_finalize_block,omitempty"` - ResponseFinalizeBlock *v1.FinalizeBlockResponse `protobuf:"bytes,8,opt,name=response_finalize_block,json=responseFinalizeBlock,proto3" json:"response_finalize_block,omitempty"` -} - -func (m *BlockMetadata) Reset() { *m = BlockMetadata{} } -func (m *BlockMetadata) String() string { return proto.CompactTextString(m) } -func (*BlockMetadata) ProtoMessage() {} -func (*BlockMetadata) Descriptor() ([]byte, []int) { - return fileDescriptor_b6caeb9d7b7c7c10, []int{1} -} -func (m *BlockMetadata) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BlockMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BlockMetadata.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BlockMetadata) XXX_Merge(src proto.Message) { - xxx_messageInfo_BlockMetadata.Merge(m, src) -} -func (m *BlockMetadata) XXX_Size() int { - return m.Size() -} -func (m *BlockMetadata) XXX_DiscardUnknown() { - xxx_messageInfo_BlockMetadata.DiscardUnknown(m) -} - -var xxx_messageInfo_BlockMetadata proto.InternalMessageInfo - -func (m *BlockMetadata) GetResponseCommit() *v1.CommitResponse { - if m != nil { - return m.ResponseCommit - } - return nil -} - -func (m *BlockMetadata) GetRequestFinalizeBlock() *v1.FinalizeBlockRequest { - if m != nil { - return m.RequestFinalizeBlock - } - return nil -} - -func (m *BlockMetadata) GetResponseFinalizeBlock() *v1.FinalizeBlockResponse { - if m != nil { - return m.ResponseFinalizeBlock - } - return nil -} - -func init() { - proto.RegisterType((*StoreKVPair)(nil), "cosmos.store.v1beta1.StoreKVPair") - proto.RegisterType((*BlockMetadata)(nil), "cosmos.store.v1beta1.BlockMetadata") -} - -func init() { - proto.RegisterFile("cosmos/store/v1beta1/listening.proto", fileDescriptor_b6caeb9d7b7c7c10) -} - -var fileDescriptor_b6caeb9d7b7c7c10 = []byte{ - // 416 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x6f, 0xd3, 0x30, - 0x14, 0xc7, 0xeb, 0xd6, 0x2d, 0x9e, 0x07, 0x2c, 0x32, 0x65, 0x84, 0x81, 0xa2, 0x68, 0x42, 0xd0, - 0xcb, 0x1c, 0xba, 0x71, 0xe2, 0x38, 0x24, 0x24, 0x32, 0x21, 0xa1, 0x20, 0x71, 0x40, 0x48, 0x91, - 0x93, 0xbe, 0x21, 0xab, 0x69, 0x5c, 0x62, 0x2f, 0x52, 0xb9, 0xf0, 0x15, 0xf8, 0x30, 0x48, 0x7c, - 0x05, 0x8e, 0x13, 0x27, 0x8e, 0xa8, 0xfd, 0x22, 0x28, 0xb6, 0x8b, 0x34, 0x38, 0xec, 0x96, 0xff, - 0x7b, 0xff, 0xff, 0xcf, 0xcf, 0xf1, 0xa3, 0x8f, 0x4a, 0xa5, 0x17, 0x4a, 0x27, 0xda, 0xa8, 0x06, - 0x92, 0x76, 0x5a, 0x80, 0x11, 0xd3, 0xa4, 0x92, 0xda, 0x40, 0x2d, 0xeb, 0x8f, 0x7c, 0xd9, 0x28, - 0xa3, 0xd8, 0xd8, 0xb9, 0xb8, 0x75, 0x71, 0xef, 0x3a, 0x78, 0x58, 0xaa, 0x05, 0x98, 0xe2, 0xdc, - 0x24, 0xa2, 0x28, 0x65, 0xd2, 0x4e, 0x13, 0xb3, 0x5a, 0x82, 0x76, 0x99, 0x83, 0xfb, 0x2e, 0x93, - 0x5b, 0x95, 0x78, 0x80, 0x15, 0x87, 0x5f, 0xe8, 0xee, 0xdb, 0x8e, 0x74, 0xf6, 0xee, 0x8d, 0x90, - 0x0d, 0x7b, 0x40, 0x77, 0x2c, 0x38, 0x9f, 0xc3, 0x2a, 0x44, 0x31, 0x9a, 0xec, 0x64, 0xc4, 0x16, - 0xce, 0x60, 0xc5, 0xf6, 0xe9, 0x68, 0x06, 0x15, 0x18, 0x08, 0xfb, 0x31, 0x9a, 0x90, 0xcc, 0x2b, - 0x16, 0xd0, 0x41, 0x67, 0x1f, 0xc4, 0x68, 0x72, 0x33, 0xeb, 0x3e, 0xd9, 0x98, 0x0e, 0x5b, 0x51, - 0x5d, 0x40, 0x88, 0x6d, 0xcd, 0x89, 0xe7, 0x77, 0x7e, 0x7e, 0x3b, 0xda, 0x73, 0xa7, 0x1f, 0xe9, - 0xd9, 0x3c, 0x7e, 0xca, 0x9f, 0x9d, 0x1c, 0x7e, 0xef, 0xd3, 0x5b, 0xa7, 0x95, 0x2a, 0xe7, 0xaf, - 0xc1, 0x88, 0x99, 0x30, 0x82, 0xbd, 0xa2, 0x7b, 0x0d, 0xe8, 0xa5, 0xaa, 0x35, 0xe4, 0xa5, 0x5a, - 0x2c, 0xa4, 0x09, 0x47, 0x31, 0x9a, 0xec, 0x1e, 0xc7, 0x7c, 0x7b, 0x4b, 0xde, 0xdd, 0x92, 0xb7, - 0x53, 0xfe, 0xc2, 0xf6, 0x33, 0x6f, 0xcf, 0x6e, 0x6f, 0x83, 0xae, 0xce, 0x3e, 0xd0, 0xfd, 0x06, - 0x3e, 0x5d, 0x80, 0x36, 0xf9, 0xb9, 0xac, 0x45, 0x25, 0x3f, 0x43, 0x5e, 0x74, 0x87, 0x85, 0x37, - 0x2c, 0xf1, 0xf1, 0xff, 0xc4, 0x97, 0xde, 0x67, 0x67, 0xca, 0x5c, 0x38, 0x1b, 0x7b, 0xca, 0x95, - 0x26, 0xcb, 0xe9, 0xbd, 0xbf, 0x83, 0xfe, 0x83, 0x27, 0x16, 0xff, 0xe4, 0x5a, 0xbc, 0x9f, 0xfb, - 0xee, 0x96, 0x73, 0xa5, 0x9d, 0x62, 0x82, 0x82, 0x7e, 0x8a, 0x49, 0x3f, 0x18, 0xa4, 0x98, 0x0c, - 0x02, 0x9c, 0x62, 0x82, 0x83, 0x61, 0x8a, 0xc9, 0x30, 0x18, 0x9d, 0x1e, 0xff, 0x58, 0x47, 0xe8, - 0x72, 0x1d, 0xa1, 0xdf, 0xeb, 0x08, 0x7d, 0xdd, 0x44, 0xbd, 0xcb, 0x4d, 0xd4, 0xfb, 0xb5, 0x89, - 0x7a, 0xef, 0x43, 0xf7, 0x93, 0xf5, 0x6c, 0xce, 0xa5, 0xf2, 0xfb, 0x64, 0xf7, 0xa1, 0x18, 0xd9, - 0x57, 0x3f, 0xf9, 0x13, 0x00, 0x00, 0xff, 0xff, 0x98, 0x9f, 0x12, 0x13, 0x6c, 0x02, 0x00, 0x00, -} - -func (m *StoreKVPair) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StoreKVPair) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StoreKVPair) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintListening(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x22 - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintListening(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x1a - } - if m.Delete { - i-- - if m.Delete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.StoreKey) > 0 { - i -= len(m.StoreKey) - copy(dAtA[i:], m.StoreKey) - i = encodeVarintListening(dAtA, i, uint64(len(m.StoreKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BlockMetadata) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BlockMetadata) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BlockMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ResponseFinalizeBlock != nil { - { - size, err := m.ResponseFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.RequestFinalizeBlock != nil { - { - size, err := m.RequestFinalizeBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.ResponseCommit != nil { - { - size, err := m.ResponseCommit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintListening(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} - -func encodeVarintListening(dAtA []byte, offset int, v uint64) int { - offset -= sovListening(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *StoreKVPair) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StoreKey) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - if m.Delete { - n += 2 - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovListening(uint64(l)) - } - return n -} - -func (m *BlockMetadata) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ResponseCommit != nil { - l = m.ResponseCommit.Size() - n += 1 + l + sovListening(uint64(l)) - } - if m.RequestFinalizeBlock != nil { - l = m.RequestFinalizeBlock.Size() - n += 1 + l + sovListening(uint64(l)) - } - if m.ResponseFinalizeBlock != nil { - l = m.ResponseFinalizeBlock.Size() - n += 1 + l + sovListening(uint64(l)) - } - return n -} - -func sovListening(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozListening(x uint64) (n int) { - return sovListening(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *StoreKVPair) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StoreKVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StoreKey", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StoreKey = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Delete = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipListening(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthListening - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BlockMetadata) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BlockMetadata: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BlockMetadata: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseCommit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResponseCommit == nil { - m.ResponseCommit = &v1.CommitResponse{} - } - if err := m.ResponseCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestFinalizeBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestFinalizeBlock == nil { - m.RequestFinalizeBlock = &v1.FinalizeBlockRequest{} - } - if err := m.RequestFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseFinalizeBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowListening - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthListening - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthListening - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResponseFinalizeBlock == nil { - m.ResponseFinalizeBlock = &v1.FinalizeBlockResponse{} - } - if err := m.ResponseFinalizeBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipListening(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthListening - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipListening(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowListening - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthListening - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupListening - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthListening - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthListening = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowListening = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupListening = fmt.Errorf("proto: unexpected end of group") -) diff --git a/cosmossdk.io/x/consensus/types/consensus.pb.go b/cosmossdk.io/x/consensus/types/consensus.pb.go deleted file mode 100644 index 3545af8cac9f..000000000000 --- a/cosmossdk.io/x/consensus/types/consensus.pb.go +++ /dev/null @@ -1,824 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: cosmos/consensus/v1/consensus.proto - -package types - -import ( - fmt "fmt" - v1 "github.com/cometbft/cometbft/api/cometbft/types/v1" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// ConsensusMsgParams is the Msg/Params request type. This is a consensus message that is sent from cometbft. -type ConsensusMsgParams struct { - // params defines the x/consensus parameters to be passed from comet. - // - // NOTE: All parameters must be supplied. - Version *v1.VersionParams `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - Block *v1.BlockParams `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` - Evidence *v1.EvidenceParams `protobuf:"bytes,3,opt,name=evidence,proto3" json:"evidence,omitempty"` - Validator *v1.ValidatorParams `protobuf:"bytes,4,opt,name=validator,proto3" json:"validator,omitempty"` - Abci *v1.ABCIParams `protobuf:"bytes,5,opt,name=abci,proto3" json:"abci,omitempty"` // Deprecated: Do not use. - Synchrony *v1.SynchronyParams `protobuf:"bytes,6,opt,name=synchrony,proto3" json:"synchrony,omitempty"` - Feature *v1.FeatureParams `protobuf:"bytes,7,opt,name=feature,proto3" json:"feature,omitempty"` -} - -func (m *ConsensusMsgParams) Reset() { *m = ConsensusMsgParams{} } -func (m *ConsensusMsgParams) String() string { return proto.CompactTextString(m) } -func (*ConsensusMsgParams) ProtoMessage() {} -func (*ConsensusMsgParams) Descriptor() ([]byte, []int) { - return fileDescriptor_7ed86dd7d42fb61b, []int{0} -} -func (m *ConsensusMsgParams) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusMsgParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusMsgParams.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ConsensusMsgParams) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusMsgParams.Merge(m, src) -} -func (m *ConsensusMsgParams) XXX_Size() int { - return m.Size() -} -func (m *ConsensusMsgParams) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusMsgParams.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusMsgParams proto.InternalMessageInfo - -func (m *ConsensusMsgParams) GetVersion() *v1.VersionParams { - if m != nil { - return m.Version - } - return nil -} - -func (m *ConsensusMsgParams) GetBlock() *v1.BlockParams { - if m != nil { - return m.Block - } - return nil -} - -func (m *ConsensusMsgParams) GetEvidence() *v1.EvidenceParams { - if m != nil { - return m.Evidence - } - return nil -} - -func (m *ConsensusMsgParams) GetValidator() *v1.ValidatorParams { - if m != nil { - return m.Validator - } - return nil -} - -// Deprecated: Do not use. -func (m *ConsensusMsgParams) GetAbci() *v1.ABCIParams { - if m != nil { - return m.Abci - } - return nil -} - -func (m *ConsensusMsgParams) GetSynchrony() *v1.SynchronyParams { - if m != nil { - return m.Synchrony - } - return nil -} - -func (m *ConsensusMsgParams) GetFeature() *v1.FeatureParams { - if m != nil { - return m.Feature - } - return nil -} - -// ConsensusMsgParamsResponse defines the response structure for executing a -// ConsensusMsgParams message. -type ConsensusMsgParamsResponse struct { -} - -func (m *ConsensusMsgParamsResponse) Reset() { *m = ConsensusMsgParamsResponse{} } -func (m *ConsensusMsgParamsResponse) String() string { return proto.CompactTextString(m) } -func (*ConsensusMsgParamsResponse) ProtoMessage() {} -func (*ConsensusMsgParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7ed86dd7d42fb61b, []int{1} -} -func (m *ConsensusMsgParamsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConsensusMsgParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ConsensusMsgParamsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ConsensusMsgParamsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConsensusMsgParamsResponse.Merge(m, src) -} -func (m *ConsensusMsgParamsResponse) XXX_Size() int { - return m.Size() -} -func (m *ConsensusMsgParamsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ConsensusMsgParamsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ConsensusMsgParamsResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ConsensusMsgParams)(nil), "cosmos.consensus.v1.ConsensusMsgParams") - proto.RegisterType((*ConsensusMsgParamsResponse)(nil), "cosmos.consensus.v1.ConsensusMsgParamsResponse") -} - -func init() { - proto.RegisterFile("cosmos/consensus/v1/consensus.proto", fileDescriptor_7ed86dd7d42fb61b) -} - -var fileDescriptor_7ed86dd7d42fb61b = []byte{ - // 340 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd2, 0xcb, 0x4a, 0x33, 0x31, - 0x14, 0x07, 0xf0, 0x4e, 0xaf, 0xdf, 0x17, 0x77, 0x71, 0x13, 0x8a, 0x86, 0x5a, 0x37, 0xae, 0x32, - 0xd4, 0x0b, 0x88, 0x20, 0xe8, 0x14, 0x05, 0x17, 0x82, 0x54, 0x70, 0xe1, 0x6e, 0x26, 0x4d, 0x75, - 0x68, 0x3b, 0x19, 0x92, 0x34, 0xd8, 0xb7, 0xf0, 0x81, 0x7c, 0x00, 0x97, 0x5d, 0xba, 0x94, 0xf6, - 0x45, 0x64, 0x72, 0x69, 0x05, 0xa7, 0xcb, 0x49, 0xfe, 0xbf, 0x73, 0x86, 0x93, 0x03, 0x0e, 0x29, - 0x97, 0x53, 0x2e, 0x43, 0xca, 0x33, 0xc9, 0x32, 0x39, 0x93, 0xa1, 0xee, 0x6d, 0x3e, 0x48, 0x2e, - 0xb8, 0xe2, 0x70, 0xd7, 0x86, 0xc8, 0xe6, 0x5c, 0xf7, 0xda, 0x98, 0xf2, 0x29, 0x53, 0xc9, 0x48, - 0x85, 0x6a, 0x9e, 0x33, 0xe3, 0xf2, 0x58, 0xc4, 0x53, 0x87, 0xba, 0x1f, 0x35, 0x00, 0xfb, 0x1e, - 0xdc, 0xcb, 0x97, 0x07, 0x73, 0x09, 0x2f, 0x40, 0x4b, 0x33, 0x21, 0x53, 0x9e, 0xa1, 0xa0, 0x13, - 0x1c, 0xed, 0x1c, 0x77, 0x88, 0x2f, 0x44, 0x4c, 0x21, 0xa2, 0x7b, 0xe4, 0xc9, 0x26, 0x2c, 0x19, - 0x78, 0x00, 0x4f, 0x41, 0x23, 0x99, 0x70, 0x3a, 0x46, 0x55, 0x23, 0x71, 0x89, 0x8c, 0x8a, 0x7b, - 0xe7, 0x6c, 0x18, 0x5e, 0x82, 0x7f, 0x4c, 0xa7, 0x43, 0x96, 0x51, 0x86, 0x6a, 0x06, 0x1e, 0x94, - 0xc0, 0x1b, 0x17, 0x71, 0x76, 0x4d, 0xe0, 0x15, 0xf8, 0xaf, 0xe3, 0x49, 0x3a, 0x8c, 0x15, 0x17, - 0xa8, 0x6e, 0x7c, 0xb7, 0xec, 0x97, 0x7d, 0xc6, 0x15, 0xd8, 0x20, 0x78, 0x06, 0xea, 0x71, 0x42, - 0x53, 0xd4, 0x30, 0x78, 0xbf, 0x04, 0x5f, 0x47, 0xfd, 0x3b, 0xeb, 0xa2, 0x2a, 0x0a, 0x06, 0x26, - 0x5e, 0x34, 0x96, 0xf3, 0x8c, 0xbe, 0x0a, 0x9e, 0xcd, 0x51, 0x73, 0x6b, 0xe3, 0x47, 0x9f, 0xf1, - 0x8d, 0xd7, 0xa8, 0x98, 0xf5, 0x88, 0xc5, 0x6a, 0x26, 0x18, 0x6a, 0x6d, 0x9d, 0xf5, 0xad, 0x4d, - 0xf8, 0x59, 0x3b, 0xd0, 0xdd, 0x03, 0xed, 0xbf, 0xaf, 0x37, 0x60, 0x32, 0x2f, 0x0e, 0xa3, 0xf3, - 0xcf, 0x25, 0x0e, 0x16, 0x4b, 0x1c, 0x7c, 0x2f, 0x71, 0xf0, 0xbe, 0xc2, 0x95, 0xc5, 0x0a, 0x57, - 0xbe, 0x56, 0xb8, 0xf2, 0x8c, 0xed, 0xae, 0xc8, 0xe1, 0x98, 0xa4, 0x3c, 0x7c, 0xfb, 0xb5, 0x58, - 0xa6, 0x63, 0xd2, 0x34, 0xdb, 0x71, 0xf2, 0x13, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x8f, 0x7e, 0x2c, - 0x79, 0x02, 0x00, 0x00, -} - -func (m *ConsensusMsgParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConsensusMsgParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusMsgParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Feature != nil { - { - size, err := m.Feature.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.Synchrony != nil { - { - size, err := m.Synchrony.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Abci != nil { - { - size, err := m.Abci.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Validator != nil { - { - size, err := m.Validator.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Evidence != nil { - { - size, err := m.Evidence.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Block != nil { - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Version != nil { - { - size, err := m.Version.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintConsensus(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ConsensusMsgParamsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConsensusMsgParamsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConsensusMsgParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func encodeVarintConsensus(dAtA []byte, offset int, v uint64) int { - offset -= sovConsensus(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ConsensusMsgParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Version != nil { - l = m.Version.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Evidence != nil { - l = m.Evidence.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Validator != nil { - l = m.Validator.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Abci != nil { - l = m.Abci.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Synchrony != nil { - l = m.Synchrony.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - if m.Feature != nil { - l = m.Feature.Size() - n += 1 + l + sovConsensus(uint64(l)) - } - return n -} - -func (m *ConsensusMsgParamsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func sovConsensus(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozConsensus(x uint64) (n int) { - return sovConsensus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ConsensusMsgParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConsensusMsgParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusMsgParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Version == nil { - m.Version = &v1.VersionParams{} - } - if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Block == nil { - m.Block = &v1.BlockParams{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Evidence", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Evidence == nil { - m.Evidence = &v1.EvidenceParams{} - } - if err := m.Evidence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validator", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Validator == nil { - m.Validator = &v1.ValidatorParams{} - } - if err := m.Validator.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Abci", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Abci == nil { - m.Abci = &v1.ABCIParams{} - } - if err := m.Abci.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Synchrony", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Synchrony == nil { - m.Synchrony = &v1.SynchronyParams{} - } - if err := m.Synchrony.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Feature", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthConsensus - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthConsensus - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Feature == nil { - m.Feature = &v1.FeatureParams{} - } - if err := m.Feature.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConsensusMsgParamsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowConsensus - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConsensusMsgParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConsensusMsgParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipConsensus(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthConsensus - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipConsensus(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConsensus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConsensus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowConsensus - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthConsensus - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupConsensus - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthConsensus - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthConsensus = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowConsensus = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupConsensus = fmt.Errorf("proto: unexpected end of group") -) From e3bc77f70965211ee580f5c4cb2a5bf961af0285 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Wed, 29 May 2024 15:48:51 +0200 Subject: [PATCH 11/20] remove extra --- api/cosmos/streaming/v1/grpc.pulsar.go | 5365 ----------------------- api/cosmos/streaming/v1/grpc_grpc.pb.go | 150 - 2 files changed, 5515 deletions(-) delete mode 100644 api/cosmos/streaming/v1/grpc.pulsar.go delete mode 100644 api/cosmos/streaming/v1/grpc_grpc.pb.go diff --git a/api/cosmos/streaming/v1/grpc.pulsar.go b/api/cosmos/streaming/v1/grpc.pulsar.go deleted file mode 100644 index 76b76b8c89b3..000000000000 --- a/api/cosmos/streaming/v1/grpc.pulsar.go +++ /dev/null @@ -1,5365 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package streamingv1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_ListenDeliverBlockRequest_2_list)(nil) - -type _ListenDeliverBlockRequest_2_list struct { - list *[][]byte -} - -func (x *_ListenDeliverBlockRequest_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ListenDeliverBlockRequest_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_ListenDeliverBlockRequest_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_ListenDeliverBlockRequest_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_ListenDeliverBlockRequest_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ListenDeliverBlockRequest at list field Txs as it is not of Message kind")) -} - -func (x *_ListenDeliverBlockRequest_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ListenDeliverBlockRequest_2_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_ListenDeliverBlockRequest_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_ListenDeliverBlockRequest_3_list)(nil) - -type _ListenDeliverBlockRequest_3_list struct { - list *[]*Event -} - -func (x *_ListenDeliverBlockRequest_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ListenDeliverBlockRequest_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ListenDeliverBlockRequest_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - (*x.list)[i] = concreteValue -} - -func (x *_ListenDeliverBlockRequest_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ListenDeliverBlockRequest_3_list) AppendMutable() protoreflect.Value { - v := new(Event) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ListenDeliverBlockRequest_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ListenDeliverBlockRequest_3_list) NewElement() protoreflect.Value { - v := new(Event) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ListenDeliverBlockRequest_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_ListenDeliverBlockRequest_4_list)(nil) - -type _ListenDeliverBlockRequest_4_list struct { - list *[]*ExecTxResult -} - -func (x *_ListenDeliverBlockRequest_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ListenDeliverBlockRequest_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ListenDeliverBlockRequest_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ExecTxResult) - (*x.list)[i] = concreteValue -} - -func (x *_ListenDeliverBlockRequest_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ExecTxResult) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ListenDeliverBlockRequest_4_list) AppendMutable() protoreflect.Value { - v := new(ExecTxResult) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ListenDeliverBlockRequest_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ListenDeliverBlockRequest_4_list) NewElement() protoreflect.Value { - v := new(ExecTxResult) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ListenDeliverBlockRequest_4_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ListenDeliverBlockRequest protoreflect.MessageDescriptor - fd_ListenDeliverBlockRequest_block_height protoreflect.FieldDescriptor - fd_ListenDeliverBlockRequest_txs protoreflect.FieldDescriptor - fd_ListenDeliverBlockRequest_events protoreflect.FieldDescriptor - fd_ListenDeliverBlockRequest_tx_results protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_streaming_v1_grpc_proto_init() - md_ListenDeliverBlockRequest = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenDeliverBlockRequest") - fd_ListenDeliverBlockRequest_block_height = md_ListenDeliverBlockRequest.Fields().ByName("block_height") - fd_ListenDeliverBlockRequest_txs = md_ListenDeliverBlockRequest.Fields().ByName("txs") - fd_ListenDeliverBlockRequest_events = md_ListenDeliverBlockRequest.Fields().ByName("events") - fd_ListenDeliverBlockRequest_tx_results = md_ListenDeliverBlockRequest.Fields().ByName("tx_results") -} - -var _ protoreflect.Message = (*fastReflection_ListenDeliverBlockRequest)(nil) - -type fastReflection_ListenDeliverBlockRequest ListenDeliverBlockRequest - -func (x *ListenDeliverBlockRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_ListenDeliverBlockRequest)(x) -} - -func (x *ListenDeliverBlockRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ListenDeliverBlockRequest_messageType fastReflection_ListenDeliverBlockRequest_messageType -var _ protoreflect.MessageType = fastReflection_ListenDeliverBlockRequest_messageType{} - -type fastReflection_ListenDeliverBlockRequest_messageType struct{} - -func (x fastReflection_ListenDeliverBlockRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_ListenDeliverBlockRequest)(nil) -} -func (x fastReflection_ListenDeliverBlockRequest_messageType) New() protoreflect.Message { - return new(fastReflection_ListenDeliverBlockRequest) -} -func (x fastReflection_ListenDeliverBlockRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ListenDeliverBlockRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ListenDeliverBlockRequest) Descriptor() protoreflect.MessageDescriptor { - return md_ListenDeliverBlockRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ListenDeliverBlockRequest) Type() protoreflect.MessageType { - return _fastReflection_ListenDeliverBlockRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ListenDeliverBlockRequest) New() protoreflect.Message { - return new(fastReflection_ListenDeliverBlockRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ListenDeliverBlockRequest) Interface() protoreflect.ProtoMessage { - return (*ListenDeliverBlockRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ListenDeliverBlockRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.BlockHeight) - if !f(fd_ListenDeliverBlockRequest_block_height, value) { - return - } - } - if len(x.Txs) != 0 { - value := protoreflect.ValueOfList(&_ListenDeliverBlockRequest_2_list{list: &x.Txs}) - if !f(fd_ListenDeliverBlockRequest_txs, value) { - return - } - } - if len(x.Events) != 0 { - value := protoreflect.ValueOfList(&_ListenDeliverBlockRequest_3_list{list: &x.Events}) - if !f(fd_ListenDeliverBlockRequest_events, value) { - return - } - } - if len(x.TxResults) != 0 { - value := protoreflect.ValueOfList(&_ListenDeliverBlockRequest_4_list{list: &x.TxResults}) - if !f(fd_ListenDeliverBlockRequest_tx_results, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ListenDeliverBlockRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": - return x.BlockHeight != int64(0) - case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": - return len(x.Txs) != 0 - case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": - return len(x.Events) != 0 - case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": - return len(x.TxResults) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenDeliverBlockRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": - x.BlockHeight = int64(0) - case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": - x.Txs = nil - case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": - x.Events = nil - case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": - x.TxResults = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ListenDeliverBlockRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": - value := x.BlockHeight - return protoreflect.ValueOfInt64(value) - case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": - if len(x.Txs) == 0 { - return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_2_list{}) - } - listValue := &_ListenDeliverBlockRequest_2_list{list: &x.Txs} - return protoreflect.ValueOfList(listValue) - case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": - if len(x.Events) == 0 { - return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_3_list{}) - } - listValue := &_ListenDeliverBlockRequest_3_list{list: &x.Events} - return protoreflect.ValueOfList(listValue) - case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": - if len(x.TxResults) == 0 { - return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_4_list{}) - } - listValue := &_ListenDeliverBlockRequest_4_list{list: &x.TxResults} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenDeliverBlockRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": - x.BlockHeight = value.Int() - case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": - lv := value.List() - clv := lv.(*_ListenDeliverBlockRequest_2_list) - x.Txs = *clv.list - case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": - lv := value.List() - clv := lv.(*_ListenDeliverBlockRequest_3_list) - x.Events = *clv.list - case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": - lv := value.List() - clv := lv.(*_ListenDeliverBlockRequest_4_list) - x.TxResults = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenDeliverBlockRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": - if x.Txs == nil { - x.Txs = [][]byte{} - } - value := &_ListenDeliverBlockRequest_2_list{list: &x.Txs} - return protoreflect.ValueOfList(value) - case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": - if x.Events == nil { - x.Events = []*Event{} - } - value := &_ListenDeliverBlockRequest_3_list{list: &x.Events} - return protoreflect.ValueOfList(value) - case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": - if x.TxResults == nil { - x.TxResults = []*ExecTxResult{} - } - value := &_ListenDeliverBlockRequest_4_list{list: &x.TxResults} - return protoreflect.ValueOfList(value) - case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": - panic(fmt.Errorf("field block_height of message cosmos.streaming.v1.ListenDeliverBlockRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ListenDeliverBlockRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.ListenDeliverBlockRequest.block_height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.streaming.v1.ListenDeliverBlockRequest.txs": - list := [][]byte{} - return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_2_list{list: &list}) - case "cosmos.streaming.v1.ListenDeliverBlockRequest.events": - list := []*Event{} - return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_3_list{list: &list}) - case "cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results": - list := []*ExecTxResult{} - return protoreflect.ValueOfList(&_ListenDeliverBlockRequest_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ListenDeliverBlockRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenDeliverBlockRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ListenDeliverBlockRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenDeliverBlockRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ListenDeliverBlockRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ListenDeliverBlockRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ListenDeliverBlockRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.BlockHeight != 0 { - n += 1 + runtime.Sov(uint64(x.BlockHeight)) - } - if len(x.Txs) > 0 { - for _, b := range x.Txs { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Events) > 0 { - for _, e := range x.Events { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.TxResults) > 0 { - for _, e := range x.TxResults { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ListenDeliverBlockRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.TxResults) > 0 { - for iNdEx := len(x.TxResults) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.TxResults[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Events) > 0 { - for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Events[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Txs) > 0 { - for iNdEx := len(x.Txs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Txs[iNdEx]) - copy(dAtA[i:], x.Txs[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Txs[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if x.BlockHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ListenDeliverBlockRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenDeliverBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenDeliverBlockRequest: 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 BlockHeight", wireType) - } - x.BlockHeight = 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.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Txs = append(x.Txs, make([]byte, postIndex-iNdEx)) - copy(x.Txs[len(x.Txs)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Events = append(x.Events, &Event{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxResults", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TxResults = append(x.TxResults, &ExecTxResult{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.TxResults[len(x.TxResults)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ListenDeliverBlockResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_streaming_v1_grpc_proto_init() - md_ListenDeliverBlockResponse = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenDeliverBlockResponse") -} - -var _ protoreflect.Message = (*fastReflection_ListenDeliverBlockResponse)(nil) - -type fastReflection_ListenDeliverBlockResponse ListenDeliverBlockResponse - -func (x *ListenDeliverBlockResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_ListenDeliverBlockResponse)(x) -} - -func (x *ListenDeliverBlockResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ListenDeliverBlockResponse_messageType fastReflection_ListenDeliverBlockResponse_messageType -var _ protoreflect.MessageType = fastReflection_ListenDeliverBlockResponse_messageType{} - -type fastReflection_ListenDeliverBlockResponse_messageType struct{} - -func (x fastReflection_ListenDeliverBlockResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_ListenDeliverBlockResponse)(nil) -} -func (x fastReflection_ListenDeliverBlockResponse_messageType) New() protoreflect.Message { - return new(fastReflection_ListenDeliverBlockResponse) -} -func (x fastReflection_ListenDeliverBlockResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ListenDeliverBlockResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ListenDeliverBlockResponse) Descriptor() protoreflect.MessageDescriptor { - return md_ListenDeliverBlockResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ListenDeliverBlockResponse) Type() protoreflect.MessageType { - return _fastReflection_ListenDeliverBlockResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ListenDeliverBlockResponse) New() protoreflect.Message { - return new(fastReflection_ListenDeliverBlockResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ListenDeliverBlockResponse) Interface() protoreflect.ProtoMessage { - return (*ListenDeliverBlockResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ListenDeliverBlockResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ListenDeliverBlockResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenDeliverBlockResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ListenDeliverBlockResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenDeliverBlockResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenDeliverBlockResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ListenDeliverBlockResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenDeliverBlockResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenDeliverBlockResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ListenDeliverBlockResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenDeliverBlockResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ListenDeliverBlockResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenDeliverBlockResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ListenDeliverBlockResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ListenDeliverBlockResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ListenDeliverBlockResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ListenDeliverBlockResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ListenDeliverBlockResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenDeliverBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenDeliverBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ListenStateChangesRequest_2_list)(nil) - -type _ListenStateChangesRequest_2_list struct { - list *[]*StoreKVPair -} - -func (x *_ListenStateChangesRequest_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ListenStateChangesRequest_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ListenStateChangesRequest_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*StoreKVPair) - (*x.list)[i] = concreteValue -} - -func (x *_ListenStateChangesRequest_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*StoreKVPair) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ListenStateChangesRequest_2_list) AppendMutable() protoreflect.Value { - v := new(StoreKVPair) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ListenStateChangesRequest_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ListenStateChangesRequest_2_list) NewElement() protoreflect.Value { - v := new(StoreKVPair) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ListenStateChangesRequest_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ListenStateChangesRequest protoreflect.MessageDescriptor - fd_ListenStateChangesRequest_block_height protoreflect.FieldDescriptor - fd_ListenStateChangesRequest_change_set protoreflect.FieldDescriptor - fd_ListenStateChangesRequest_app_hash protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_streaming_v1_grpc_proto_init() - md_ListenStateChangesRequest = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenStateChangesRequest") - fd_ListenStateChangesRequest_block_height = md_ListenStateChangesRequest.Fields().ByName("block_height") - fd_ListenStateChangesRequest_change_set = md_ListenStateChangesRequest.Fields().ByName("change_set") - fd_ListenStateChangesRequest_app_hash = md_ListenStateChangesRequest.Fields().ByName("app_hash") -} - -var _ protoreflect.Message = (*fastReflection_ListenStateChangesRequest)(nil) - -type fastReflection_ListenStateChangesRequest ListenStateChangesRequest - -func (x *ListenStateChangesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_ListenStateChangesRequest)(x) -} - -func (x *ListenStateChangesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ListenStateChangesRequest_messageType fastReflection_ListenStateChangesRequest_messageType -var _ protoreflect.MessageType = fastReflection_ListenStateChangesRequest_messageType{} - -type fastReflection_ListenStateChangesRequest_messageType struct{} - -func (x fastReflection_ListenStateChangesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_ListenStateChangesRequest)(nil) -} -func (x fastReflection_ListenStateChangesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_ListenStateChangesRequest) -} -func (x fastReflection_ListenStateChangesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ListenStateChangesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ListenStateChangesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_ListenStateChangesRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ListenStateChangesRequest) Type() protoreflect.MessageType { - return _fastReflection_ListenStateChangesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ListenStateChangesRequest) New() protoreflect.Message { - return new(fastReflection_ListenStateChangesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ListenStateChangesRequest) Interface() protoreflect.ProtoMessage { - return (*ListenStateChangesRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ListenStateChangesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.BlockHeight != int64(0) { - value := protoreflect.ValueOfInt64(x.BlockHeight) - if !f(fd_ListenStateChangesRequest_block_height, value) { - return - } - } - if len(x.ChangeSet) != 0 { - value := protoreflect.ValueOfList(&_ListenStateChangesRequest_2_list{list: &x.ChangeSet}) - if !f(fd_ListenStateChangesRequest_change_set, value) { - return - } - } - if len(x.AppHash) != 0 { - value := protoreflect.ValueOfBytes(x.AppHash) - if !f(fd_ListenStateChangesRequest_app_hash, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ListenStateChangesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": - return x.BlockHeight != int64(0) - case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": - return len(x.ChangeSet) != 0 - case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": - return len(x.AppHash) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenStateChangesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": - x.BlockHeight = int64(0) - case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": - x.ChangeSet = nil - case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": - x.AppHash = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ListenStateChangesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": - value := x.BlockHeight - return protoreflect.ValueOfInt64(value) - case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": - if len(x.ChangeSet) == 0 { - return protoreflect.ValueOfList(&_ListenStateChangesRequest_2_list{}) - } - listValue := &_ListenStateChangesRequest_2_list{list: &x.ChangeSet} - return protoreflect.ValueOfList(listValue) - case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": - value := x.AppHash - return protoreflect.ValueOfBytes(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenStateChangesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": - x.BlockHeight = value.Int() - case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": - lv := value.List() - clv := lv.(*_ListenStateChangesRequest_2_list) - x.ChangeSet = *clv.list - case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": - x.AppHash = value.Bytes() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenStateChangesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": - if x.ChangeSet == nil { - x.ChangeSet = []*StoreKVPair{} - } - value := &_ListenStateChangesRequest_2_list{list: &x.ChangeSet} - return protoreflect.ValueOfList(value) - case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": - panic(fmt.Errorf("field block_height of message cosmos.streaming.v1.ListenStateChangesRequest is not mutable")) - case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": - panic(fmt.Errorf("field app_hash of message cosmos.streaming.v1.ListenStateChangesRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ListenStateChangesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.ListenStateChangesRequest.block_height": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.streaming.v1.ListenStateChangesRequest.change_set": - list := []*StoreKVPair{} - return protoreflect.ValueOfList(&_ListenStateChangesRequest_2_list{list: &list}) - case "cosmos.streaming.v1.ListenStateChangesRequest.app_hash": - return protoreflect.ValueOfBytes(nil) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesRequest")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ListenStateChangesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenStateChangesRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ListenStateChangesRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenStateChangesRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ListenStateChangesRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ListenStateChangesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ListenStateChangesRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.BlockHeight != 0 { - n += 1 + runtime.Sov(uint64(x.BlockHeight)) - } - if len(x.ChangeSet) > 0 { - for _, e := range x.ChangeSet { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.AppHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ListenStateChangesRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AppHash) > 0 { - i -= len(x.AppHash) - copy(dAtA[i:], x.AppHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AppHash))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChangeSet) > 0 { - for iNdEx := len(x.ChangeSet) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.ChangeSet[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.BlockHeight != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ListenStateChangesRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenStateChangesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenStateChangesRequest: 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 BlockHeight", wireType) - } - x.BlockHeight = 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.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChangeSet", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChangeSet = append(x.ChangeSet, &StoreKVPair{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ChangeSet[len(x.ChangeSet)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AppHash = append(x.AppHash[:0], dAtA[iNdEx:postIndex]...) - if x.AppHash == nil { - x.AppHash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_ListenStateChangesResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_streaming_v1_grpc_proto_init() - md_ListenStateChangesResponse = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ListenStateChangesResponse") -} - -var _ protoreflect.Message = (*fastReflection_ListenStateChangesResponse)(nil) - -type fastReflection_ListenStateChangesResponse ListenStateChangesResponse - -func (x *ListenStateChangesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_ListenStateChangesResponse)(x) -} - -func (x *ListenStateChangesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ListenStateChangesResponse_messageType fastReflection_ListenStateChangesResponse_messageType -var _ protoreflect.MessageType = fastReflection_ListenStateChangesResponse_messageType{} - -type fastReflection_ListenStateChangesResponse_messageType struct{} - -func (x fastReflection_ListenStateChangesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_ListenStateChangesResponse)(nil) -} -func (x fastReflection_ListenStateChangesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_ListenStateChangesResponse) -} -func (x fastReflection_ListenStateChangesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ListenStateChangesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ListenStateChangesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_ListenStateChangesResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ListenStateChangesResponse) Type() protoreflect.MessageType { - return _fastReflection_ListenStateChangesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ListenStateChangesResponse) New() protoreflect.Message { - return new(fastReflection_ListenStateChangesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ListenStateChangesResponse) Interface() protoreflect.ProtoMessage { - return (*ListenStateChangesResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ListenStateChangesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ListenStateChangesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenStateChangesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ListenStateChangesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenStateChangesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenStateChangesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ListenStateChangesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ListenStateChangesResponse")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ListenStateChangesResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ListenStateChangesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ListenStateChangesResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ListenStateChangesResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ListenStateChangesResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ListenStateChangesResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ListenStateChangesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ListenStateChangesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ListenStateChangesResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ListenStateChangesResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenStateChangesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ListenStateChangesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_StoreKVPair protoreflect.MessageDescriptor - fd_StoreKVPair_address protoreflect.FieldDescriptor - fd_StoreKVPair_key protoreflect.FieldDescriptor - fd_StoreKVPair_value protoreflect.FieldDescriptor - fd_StoreKVPair_delete protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_streaming_v1_grpc_proto_init() - md_StoreKVPair = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("StoreKVPair") - fd_StoreKVPair_address = md_StoreKVPair.Fields().ByName("address") - fd_StoreKVPair_key = md_StoreKVPair.Fields().ByName("key") - fd_StoreKVPair_value = md_StoreKVPair.Fields().ByName("value") - fd_StoreKVPair_delete = md_StoreKVPair.Fields().ByName("delete") -} - -var _ protoreflect.Message = (*fastReflection_StoreKVPair)(nil) - -type fastReflection_StoreKVPair StoreKVPair - -func (x *StoreKVPair) ProtoReflect() protoreflect.Message { - return (*fastReflection_StoreKVPair)(x) -} - -func (x *StoreKVPair) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_StoreKVPair_messageType fastReflection_StoreKVPair_messageType -var _ protoreflect.MessageType = fastReflection_StoreKVPair_messageType{} - -type fastReflection_StoreKVPair_messageType struct{} - -func (x fastReflection_StoreKVPair_messageType) Zero() protoreflect.Message { - return (*fastReflection_StoreKVPair)(nil) -} -func (x fastReflection_StoreKVPair_messageType) New() protoreflect.Message { - return new(fastReflection_StoreKVPair) -} -func (x fastReflection_StoreKVPair_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_StoreKVPair -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_StoreKVPair) Descriptor() protoreflect.MessageDescriptor { - return md_StoreKVPair -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_StoreKVPair) Type() protoreflect.MessageType { - return _fastReflection_StoreKVPair_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_StoreKVPair) New() protoreflect.Message { - return new(fastReflection_StoreKVPair) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_StoreKVPair) Interface() protoreflect.ProtoMessage { - return (*StoreKVPair)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_StoreKVPair) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Address) != 0 { - value := protoreflect.ValueOfBytes(x.Address) - if !f(fd_StoreKVPair_address, value) { - return - } - } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_StoreKVPair_key, value) { - return - } - } - if len(x.Value) != 0 { - value := protoreflect.ValueOfBytes(x.Value) - if !f(fd_StoreKVPair_value, value) { - return - } - } - if x.Delete != false { - value := protoreflect.ValueOfBool(x.Delete) - if !f(fd_StoreKVPair_delete, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_StoreKVPair) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.streaming.v1.StoreKVPair.address": - return len(x.Address) != 0 - case "cosmos.streaming.v1.StoreKVPair.key": - return len(x.Key) != 0 - case "cosmos.streaming.v1.StoreKVPair.value": - return len(x.Value) != 0 - case "cosmos.streaming.v1.StoreKVPair.delete": - return x.Delete != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StoreKVPair) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.streaming.v1.StoreKVPair.address": - x.Address = nil - case "cosmos.streaming.v1.StoreKVPair.key": - x.Key = nil - case "cosmos.streaming.v1.StoreKVPair.value": - x.Value = nil - case "cosmos.streaming.v1.StoreKVPair.delete": - x.Delete = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_StoreKVPair) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.streaming.v1.StoreKVPair.address": - value := x.Address - return protoreflect.ValueOfBytes(value) - case "cosmos.streaming.v1.StoreKVPair.key": - value := x.Key - return protoreflect.ValueOfBytes(value) - case "cosmos.streaming.v1.StoreKVPair.value": - value := x.Value - return protoreflect.ValueOfBytes(value) - case "cosmos.streaming.v1.StoreKVPair.delete": - value := x.Delete - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StoreKVPair) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.streaming.v1.StoreKVPair.address": - x.Address = value.Bytes() - case "cosmos.streaming.v1.StoreKVPair.key": - x.Key = value.Bytes() - case "cosmos.streaming.v1.StoreKVPair.value": - x.Value = value.Bytes() - case "cosmos.streaming.v1.StoreKVPair.delete": - x.Delete = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StoreKVPair) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.StoreKVPair.address": - panic(fmt.Errorf("field address of message cosmos.streaming.v1.StoreKVPair is not mutable")) - case "cosmos.streaming.v1.StoreKVPair.key": - panic(fmt.Errorf("field key of message cosmos.streaming.v1.StoreKVPair is not mutable")) - case "cosmos.streaming.v1.StoreKVPair.value": - panic(fmt.Errorf("field value of message cosmos.streaming.v1.StoreKVPair is not mutable")) - case "cosmos.streaming.v1.StoreKVPair.delete": - panic(fmt.Errorf("field delete of message cosmos.streaming.v1.StoreKVPair is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_StoreKVPair) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.StoreKVPair.address": - return protoreflect.ValueOfBytes(nil) - case "cosmos.streaming.v1.StoreKVPair.key": - return protoreflect.ValueOfBytes(nil) - case "cosmos.streaming.v1.StoreKVPair.value": - return protoreflect.ValueOfBytes(nil) - case "cosmos.streaming.v1.StoreKVPair.delete": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.StoreKVPair")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.StoreKVPair does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_StoreKVPair) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.StoreKVPair", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_StoreKVPair) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_StoreKVPair) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_StoreKVPair) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_StoreKVPair) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*StoreKVPair) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Delete { - n += 2 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*StoreKVPair) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Delete { - i-- - if x.Delete { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x1a - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0x12 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*StoreKVPair) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StoreKVPair: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: StoreKVPair: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Address = append(x.Address[:0], dAtA[iNdEx:postIndex]...) - if x.Address == nil { - x.Address = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = append(x.Value[:0], dAtA[iNdEx:postIndex]...) - if x.Value == nil { - x.Value = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Delete", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Delete = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_Event_2_list)(nil) - -type _Event_2_list struct { - list *[]*EventAttribute -} - -func (x *_Event_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Event_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Event_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EventAttribute) - (*x.list)[i] = concreteValue -} - -func (x *_Event_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*EventAttribute) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Event_2_list) AppendMutable() protoreflect.Value { - v := new(EventAttribute) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Event_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Event_2_list) NewElement() protoreflect.Value { - v := new(EventAttribute) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Event_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Event protoreflect.MessageDescriptor - fd_Event_type protoreflect.FieldDescriptor - fd_Event_attributes protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_streaming_v1_grpc_proto_init() - md_Event = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("Event") - fd_Event_type = md_Event.Fields().ByName("type") - fd_Event_attributes = md_Event.Fields().ByName("attributes") -} - -var _ protoreflect.Message = (*fastReflection_Event)(nil) - -type fastReflection_Event Event - -func (x *Event) ProtoReflect() protoreflect.Message { - return (*fastReflection_Event)(x) -} - -func (x *Event) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Event_messageType fastReflection_Event_messageType -var _ protoreflect.MessageType = fastReflection_Event_messageType{} - -type fastReflection_Event_messageType struct{} - -func (x fastReflection_Event_messageType) Zero() protoreflect.Message { - return (*fastReflection_Event)(nil) -} -func (x fastReflection_Event_messageType) New() protoreflect.Message { - return new(fastReflection_Event) -} -func (x fastReflection_Event_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Event -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Event) Descriptor() protoreflect.MessageDescriptor { - return md_Event -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Event) Type() protoreflect.MessageType { - return _fastReflection_Event_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Event) New() protoreflect.Message { - return new(fastReflection_Event) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Event) Interface() protoreflect.ProtoMessage { - return (*Event)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Event) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Type_ != "" { - value := protoreflect.ValueOfString(x.Type_) - if !f(fd_Event_type, value) { - return - } - } - if len(x.Attributes) != 0 { - value := protoreflect.ValueOfList(&_Event_2_list{list: &x.Attributes}) - if !f(fd_Event_attributes, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Event) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.streaming.v1.Event.type": - return x.Type_ != "" - case "cosmos.streaming.v1.Event.attributes": - return len(x.Attributes) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Event) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.streaming.v1.Event.type": - x.Type_ = "" - case "cosmos.streaming.v1.Event.attributes": - x.Attributes = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Event) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.streaming.v1.Event.type": - value := x.Type_ - return protoreflect.ValueOfString(value) - case "cosmos.streaming.v1.Event.attributes": - if len(x.Attributes) == 0 { - return protoreflect.ValueOfList(&_Event_2_list{}) - } - listValue := &_Event_2_list{list: &x.Attributes} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Event) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.streaming.v1.Event.type": - x.Type_ = value.Interface().(string) - case "cosmos.streaming.v1.Event.attributes": - lv := value.List() - clv := lv.(*_Event_2_list) - x.Attributes = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Event) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.Event.attributes": - if x.Attributes == nil { - x.Attributes = []*EventAttribute{} - } - value := &_Event_2_list{list: &x.Attributes} - return protoreflect.ValueOfList(value) - case "cosmos.streaming.v1.Event.type": - panic(fmt.Errorf("field type of message cosmos.streaming.v1.Event is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Event) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.Event.type": - return protoreflect.ValueOfString("") - case "cosmos.streaming.v1.Event.attributes": - list := []*EventAttribute{} - return protoreflect.ValueOfList(&_Event_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.Event")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.Event does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Event) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.Event", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Event) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Event) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Event) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Event) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Event) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Type_) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Attributes) > 0 { - for _, e := range x.Attributes { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Event) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Attributes) > 0 { - for iNdEx := len(x.Attributes) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Attributes[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Type_) > 0 { - i -= len(x.Type_) - copy(dAtA[i:], x.Type_) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Type_))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Event) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Type_ = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Attributes = append(x.Attributes, &EventAttribute{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Attributes[len(x.Attributes)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_EventAttribute protoreflect.MessageDescriptor - fd_EventAttribute_key protoreflect.FieldDescriptor - fd_EventAttribute_value protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_streaming_v1_grpc_proto_init() - md_EventAttribute = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("EventAttribute") - fd_EventAttribute_key = md_EventAttribute.Fields().ByName("key") - fd_EventAttribute_value = md_EventAttribute.Fields().ByName("value") -} - -var _ protoreflect.Message = (*fastReflection_EventAttribute)(nil) - -type fastReflection_EventAttribute EventAttribute - -func (x *EventAttribute) ProtoReflect() protoreflect.Message { - return (*fastReflection_EventAttribute)(x) -} - -func (x *EventAttribute) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_EventAttribute_messageType fastReflection_EventAttribute_messageType -var _ protoreflect.MessageType = fastReflection_EventAttribute_messageType{} - -type fastReflection_EventAttribute_messageType struct{} - -func (x fastReflection_EventAttribute_messageType) Zero() protoreflect.Message { - return (*fastReflection_EventAttribute)(nil) -} -func (x fastReflection_EventAttribute_messageType) New() protoreflect.Message { - return new(fastReflection_EventAttribute) -} -func (x fastReflection_EventAttribute_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_EventAttribute -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_EventAttribute) Descriptor() protoreflect.MessageDescriptor { - return md_EventAttribute -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_EventAttribute) Type() protoreflect.MessageType { - return _fastReflection_EventAttribute_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_EventAttribute) New() protoreflect.Message { - return new(fastReflection_EventAttribute) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_EventAttribute) Interface() protoreflect.ProtoMessage { - return (*EventAttribute)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_EventAttribute) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Key != "" { - value := protoreflect.ValueOfString(x.Key) - if !f(fd_EventAttribute_key, value) { - return - } - } - if x.Value != "" { - value := protoreflect.ValueOfString(x.Value) - if !f(fd_EventAttribute_value, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_EventAttribute) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.streaming.v1.EventAttribute.key": - return x.Key != "" - case "cosmos.streaming.v1.EventAttribute.value": - return x.Value != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventAttribute) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.streaming.v1.EventAttribute.key": - x.Key = "" - case "cosmos.streaming.v1.EventAttribute.value": - x.Value = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_EventAttribute) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.streaming.v1.EventAttribute.key": - value := x.Key - return protoreflect.ValueOfString(value) - case "cosmos.streaming.v1.EventAttribute.value": - value := x.Value - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventAttribute) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.streaming.v1.EventAttribute.key": - x.Key = value.Interface().(string) - case "cosmos.streaming.v1.EventAttribute.value": - x.Value = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventAttribute) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.EventAttribute.key": - panic(fmt.Errorf("field key of message cosmos.streaming.v1.EventAttribute is not mutable")) - case "cosmos.streaming.v1.EventAttribute.value": - panic(fmt.Errorf("field value of message cosmos.streaming.v1.EventAttribute is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_EventAttribute) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.EventAttribute.key": - return protoreflect.ValueOfString("") - case "cosmos.streaming.v1.EventAttribute.value": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.EventAttribute")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.EventAttribute does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_EventAttribute) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.EventAttribute", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_EventAttribute) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_EventAttribute) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_EventAttribute) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_EventAttribute) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*EventAttribute) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Key) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*EventAttribute) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x12 - } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*EventAttribute) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAttribute: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: EventAttribute: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ExecTxResult_7_list)(nil) - -type _ExecTxResult_7_list struct { - list *[]*Event -} - -func (x *_ExecTxResult_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ExecTxResult_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ExecTxResult_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - (*x.list)[i] = concreteValue -} - -func (x *_ExecTxResult_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Event) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ExecTxResult_7_list) AppendMutable() protoreflect.Value { - v := new(Event) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ExecTxResult_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ExecTxResult_7_list) NewElement() protoreflect.Value { - v := new(Event) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ExecTxResult_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ExecTxResult protoreflect.MessageDescriptor - fd_ExecTxResult_code protoreflect.FieldDescriptor - fd_ExecTxResult_data protoreflect.FieldDescriptor - fd_ExecTxResult_log protoreflect.FieldDescriptor - fd_ExecTxResult_info protoreflect.FieldDescriptor - fd_ExecTxResult_gas_wanted protoreflect.FieldDescriptor - fd_ExecTxResult_gas_used protoreflect.FieldDescriptor - fd_ExecTxResult_events protoreflect.FieldDescriptor - fd_ExecTxResult_codespace protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_streaming_v1_grpc_proto_init() - md_ExecTxResult = File_cosmos_streaming_v1_grpc_proto.Messages().ByName("ExecTxResult") - fd_ExecTxResult_code = md_ExecTxResult.Fields().ByName("code") - fd_ExecTxResult_data = md_ExecTxResult.Fields().ByName("data") - fd_ExecTxResult_log = md_ExecTxResult.Fields().ByName("log") - fd_ExecTxResult_info = md_ExecTxResult.Fields().ByName("info") - fd_ExecTxResult_gas_wanted = md_ExecTxResult.Fields().ByName("gas_wanted") - fd_ExecTxResult_gas_used = md_ExecTxResult.Fields().ByName("gas_used") - fd_ExecTxResult_events = md_ExecTxResult.Fields().ByName("events") - fd_ExecTxResult_codespace = md_ExecTxResult.Fields().ByName("codespace") -} - -var _ protoreflect.Message = (*fastReflection_ExecTxResult)(nil) - -type fastReflection_ExecTxResult ExecTxResult - -func (x *ExecTxResult) ProtoReflect() protoreflect.Message { - return (*fastReflection_ExecTxResult)(x) -} - -func (x *ExecTxResult) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ExecTxResult_messageType fastReflection_ExecTxResult_messageType -var _ protoreflect.MessageType = fastReflection_ExecTxResult_messageType{} - -type fastReflection_ExecTxResult_messageType struct{} - -func (x fastReflection_ExecTxResult_messageType) Zero() protoreflect.Message { - return (*fastReflection_ExecTxResult)(nil) -} -func (x fastReflection_ExecTxResult_messageType) New() protoreflect.Message { - return new(fastReflection_ExecTxResult) -} -func (x fastReflection_ExecTxResult_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ExecTxResult -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ExecTxResult) Descriptor() protoreflect.MessageDescriptor { - return md_ExecTxResult -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ExecTxResult) Type() protoreflect.MessageType { - return _fastReflection_ExecTxResult_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ExecTxResult) New() protoreflect.Message { - return new(fastReflection_ExecTxResult) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ExecTxResult) Interface() protoreflect.ProtoMessage { - return (*ExecTxResult)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ExecTxResult) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Code != uint32(0) { - value := protoreflect.ValueOfUint32(x.Code) - if !f(fd_ExecTxResult_code, value) { - return - } - } - if len(x.Data) != 0 { - value := protoreflect.ValueOfBytes(x.Data) - if !f(fd_ExecTxResult_data, value) { - return - } - } - if x.Log != "" { - value := protoreflect.ValueOfString(x.Log) - if !f(fd_ExecTxResult_log, value) { - return - } - } - if x.Info != "" { - value := protoreflect.ValueOfString(x.Info) - if !f(fd_ExecTxResult_info, value) { - return - } - } - if x.GasWanted != int64(0) { - value := protoreflect.ValueOfInt64(x.GasWanted) - if !f(fd_ExecTxResult_gas_wanted, value) { - return - } - } - if x.GasUsed != int64(0) { - value := protoreflect.ValueOfInt64(x.GasUsed) - if !f(fd_ExecTxResult_gas_used, value) { - return - } - } - if len(x.Events) != 0 { - value := protoreflect.ValueOfList(&_ExecTxResult_7_list{list: &x.Events}) - if !f(fd_ExecTxResult_events, value) { - return - } - } - if x.Codespace != "" { - value := protoreflect.ValueOfString(x.Codespace) - if !f(fd_ExecTxResult_codespace, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ExecTxResult) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.streaming.v1.ExecTxResult.code": - return x.Code != uint32(0) - case "cosmos.streaming.v1.ExecTxResult.data": - return len(x.Data) != 0 - case "cosmos.streaming.v1.ExecTxResult.log": - return x.Log != "" - case "cosmos.streaming.v1.ExecTxResult.info": - return x.Info != "" - case "cosmos.streaming.v1.ExecTxResult.gas_wanted": - return x.GasWanted != int64(0) - case "cosmos.streaming.v1.ExecTxResult.gas_used": - return x.GasUsed != int64(0) - case "cosmos.streaming.v1.ExecTxResult.events": - return len(x.Events) != 0 - case "cosmos.streaming.v1.ExecTxResult.codespace": - return x.Codespace != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExecTxResult) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.streaming.v1.ExecTxResult.code": - x.Code = uint32(0) - case "cosmos.streaming.v1.ExecTxResult.data": - x.Data = nil - case "cosmos.streaming.v1.ExecTxResult.log": - x.Log = "" - case "cosmos.streaming.v1.ExecTxResult.info": - x.Info = "" - case "cosmos.streaming.v1.ExecTxResult.gas_wanted": - x.GasWanted = int64(0) - case "cosmos.streaming.v1.ExecTxResult.gas_used": - x.GasUsed = int64(0) - case "cosmos.streaming.v1.ExecTxResult.events": - x.Events = nil - case "cosmos.streaming.v1.ExecTxResult.codespace": - x.Codespace = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ExecTxResult) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.streaming.v1.ExecTxResult.code": - value := x.Code - return protoreflect.ValueOfUint32(value) - case "cosmos.streaming.v1.ExecTxResult.data": - value := x.Data - return protoreflect.ValueOfBytes(value) - case "cosmos.streaming.v1.ExecTxResult.log": - value := x.Log - return protoreflect.ValueOfString(value) - case "cosmos.streaming.v1.ExecTxResult.info": - value := x.Info - return protoreflect.ValueOfString(value) - case "cosmos.streaming.v1.ExecTxResult.gas_wanted": - value := x.GasWanted - return protoreflect.ValueOfInt64(value) - case "cosmos.streaming.v1.ExecTxResult.gas_used": - value := x.GasUsed - return protoreflect.ValueOfInt64(value) - case "cosmos.streaming.v1.ExecTxResult.events": - if len(x.Events) == 0 { - return protoreflect.ValueOfList(&_ExecTxResult_7_list{}) - } - listValue := &_ExecTxResult_7_list{list: &x.Events} - return protoreflect.ValueOfList(listValue) - case "cosmos.streaming.v1.ExecTxResult.codespace": - value := x.Codespace - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExecTxResult) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.streaming.v1.ExecTxResult.code": - x.Code = uint32(value.Uint()) - case "cosmos.streaming.v1.ExecTxResult.data": - x.Data = value.Bytes() - case "cosmos.streaming.v1.ExecTxResult.log": - x.Log = value.Interface().(string) - case "cosmos.streaming.v1.ExecTxResult.info": - x.Info = value.Interface().(string) - case "cosmos.streaming.v1.ExecTxResult.gas_wanted": - x.GasWanted = value.Int() - case "cosmos.streaming.v1.ExecTxResult.gas_used": - x.GasUsed = value.Int() - case "cosmos.streaming.v1.ExecTxResult.events": - lv := value.List() - clv := lv.(*_ExecTxResult_7_list) - x.Events = *clv.list - case "cosmos.streaming.v1.ExecTxResult.codespace": - x.Codespace = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExecTxResult) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.ExecTxResult.events": - if x.Events == nil { - x.Events = []*Event{} - } - value := &_ExecTxResult_7_list{list: &x.Events} - return protoreflect.ValueOfList(value) - case "cosmos.streaming.v1.ExecTxResult.code": - panic(fmt.Errorf("field code of message cosmos.streaming.v1.ExecTxResult is not mutable")) - case "cosmos.streaming.v1.ExecTxResult.data": - panic(fmt.Errorf("field data of message cosmos.streaming.v1.ExecTxResult is not mutable")) - case "cosmos.streaming.v1.ExecTxResult.log": - panic(fmt.Errorf("field log of message cosmos.streaming.v1.ExecTxResult is not mutable")) - case "cosmos.streaming.v1.ExecTxResult.info": - panic(fmt.Errorf("field info of message cosmos.streaming.v1.ExecTxResult is not mutable")) - case "cosmos.streaming.v1.ExecTxResult.gas_wanted": - panic(fmt.Errorf("field gas_wanted of message cosmos.streaming.v1.ExecTxResult is not mutable")) - case "cosmos.streaming.v1.ExecTxResult.gas_used": - panic(fmt.Errorf("field gas_used of message cosmos.streaming.v1.ExecTxResult is not mutable")) - case "cosmos.streaming.v1.ExecTxResult.codespace": - panic(fmt.Errorf("field codespace of message cosmos.streaming.v1.ExecTxResult is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ExecTxResult) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.streaming.v1.ExecTxResult.code": - return protoreflect.ValueOfUint32(uint32(0)) - case "cosmos.streaming.v1.ExecTxResult.data": - return protoreflect.ValueOfBytes(nil) - case "cosmos.streaming.v1.ExecTxResult.log": - return protoreflect.ValueOfString("") - case "cosmos.streaming.v1.ExecTxResult.info": - return protoreflect.ValueOfString("") - case "cosmos.streaming.v1.ExecTxResult.gas_wanted": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.streaming.v1.ExecTxResult.gas_used": - return protoreflect.ValueOfInt64(int64(0)) - case "cosmos.streaming.v1.ExecTxResult.events": - list := []*Event{} - return protoreflect.ValueOfList(&_ExecTxResult_7_list{list: &list}) - case "cosmos.streaming.v1.ExecTxResult.codespace": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.streaming.v1.ExecTxResult")) - } - panic(fmt.Errorf("message cosmos.streaming.v1.ExecTxResult does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ExecTxResult) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.streaming.v1.ExecTxResult", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ExecTxResult) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ExecTxResult) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ExecTxResult) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ExecTxResult) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ExecTxResult) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Code != 0 { - n += 1 + runtime.Sov(uint64(x.Code)) - } - l = len(x.Data) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Log) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Info) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.GasWanted != 0 { - n += 1 + runtime.Sov(uint64(x.GasWanted)) - } - if x.GasUsed != 0 { - n += 1 + runtime.Sov(uint64(x.GasUsed)) - } - if len(x.Events) > 0 { - for _, e := range x.Events { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Codespace) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ExecTxResult) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Codespace) > 0 { - i -= len(x.Codespace) - copy(dAtA[i:], x.Codespace) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Codespace))) - i-- - dAtA[i] = 0x42 - } - if len(x.Events) > 0 { - for iNdEx := len(x.Events) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Events[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if x.GasUsed != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasUsed)) - i-- - dAtA[i] = 0x30 - } - if x.GasWanted != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.GasWanted)) - i-- - dAtA[i] = 0x28 - } - if len(x.Info) > 0 { - i -= len(x.Info) - copy(dAtA[i:], x.Info) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Info))) - i-- - dAtA[i] = 0x22 - } - if len(x.Log) > 0 { - i -= len(x.Log) - copy(dAtA[i:], x.Log) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Log))) - i-- - dAtA[i] = 0x1a - } - if len(x.Data) > 0 { - i -= len(x.Data) - copy(dAtA[i:], x.Data) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Data))) - i-- - dAtA[i] = 0x12 - } - if x.Code != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Code)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ExecTxResult) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExecTxResult: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExecTxResult: 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 Code", wireType) - } - x.Code = 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.Code |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Data = append(x.Data[:0], dAtA[iNdEx:postIndex]...) - if x.Data == nil { - x.Data = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Log", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Log = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Info = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasWanted", wireType) - } - x.GasWanted = 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.GasWanted |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasUsed", wireType) - } - x.GasUsed = 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.GasUsed |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Events = append(x.Events, &Event{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Events[len(x.Events)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Codespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Codespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/streaming/v1/grpc.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// ListenDeliverBlockRequest is the request type for the ListenDeliverBlock RPC method -type ListenDeliverBlockRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Txs [][]byte `protobuf:"bytes,2,rep,name=txs,proto3" json:"txs,omitempty"` - Events []*Event `protobuf:"bytes,3,rep,name=events,proto3" json:"events,omitempty"` - TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` -} - -func (x *ListenDeliverBlockRequest) Reset() { - *x = ListenDeliverBlockRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenDeliverBlockRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenDeliverBlockRequest) ProtoMessage() {} - -// Deprecated: Use ListenDeliverBlockRequest.ProtoReflect.Descriptor instead. -func (*ListenDeliverBlockRequest) Descriptor() ([]byte, []int) { - return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{0} -} - -func (x *ListenDeliverBlockRequest) GetBlockHeight() int64 { - if x != nil { - return x.BlockHeight - } - return 0 -} - -func (x *ListenDeliverBlockRequest) GetTxs() [][]byte { - if x != nil { - return x.Txs - } - return nil -} - -func (x *ListenDeliverBlockRequest) GetEvents() []*Event { - if x != nil { - return x.Events - } - return nil -} - -func (x *ListenDeliverBlockRequest) GetTxResults() []*ExecTxResult { - if x != nil { - return x.TxResults - } - return nil -} - -// ListenDeliverBlockResponse is the response type for the ListenDeliverBlock RPC method -type ListenDeliverBlockResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListenDeliverBlockResponse) Reset() { - *x = ListenDeliverBlockResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenDeliverBlockResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenDeliverBlockResponse) ProtoMessage() {} - -// Deprecated: Use ListenDeliverBlockResponse.ProtoReflect.Descriptor instead. -func (*ListenDeliverBlockResponse) Descriptor() ([]byte, []int) { - return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{1} -} - -// ListenStateChangesRequest is the request type for the ListenStateChanges RPC method -type ListenStateChangesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - ChangeSet []*StoreKVPair `protobuf:"bytes,2,rep,name=change_set,json=changeSet,proto3" json:"change_set,omitempty"` - AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` -} - -func (x *ListenStateChangesRequest) Reset() { - *x = ListenStateChangesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenStateChangesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenStateChangesRequest) ProtoMessage() {} - -// Deprecated: Use ListenStateChangesRequest.ProtoReflect.Descriptor instead. -func (*ListenStateChangesRequest) Descriptor() ([]byte, []int) { - return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{2} -} - -func (x *ListenStateChangesRequest) GetBlockHeight() int64 { - if x != nil { - return x.BlockHeight - } - return 0 -} - -func (x *ListenStateChangesRequest) GetChangeSet() []*StoreKVPair { - if x != nil { - return x.ChangeSet - } - return nil -} - -func (x *ListenStateChangesRequest) GetAppHash() []byte { - if x != nil { - return x.AppHash - } - return nil -} - -// ListenStateChangesResponse is the response type for the ListenStateChanges RPC method -type ListenStateChangesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListenStateChangesResponse) Reset() { - *x = ListenStateChangesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListenStateChangesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListenStateChangesResponse) ProtoMessage() {} - -// Deprecated: Use ListenStateChangesResponse.ProtoReflect.Descriptor instead. -func (*ListenStateChangesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{3} -} - -// StoreKVPair is a single key-value pair, associated with a store. -type StoreKVPair struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // address defines the address of the account the state changes are coming from. - // In case of modules you can expect a stringified - Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - // key defines the key of the address that changed. - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - // value defines the value that changed, empty in case of removal. - Value []byte `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` - // delete defines if the key was removed. - Delete bool `protobuf:"varint,4,opt,name=delete,proto3" json:"delete,omitempty"` // true indicates a delete operation, false indicates a set operation -} - -func (x *StoreKVPair) Reset() { - *x = StoreKVPair{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *StoreKVPair) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StoreKVPair) ProtoMessage() {} - -// Deprecated: Use StoreKVPair.ProtoReflect.Descriptor instead. -func (*StoreKVPair) Descriptor() ([]byte, []int) { - return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{4} -} - -func (x *StoreKVPair) GetAddress() []byte { - if x != nil { - return x.Address - } - return nil -} - -func (x *StoreKVPair) GetKey() []byte { - if x != nil { - return x.Key - } - return nil -} - -func (x *StoreKVPair) GetValue() []byte { - if x != nil { - return x.Value - } - return nil -} - -func (x *StoreKVPair) GetDelete() bool { - if x != nil { - return x.Delete - } - return false -} - -// Event is a single event, associated with a transaction. -type Event struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Type_ string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - Attributes []*EventAttribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"` -} - -func (x *Event) Reset() { - *x = Event{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Event) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Event) ProtoMessage() {} - -// Deprecated: Use Event.ProtoReflect.Descriptor instead. -func (*Event) Descriptor() ([]byte, []int) { - return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{5} -} - -func (x *Event) GetType_() string { - if x != nil { - return x.Type_ - } - return "" -} - -func (x *Event) GetAttributes() []*EventAttribute { - if x != nil { - return x.Attributes - } - return nil -} - -// EventAttribute is a single key-value pair, associated with an event. -type EventAttribute struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *EventAttribute) Reset() { - *x = EventAttribute{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *EventAttribute) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EventAttribute) ProtoMessage() {} - -// Deprecated: Use EventAttribute.ProtoReflect.Descriptor instead. -func (*EventAttribute) Descriptor() ([]byte, []int) { - return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{6} -} - -func (x *EventAttribute) GetKey() string { - if x != nil { - return x.Key - } - return "" -} - -func (x *EventAttribute) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// ExecTxResult contains results of executing one individual transaction. -type ExecTxResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"` - Info string `protobuf:"bytes,4,opt,name=info,proto3" json:"info,omitempty"` - GasWanted int64 `protobuf:"varint,5,opt,name=gas_wanted,json=gasWanted,proto3" json:"gas_wanted,omitempty"` - GasUsed int64 `protobuf:"varint,6,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` - Events []*Event `protobuf:"bytes,7,rep,name=events,proto3" json:"events,omitempty"` - Codespace string `protobuf:"bytes,8,opt,name=codespace,proto3" json:"codespace,omitempty"` -} - -func (x *ExecTxResult) Reset() { - *x = ExecTxResult{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_streaming_v1_grpc_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ExecTxResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ExecTxResult) ProtoMessage() {} - -// Deprecated: Use ExecTxResult.ProtoReflect.Descriptor instead. -func (*ExecTxResult) Descriptor() ([]byte, []int) { - return file_cosmos_streaming_v1_grpc_proto_rawDescGZIP(), []int{7} -} - -func (x *ExecTxResult) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *ExecTxResult) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *ExecTxResult) GetLog() string { - if x != nil { - return x.Log - } - return "" -} - -func (x *ExecTxResult) GetInfo() string { - if x != nil { - return x.Info - } - return "" -} - -func (x *ExecTxResult) GetGasWanted() int64 { - if x != nil { - return x.GasWanted - } - return 0 -} - -func (x *ExecTxResult) GetGasUsed() int64 { - if x != nil { - return x.GasUsed - } - return 0 -} - -func (x *ExecTxResult) GetEvents() []*Event { - if x != nil { - return x.Events - } - return nil -} - -func (x *ExecTxResult) GetCodespace() string { - if x != nil { - return x.Codespace - } - return "" -} - -var File_cosmos_streaming_v1_grpc_proto protoreflect.FileDescriptor - -var file_cosmos_streaming_v1_grpc_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, - 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x22, 0xc6, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, - 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x0a, - 0x74, 0x78, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x21, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x54, 0x78, 0x52, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x52, 0x09, 0x74, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x1c, - 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, 0x01, 0x0a, - 0x19, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, - 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x3f, 0x0a, - 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x4b, 0x56, 0x50, - 0x61, 0x69, 0x72, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x53, 0x65, 0x74, 0x12, 0x19, - 0x0a, 0x08, 0x61, 0x70, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x07, 0x61, 0x70, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0x1c, 0x0a, 0x1a, 0x4c, 0x69, 0x73, - 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x65, - 0x4b, 0x56, 0x50, 0x61, 0x69, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x22, 0x60, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x43, 0x0a, - 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x22, 0x38, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xe8, 0x01, 0x0a, - 0x0c, 0x45, 0x78, 0x65, 0x63, 0x54, 0x78, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x12, 0x0a, - 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x67, - 0x61, 0x73, 0x5f, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x09, 0x67, 0x61, 0x73, 0x57, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, - 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x67, 0x61, - 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, - 0x74, 0x52, 0x06, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x64, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, - 0x64, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x32, 0xff, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, - 0x65, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x12, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, - 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x44, 0x65, - 0x6c, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x75, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x65, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xc4, 0x01, 0x0a, 0x17, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, - 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x47, 0x72, 0x70, 0x63, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, - 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, - 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x53, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, - 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, - 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x15, 0x43, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x3a, 0x3a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_streaming_v1_grpc_proto_rawDescOnce sync.Once - file_cosmos_streaming_v1_grpc_proto_rawDescData = file_cosmos_streaming_v1_grpc_proto_rawDesc -) - -func file_cosmos_streaming_v1_grpc_proto_rawDescGZIP() []byte { - file_cosmos_streaming_v1_grpc_proto_rawDescOnce.Do(func() { - file_cosmos_streaming_v1_grpc_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_streaming_v1_grpc_proto_rawDescData) - }) - return file_cosmos_streaming_v1_grpc_proto_rawDescData -} - -var file_cosmos_streaming_v1_grpc_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_cosmos_streaming_v1_grpc_proto_goTypes = []interface{}{ - (*ListenDeliverBlockRequest)(nil), // 0: cosmos.streaming.v1.ListenDeliverBlockRequest - (*ListenDeliverBlockResponse)(nil), // 1: cosmos.streaming.v1.ListenDeliverBlockResponse - (*ListenStateChangesRequest)(nil), // 2: cosmos.streaming.v1.ListenStateChangesRequest - (*ListenStateChangesResponse)(nil), // 3: cosmos.streaming.v1.ListenStateChangesResponse - (*StoreKVPair)(nil), // 4: cosmos.streaming.v1.StoreKVPair - (*Event)(nil), // 5: cosmos.streaming.v1.Event - (*EventAttribute)(nil), // 6: cosmos.streaming.v1.EventAttribute - (*ExecTxResult)(nil), // 7: cosmos.streaming.v1.ExecTxResult -} -var file_cosmos_streaming_v1_grpc_proto_depIdxs = []int32{ - 5, // 0: cosmos.streaming.v1.ListenDeliverBlockRequest.events:type_name -> cosmos.streaming.v1.Event - 7, // 1: cosmos.streaming.v1.ListenDeliverBlockRequest.tx_results:type_name -> cosmos.streaming.v1.ExecTxResult - 4, // 2: cosmos.streaming.v1.ListenStateChangesRequest.change_set:type_name -> cosmos.streaming.v1.StoreKVPair - 6, // 3: cosmos.streaming.v1.Event.attributes:type_name -> cosmos.streaming.v1.EventAttribute - 5, // 4: cosmos.streaming.v1.ExecTxResult.events:type_name -> cosmos.streaming.v1.Event - 0, // 5: cosmos.streaming.v1.ListenerService.ListenDeliverBlock:input_type -> cosmos.streaming.v1.ListenDeliverBlockRequest - 2, // 6: cosmos.streaming.v1.ListenerService.ListenStateChanges:input_type -> cosmos.streaming.v1.ListenStateChangesRequest - 1, // 7: cosmos.streaming.v1.ListenerService.ListenDeliverBlock:output_type -> cosmos.streaming.v1.ListenDeliverBlockResponse - 3, // 8: cosmos.streaming.v1.ListenerService.ListenStateChanges:output_type -> cosmos.streaming.v1.ListenStateChangesResponse - 7, // [7:9] is the sub-list for method output_type - 5, // [5:7] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_cosmos_streaming_v1_grpc_proto_init() } -func file_cosmos_streaming_v1_grpc_proto_init() { - if File_cosmos_streaming_v1_grpc_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_streaming_v1_grpc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenDeliverBlockRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_streaming_v1_grpc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenDeliverBlockResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_streaming_v1_grpc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenStateChangesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_streaming_v1_grpc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListenStateChangesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_streaming_v1_grpc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StoreKVPair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_streaming_v1_grpc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Event); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_streaming_v1_grpc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventAttribute); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_streaming_v1_grpc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExecTxResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_streaming_v1_grpc_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_cosmos_streaming_v1_grpc_proto_goTypes, - DependencyIndexes: file_cosmos_streaming_v1_grpc_proto_depIdxs, - MessageInfos: file_cosmos_streaming_v1_grpc_proto_msgTypes, - }.Build() - File_cosmos_streaming_v1_grpc_proto = out.File - file_cosmos_streaming_v1_grpc_proto_rawDesc = nil - file_cosmos_streaming_v1_grpc_proto_goTypes = nil - file_cosmos_streaming_v1_grpc_proto_depIdxs = nil -} diff --git a/api/cosmos/streaming/v1/grpc_grpc.pb.go b/api/cosmos/streaming/v1/grpc_grpc.pb.go deleted file mode 100644 index fad0b3a72eee..000000000000 --- a/api/cosmos/streaming/v1/grpc_grpc.pb.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: cosmos/streaming/v1/grpc.proto - -package streamingv1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - ListenerService_ListenDeliverBlock_FullMethodName = "/cosmos.streaming.v1.ListenerService/ListenDeliverBlock" - ListenerService_ListenStateChanges_FullMethodName = "/cosmos.streaming.v1.ListenerService/ListenStateChanges" -) - -// ListenerServiceClient is the client API for ListenerService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ListenerServiceClient interface { - // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock - ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) - // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges - ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) -} - -type listenerServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewListenerServiceClient(cc grpc.ClientConnInterface) ListenerServiceClient { - return &listenerServiceClient{cc} -} - -func (c *listenerServiceClient) ListenDeliverBlock(ctx context.Context, in *ListenDeliverBlockRequest, opts ...grpc.CallOption) (*ListenDeliverBlockResponse, error) { - out := new(ListenDeliverBlockResponse) - err := c.cc.Invoke(ctx, ListenerService_ListenDeliverBlock_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *listenerServiceClient) ListenStateChanges(ctx context.Context, in *ListenStateChangesRequest, opts ...grpc.CallOption) (*ListenStateChangesResponse, error) { - out := new(ListenStateChangesResponse) - err := c.cc.Invoke(ctx, ListenerService_ListenStateChanges_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ListenerServiceServer is the server API for ListenerService service. -// All implementations must embed UnimplementedListenerServiceServer -// for forward compatibility -type ListenerServiceServer interface { - // ListenDeliverBlock is the corresponding endpoint for Listener.ListenDeliverBlock - ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) - // ListenStateChanges is the corresponding endpoint for Listener.ListenStateChanges - ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) - mustEmbedUnimplementedListenerServiceServer() -} - -// UnimplementedListenerServiceServer must be embedded to have forward compatible implementations. -type UnimplementedListenerServiceServer struct { -} - -func (UnimplementedListenerServiceServer) ListenDeliverBlock(context.Context, *ListenDeliverBlockRequest) (*ListenDeliverBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenDeliverBlock not implemented") -} -func (UnimplementedListenerServiceServer) ListenStateChanges(context.Context, *ListenStateChangesRequest) (*ListenStateChangesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListenStateChanges not implemented") -} -func (UnimplementedListenerServiceServer) mustEmbedUnimplementedListenerServiceServer() {} - -// UnsafeListenerServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ListenerServiceServer will -// result in compilation errors. -type UnsafeListenerServiceServer interface { - mustEmbedUnimplementedListenerServiceServer() -} - -func RegisterListenerServiceServer(s grpc.ServiceRegistrar, srv ListenerServiceServer) { - s.RegisterService(&ListenerService_ServiceDesc, srv) -} - -func _ListenerService_ListenDeliverBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenDeliverBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ListenerService_ListenDeliverBlock_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ListenerServiceServer).ListenDeliverBlock(ctx, req.(*ListenDeliverBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ListenerService_ListenStateChanges_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListenStateChangesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ListenerServiceServer).ListenStateChanges(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ListenerService_ListenStateChanges_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ListenerServiceServer).ListenStateChanges(ctx, req.(*ListenStateChangesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// ListenerService_ServiceDesc is the grpc.ServiceDesc for ListenerService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ListenerService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "cosmos.streaming.v1.ListenerService", - HandlerType: (*ListenerServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListenDeliverBlock", - Handler: _ListenerService_ListenDeliverBlock_Handler, - }, - { - MethodName: "ListenStateChanges", - Handler: _ListenerService_ListenStateChanges_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "cosmos/streaming/v1/grpc.proto", -} From 7fc4ddbe8a13a75a8b58e5fa0a754ee1c3d3f72c Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Mon, 3 Jun 2024 10:29:46 +0200 Subject: [PATCH 12/20] update proposal when running out of gas --- x/gov/keeper/abci.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index 9713ff7aea92..e013037ba381 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -218,6 +218,13 @@ func (k Keeper) EndBlocker(ctx context.Context) error { return nil }) if err != nil { + // update proposal if error is out of gas + if errors.Is(err, sdkerrors.ErrOutOfGas) { + proposal.Status = v1.StatusFailed + proposal.FailedReason = err.Error() + tagValue = types.AttributeValueProposalFailed + logMsg = "passed proposal failed due to out of gas" + } break // We do not anything with the error. Returning an error halts the chain, and proposal struct is already updated. } case !burnDeposits && (proposal.ProposalType == v1.ProposalType_PROPOSAL_TYPE_EXPEDITED || From 12ad1f9e4f4600950f089e358215d5fc68bcae6d Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Mon, 3 Jun 2024 10:50:56 +0200 Subject: [PATCH 13/20] fix build --- x/gov/keeper/abci.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index e013037ba381..deaed6a1b525 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -16,6 +16,8 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // EndBlocker is called every block. From d10a2598b2afa93807694c3c766866e5bf5a586b Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Mon, 3 Jun 2024 11:10:48 +0200 Subject: [PATCH 14/20] fix go.mod --- x/accounts/go.mod | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x/accounts/go.mod b/x/accounts/go.mod index 8300ce3a1737..86fa7a14fa32 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -7,6 +7,7 @@ require ( cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.12.1-0.20231114100755-569e3ff6a0d7 cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/tx v0.13.3 github.com/cosmos/cosmos-sdk v0.51.0 github.com/cosmos/gogoproto v1.4.12 @@ -17,8 +18,6 @@ require ( google.golang.org/protobuf v1.34.1 ) -require cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect - require ( cosmossdk.io/log v1.3.1 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect @@ -33,7 +32,7 @@ require ( cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc // indirect cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect - cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 + cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect From daaf91b357df271286cd2444d9a452a20da01031 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Mon, 3 Jun 2024 11:11:47 +0200 Subject: [PATCH 15/20] fix go.mod --- x/accounts/go.mod | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/x/accounts/go.mod b/x/accounts/go.mod index 86fa7a14fa32..7ea47080389a 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -18,16 +18,11 @@ require ( google.golang.org/protobuf v1.34.1 ) -require ( - cosmossdk.io/log v1.3.1 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect - go.opencensus.io v0.24.0 // indirect -) - require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.1-20240312114316-c0d3497e35d6.1 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.1-20240130113600-88ef6483f90f.1 // indirect cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/log v1.3.1 // indirect cosmossdk.io/math v1.3.0 cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc // indirect cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 @@ -98,6 +93,7 @@ require ( github.com/hashicorp/go-metrics v0.5.3 // indirect github.com/hashicorp/go-plugin v1.6.1 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hdevalence/ed25519consensus v0.2.0 // indirect @@ -150,6 +146,7 @@ require ( gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b // indirect gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 // indirect go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect + go.opencensus.io v0.24.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.23.0 // indirect golang.org/x/exp v0.0.0-20240531132922-fd00a4e0eefc // indirect From 736d39a8b2fc03ad94fa36250ab09ce6077b5eeb Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Mon, 3 Jun 2024 12:08:33 +0200 Subject: [PATCH 16/20] move params higher to avoid multiple gets --- x/gov/keeper/abci.go | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index deaed6a1b525..8560fa4e87d6 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -16,7 +16,6 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) @@ -37,6 +36,11 @@ func (k Keeper) EndBlocker(ctx context.Context) error { return err } + params, err := k.Params.Get(ctx) + if err != nil { + return err + } + for _, prop := range inactiveProps { proposal, err := k.Proposals.Get(ctx, prop.Key.K2()) if err != nil { @@ -63,10 +67,6 @@ func (k Keeper) EndBlocker(ctx context.Context) error { return err } - params, err := k.Params.Get(ctx) - if err != nil { - return err - } if !params.BurnProposalDepositPrevote { err = k.RefundAndDeleteDeposits(ctx, proposal.Id) // refund deposit if proposal got removed without getting 100% of the proposal } else { @@ -195,10 +195,6 @@ func (k Keeper) EndBlocker(ctx context.Context) error { // Messages may mutate state thus we use a cached context. If one of // the handlers fails, no state mutation is written and the error // message is logged. - params, err := k.Params.Get(ctx) - if err != nil { - return err - } _, err = k.BranchService.ExecuteWithGasLimit(ctx, params.ProposalExecutionGas, func(ctx context.Context) error { // execute all messages for idx, msg = range messages { @@ -236,10 +232,6 @@ func (k Keeper) EndBlocker(ctx context.Context) error { // once the regular voting period expires again, the tally is repeated // according to the regular proposal rules. proposal.ProposalType = v1.ProposalType_PROPOSAL_TYPE_STANDARD - params, err := k.Params.Get(ctx) - if err != nil { - return err - } endTime := proposal.VotingStartTime.Add(*params.VotingPeriod) proposal.VotingEndTime = &endTime From d4997af3e89c576cf06c84e10ca31982a9222565 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Mon, 10 Jun 2024 10:04:12 +0200 Subject: [PATCH 17/20] add check --- x/gov/CHANGELOG.md | 1 + x/gov/proto/cosmos/gov/v1/gov.proto | 2 +- x/gov/types/v1/params.go | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/x/gov/CHANGELOG.md b/x/gov/CHANGELOG.md index eb792c01ed2b..e8c81fe3639e 100644 --- a/x/gov/CHANGELOG.md +++ b/x/gov/CHANGELOG.md @@ -55,6 +55,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#18762](https://github.com/cosmos/cosmos-sdk/pull/18762) Add multiple choice proposals. * [#18856](https://github.com/cosmos/cosmos-sdk/pull/18856) Add `ProposalCancelMaxPeriod` parameters. * [#19167](https://github.com/cosmos/cosmos-sdk/pull/19167) Add `YesQuorum` parameter. +* [#20348](https://github.com/cosmos/cosmos-sdk/pull/20348) Limit gov exectution of proposals to a max gas limit. The limit was added to parameters and can be modified ### Client Breaking Changes diff --git a/x/gov/proto/cosmos/gov/v1/gov.proto b/x/gov/proto/cosmos/gov/v1/gov.proto index 0f1446023685..d6cb26ce8d30 100644 --- a/x/gov/proto/cosmos/gov/v1/gov.proto +++ b/x/gov/proto/cosmos/gov/v1/gov.proto @@ -344,7 +344,7 @@ message Params { // considered valid for an expedited proposal. string expedited_quorum = 21 [(cosmos_proto.scalar) = "cosmos.Dec", (cosmos_proto.field_added_in) = "x/gov v1.0.0"]; - uint64 proposal_execution_gas = 22 [(cosmos_proto.field_added_in) = "x/gov v1.0.0"]; + uint64 proposal_execution_gas = 22 [(cosmos_proto.field_added_in) = "x/gov v0.2.0"]; } // MessageBasedParams defines the parameters of specific messages in a proposal. diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index aa16eb0681c3..0bddd772fb3f 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -270,6 +270,10 @@ func (p Params) ValidateBasic(addressCodec address.Codec) error { } } + if p.ProposalExecutionGas == 0 { + return fmt.Errorf("proposal execution gas must be positive: %d", p.ProposalExecutionGas) + } + return nil } From 27d2eb3e80e083c990f51523d0128ed1662c4138 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Tue, 11 Jun 2024 10:58:42 +0200 Subject: [PATCH 18/20] ++ --- x/gov/keeper/abci.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index 8560fa4e87d6..38cf3f2d06c5 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -199,12 +199,6 @@ func (k Keeper) EndBlocker(ctx context.Context) error { // execute all messages for idx, msg = range messages { if _, err := safeExecuteHandler(ctx, msg, k.MsgRouterService); err != nil { - // `idx` and `err` are populated with the msg index and error. - proposal.Status = v1.StatusFailed - proposal.FailedReason = err.Error() - tagValue = types.AttributeValueProposalFailed - logMsg = fmt.Sprintf("passed, but msg %d (%s) failed on execution: %s", idx, sdk.MsgTypeURL(msg), err) - return err } } @@ -223,6 +217,12 @@ func (k Keeper) EndBlocker(ctx context.Context) error { tagValue = types.AttributeValueProposalFailed logMsg = "passed proposal failed due to out of gas" } + // `idx` and `err` are populated with the msg index and error. + proposal.Status = v1.StatusFailed + proposal.FailedReason = err.Error() + tagValue = types.AttributeValueProposalFailed + logMsg = fmt.Sprintf("passed, but msg %d (%s) failed on execution: %s", idx, sdk.MsgTypeURL(msg), err) + break // We do not anything with the error. Returning an error halts the chain, and proposal struct is already updated. } case !burnDeposits && (proposal.ProposalType == v1.ProposalType_PROPOSAL_TYPE_EXPEDITED || From c04d07f1046cd7b2bdc1a9c136805a361bdbf500 Mon Sep 17 00:00:00 2001 From: Marko Date: Wed, 12 Jun 2024 11:26:52 +0200 Subject: [PATCH 19/20] Update x/gov/CHANGELOG.md Co-authored-by: Alexander Peters --- x/gov/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/gov/CHANGELOG.md b/x/gov/CHANGELOG.md index e8c81fe3639e..410bb0fa6038 100644 --- a/x/gov/CHANGELOG.md +++ b/x/gov/CHANGELOG.md @@ -55,7 +55,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#18762](https://github.com/cosmos/cosmos-sdk/pull/18762) Add multiple choice proposals. * [#18856](https://github.com/cosmos/cosmos-sdk/pull/18856) Add `ProposalCancelMaxPeriod` parameters. * [#19167](https://github.com/cosmos/cosmos-sdk/pull/19167) Add `YesQuorum` parameter. -* [#20348](https://github.com/cosmos/cosmos-sdk/pull/20348) Limit gov exectution of proposals to a max gas limit. The limit was added to parameters and can be modified +* [#20348](https://github.com/cosmos/cosmos-sdk/pull/20348) Limit gov execution of proposals to a max gas limit. The limit was added to parameters and can be modified. With this version the default is set to 10 million gas. Before it was infinite gas. ### Client Breaking Changes From 7f469d206a58f3b9abdbcc476d4884ec4c82ee29 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Wed, 12 Jun 2024 11:47:54 +0200 Subject: [PATCH 20/20] address comments --- x/gov/README.md | 2 +- x/gov/keeper/abci.go | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/x/gov/README.md b/x/gov/README.md index 6bde42c862f3..b8890b501aaa 100644 --- a/x/gov/README.md +++ b/x/gov/README.md @@ -24,7 +24,7 @@ they don't vote themselves. deposits if the proposal was accepted or rejected. If the proposal was vetoed, or never entered voting period (minimum deposit not reached within deposit period), the deposit is burned. This module is in use on the Cosmos Hub (a.k.a [gaia](https://github.com/cosmos/gaia)). -Features that may be added in the future are described in [Future Improvements](#future-improvements). + ## Contents diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index 38cf3f2d06c5..f45c3d4c0a66 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -16,7 +16,6 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // EndBlocker is called every block. @@ -210,13 +209,6 @@ func (k Keeper) EndBlocker(ctx context.Context) error { return nil }) if err != nil { - // update proposal if error is out of gas - if errors.Is(err, sdkerrors.ErrOutOfGas) { - proposal.Status = v1.StatusFailed - proposal.FailedReason = err.Error() - tagValue = types.AttributeValueProposalFailed - logMsg = "passed proposal failed due to out of gas" - } // `idx` and `err` are populated with the msg index and error. proposal.Status = v1.StatusFailed proposal.FailedReason = err.Error()