From 14c841c86ee5f2e48042afed34f1b6b82e95c042 Mon Sep 17 00:00:00 2001 From: Matt Kocubinski Date: Thu, 12 Dec 2024 09:33:23 -0600 Subject: [PATCH 1/2] feat(tools/benchmark): introduce benchmark module (#22778) --- .github/dependabot.yml | 9 + .github/pr_labeler.yml | 1 + .github/workflows/test.yml | 31 + .../benchmark/module/v1/module.pulsar.go | 1609 +++++++++++++++++ api/cosmos/benchmark/v1/benchmark.pulsar.go | 928 ++++++++++ api/cosmos/benchmark/v1/tx.pulsar.go | 1256 +++++++++++++ api/cosmos/benchmark/v1/tx_grpc.pb.go | 127 ++ go.work.example | 1 + runtime/module.go | 9 + scripts/build/build.mk | 5 + scripts/init-simapp-v2.sh | 1 + server/v2/cometbft/grpc.go | 2 +- simapp/app.go | 3 +- simapp/app_config.go | 4 +- simapp/app_test.go | 10 + simapp/benchmark.go | 39 + simapp/go.mod | 2 + simapp/simd/cmd/testnet.go | 3 +- simapp/v2/app.go | 3 +- simapp/v2/app_config.go | 6 +- simapp/v2/benchmark.go | 39 + simapp/v2/go.mod | 2 + tests/go.mod | 2 + tools/benchmark/CHANGELOG.md | 30 + tools/benchmark/README.md | 24 + tools/benchmark/benchmark.pb.go | 545 ++++++ tools/benchmark/client/cli/tx.go | 186 ++ tools/benchmark/generator/gen.go | 381 ++++ tools/benchmark/generator/gen_test.go | 138 ++ tools/benchmark/go.mod | 158 ++ tools/benchmark/go.sum | 622 +++++++ tools/benchmark/module/depinject.go | 69 + tools/benchmark/module/keeper.go | 119 ++ tools/benchmark/module/module.go | 107 ++ tools/benchmark/proto/buf.gen.gogo.yaml | 8 + tools/benchmark/proto/buf.gen.pulsar.yaml | 19 + tools/benchmark/proto/buf.lock | 38 + tools/benchmark/proto/buf.yaml | 19 + .../cosmos/benchmark/module/v1/module.proto | 43 + .../proto/cosmos/benchmark/v1/benchmark.proto | 17 + .../proto/cosmos/benchmark/v1/tx.proto | 33 + tools/benchmark/sonar-project.properties | 16 + tools/benchmark/tx.pb.go | 670 +++++++ 43 files changed, 7325 insertions(+), 9 deletions(-) create mode 100644 api/cosmos/benchmark/module/v1/module.pulsar.go create mode 100644 api/cosmos/benchmark/v1/benchmark.pulsar.go create mode 100644 api/cosmos/benchmark/v1/tx.pulsar.go create mode 100644 api/cosmos/benchmark/v1/tx_grpc.pb.go create mode 100644 simapp/benchmark.go create mode 100644 simapp/v2/benchmark.go create mode 100644 tools/benchmark/CHANGELOG.md create mode 100644 tools/benchmark/README.md create mode 100644 tools/benchmark/benchmark.pb.go create mode 100644 tools/benchmark/client/cli/tx.go create mode 100644 tools/benchmark/generator/gen.go create mode 100644 tools/benchmark/generator/gen_test.go create mode 100644 tools/benchmark/go.mod create mode 100644 tools/benchmark/go.sum create mode 100644 tools/benchmark/module/depinject.go create mode 100644 tools/benchmark/module/keeper.go create mode 100644 tools/benchmark/module/module.go create mode 100644 tools/benchmark/proto/buf.gen.gogo.yaml create mode 100644 tools/benchmark/proto/buf.gen.pulsar.yaml create mode 100644 tools/benchmark/proto/buf.lock create mode 100644 tools/benchmark/proto/buf.yaml create mode 100644 tools/benchmark/proto/cosmos/benchmark/module/v1/module.proto create mode 100644 tools/benchmark/proto/cosmos/benchmark/v1/benchmark.proto create mode 100644 tools/benchmark/proto/cosmos/benchmark/v1/tx.proto create mode 100644 tools/benchmark/sonar-project.properties create mode 100644 tools/benchmark/tx.pb.go diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f8033e258c15..cd97261d4e15 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -332,6 +332,15 @@ updates: labels: - "A:automerge" - dependencies + - package-ecosystem: gomod + directory: "/tools/benchmark" + schedule: + interval: weekly + day: wednesday + time: "03:25" + labels: + - "A:automerge" + - dependencies # Dependencies should be up to date on release branch - package-ecosystem: gomod diff --git a/.github/pr_labeler.yml b/.github/pr_labeler.yml index 8855dc2efff3..ae243fdddb2a 100644 --- a/.github/pr_labeler.yml +++ b/.github/pr_labeler.yml @@ -14,6 +14,7 @@ - x/simulation/**/* - x/*/simulation/**/* - simsx/**/* + - tools/benchmark/**/* "C:Store": - store/**/* "C:collections": diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 19f27d25d952..ba729ff56a25 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1536,3 +1536,34 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: projectBaseDir: x/consensus/ + + test-tools-benchmark: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.23.2" + check-latest: true + cache: true + cache-dependency-path: tools/benchmark/go.sum + - uses: technote-space/get-diff-action@v6.1.2 + id: git_diff + with: + PATTERNS: | + tools/benchmark/**/*.go + tools/benchmark/go.mod + tools/benchmark/go.sum + - name: tests + if: env.GIT_DIFF + run: | + cd tools/benchmark + go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic -tags='norace' ./... + - name: sonarcloud + if: ${{ env.GIT_DIFF && !github.event.pull_request.draft && env.SONAR_TOKEN != null }} + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + projectBaseDir: tools/benchmark/ diff --git a/api/cosmos/benchmark/module/v1/module.pulsar.go b/api/cosmos/benchmark/module/v1/module.pulsar.go new file mode 100644 index 000000000000..6026b5d30281 --- /dev/null +++ b/api/cosmos/benchmark/module/v1/module.pulsar.go @@ -0,0 +1,1609 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package modulev1 + +import ( + _ "cosmossdk.io/api/cosmos/app/v1alpha1" + binary "encoding/binary" + 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" + math "math" + reflect "reflect" + sync "sync" +) + +var ( + md_Module protoreflect.MessageDescriptor + fd_Module_genesis_params protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_benchmark_module_v1_module_proto_init() + md_Module = File_cosmos_benchmark_module_v1_module_proto.Messages().ByName("Module") + fd_Module_genesis_params = md_Module.Fields().ByName("genesis_params") +} + +var _ protoreflect.Message = (*fastReflection_Module)(nil) + +type fastReflection_Module Module + +func (x *Module) ProtoReflect() protoreflect.Message { + return (*fastReflection_Module)(x) +} + +func (x *Module) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_benchmark_module_v1_module_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_Module_messageType fastReflection_Module_messageType +var _ protoreflect.MessageType = fastReflection_Module_messageType{} + +type fastReflection_Module_messageType struct{} + +func (x fastReflection_Module_messageType) Zero() protoreflect.Message { + return (*fastReflection_Module)(nil) +} +func (x fastReflection_Module_messageType) New() protoreflect.Message { + return new(fastReflection_Module) +} +func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor { + return md_Module +} + +// 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_Module) Type() protoreflect.MessageType { + return _fastReflection_Module_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Module) New() protoreflect.Message { + return new(fastReflection_Module) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage { + return (*Module)(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_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.GenesisParams != nil { + value := protoreflect.ValueOfMessage(x.GenesisParams.ProtoReflect()) + if !f(fd_Module_genesis_params, 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_Module) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.benchmark.module.v1.Module.genesis_params": + return x.GenesisParams != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.Module 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_Module) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.benchmark.module.v1.Module.genesis_params": + x.GenesisParams = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.Module 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.benchmark.module.v1.Module.genesis_params": + value := x.GenesisParams + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.Module 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_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.benchmark.module.v1.Module.genesis_params": + x.GenesisParams = value.Message().Interface().(*GeneratorParams) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.Module 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_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.benchmark.module.v1.Module.genesis_params": + if x.GenesisParams == nil { + x.GenesisParams = new(GeneratorParams) + } + return protoreflect.ValueOfMessage(x.GenesisParams.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.Module 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.benchmark.module.v1.Module.genesis_params": + m := new(GeneratorParams) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.Module")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.Module 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_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.benchmark.module.v1.Module", 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_Module) 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_Module) 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_Module) 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_Module) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Module) + 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.GenesisParams != nil { + l = options.Size(x.GenesisParams) + 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().(*Module) + 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.GenesisParams != nil { + encoded, err := options.Marshal(x.GenesisParams) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Module) + 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: Module: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: 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 GenesisParams", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.GenesisParams == nil { + x.GenesisParams = &GeneratorParams{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GenesisParams); 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_GeneratorParams protoreflect.MessageDescriptor + fd_GeneratorParams_seed protoreflect.FieldDescriptor + fd_GeneratorParams_bucket_count protoreflect.FieldDescriptor + fd_GeneratorParams_key_mean protoreflect.FieldDescriptor + fd_GeneratorParams_key_std_dev protoreflect.FieldDescriptor + fd_GeneratorParams_value_mean protoreflect.FieldDescriptor + fd_GeneratorParams_value_std_dev protoreflect.FieldDescriptor + fd_GeneratorParams_genesis_count protoreflect.FieldDescriptor + fd_GeneratorParams_insert_weight protoreflect.FieldDescriptor + fd_GeneratorParams_update_weight protoreflect.FieldDescriptor + fd_GeneratorParams_get_weight protoreflect.FieldDescriptor + fd_GeneratorParams_delete_weight protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_benchmark_module_v1_module_proto_init() + md_GeneratorParams = File_cosmos_benchmark_module_v1_module_proto.Messages().ByName("GeneratorParams") + fd_GeneratorParams_seed = md_GeneratorParams.Fields().ByName("seed") + fd_GeneratorParams_bucket_count = md_GeneratorParams.Fields().ByName("bucket_count") + fd_GeneratorParams_key_mean = md_GeneratorParams.Fields().ByName("key_mean") + fd_GeneratorParams_key_std_dev = md_GeneratorParams.Fields().ByName("key_std_dev") + fd_GeneratorParams_value_mean = md_GeneratorParams.Fields().ByName("value_mean") + fd_GeneratorParams_value_std_dev = md_GeneratorParams.Fields().ByName("value_std_dev") + fd_GeneratorParams_genesis_count = md_GeneratorParams.Fields().ByName("genesis_count") + fd_GeneratorParams_insert_weight = md_GeneratorParams.Fields().ByName("insert_weight") + fd_GeneratorParams_update_weight = md_GeneratorParams.Fields().ByName("update_weight") + fd_GeneratorParams_get_weight = md_GeneratorParams.Fields().ByName("get_weight") + fd_GeneratorParams_delete_weight = md_GeneratorParams.Fields().ByName("delete_weight") +} + +var _ protoreflect.Message = (*fastReflection_GeneratorParams)(nil) + +type fastReflection_GeneratorParams GeneratorParams + +func (x *GeneratorParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_GeneratorParams)(x) +} + +func (x *GeneratorParams) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_benchmark_module_v1_module_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_GeneratorParams_messageType fastReflection_GeneratorParams_messageType +var _ protoreflect.MessageType = fastReflection_GeneratorParams_messageType{} + +type fastReflection_GeneratorParams_messageType struct{} + +func (x fastReflection_GeneratorParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_GeneratorParams)(nil) +} +func (x fastReflection_GeneratorParams_messageType) New() protoreflect.Message { + return new(fastReflection_GeneratorParams) +} +func (x fastReflection_GeneratorParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GeneratorParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GeneratorParams) Descriptor() protoreflect.MessageDescriptor { + return md_GeneratorParams +} + +// 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_GeneratorParams) Type() protoreflect.MessageType { + return _fastReflection_GeneratorParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GeneratorParams) New() protoreflect.Message { + return new(fastReflection_GeneratorParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GeneratorParams) Interface() protoreflect.ProtoMessage { + return (*GeneratorParams)(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_GeneratorParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Seed != uint64(0) { + value := protoreflect.ValueOfUint64(x.Seed) + if !f(fd_GeneratorParams_seed, value) { + return + } + } + if x.BucketCount != uint64(0) { + value := protoreflect.ValueOfUint64(x.BucketCount) + if !f(fd_GeneratorParams_bucket_count, value) { + return + } + } + if x.KeyMean != uint64(0) { + value := protoreflect.ValueOfUint64(x.KeyMean) + if !f(fd_GeneratorParams_key_mean, value) { + return + } + } + if x.KeyStdDev != uint64(0) { + value := protoreflect.ValueOfUint64(x.KeyStdDev) + if !f(fd_GeneratorParams_key_std_dev, value) { + return + } + } + if x.ValueMean != uint64(0) { + value := protoreflect.ValueOfUint64(x.ValueMean) + if !f(fd_GeneratorParams_value_mean, value) { + return + } + } + if x.ValueStdDev != uint64(0) { + value := protoreflect.ValueOfUint64(x.ValueStdDev) + if !f(fd_GeneratorParams_value_std_dev, value) { + return + } + } + if x.GenesisCount != uint64(0) { + value := protoreflect.ValueOfUint64(x.GenesisCount) + if !f(fd_GeneratorParams_genesis_count, value) { + return + } + } + if x.InsertWeight != float32(0) || math.Signbit(float64(x.InsertWeight)) { + value := protoreflect.ValueOfFloat32(x.InsertWeight) + if !f(fd_GeneratorParams_insert_weight, value) { + return + } + } + if x.UpdateWeight != float32(0) || math.Signbit(float64(x.UpdateWeight)) { + value := protoreflect.ValueOfFloat32(x.UpdateWeight) + if !f(fd_GeneratorParams_update_weight, value) { + return + } + } + if x.GetWeight != float32(0) || math.Signbit(float64(x.GetWeight)) { + value := protoreflect.ValueOfFloat32(x.GetWeight) + if !f(fd_GeneratorParams_get_weight, value) { + return + } + } + if x.DeleteWeight != float32(0) || math.Signbit(float64(x.DeleteWeight)) { + value := protoreflect.ValueOfFloat32(x.DeleteWeight) + if !f(fd_GeneratorParams_delete_weight, 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_GeneratorParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.benchmark.module.v1.GeneratorParams.seed": + return x.Seed != uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.bucket_count": + return x.BucketCount != uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.key_mean": + return x.KeyMean != uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.key_std_dev": + return x.KeyStdDev != uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.value_mean": + return x.ValueMean != uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.value_std_dev": + return x.ValueStdDev != uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.genesis_count": + return x.GenesisCount != uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.insert_weight": + return x.InsertWeight != float32(0) || math.Signbit(float64(x.InsertWeight)) + case "cosmos.benchmark.module.v1.GeneratorParams.update_weight": + return x.UpdateWeight != float32(0) || math.Signbit(float64(x.UpdateWeight)) + case "cosmos.benchmark.module.v1.GeneratorParams.get_weight": + return x.GetWeight != float32(0) || math.Signbit(float64(x.GetWeight)) + case "cosmos.benchmark.module.v1.GeneratorParams.delete_weight": + return x.DeleteWeight != float32(0) || math.Signbit(float64(x.DeleteWeight)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.GeneratorParams")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.GeneratorParams 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_GeneratorParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.benchmark.module.v1.GeneratorParams.seed": + x.Seed = uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.bucket_count": + x.BucketCount = uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.key_mean": + x.KeyMean = uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.key_std_dev": + x.KeyStdDev = uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.value_mean": + x.ValueMean = uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.value_std_dev": + x.ValueStdDev = uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.genesis_count": + x.GenesisCount = uint64(0) + case "cosmos.benchmark.module.v1.GeneratorParams.insert_weight": + x.InsertWeight = float32(0) + case "cosmos.benchmark.module.v1.GeneratorParams.update_weight": + x.UpdateWeight = float32(0) + case "cosmos.benchmark.module.v1.GeneratorParams.get_weight": + x.GetWeight = float32(0) + case "cosmos.benchmark.module.v1.GeneratorParams.delete_weight": + x.DeleteWeight = float32(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.GeneratorParams")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.GeneratorParams 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_GeneratorParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.benchmark.module.v1.GeneratorParams.seed": + value := x.Seed + return protoreflect.ValueOfUint64(value) + case "cosmos.benchmark.module.v1.GeneratorParams.bucket_count": + value := x.BucketCount + return protoreflect.ValueOfUint64(value) + case "cosmos.benchmark.module.v1.GeneratorParams.key_mean": + value := x.KeyMean + return protoreflect.ValueOfUint64(value) + case "cosmos.benchmark.module.v1.GeneratorParams.key_std_dev": + value := x.KeyStdDev + return protoreflect.ValueOfUint64(value) + case "cosmos.benchmark.module.v1.GeneratorParams.value_mean": + value := x.ValueMean + return protoreflect.ValueOfUint64(value) + case "cosmos.benchmark.module.v1.GeneratorParams.value_std_dev": + value := x.ValueStdDev + return protoreflect.ValueOfUint64(value) + case "cosmos.benchmark.module.v1.GeneratorParams.genesis_count": + value := x.GenesisCount + return protoreflect.ValueOfUint64(value) + case "cosmos.benchmark.module.v1.GeneratorParams.insert_weight": + value := x.InsertWeight + return protoreflect.ValueOfFloat32(value) + case "cosmos.benchmark.module.v1.GeneratorParams.update_weight": + value := x.UpdateWeight + return protoreflect.ValueOfFloat32(value) + case "cosmos.benchmark.module.v1.GeneratorParams.get_weight": + value := x.GetWeight + return protoreflect.ValueOfFloat32(value) + case "cosmos.benchmark.module.v1.GeneratorParams.delete_weight": + value := x.DeleteWeight + return protoreflect.ValueOfFloat32(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.GeneratorParams")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.GeneratorParams 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_GeneratorParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.benchmark.module.v1.GeneratorParams.seed": + x.Seed = value.Uint() + case "cosmos.benchmark.module.v1.GeneratorParams.bucket_count": + x.BucketCount = value.Uint() + case "cosmos.benchmark.module.v1.GeneratorParams.key_mean": + x.KeyMean = value.Uint() + case "cosmos.benchmark.module.v1.GeneratorParams.key_std_dev": + x.KeyStdDev = value.Uint() + case "cosmos.benchmark.module.v1.GeneratorParams.value_mean": + x.ValueMean = value.Uint() + case "cosmos.benchmark.module.v1.GeneratorParams.value_std_dev": + x.ValueStdDev = value.Uint() + case "cosmos.benchmark.module.v1.GeneratorParams.genesis_count": + x.GenesisCount = value.Uint() + case "cosmos.benchmark.module.v1.GeneratorParams.insert_weight": + x.InsertWeight = float32(value.Float()) + case "cosmos.benchmark.module.v1.GeneratorParams.update_weight": + x.UpdateWeight = float32(value.Float()) + case "cosmos.benchmark.module.v1.GeneratorParams.get_weight": + x.GetWeight = float32(value.Float()) + case "cosmos.benchmark.module.v1.GeneratorParams.delete_weight": + x.DeleteWeight = float32(value.Float()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.GeneratorParams")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.GeneratorParams 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_GeneratorParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.benchmark.module.v1.GeneratorParams.seed": + panic(fmt.Errorf("field seed of message cosmos.benchmark.module.v1.GeneratorParams is not mutable")) + case "cosmos.benchmark.module.v1.GeneratorParams.bucket_count": + panic(fmt.Errorf("field bucket_count of message cosmos.benchmark.module.v1.GeneratorParams is not mutable")) + case "cosmos.benchmark.module.v1.GeneratorParams.key_mean": + panic(fmt.Errorf("field key_mean of message cosmos.benchmark.module.v1.GeneratorParams is not mutable")) + case "cosmos.benchmark.module.v1.GeneratorParams.key_std_dev": + panic(fmt.Errorf("field key_std_dev of message cosmos.benchmark.module.v1.GeneratorParams is not mutable")) + case "cosmos.benchmark.module.v1.GeneratorParams.value_mean": + panic(fmt.Errorf("field value_mean of message cosmos.benchmark.module.v1.GeneratorParams is not mutable")) + case "cosmos.benchmark.module.v1.GeneratorParams.value_std_dev": + panic(fmt.Errorf("field value_std_dev of message cosmos.benchmark.module.v1.GeneratorParams is not mutable")) + case "cosmos.benchmark.module.v1.GeneratorParams.genesis_count": + panic(fmt.Errorf("field genesis_count of message cosmos.benchmark.module.v1.GeneratorParams is not mutable")) + case "cosmos.benchmark.module.v1.GeneratorParams.insert_weight": + panic(fmt.Errorf("field insert_weight of message cosmos.benchmark.module.v1.GeneratorParams is not mutable")) + case "cosmos.benchmark.module.v1.GeneratorParams.update_weight": + panic(fmt.Errorf("field update_weight of message cosmos.benchmark.module.v1.GeneratorParams is not mutable")) + case "cosmos.benchmark.module.v1.GeneratorParams.get_weight": + panic(fmt.Errorf("field get_weight of message cosmos.benchmark.module.v1.GeneratorParams is not mutable")) + case "cosmos.benchmark.module.v1.GeneratorParams.delete_weight": + panic(fmt.Errorf("field delete_weight of message cosmos.benchmark.module.v1.GeneratorParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.GeneratorParams")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.GeneratorParams 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_GeneratorParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.benchmark.module.v1.GeneratorParams.seed": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.benchmark.module.v1.GeneratorParams.bucket_count": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.benchmark.module.v1.GeneratorParams.key_mean": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.benchmark.module.v1.GeneratorParams.key_std_dev": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.benchmark.module.v1.GeneratorParams.value_mean": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.benchmark.module.v1.GeneratorParams.value_std_dev": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.benchmark.module.v1.GeneratorParams.genesis_count": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.benchmark.module.v1.GeneratorParams.insert_weight": + return protoreflect.ValueOfFloat32(float32(0)) + case "cosmos.benchmark.module.v1.GeneratorParams.update_weight": + return protoreflect.ValueOfFloat32(float32(0)) + case "cosmos.benchmark.module.v1.GeneratorParams.get_weight": + return protoreflect.ValueOfFloat32(float32(0)) + case "cosmos.benchmark.module.v1.GeneratorParams.delete_weight": + return protoreflect.ValueOfFloat32(float32(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.module.v1.GeneratorParams")) + } + panic(fmt.Errorf("message cosmos.benchmark.module.v1.GeneratorParams 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_GeneratorParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.benchmark.module.v1.GeneratorParams", 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_GeneratorParams) 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_GeneratorParams) 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_GeneratorParams) 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_GeneratorParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GeneratorParams) + 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.Seed != 0 { + n += 1 + runtime.Sov(uint64(x.Seed)) + } + if x.BucketCount != 0 { + n += 1 + runtime.Sov(uint64(x.BucketCount)) + } + if x.KeyMean != 0 { + n += 1 + runtime.Sov(uint64(x.KeyMean)) + } + if x.KeyStdDev != 0 { + n += 1 + runtime.Sov(uint64(x.KeyStdDev)) + } + if x.ValueMean != 0 { + n += 1 + runtime.Sov(uint64(x.ValueMean)) + } + if x.ValueStdDev != 0 { + n += 1 + runtime.Sov(uint64(x.ValueStdDev)) + } + if x.GenesisCount != 0 { + n += 1 + runtime.Sov(uint64(x.GenesisCount)) + } + if x.InsertWeight != 0 || math.Signbit(float64(x.InsertWeight)) { + n += 5 + } + if x.UpdateWeight != 0 || math.Signbit(float64(x.UpdateWeight)) { + n += 5 + } + if x.GetWeight != 0 || math.Signbit(float64(x.GetWeight)) { + n += 5 + } + if x.DeleteWeight != 0 || math.Signbit(float64(x.DeleteWeight)) { + n += 5 + } + 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().(*GeneratorParams) + 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.GetWeight != 0 || math.Signbit(float64(x.GetWeight)) { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(x.GetWeight)))) + i-- + dAtA[i] = 0x65 + } + if x.DeleteWeight != 0 || math.Signbit(float64(x.DeleteWeight)) { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(x.DeleteWeight)))) + i-- + dAtA[i] = 0x5d + } + if x.UpdateWeight != 0 || math.Signbit(float64(x.UpdateWeight)) { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(x.UpdateWeight)))) + i-- + dAtA[i] = 0x55 + } + if x.InsertWeight != 0 || math.Signbit(float64(x.InsertWeight)) { + i -= 4 + binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(x.InsertWeight)))) + i-- + dAtA[i] = 0x4d + } + if x.GenesisCount != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.GenesisCount)) + i-- + dAtA[i] = 0x40 + } + if x.ValueStdDev != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ValueStdDev)) + i-- + dAtA[i] = 0x38 + } + if x.ValueMean != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ValueMean)) + i-- + dAtA[i] = 0x30 + } + if x.KeyStdDev != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.KeyStdDev)) + i-- + dAtA[i] = 0x20 + } + if x.KeyMean != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.KeyMean)) + i-- + dAtA[i] = 0x18 + } + if x.BucketCount != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BucketCount)) + i-- + dAtA[i] = 0x10 + } + if x.Seed != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Seed)) + 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().(*GeneratorParams) + 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: GeneratorParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GeneratorParams: 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 Seed", wireType) + } + x.Seed = 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.Seed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BucketCount", wireType) + } + x.BucketCount = 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.BucketCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyMean", wireType) + } + x.KeyMean = 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.KeyMean |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyStdDev", wireType) + } + x.KeyStdDev = 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.KeyStdDev |= uint64(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 ValueMean", wireType) + } + x.ValueMean = 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.ValueMean |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValueStdDev", wireType) + } + x.ValueStdDev = 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.ValueStdDev |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GenesisCount", wireType) + } + x.GenesisCount = 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.GenesisCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 5 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InsertWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + x.InsertWeight = float32(math.Float32frombits(v)) + case 10: + if wireType != 5 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UpdateWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + x.UpdateWeight = float32(math.Float32frombits(v)) + case 12: + if wireType != 5 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GetWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + x.GetWeight = float32(math.Float32frombits(v)) + case 11: + if wireType != 5 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DeleteWeight", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + v = uint32(binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + x.DeleteWeight = float32(math.Float32frombits(v)) + 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/benchmark/module/v1/module.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) +) + +// Module is the config object of the benchmark module. +type Module struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + GenesisParams *GeneratorParams `protobuf:"bytes,1,opt,name=genesis_params,json=genesisParams,proto3" json:"genesis_params,omitempty"` +} + +func (x *Module) Reset() { + *x = Module{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_benchmark_module_v1_module_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Module) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Module) ProtoMessage() {} + +// Deprecated: Use Module.ProtoReflect.Descriptor instead. +func (*Module) Descriptor() ([]byte, []int) { + return file_cosmos_benchmark_module_v1_module_proto_rawDescGZIP(), []int{0} +} + +func (x *Module) GetGenesisParams() *GeneratorParams { + if x != nil { + return x.GenesisParams + } + return nil +} + +// GenesisParams defines the genesis parameters for the benchmark module. +type GeneratorParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Seed uint64 `protobuf:"varint,1,opt,name=seed,proto3" json:"seed,omitempty"` + BucketCount uint64 `protobuf:"varint,2,opt,name=bucket_count,json=bucketCount,proto3" json:"bucket_count,omitempty"` + KeyMean uint64 `protobuf:"varint,3,opt,name=key_mean,json=keyMean,proto3" json:"key_mean,omitempty"` + KeyStdDev uint64 `protobuf:"varint,4,opt,name=key_std_dev,json=keyStdDev,proto3" json:"key_std_dev,omitempty"` + ValueMean uint64 `protobuf:"varint,6,opt,name=value_mean,json=valueMean,proto3" json:"value_mean,omitempty"` + ValueStdDev uint64 `protobuf:"varint,7,opt,name=value_std_dev,json=valueStdDev,proto3" json:"value_std_dev,omitempty"` + GenesisCount uint64 `protobuf:"varint,8,opt,name=genesis_count,json=genesisCount,proto3" json:"genesis_count,omitempty"` + InsertWeight float32 `protobuf:"fixed32,9,opt,name=insert_weight,json=insertWeight,proto3" json:"insert_weight,omitempty"` + UpdateWeight float32 `protobuf:"fixed32,10,opt,name=update_weight,json=updateWeight,proto3" json:"update_weight,omitempty"` + GetWeight float32 `protobuf:"fixed32,12,opt,name=get_weight,json=getWeight,proto3" json:"get_weight,omitempty"` + DeleteWeight float32 `protobuf:"fixed32,11,opt,name=delete_weight,json=deleteWeight,proto3" json:"delete_weight,omitempty"` +} + +func (x *GeneratorParams) Reset() { + *x = GeneratorParams{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_benchmark_module_v1_module_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GeneratorParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeneratorParams) ProtoMessage() {} + +// Deprecated: Use GeneratorParams.ProtoReflect.Descriptor instead. +func (*GeneratorParams) Descriptor() ([]byte, []int) { + return file_cosmos_benchmark_module_v1_module_proto_rawDescGZIP(), []int{1} +} + +func (x *GeneratorParams) GetSeed() uint64 { + if x != nil { + return x.Seed + } + return 0 +} + +func (x *GeneratorParams) GetBucketCount() uint64 { + if x != nil { + return x.BucketCount + } + return 0 +} + +func (x *GeneratorParams) GetKeyMean() uint64 { + if x != nil { + return x.KeyMean + } + return 0 +} + +func (x *GeneratorParams) GetKeyStdDev() uint64 { + if x != nil { + return x.KeyStdDev + } + return 0 +} + +func (x *GeneratorParams) GetValueMean() uint64 { + if x != nil { + return x.ValueMean + } + return 0 +} + +func (x *GeneratorParams) GetValueStdDev() uint64 { + if x != nil { + return x.ValueStdDev + } + return 0 +} + +func (x *GeneratorParams) GetGenesisCount() uint64 { + if x != nil { + return x.GenesisCount + } + return 0 +} + +func (x *GeneratorParams) GetInsertWeight() float32 { + if x != nil { + return x.InsertWeight + } + return 0 +} + +func (x *GeneratorParams) GetUpdateWeight() float32 { + if x != nil { + return x.UpdateWeight + } + return 0 +} + +func (x *GeneratorParams) GetGetWeight() float32 { + if x != nil { + return x.GetWeight + } + return 0 +} + +func (x *GeneratorParams) GetDeleteWeight() float32 { + if x != nil { + return x.DeleteWeight + } + return 0 +} + +var File_cosmos_benchmark_module_v1_module_proto protoreflect.FileDescriptor + +var file_cosmos_benchmark_module_v1_module_proto_rawDesc = []byte{ + 0x0a, 0x27, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, + 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x82, 0x01, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x12, 0x52, 0x0a, 0x0e, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x24, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x1e, 0x0a, 0x1c, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x74, 0x6f, 0x6f, + 0x6c, 0x73, 0x2f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x22, 0xf9, 0x02, 0x0a, + 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, + 0x73, 0x65, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x75, 0x63, 0x6b, + 0x65, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6d, + 0x65, 0x61, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4d, 0x65, + 0x61, 0x6e, 0x12, 0x1e, 0x0a, 0x0b, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x74, 0x64, 0x5f, 0x64, 0x65, + 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x53, 0x74, 0x64, 0x44, + 0x65, 0x76, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x65, 0x61, 0x6e, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x65, 0x61, + 0x6e, 0x12, 0x22, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x74, 0x64, 0x5f, 0x64, + 0x65, 0x76, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x53, + 0x74, 0x64, 0x44, 0x65, 0x76, 0x12, 0x23, 0x0a, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x67, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, + 0x73, 0x65, 0x72, 0x74, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x02, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, + 0x23, 0x0a, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x65, 0x74, 0x5f, 0x77, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x67, 0x65, 0x74, 0x57, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x5f, 0x77, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c, 0x64, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x42, 0xee, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, + 0x6b, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2f, 0x6d, 0x6f, + 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x43, 0x42, 0x4d, 0xaa, 0x02, 0x1a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1a, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x65, 0x6e, + 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x26, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, + 0x61, 0x72, 0x6b, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1d, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x3a, 0x3a, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x3a, 0x3a, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_cosmos_benchmark_module_v1_module_proto_rawDescOnce sync.Once + file_cosmos_benchmark_module_v1_module_proto_rawDescData = file_cosmos_benchmark_module_v1_module_proto_rawDesc +) + +func file_cosmos_benchmark_module_v1_module_proto_rawDescGZIP() []byte { + file_cosmos_benchmark_module_v1_module_proto_rawDescOnce.Do(func() { + file_cosmos_benchmark_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_benchmark_module_v1_module_proto_rawDescData) + }) + return file_cosmos_benchmark_module_v1_module_proto_rawDescData +} + +var file_cosmos_benchmark_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cosmos_benchmark_module_v1_module_proto_goTypes = []interface{}{ + (*Module)(nil), // 0: cosmos.benchmark.module.v1.Module + (*GeneratorParams)(nil), // 1: cosmos.benchmark.module.v1.GeneratorParams +} +var file_cosmos_benchmark_module_v1_module_proto_depIdxs = []int32{ + 1, // 0: cosmos.benchmark.module.v1.Module.genesis_params:type_name -> cosmos.benchmark.module.v1.GeneratorParams + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_cosmos_benchmark_module_v1_module_proto_init() } +func file_cosmos_benchmark_module_v1_module_proto_init() { + if File_cosmos_benchmark_module_v1_module_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_benchmark_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Module); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_benchmark_module_v1_module_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GeneratorParams); 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_benchmark_module_v1_module_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_benchmark_module_v1_module_proto_goTypes, + DependencyIndexes: file_cosmos_benchmark_module_v1_module_proto_depIdxs, + MessageInfos: file_cosmos_benchmark_module_v1_module_proto_msgTypes, + }.Build() + File_cosmos_benchmark_module_v1_module_proto = out.File + file_cosmos_benchmark_module_v1_module_proto_rawDesc = nil + file_cosmos_benchmark_module_v1_module_proto_goTypes = nil + file_cosmos_benchmark_module_v1_module_proto_depIdxs = nil +} diff --git a/api/cosmos/benchmark/v1/benchmark.pulsar.go b/api/cosmos/benchmark/v1/benchmark.pulsar.go new file mode 100644 index 000000000000..f834bf313216 --- /dev/null +++ b/api/cosmos/benchmark/v1/benchmark.pulsar.go @@ -0,0 +1,928 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package benchmarkv1 + +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 ( + md_Op protoreflect.MessageDescriptor + fd_Op_seed protoreflect.FieldDescriptor + fd_Op_actor protoreflect.FieldDescriptor + fd_Op_key_length protoreflect.FieldDescriptor + fd_Op_value_length protoreflect.FieldDescriptor + fd_Op_iterations protoreflect.FieldDescriptor + fd_Op_delete protoreflect.FieldDescriptor + fd_Op_exists protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_benchmark_v1_benchmark_proto_init() + md_Op = File_cosmos_benchmark_v1_benchmark_proto.Messages().ByName("Op") + fd_Op_seed = md_Op.Fields().ByName("seed") + fd_Op_actor = md_Op.Fields().ByName("actor") + fd_Op_key_length = md_Op.Fields().ByName("key_length") + fd_Op_value_length = md_Op.Fields().ByName("value_length") + fd_Op_iterations = md_Op.Fields().ByName("iterations") + fd_Op_delete = md_Op.Fields().ByName("delete") + fd_Op_exists = md_Op.Fields().ByName("exists") +} + +var _ protoreflect.Message = (*fastReflection_Op)(nil) + +type fastReflection_Op Op + +func (x *Op) ProtoReflect() protoreflect.Message { + return (*fastReflection_Op)(x) +} + +func (x *Op) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_benchmark_v1_benchmark_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_Op_messageType fastReflection_Op_messageType +var _ protoreflect.MessageType = fastReflection_Op_messageType{} + +type fastReflection_Op_messageType struct{} + +func (x fastReflection_Op_messageType) Zero() protoreflect.Message { + return (*fastReflection_Op)(nil) +} +func (x fastReflection_Op_messageType) New() protoreflect.Message { + return new(fastReflection_Op) +} +func (x fastReflection_Op_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Op +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Op) Descriptor() protoreflect.MessageDescriptor { + return md_Op +} + +// 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_Op) Type() protoreflect.MessageType { + return _fastReflection_Op_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Op) New() protoreflect.Message { + return new(fastReflection_Op) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Op) Interface() protoreflect.ProtoMessage { + return (*Op)(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_Op) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Seed != uint64(0) { + value := protoreflect.ValueOfUint64(x.Seed) + if !f(fd_Op_seed, value) { + return + } + } + if x.Actor != "" { + value := protoreflect.ValueOfString(x.Actor) + if !f(fd_Op_actor, value) { + return + } + } + if x.KeyLength != uint64(0) { + value := protoreflect.ValueOfUint64(x.KeyLength) + if !f(fd_Op_key_length, value) { + return + } + } + if x.ValueLength != uint64(0) { + value := protoreflect.ValueOfUint64(x.ValueLength) + if !f(fd_Op_value_length, value) { + return + } + } + if x.Iterations != uint32(0) { + value := protoreflect.ValueOfUint32(x.Iterations) + if !f(fd_Op_iterations, value) { + return + } + } + if x.Delete != false { + value := protoreflect.ValueOfBool(x.Delete) + if !f(fd_Op_delete, value) { + return + } + } + if x.Exists != false { + value := protoreflect.ValueOfBool(x.Exists) + if !f(fd_Op_exists, 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_Op) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.benchmark.v1.Op.seed": + return x.Seed != uint64(0) + case "cosmos.benchmark.v1.Op.actor": + return x.Actor != "" + case "cosmos.benchmark.v1.Op.key_length": + return x.KeyLength != uint64(0) + case "cosmos.benchmark.v1.Op.value_length": + return x.ValueLength != uint64(0) + case "cosmos.benchmark.v1.Op.iterations": + return x.Iterations != uint32(0) + case "cosmos.benchmark.v1.Op.delete": + return x.Delete != false + case "cosmos.benchmark.v1.Op.exists": + return x.Exists != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.Op")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.Op 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_Op) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.benchmark.v1.Op.seed": + x.Seed = uint64(0) + case "cosmos.benchmark.v1.Op.actor": + x.Actor = "" + case "cosmos.benchmark.v1.Op.key_length": + x.KeyLength = uint64(0) + case "cosmos.benchmark.v1.Op.value_length": + x.ValueLength = uint64(0) + case "cosmos.benchmark.v1.Op.iterations": + x.Iterations = uint32(0) + case "cosmos.benchmark.v1.Op.delete": + x.Delete = false + case "cosmos.benchmark.v1.Op.exists": + x.Exists = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.Op")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.Op 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_Op) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.benchmark.v1.Op.seed": + value := x.Seed + return protoreflect.ValueOfUint64(value) + case "cosmos.benchmark.v1.Op.actor": + value := x.Actor + return protoreflect.ValueOfString(value) + case "cosmos.benchmark.v1.Op.key_length": + value := x.KeyLength + return protoreflect.ValueOfUint64(value) + case "cosmos.benchmark.v1.Op.value_length": + value := x.ValueLength + return protoreflect.ValueOfUint64(value) + case "cosmos.benchmark.v1.Op.iterations": + value := x.Iterations + return protoreflect.ValueOfUint32(value) + case "cosmos.benchmark.v1.Op.delete": + value := x.Delete + return protoreflect.ValueOfBool(value) + case "cosmos.benchmark.v1.Op.exists": + value := x.Exists + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.Op")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.Op 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_Op) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.benchmark.v1.Op.seed": + x.Seed = value.Uint() + case "cosmos.benchmark.v1.Op.actor": + x.Actor = value.Interface().(string) + case "cosmos.benchmark.v1.Op.key_length": + x.KeyLength = value.Uint() + case "cosmos.benchmark.v1.Op.value_length": + x.ValueLength = value.Uint() + case "cosmos.benchmark.v1.Op.iterations": + x.Iterations = uint32(value.Uint()) + case "cosmos.benchmark.v1.Op.delete": + x.Delete = value.Bool() + case "cosmos.benchmark.v1.Op.exists": + x.Exists = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.Op")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.Op 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_Op) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.benchmark.v1.Op.seed": + panic(fmt.Errorf("field seed of message cosmos.benchmark.v1.Op is not mutable")) + case "cosmos.benchmark.v1.Op.actor": + panic(fmt.Errorf("field actor of message cosmos.benchmark.v1.Op is not mutable")) + case "cosmos.benchmark.v1.Op.key_length": + panic(fmt.Errorf("field key_length of message cosmos.benchmark.v1.Op is not mutable")) + case "cosmos.benchmark.v1.Op.value_length": + panic(fmt.Errorf("field value_length of message cosmos.benchmark.v1.Op is not mutable")) + case "cosmos.benchmark.v1.Op.iterations": + panic(fmt.Errorf("field iterations of message cosmos.benchmark.v1.Op is not mutable")) + case "cosmos.benchmark.v1.Op.delete": + panic(fmt.Errorf("field delete of message cosmos.benchmark.v1.Op is not mutable")) + case "cosmos.benchmark.v1.Op.exists": + panic(fmt.Errorf("field exists of message cosmos.benchmark.v1.Op is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.Op")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.Op 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_Op) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.benchmark.v1.Op.seed": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.benchmark.v1.Op.actor": + return protoreflect.ValueOfString("") + case "cosmos.benchmark.v1.Op.key_length": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.benchmark.v1.Op.value_length": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.benchmark.v1.Op.iterations": + return protoreflect.ValueOfUint32(uint32(0)) + case "cosmos.benchmark.v1.Op.delete": + return protoreflect.ValueOfBool(false) + case "cosmos.benchmark.v1.Op.exists": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.Op")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.Op 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_Op) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.benchmark.v1.Op", 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_Op) 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_Op) 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_Op) 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_Op) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Op) + 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.Seed != 0 { + n += 1 + runtime.Sov(uint64(x.Seed)) + } + l = len(x.Actor) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.KeyLength != 0 { + n += 1 + runtime.Sov(uint64(x.KeyLength)) + } + if x.ValueLength != 0 { + n += 1 + runtime.Sov(uint64(x.ValueLength)) + } + if x.Iterations != 0 { + n += 1 + runtime.Sov(uint64(x.Iterations)) + } + if x.Delete { + n += 2 + } + if x.Exists { + 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().(*Op) + 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.Exists { + i-- + if x.Exists { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if x.Delete { + i-- + if x.Delete { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if x.Iterations != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Iterations)) + i-- + dAtA[i] = 0x28 + } + if x.ValueLength != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ValueLength)) + i-- + dAtA[i] = 0x20 + } + if x.KeyLength != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.KeyLength)) + i-- + dAtA[i] = 0x18 + } + if len(x.Actor) > 0 { + i -= len(x.Actor) + copy(dAtA[i:], x.Actor) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Actor))) + i-- + dAtA[i] = 0x12 + } + if x.Seed != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Seed)) + 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().(*Op) + 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: Op: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Op: 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 Seed", wireType) + } + x.Seed = 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.Seed |= uint64(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 Actor", 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.Actor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyLength", wireType) + } + x.KeyLength = 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.KeyLength |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValueLength", wireType) + } + x.ValueLength = 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.ValueLength |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Iterations", wireType) + } + x.Iterations = 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.Iterations |= uint32(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 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) + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exists", 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.Exists = 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, + } +} + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: cosmos/benchmark/v1/benchmark.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) +) + +// Op is a message describing a benchmark operation. +type Op struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Seed uint64 `protobuf:"varint,1,opt,name=seed,proto3" json:"seed,omitempty"` + Actor string `protobuf:"bytes,2,opt,name=actor,proto3" json:"actor,omitempty"` + KeyLength uint64 `protobuf:"varint,3,opt,name=key_length,json=keyLength,proto3" json:"key_length,omitempty"` + ValueLength uint64 `protobuf:"varint,4,opt,name=value_length,json=valueLength,proto3" json:"value_length,omitempty"` + Iterations uint32 `protobuf:"varint,5,opt,name=iterations,proto3" json:"iterations,omitempty"` + Delete bool `protobuf:"varint,6,opt,name=delete,proto3" json:"delete,omitempty"` + Exists bool `protobuf:"varint,7,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (x *Op) Reset() { + *x = Op{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_benchmark_v1_benchmark_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Op) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Op) ProtoMessage() {} + +// Deprecated: Use Op.ProtoReflect.Descriptor instead. +func (*Op) Descriptor() ([]byte, []int) { + return file_cosmos_benchmark_v1_benchmark_proto_rawDescGZIP(), []int{0} +} + +func (x *Op) GetSeed() uint64 { + if x != nil { + return x.Seed + } + return 0 +} + +func (x *Op) GetActor() string { + if x != nil { + return x.Actor + } + return "" +} + +func (x *Op) GetKeyLength() uint64 { + if x != nil { + return x.KeyLength + } + return 0 +} + +func (x *Op) GetValueLength() uint64 { + if x != nil { + return x.ValueLength + } + return 0 +} + +func (x *Op) GetIterations() uint32 { + if x != nil { + return x.Iterations + } + return 0 +} + +func (x *Op) GetDelete() bool { + if x != nil { + return x.Delete + } + return false +} + +func (x *Op) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + +var File_cosmos_benchmark_v1_benchmark_proto protoreflect.FileDescriptor + +var file_cosmos_benchmark_v1_benchmark_proto_rawDesc = []byte{ + 0x0a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x65, + 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x22, 0xc0, 0x01, 0x0a, 0x02, 0x4f, + 0x70, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x65, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x04, 0x73, 0x65, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6b, + 0x65, 0x79, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x09, 0x6b, 0x65, 0x79, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x12, 0x1e, 0x0a, + 0x0a, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0a, 0x69, 0x74, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x42, 0xc9, 0x01, + 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x65, 0x6e, + 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x42, 0x65, 0x6e, 0x63, 0x68, + 0x6d, 0x61, 0x72, 0x6b, 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, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2f, 0x76, + 0x31, 0x3b, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x43, 0x42, 0x58, 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x65, 0x6e, + 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x5c, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x1f, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 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, 0x42, 0x65, 0x6e, 0x63, + 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_cosmos_benchmark_v1_benchmark_proto_rawDescOnce sync.Once + file_cosmos_benchmark_v1_benchmark_proto_rawDescData = file_cosmos_benchmark_v1_benchmark_proto_rawDesc +) + +func file_cosmos_benchmark_v1_benchmark_proto_rawDescGZIP() []byte { + file_cosmos_benchmark_v1_benchmark_proto_rawDescOnce.Do(func() { + file_cosmos_benchmark_v1_benchmark_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_benchmark_v1_benchmark_proto_rawDescData) + }) + return file_cosmos_benchmark_v1_benchmark_proto_rawDescData +} + +var file_cosmos_benchmark_v1_benchmark_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_cosmos_benchmark_v1_benchmark_proto_goTypes = []interface{}{ + (*Op)(nil), // 0: cosmos.benchmark.v1.Op +} +var file_cosmos_benchmark_v1_benchmark_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_cosmos_benchmark_v1_benchmark_proto_init() } +func file_cosmos_benchmark_v1_benchmark_proto_init() { + if File_cosmos_benchmark_v1_benchmark_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_cosmos_benchmark_v1_benchmark_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Op); 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_benchmark_v1_benchmark_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cosmos_benchmark_v1_benchmark_proto_goTypes, + DependencyIndexes: file_cosmos_benchmark_v1_benchmark_proto_depIdxs, + MessageInfos: file_cosmos_benchmark_v1_benchmark_proto_msgTypes, + }.Build() + File_cosmos_benchmark_v1_benchmark_proto = out.File + file_cosmos_benchmark_v1_benchmark_proto_rawDesc = nil + file_cosmos_benchmark_v1_benchmark_proto_goTypes = nil + file_cosmos_benchmark_v1_benchmark_proto_depIdxs = nil +} diff --git a/api/cosmos/benchmark/v1/tx.pulsar.go b/api/cosmos/benchmark/v1/tx.pulsar.go new file mode 100644 index 000000000000..b119e5c8e6d3 --- /dev/null +++ b/api/cosmos/benchmark/v1/tx.pulsar.go @@ -0,0 +1,1256 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package benchmarkv1 + +import ( + _ "cosmossdk.io/api/amino" + _ "cosmossdk.io/api/cosmos/msg/v1" + 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 = (*_MsgLoadTest_2_list)(nil) + +type _MsgLoadTest_2_list struct { + list *[]*Op +} + +func (x *_MsgLoadTest_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgLoadTest_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_MsgLoadTest_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Op) + (*x.list)[i] = concreteValue +} + +func (x *_MsgLoadTest_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Op) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgLoadTest_2_list) AppendMutable() protoreflect.Value { + v := new(Op) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgLoadTest_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_MsgLoadTest_2_list) NewElement() protoreflect.Value { + v := new(Op) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_MsgLoadTest_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgLoadTest protoreflect.MessageDescriptor + fd_MsgLoadTest_caller protoreflect.FieldDescriptor + fd_MsgLoadTest_ops protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_benchmark_v1_tx_proto_init() + md_MsgLoadTest = File_cosmos_benchmark_v1_tx_proto.Messages().ByName("MsgLoadTest") + fd_MsgLoadTest_caller = md_MsgLoadTest.Fields().ByName("caller") + fd_MsgLoadTest_ops = md_MsgLoadTest.Fields().ByName("ops") +} + +var _ protoreflect.Message = (*fastReflection_MsgLoadTest)(nil) + +type fastReflection_MsgLoadTest MsgLoadTest + +func (x *MsgLoadTest) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLoadTest)(x) +} + +func (x *MsgLoadTest) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_benchmark_v1_tx_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_MsgLoadTest_messageType fastReflection_MsgLoadTest_messageType +var _ protoreflect.MessageType = fastReflection_MsgLoadTest_messageType{} + +type fastReflection_MsgLoadTest_messageType struct{} + +func (x fastReflection_MsgLoadTest_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLoadTest)(nil) +} +func (x fastReflection_MsgLoadTest_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLoadTest) +} +func (x fastReflection_MsgLoadTest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLoadTest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgLoadTest) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLoadTest +} + +// 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_MsgLoadTest) Type() protoreflect.MessageType { + return _fastReflection_MsgLoadTest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgLoadTest) New() protoreflect.Message { + return new(fastReflection_MsgLoadTest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgLoadTest) Interface() protoreflect.ProtoMessage { + return (*MsgLoadTest)(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_MsgLoadTest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Caller) != 0 { + value := protoreflect.ValueOfBytes(x.Caller) + if !f(fd_MsgLoadTest_caller, value) { + return + } + } + if len(x.Ops) != 0 { + value := protoreflect.ValueOfList(&_MsgLoadTest_2_list{list: &x.Ops}) + if !f(fd_MsgLoadTest_ops, 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_MsgLoadTest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.benchmark.v1.MsgLoadTest.caller": + return len(x.Caller) != 0 + case "cosmos.benchmark.v1.MsgLoadTest.ops": + return len(x.Ops) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTest")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTest 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_MsgLoadTest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.benchmark.v1.MsgLoadTest.caller": + x.Caller = nil + case "cosmos.benchmark.v1.MsgLoadTest.ops": + x.Ops = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTest")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTest 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_MsgLoadTest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.benchmark.v1.MsgLoadTest.caller": + value := x.Caller + return protoreflect.ValueOfBytes(value) + case "cosmos.benchmark.v1.MsgLoadTest.ops": + if len(x.Ops) == 0 { + return protoreflect.ValueOfList(&_MsgLoadTest_2_list{}) + } + listValue := &_MsgLoadTest_2_list{list: &x.Ops} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTest")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTest 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_MsgLoadTest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.benchmark.v1.MsgLoadTest.caller": + x.Caller = value.Bytes() + case "cosmos.benchmark.v1.MsgLoadTest.ops": + lv := value.List() + clv := lv.(*_MsgLoadTest_2_list) + x.Ops = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTest")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTest 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_MsgLoadTest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.benchmark.v1.MsgLoadTest.ops": + if x.Ops == nil { + x.Ops = []*Op{} + } + value := &_MsgLoadTest_2_list{list: &x.Ops} + return protoreflect.ValueOfList(value) + case "cosmos.benchmark.v1.MsgLoadTest.caller": + panic(fmt.Errorf("field caller of message cosmos.benchmark.v1.MsgLoadTest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTest")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTest 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_MsgLoadTest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.benchmark.v1.MsgLoadTest.caller": + return protoreflect.ValueOfBytes(nil) + case "cosmos.benchmark.v1.MsgLoadTest.ops": + list := []*Op{} + return protoreflect.ValueOfList(&_MsgLoadTest_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTest")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTest 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_MsgLoadTest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.benchmark.v1.MsgLoadTest", 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_MsgLoadTest) 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_MsgLoadTest) 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_MsgLoadTest) 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_MsgLoadTest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgLoadTest) + 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.Caller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Ops) > 0 { + for _, e := range x.Ops { + 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().(*MsgLoadTest) + 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.Ops) > 0 { + for iNdEx := len(x.Ops) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Ops[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.Caller) > 0 { + i -= len(x.Caller) + copy(dAtA[i:], x.Caller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Caller))) + 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().(*MsgLoadTest) + 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: MsgLoadTest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLoadTest: 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 Caller", 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.Caller = append(x.Caller[:0], dAtA[iNdEx:postIndex]...) + if x.Caller == nil { + x.Caller = []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 Ops", 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.Ops = append(x.Ops, &Op{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Ops[len(x.Ops)-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_MsgLoadTestResponse protoreflect.MessageDescriptor + fd_MsgLoadTestResponse_total_time protoreflect.FieldDescriptor + fd_MsgLoadTestResponse_total_errors protoreflect.FieldDescriptor +) + +func init() { + file_cosmos_benchmark_v1_tx_proto_init() + md_MsgLoadTestResponse = File_cosmos_benchmark_v1_tx_proto.Messages().ByName("MsgLoadTestResponse") + fd_MsgLoadTestResponse_total_time = md_MsgLoadTestResponse.Fields().ByName("total_time") + fd_MsgLoadTestResponse_total_errors = md_MsgLoadTestResponse.Fields().ByName("total_errors") +} + +var _ protoreflect.Message = (*fastReflection_MsgLoadTestResponse)(nil) + +type fastReflection_MsgLoadTestResponse MsgLoadTestResponse + +func (x *MsgLoadTestResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLoadTestResponse)(x) +} + +func (x *MsgLoadTestResponse) slowProtoReflect() protoreflect.Message { + mi := &file_cosmos_benchmark_v1_tx_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_MsgLoadTestResponse_messageType fastReflection_MsgLoadTestResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgLoadTestResponse_messageType{} + +type fastReflection_MsgLoadTestResponse_messageType struct{} + +func (x fastReflection_MsgLoadTestResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLoadTestResponse)(nil) +} +func (x fastReflection_MsgLoadTestResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLoadTestResponse) +} +func (x fastReflection_MsgLoadTestResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLoadTestResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgLoadTestResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLoadTestResponse +} + +// 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_MsgLoadTestResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgLoadTestResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgLoadTestResponse) New() protoreflect.Message { + return new(fastReflection_MsgLoadTestResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgLoadTestResponse) Interface() protoreflect.ProtoMessage { + return (*MsgLoadTestResponse)(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_MsgLoadTestResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TotalTime != uint64(0) { + value := protoreflect.ValueOfUint64(x.TotalTime) + if !f(fd_MsgLoadTestResponse_total_time, value) { + return + } + } + if x.TotalErrors != uint64(0) { + value := protoreflect.ValueOfUint64(x.TotalErrors) + if !f(fd_MsgLoadTestResponse_total_errors, 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_MsgLoadTestResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_time": + return x.TotalTime != uint64(0) + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_errors": + return x.TotalErrors != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTestResponse")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTestResponse 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_MsgLoadTestResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_time": + x.TotalTime = uint64(0) + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_errors": + x.TotalErrors = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTestResponse")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTestResponse 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_MsgLoadTestResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_time": + value := x.TotalTime + return protoreflect.ValueOfUint64(value) + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_errors": + value := x.TotalErrors + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTestResponse")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTestResponse 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_MsgLoadTestResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_time": + x.TotalTime = value.Uint() + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_errors": + x.TotalErrors = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTestResponse")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTestResponse 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_MsgLoadTestResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_time": + panic(fmt.Errorf("field total_time of message cosmos.benchmark.v1.MsgLoadTestResponse is not mutable")) + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_errors": + panic(fmt.Errorf("field total_errors of message cosmos.benchmark.v1.MsgLoadTestResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTestResponse")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTestResponse 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_MsgLoadTestResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_time": + return protoreflect.ValueOfUint64(uint64(0)) + case "cosmos.benchmark.v1.MsgLoadTestResponse.total_errors": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.benchmark.v1.MsgLoadTestResponse")) + } + panic(fmt.Errorf("message cosmos.benchmark.v1.MsgLoadTestResponse 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_MsgLoadTestResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in cosmos.benchmark.v1.MsgLoadTestResponse", 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_MsgLoadTestResponse) 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_MsgLoadTestResponse) 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_MsgLoadTestResponse) 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_MsgLoadTestResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgLoadTestResponse) + 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.TotalTime != 0 { + n += 1 + runtime.Sov(uint64(x.TotalTime)) + } + if x.TotalErrors != 0 { + n += 1 + runtime.Sov(uint64(x.TotalErrors)) + } + 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().(*MsgLoadTestResponse) + 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.TotalErrors != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TotalErrors)) + i-- + dAtA[i] = 0x10 + } + if x.TotalTime != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TotalTime)) + 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().(*MsgLoadTestResponse) + 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: MsgLoadTestResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLoadTestResponse: 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 TotalTime", wireType) + } + x.TotalTime = 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.TotalTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TotalErrors", wireType) + } + x.TotalErrors = 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.TotalErrors |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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/benchmark/v1/tx.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) +) + +// MsgLoadTestOps defines a message containing a sequence of load test operations. +type MsgLoadTest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Caller []byte `protobuf:"bytes,1,opt,name=caller,proto3" json:"caller,omitempty"` + Ops []*Op `protobuf:"bytes,2,rep,name=ops,proto3" json:"ops,omitempty"` +} + +func (x *MsgLoadTest) Reset() { + *x = MsgLoadTest{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_benchmark_v1_tx_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgLoadTest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgLoadTest) ProtoMessage() {} + +// Deprecated: Use MsgLoadTest.ProtoReflect.Descriptor instead. +func (*MsgLoadTest) Descriptor() ([]byte, []int) { + return file_cosmos_benchmark_v1_tx_proto_rawDescGZIP(), []int{0} +} + +func (x *MsgLoadTest) GetCaller() []byte { + if x != nil { + return x.Caller + } + return nil +} + +func (x *MsgLoadTest) GetOps() []*Op { + if x != nil { + return x.Ops + } + return nil +} + +// MsgLoadTestResponse defines a message containing the results of a load test operation. +type MsgLoadTestResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalTime uint64 `protobuf:"varint,1,opt,name=total_time,json=totalTime,proto3" json:"total_time,omitempty"` + TotalErrors uint64 `protobuf:"varint,2,opt,name=total_errors,json=totalErrors,proto3" json:"total_errors,omitempty"` +} + +func (x *MsgLoadTestResponse) Reset() { + *x = MsgLoadTestResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_cosmos_benchmark_v1_tx_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgLoadTestResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgLoadTestResponse) ProtoMessage() {} + +// Deprecated: Use MsgLoadTestResponse.ProtoReflect.Descriptor instead. +func (*MsgLoadTestResponse) Descriptor() ([]byte, []int) { + return file_cosmos_benchmark_v1_tx_proto_rawDescGZIP(), []int{1} +} + +func (x *MsgLoadTestResponse) GetTotalTime() uint64 { + if x != nil { + return x.TotalTime + } + return 0 +} + +func (x *MsgLoadTestResponse) GetTotalErrors() uint64 { + if x != nil { + return x.TotalErrors + } + return 0 +} + +var File_cosmos_benchmark_v1_tx_proto protoreflect.FileDescriptor + +var file_cosmos_benchmark_v1_tx_proto_rawDesc = []byte{ + 0x0a, 0x1c, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, + 0x2e, 0x76, 0x31, 0x1a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x65, 0x6e, 0x63, + 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x61, 0x64, + 0x54, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x03, + 0x6f, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x70, 0x52, 0x03, 0x6f, 0x70, 0x73, 0x3a, 0x39, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x63, 0x61, + 0x6c, 0x6c, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x29, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, + 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, + 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x65, + 0x73, 0x74, 0x22, 0x57, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, + 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x32, 0x64, 0x0a, 0x03, 0x4d, + 0x73, 0x67, 0x12, 0x56, 0x0a, 0x08, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x73, 0x74, 0x12, 0x20, + 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, + 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x65, 0x73, 0x74, + 0x1a, 0x28, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, + 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x6f, 0x61, 0x64, 0x54, 0x65, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, + 0x01, 0x42, 0xc2, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, + 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x62, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x2f, 0x76, 0x31, 0x3b, 0x62, + 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x58, + 0xaa, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, + 0x61, 0x72, 0x6b, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, + 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, 0x72, 0x6b, 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, 0x42, 0x65, 0x6e, 0x63, 0x68, 0x6d, 0x61, + 0x72, 0x6b, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_cosmos_benchmark_v1_tx_proto_rawDescOnce sync.Once + file_cosmos_benchmark_v1_tx_proto_rawDescData = file_cosmos_benchmark_v1_tx_proto_rawDesc +) + +func file_cosmos_benchmark_v1_tx_proto_rawDescGZIP() []byte { + file_cosmos_benchmark_v1_tx_proto_rawDescOnce.Do(func() { + file_cosmos_benchmark_v1_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_benchmark_v1_tx_proto_rawDescData) + }) + return file_cosmos_benchmark_v1_tx_proto_rawDescData +} + +var file_cosmos_benchmark_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_cosmos_benchmark_v1_tx_proto_goTypes = []interface{}{ + (*MsgLoadTest)(nil), // 0: cosmos.benchmark.v1.MsgLoadTest + (*MsgLoadTestResponse)(nil), // 1: cosmos.benchmark.v1.MsgLoadTestResponse + (*Op)(nil), // 2: cosmos.benchmark.v1.Op +} +var file_cosmos_benchmark_v1_tx_proto_depIdxs = []int32{ + 2, // 0: cosmos.benchmark.v1.MsgLoadTest.ops:type_name -> cosmos.benchmark.v1.Op + 0, // 1: cosmos.benchmark.v1.Msg.LoadTest:input_type -> cosmos.benchmark.v1.MsgLoadTest + 1, // 2: cosmos.benchmark.v1.Msg.LoadTest:output_type -> cosmos.benchmark.v1.MsgLoadTestResponse + 2, // [2:3] is the sub-list for method output_type + 1, // [1:2] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_cosmos_benchmark_v1_tx_proto_init() } +func file_cosmos_benchmark_v1_tx_proto_init() { + if File_cosmos_benchmark_v1_tx_proto != nil { + return + } + file_cosmos_benchmark_v1_benchmark_proto_init() + if !protoimpl.UnsafeEnabled { + file_cosmos_benchmark_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgLoadTest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cosmos_benchmark_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgLoadTestResponse); 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_benchmark_v1_tx_proto_rawDesc, + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_cosmos_benchmark_v1_tx_proto_goTypes, + DependencyIndexes: file_cosmos_benchmark_v1_tx_proto_depIdxs, + MessageInfos: file_cosmos_benchmark_v1_tx_proto_msgTypes, + }.Build() + File_cosmos_benchmark_v1_tx_proto = out.File + file_cosmos_benchmark_v1_tx_proto_rawDesc = nil + file_cosmos_benchmark_v1_tx_proto_goTypes = nil + file_cosmos_benchmark_v1_tx_proto_depIdxs = nil +} diff --git a/api/cosmos/benchmark/v1/tx_grpc.pb.go b/api/cosmos/benchmark/v1/tx_grpc.pb.go new file mode 100644 index 000000000000..6cc598845456 --- /dev/null +++ b/api/cosmos/benchmark/v1/tx_grpc.pb.go @@ -0,0 +1,127 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: cosmos/benchmark/v1/tx.proto + +package benchmarkv1 + +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.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Msg_LoadTest_FullMethodName = "/cosmos.benchmark.v1.Msg/LoadTest" +) + +// MsgClient is the client API for Msg 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. +// +// Msg defines the benchmark Msg service. +type MsgClient interface { + // LoadTest defines a method for executing a sequence of load test operations. + LoadTest(ctx context.Context, in *MsgLoadTest, opts ...grpc.CallOption) (*MsgLoadTestResponse, error) +} + +type msgClient struct { + cc grpc.ClientConnInterface +} + +func NewMsgClient(cc grpc.ClientConnInterface) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) LoadTest(ctx context.Context, in *MsgLoadTest, opts ...grpc.CallOption) (*MsgLoadTestResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgLoadTestResponse) + err := c.cc.Invoke(ctx, Msg_LoadTest_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +// All implementations must embed UnimplementedMsgServer +// for forward compatibility. +// +// Msg defines the benchmark Msg service. +type MsgServer interface { + // LoadTest defines a method for executing a sequence of load test operations. + LoadTest(context.Context, *MsgLoadTest) (*MsgLoadTestResponse, error) + mustEmbedUnimplementedMsgServer() +} + +// UnimplementedMsgServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedMsgServer struct{} + +func (UnimplementedMsgServer) LoadTest(context.Context, *MsgLoadTest) (*MsgLoadTestResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LoadTest not implemented") +} +func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} +func (UnimplementedMsgServer) testEmbeddedByValue() {} + +// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to MsgServer will +// result in compilation errors. +type UnsafeMsgServer interface { + mustEmbedUnimplementedMsgServer() +} + +func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) { + // If the following call pancis, it indicates UnimplementedMsgServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Msg_ServiceDesc, srv) +} + +func _Msg_LoadTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLoadTest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LoadTest(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_LoadTest_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LoadTest(ctx, req.(*MsgLoadTest)) + } + return interceptor(ctx, in, info, handler) +} + +// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Msg_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.benchmark.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "LoadTest", + Handler: _Msg_LoadTest_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/benchmark/v1/tx.proto", +} diff --git a/go.work.example b/go.work.example index f8a9021395e7..35c4dd20ab28 100644 --- a/go.work.example +++ b/go.work.example @@ -27,6 +27,7 @@ use ( ./tools/cosmovisor ./tools/confix ./tools/hubl + ./tools/benchmark ./x/accounts ./x/accounts/defaults/base ./x/accounts/defaults/lockup diff --git a/runtime/module.go b/runtime/module.go index 3cf7be226421..488bc6c93b8e 100644 --- a/runtime/module.go +++ b/runtime/module.go @@ -96,6 +96,7 @@ func init() { codec.ProvideProtoCodec, codec.ProvideAddressCodec, ProvideKVStoreKey, + ProvideKVStoreFactory, ProvideTransientStoreKey, ProvideMemoryStoreKey, ProvideGenesisTxHandler, @@ -296,3 +297,11 @@ func ProvideTransientStoreService( func ProvideCometService() comet.Service { return NewContextAwareCometInfoService() } + +func ProvideKVStoreFactory(app *AppBuilder) store.KVStoreServiceFactory { + return func(key []byte) store.KVStoreService { + sk := storetypes.NewKVStoreKey(string(key)) + registerStoreKey(app, sk) + return kvStoreService{key: sk} + } +} diff --git a/scripts/build/build.mk b/scripts/build/build.mk index 581ee1dbe06d..da13b0e95e23 100644 --- a/scripts/build/build.mk +++ b/scripts/build/build.mk @@ -70,6 +70,11 @@ ifeq (bls12381,$(findstring bls12381,$(COSMOS_BUILD_OPTIONS))) build_tags += bls12381 endif +# benchmark module +ifeq (benchmark,$(findstring benchmark,$(COSMOS_BUILD_OPTIONS))) + build_tags += benchmark +endif + whitespace := whitespace += $(whitespace) comma := , diff --git a/scripts/init-simapp-v2.sh b/scripts/init-simapp-v2.sh index 7410b2174746..02fb379f8e2c 100755 --- a/scripts/init-simapp-v2.sh +++ b/scripts/init-simapp-v2.sh @@ -10,6 +10,7 @@ $SIMD_BIN config set client chain-id simapp-v2-chain $SIMD_BIN config set client keyring-backend test $SIMD_BIN config set client keyring-default-keyname alice $SIMD_BIN config set app rest.enable true +$SIMD_BIN config set app telemetry.prometheus-retention-time 600 $SIMD_BIN keys add alice --indiscreet $SIMD_BIN keys add bob --indiscreet $SIMD_BIN init simapp-v2-node --chain-id simapp-v2-chain diff --git a/server/v2/cometbft/grpc.go b/server/v2/cometbft/grpc.go index 1f59a4771cf1..e85167ab496f 100644 --- a/server/v2/cometbft/grpc.go +++ b/server/v2/cometbft/grpc.go @@ -8,6 +8,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" abciproto "github.com/cometbft/cometbft/api/cometbft/abci/v1" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/gogoproto/proto" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -21,7 +22,6 @@ import ( "cosmossdk.io/log" storeserver "cosmossdk.io/server/v2/store" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node" diff --git a/simapp/app.go b/simapp/app.go index 90de295e8b7d..e57e2899d1c0 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -13,6 +13,7 @@ import ( "cosmossdk.io/core/registry" corestore "cosmossdk.io/core/store" "cosmossdk.io/depinject" + "cosmossdk.io/depinject/appconfig" _ "cosmossdk.io/indexer/postgres" // register the postgres indexer "cosmossdk.io/log" "cosmossdk.io/x/accounts" @@ -96,7 +97,7 @@ func init() { // AppConfig returns the default app config. func AppConfig() depinject.Config { return depinject.Configs( - appConfig, // Alternatively use appconfig.LoadYAML(AppConfigYAML) + appconfig.Compose(appConfig), // Alternatively use appconfig.LoadYAML(AppConfigYAML) depinject.Provide( ProvideExampleMintFn, // optional: override the mint module's mint function with epoched minting ), diff --git a/simapp/app_config.go b/simapp/app_config.go index 33e11841e795..275c3f730fe0 100644 --- a/simapp/app_config.go +++ b/simapp/app_config.go @@ -107,7 +107,7 @@ var ( } // application configuration (used by depinject) - appConfig = appconfig.Compose(&appv1alpha1.Config{ + appConfig = &appv1alpha1.Config{ Modules: []*appv1alpha1.ModuleConfig{ { Name: runtime.ModuleName, @@ -297,5 +297,5 @@ var ( Config: appconfig.WrapAny(&bankmodulev2.Module{}), }, }, - }) + } ) diff --git a/simapp/app_test.go b/simapp/app_test.go index 3553b47edf37..7add872cbfc6 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -194,6 +194,16 @@ func TestRunMigrations(t *testing.T) { } } + orderMigrations := module.DefaultMigrationsOrder(app.ModuleManager.ModuleNames()) + // Filter out benchmark module from migrations list + filteredMigrations := make([]string, 0, len(app.ModuleManager.OrderMigrations)) + for _, name := range orderMigrations { + if name != "benchmark" { + filteredMigrations = append(filteredMigrations, name) + } + } + app.ModuleManager.OrderMigrations = filteredMigrations + // Run migrations only for bank. That's why we put the initial // version for bank as 1, and for all other modules, we put as // their latest ConsensusVersion. diff --git a/simapp/benchmark.go b/simapp/benchmark.go new file mode 100644 index 000000000000..50a16ea909b8 --- /dev/null +++ b/simapp/benchmark.go @@ -0,0 +1,39 @@ +//go:build benchmark + +package simapp + +import ( + runtimev1alpha1 "cosmossdk.io/api/cosmos/app/runtime/v1alpha1" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + benchmarkmodulev1 "cosmossdk.io/api/cosmos/benchmark/module/v1" + "cosmossdk.io/depinject/appconfig" + benchmark "cosmossdk.io/tools/benchmark/module" + "fmt" +) + +func init() { + // WARNING! + // Enabling this module will produce 3M keys in the genesis state for the benchmark module. + // Will also enable processing of benchmark transactions which can easily overwhelm the system. + appConfig.Modules = append(appConfig.Modules, &appv1alpha1.ModuleConfig{ + Name: benchmark.ModuleName, + Config: appconfig.WrapAny(&benchmarkmodulev1.Module{ + GenesisParams: &benchmarkmodulev1.GeneratorParams{ + Seed: 34, + BucketCount: 3, + GenesisCount: 3_000_000, + KeyMean: 64, + KeyStdDev: 12, + ValueMean: 1024, + ValueStdDev: 256, + }, + }), + }) + runtimeConfig := &runtimev1alpha1.Module{} + err := appConfig.Modules[0].Config.UnmarshalTo(runtimeConfig) + if err != nil { + panic(fmt.Errorf("benchmark init: failed to unmarshal runtime module config: %w", err)) + } + runtimeConfig.InitGenesis = append(runtimeConfig.InitGenesis, benchmark.ModuleName) + appConfig.Modules[0].Config = appconfig.WrapAny(runtimeConfig) +} diff --git a/simapp/go.mod b/simapp/go.mod index 03905a478ffd..c902a035c0ba 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -51,6 +51,7 @@ require ( require ( cosmossdk.io/indexer/postgres v0.0.0-20241128094659-bd76b47e1d8b + cosmossdk.io/tools/benchmark v0.0.0-00010101000000-000000000000 github.com/jackc/pgx/v5 v5.7.1 ) @@ -254,6 +255,7 @@ replace ( cosmossdk.io/collections => ../collections cosmossdk.io/indexer/postgres => ../indexer/postgres cosmossdk.io/store => ../store + cosmossdk.io/tools/benchmark => ../tools/benchmark cosmossdk.io/tools/confix => ../tools/confix cosmossdk.io/x/accounts => ../x/accounts cosmossdk.io/x/accounts/defaults/base => ../x/accounts/defaults/base diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index 3a432efd4966..70ee95ced83a 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -698,8 +698,9 @@ func startTestnet( _, nodeDir := getNodeDir(args, i) // run start command + binName := cmd.Root().Use cmdArgs := []string{"start", fmt.Sprintf("--%s=%s", flags.FlagHome, nodeDir)} - runCmd := exec.Command(os.Args[0], cmdArgs...) // spawn new process + runCmd := exec.Command(binName, cmdArgs...) // spawn new process // Set stdout and stderr based on enableLogging flag if args.enableLogging { diff --git a/simapp/v2/app.go b/simapp/v2/app.go index e78708807b33..601d641ad060 100644 --- a/simapp/v2/app.go +++ b/simapp/v2/app.go @@ -10,6 +10,7 @@ import ( "cosmossdk.io/core/server" "cosmossdk.io/core/transaction" "cosmossdk.io/depinject" + "cosmossdk.io/depinject/appconfig" _ "cosmossdk.io/indexer/postgres" // register the postgres indexer "cosmossdk.io/log" "cosmossdk.io/runtime/v2" @@ -49,7 +50,7 @@ type SimApp[T transaction.Tx] struct { // AppConfig returns the default app config. func AppConfig() depinject.Config { return depinject.Configs( - ModuleConfig, // Alternatively use appconfig.LoadYAML(AppConfigYAML) + appconfig.Compose(ModuleConfig), // Alternatively use appconfig.LoadYAML(AppConfigYAML) runtime.DefaultServiceBindings(), codec.DefaultProviders, depinject.Provide( diff --git a/simapp/v2/app_config.go b/simapp/v2/app_config.go index 5ade503e6403..0681354b549e 100644 --- a/simapp/v2/app_config.go +++ b/simapp/v2/app_config.go @@ -107,7 +107,7 @@ var ( } // ModuleConfig is the application module configuration used by depinject - ModuleConfig = appconfig.Compose(&appv1alpha1.Config{ + ModuleConfig = &appv1alpha1.Config{ Modules: []*appv1alpha1.ModuleConfig{ { Name: runtime.ModuleName, @@ -181,7 +181,7 @@ var ( // OrderMigrations: []string{}, // TODO GasConfig was added to the config in runtimev2. Where/how was it set in v1? GasConfig: &runtimev2.GasConfig{ - ValidateTxGasLimit: 100_000, + ValidateTxGasLimit: 10_000_000, QueryGasLimit: 100_000, SimulationGasLimit: 100_000, }, @@ -302,5 +302,5 @@ var ( Config: appconfig.WrapAny(&bankmodulev2.Module{}), }, }, - }) + } ) diff --git a/simapp/v2/benchmark.go b/simapp/v2/benchmark.go new file mode 100644 index 000000000000..85376b02cb83 --- /dev/null +++ b/simapp/v2/benchmark.go @@ -0,0 +1,39 @@ +//go:build benchmark + +package simapp + +import ( + runtimev2 "cosmossdk.io/api/cosmos/app/runtime/v2" + appv1alpha1 "cosmossdk.io/api/cosmos/app/v1alpha1" + benchmarkmodulev1 "cosmossdk.io/api/cosmos/benchmark/module/v1" + "cosmossdk.io/depinject/appconfig" + benchmark "cosmossdk.io/tools/benchmark/module" + "fmt" +) + +func init() { + // WARNING! + // Enabling this module will produce 3M keys in the genesis state for the benchmark module. + // Will also enable processing of benchmark transactions which can easily overwhelm the system. + ModuleConfig.Modules = append(ModuleConfig.Modules, &appv1alpha1.ModuleConfig{ + Name: benchmark.ModuleName, + Config: appconfig.WrapAny(&benchmarkmodulev1.Module{ + GenesisParams: &benchmarkmodulev1.GeneratorParams{ + Seed: 34, + BucketCount: 3, + GenesisCount: 3_000_000, + KeyMean: 64, + KeyStdDev: 12, + ValueMean: 1024, + ValueStdDev: 256, + }, + }), + }) + runtimeConfig := &runtimev2.Module{} + err := ModuleConfig.Modules[0].Config.UnmarshalTo(runtimeConfig) + if err != nil { + panic(fmt.Errorf("benchmark init: failed to unmarshal runtime module config: %w", err)) + } + runtimeConfig.InitGenesis = append(runtimeConfig.InitGenesis, benchmark.ModuleName) + ModuleConfig.Modules[0].Config = appconfig.WrapAny(runtimeConfig) +} diff --git a/simapp/v2/go.mod b/simapp/v2/go.mod index ca71cd874905..c8b1f8e5607a 100644 --- a/simapp/v2/go.mod +++ b/simapp/v2/go.mod @@ -44,6 +44,7 @@ require ( require ( cosmossdk.io/indexer/postgres v0.0.0-20241204160609-556102cfa046 + cosmossdk.io/tools/benchmark v0.0.0-00010101000000-000000000000 cosmossdk.io/x/accounts/defaults/base v0.0.0-00010101000000-000000000000 cosmossdk.io/x/accounts/defaults/lockup v0.0.0-00010101000000-000000000000 cosmossdk.io/x/accounts/defaults/multisig v0.0.0-00010101000000-000000000000 @@ -257,6 +258,7 @@ require ( // SimApp on main always tests the latest extracted SDK modules importing the sdk replace ( cosmossdk.io/client/v2 => ../../client/v2 + cosmossdk.io/tools/benchmark => ../../tools/benchmark cosmossdk.io/tools/confix => ../../tools/confix cosmossdk.io/x/accounts => ../../x/accounts cosmossdk.io/x/accounts/defaults/base => ../../x/accounts/defaults/base diff --git a/tests/go.mod b/tests/go.mod index 18cc7999b3f8..e2825cf4b992 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -73,6 +73,7 @@ require ( cosmossdk.io/indexer/postgres v0.1.0 // indirect cosmossdk.io/schema v0.4.0 // indirect cosmossdk.io/server/v2/appmanager v0.0.0-00010101000000-000000000000 // indirect + cosmossdk.io/tools/benchmark v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/circuit v0.0.0-20230613133644-0a778132a60f // indirect cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 // indirect filippo.io/edwards25519 v1.1.0 // indirect @@ -258,6 +259,7 @@ replace ( cosmossdk.io/server/v2/stf => ../server/v2/stf cosmossdk.io/store => ../store cosmossdk.io/store/v2 => ../store/v2 + cosmossdk.io/tools/benchmark => ../tools/benchmark cosmossdk.io/x/accounts => ../x/accounts cosmossdk.io/x/accounts/defaults/base => ../x/accounts/defaults/base cosmossdk.io/x/accounts/defaults/lockup => ../x/accounts/defaults/lockup diff --git a/tools/benchmark/CHANGELOG.md b/tools/benchmark/CHANGELOG.md new file mode 100644 index 000000000000..f1417dde2840 --- /dev/null +++ b/tools/benchmark/CHANGELOG.md @@ -0,0 +1,30 @@ + + +# Changelog + +## [Unreleased] + +### Features + +* [#22778](https://github.com/cosmos/cosmos-sdk/pull/22778) - Initial commit diff --git a/tools/benchmark/README.md b/tools/benchmark/README.md new file mode 100644 index 000000000000..38a090c0d52e --- /dev/null +++ b/tools/benchmark/README.md @@ -0,0 +1,24 @@ +# cosmossdk.io/tools/benchmark + +A benchmark module to test chain and storage performance. It can be used to holistically test +the end to end performance of a node. Given an initial configuration tools/benchmark provides: + +* A possibly enormous sequence of key-value sets in InitGenesis distributed across n storekeys, + e.g. 20M keys across 5 store keys +* A client which syncs to genesis state then deterministically generates txs which contain a + configurable sequence of get, insert, update & delete operations +* A keeper which processes the above transactions and emits some telemetry data about them. + +Client invocation looks like: + +```bash +simdv2 tx benchmark load-test --from bob --yes --ops 1000 --pause 10 -v +``` + +On exit it dumps the generator state so that running again should still be in sync. It assumes +that any transaction accepted by the network was processed, which may not be the case, so miss +rate will probably increase over time. This isn't really a problem for tests. + +Obviously this module is built to DOS a node by testing the upper bounds of chain performance; +when testing gas limits should be increased. It should not be included in chains by default but +is enabled in simapp for testing. \ No newline at end of file diff --git a/tools/benchmark/benchmark.pb.go b/tools/benchmark/benchmark.pb.go new file mode 100644 index 000000000000..7405ba9a9723 --- /dev/null +++ b/tools/benchmark/benchmark.pb.go @@ -0,0 +1,545 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/benchmark/v1/benchmark.proto + +package benchmark + +import ( + fmt "fmt" + 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 + +// Op is a message describing a benchmark operation. +type Op struct { + Seed uint64 `protobuf:"varint,1,opt,name=seed,proto3" json:"seed,omitempty"` + Actor string `protobuf:"bytes,2,opt,name=actor,proto3" json:"actor,omitempty"` + KeyLength uint64 `protobuf:"varint,3,opt,name=key_length,json=keyLength,proto3" json:"key_length,omitempty"` + ValueLength uint64 `protobuf:"varint,4,opt,name=value_length,json=valueLength,proto3" json:"value_length,omitempty"` + Iterations uint32 `protobuf:"varint,5,opt,name=iterations,proto3" json:"iterations,omitempty"` + Delete bool `protobuf:"varint,6,opt,name=delete,proto3" json:"delete,omitempty"` + Exists bool `protobuf:"varint,7,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (m *Op) Reset() { *m = Op{} } +func (m *Op) String() string { return proto.CompactTextString(m) } +func (*Op) ProtoMessage() {} +func (*Op) Descriptor() ([]byte, []int) { + return fileDescriptor_dca1624628907df9, []int{0} +} +func (m *Op) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Op) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Op.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 *Op) XXX_Merge(src proto.Message) { + xxx_messageInfo_Op.Merge(m, src) +} +func (m *Op) XXX_Size() int { + return m.Size() +} +func (m *Op) XXX_DiscardUnknown() { + xxx_messageInfo_Op.DiscardUnknown(m) +} + +var xxx_messageInfo_Op proto.InternalMessageInfo + +func (m *Op) GetSeed() uint64 { + if m != nil { + return m.Seed + } + return 0 +} + +func (m *Op) GetActor() string { + if m != nil { + return m.Actor + } + return "" +} + +func (m *Op) GetKeyLength() uint64 { + if m != nil { + return m.KeyLength + } + return 0 +} + +func (m *Op) GetValueLength() uint64 { + if m != nil { + return m.ValueLength + } + return 0 +} + +func (m *Op) GetIterations() uint32 { + if m != nil { + return m.Iterations + } + return 0 +} + +func (m *Op) GetDelete() bool { + if m != nil { + return m.Delete + } + return false +} + +func (m *Op) GetExists() bool { + if m != nil { + return m.Exists + } + return false +} + +func init() { + proto.RegisterType((*Op)(nil), "cosmos.benchmark.v1.Op") +} + +func init() { + proto.RegisterFile("cosmos/benchmark/v1/benchmark.proto", fileDescriptor_dca1624628907df9) +} + +var fileDescriptor_dca1624628907df9 = []byte{ + // 249 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xb1, 0x4e, 0x84, 0x40, + 0x10, 0x86, 0x99, 0x93, 0x43, 0x6f, 0xd4, 0x66, 0x35, 0x66, 0x0b, 0xdd, 0xa0, 0x36, 0x54, 0x90, + 0x8b, 0x89, 0x0f, 0x60, 0x6d, 0x62, 0x42, 0x69, 0x63, 0x38, 0x98, 0x78, 0x04, 0x8e, 0xb9, 0xb0, + 0x2b, 0xf1, 0xde, 0xc2, 0x47, 0xb2, 0xb4, 0xbc, 0xd2, 0xd2, 0xc0, 0x8b, 0x18, 0x77, 0xcf, 0x1c, + 0xdd, 0x7c, 0x5f, 0xbe, 0x66, 0x7e, 0xbc, 0xcd, 0x59, 0xaf, 0x58, 0x27, 0x0b, 0x6a, 0xf2, 0xe5, + 0x2a, 0x6b, 0xab, 0xa4, 0x9b, 0xef, 0x21, 0x5e, 0xb7, 0x6c, 0x58, 0x9c, 0xb9, 0x28, 0xde, 0xfb, + 0x6e, 0x7e, 0xf3, 0x09, 0x38, 0x79, 0x5a, 0x0b, 0x81, 0xbe, 0x26, 0x2a, 0x24, 0x84, 0x10, 0xf9, + 0xa9, 0xbd, 0xc5, 0x39, 0x4e, 0xb3, 0xdc, 0x70, 0x2b, 0x27, 0x21, 0x44, 0xb3, 0xd4, 0x81, 0xb8, + 0x42, 0xac, 0x68, 0xf3, 0x52, 0x53, 0xf3, 0x6a, 0x96, 0xf2, 0xc0, 0xf6, 0xb3, 0x8a, 0x36, 0x8f, + 0x56, 0x88, 0x6b, 0x3c, 0xe9, 0xb2, 0xfa, 0x8d, 0xfe, 0x03, 0xdf, 0x06, 0xc7, 0xd6, 0xed, 0x12, + 0x85, 0x58, 0x1a, 0x6a, 0x33, 0x53, 0x72, 0xa3, 0xe5, 0x34, 0x84, 0xe8, 0x34, 0x1d, 0x19, 0x71, + 0x81, 0x41, 0x41, 0x35, 0x19, 0x92, 0x41, 0x08, 0xd1, 0x51, 0xba, 0xa3, 0x3f, 0x4f, 0xef, 0xa5, + 0x36, 0x5a, 0x1e, 0x3a, 0xef, 0xe8, 0xe1, 0xfe, 0xab, 0x57, 0xb0, 0xed, 0x15, 0xfc, 0xf4, 0x0a, + 0x3e, 0x06, 0xe5, 0x6d, 0x07, 0xe5, 0x7d, 0x0f, 0xca, 0x7b, 0xbe, 0x74, 0x1f, 0xeb, 0xa2, 0x8a, + 0x4b, 0x4e, 0x0c, 0x73, 0x3d, 0x9a, 0x68, 0x11, 0xd8, 0x59, 0xee, 0x7e, 0x03, 0x00, 0x00, 0xff, + 0xff, 0x76, 0x0b, 0x27, 0x18, 0x3d, 0x01, 0x00, 0x00, +} + +func (m *Op) 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 *Op) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Op) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Exists { + i-- + if m.Exists { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x38 + } + if m.Delete { + i-- + if m.Delete { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Iterations != 0 { + i = encodeVarintBenchmark(dAtA, i, uint64(m.Iterations)) + i-- + dAtA[i] = 0x28 + } + if m.ValueLength != 0 { + i = encodeVarintBenchmark(dAtA, i, uint64(m.ValueLength)) + i-- + dAtA[i] = 0x20 + } + if m.KeyLength != 0 { + i = encodeVarintBenchmark(dAtA, i, uint64(m.KeyLength)) + i-- + dAtA[i] = 0x18 + } + if len(m.Actor) > 0 { + i -= len(m.Actor) + copy(dAtA[i:], m.Actor) + i = encodeVarintBenchmark(dAtA, i, uint64(len(m.Actor))) + i-- + dAtA[i] = 0x12 + } + if m.Seed != 0 { + i = encodeVarintBenchmark(dAtA, i, uint64(m.Seed)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintBenchmark(dAtA []byte, offset int, v uint64) int { + offset -= sovBenchmark(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Op) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Seed != 0 { + n += 1 + sovBenchmark(uint64(m.Seed)) + } + l = len(m.Actor) + if l > 0 { + n += 1 + l + sovBenchmark(uint64(l)) + } + if m.KeyLength != 0 { + n += 1 + sovBenchmark(uint64(m.KeyLength)) + } + if m.ValueLength != 0 { + n += 1 + sovBenchmark(uint64(m.ValueLength)) + } + if m.Iterations != 0 { + n += 1 + sovBenchmark(uint64(m.Iterations)) + } + if m.Delete { + n += 2 + } + if m.Exists { + n += 2 + } + return n +} + +func sovBenchmark(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozBenchmark(x uint64) (n int) { + return sovBenchmark(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Op) 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 ErrIntOverflowBenchmark + } + 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: Op: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Op: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Seed", wireType) + } + m.Seed = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBenchmark + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Seed |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Actor", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBenchmark + } + 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 ErrInvalidLengthBenchmark + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthBenchmark + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Actor = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyLength", wireType) + } + m.KeyLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBenchmark + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeyLength |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValueLength", wireType) + } + m.ValueLength = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBenchmark + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValueLength |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Iterations", wireType) + } + m.Iterations = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBenchmark + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Iterations |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + 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 ErrIntOverflowBenchmark + } + 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 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowBenchmark + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Exists = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipBenchmark(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthBenchmark + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipBenchmark(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, ErrIntOverflowBenchmark + } + 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, ErrIntOverflowBenchmark + } + 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, ErrIntOverflowBenchmark + } + 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, ErrInvalidLengthBenchmark + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupBenchmark + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthBenchmark + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthBenchmark = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowBenchmark = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupBenchmark = fmt.Errorf("proto: unexpected end of group") +) diff --git a/tools/benchmark/client/cli/tx.go b/tools/benchmark/client/cli/tx.go new file mode 100644 index 000000000000..55e46d305795 --- /dev/null +++ b/tools/benchmark/client/cli/tx.go @@ -0,0 +1,186 @@ +package cli + +import ( + "context" + "errors" + "os" + "os/signal" + "syscall" + "time" + + "github.com/spf13/cobra" + + modulev1 "cosmossdk.io/api/cosmos/benchmark/module/v1" + "cosmossdk.io/tools/benchmark" + gen "cosmossdk.io/tools/benchmark/generator" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + clienttx "github.com/cosmos/cosmos-sdk/client/tx" +) + +func NewTxCmd(params *modulev1.GeneratorParams) *cobra.Command { + txCmd := &cobra.Command{ + Use: "benchmark", + Short: "benchmark transaction subcommands", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + txCmd.AddCommand( + NewLoadTestCmd(params), + ) + + return txCmd +} + +func NewLoadTestCmd(params *modulev1.GeneratorParams) *cobra.Command { + var ( + verbose bool + pause int64 + numOps uint64 + ) + cmd := &cobra.Command{ + Use: "load-test", + RunE: func(cmd *cobra.Command, args []string) (runErr error) { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + ctx, cancelFn := context.WithCancel(cmd.Context()) + go func() { + sigCh := make(chan os.Signal, 1) + signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM) + select { + case sig := <-sigCh: + cancelFn() + cmd.Printf("caught %s signal\n", sig.String()) + case <-ctx.Done(): + cancelFn() + } + }() + + var ( + successCount int + errCount int + since = time.Now() + last int + ) + defer func() { + cmd.Printf("done! success_tx=%d err_tx=%d\n", successCount, errCount) + }() + accNum, accSeq, err := clientCtx.AccountRetriever.GetAccountNumberSequence(clientCtx, clientCtx.FromAddress) + if err != nil { + return err + } + txf, err := clienttx.NewFactoryCLI(clientCtx, cmd.Flags()) + if err != nil { + return err + } + txf = txf.WithAccountNumber(accNum).WithChainID(clientCtx.ChainID).WithGas(1_000_000_000) + + storeKeys, err := gen.StoreKeys("benchmark", params.Seed, params.BucketCount) + if err != nil { + return err + } + var seed uint64 + for _, c := range clientCtx.FromAddress { + // root the generator seed in the account address + seed += uint64(c) + } + g := gen.NewGenerator(gen.Options{ + HomeDir: clientCtx.HomeDir, + GeneratorParams: params, + InsertWeight: 0.25, + DeleteWeight: 0.05, + UpdateWeight: 0.50, + GetWeight: 0.20, + }, + gen.WithGenesis(), + gen.WithSeed(seed), + ) + if err = g.Load(); err != nil { + return err + } + defer func() { + if err = g.Close(); err != nil { + runErr = errors.Join(runErr, err) + } + }() + + begin := time.Now() + ops := make([]*benchmark.Op, numOps) + for { + select { + case <-ctx.Done(): + return nil + default: + } + if time.Since(since) > 5*time.Second { + cmd.Printf( + "success_tx=%d err_tx=%d seq=%d rate=%.2f/s overall=%.2f/s\n", + successCount, errCount, accSeq, + float64(successCount-last)/time.Since(since).Seconds(), + float64(successCount)/time.Since(begin).Seconds(), + ) + since = time.Now() + last = successCount + } + + for j := range numOps { + bucket, op, err := g.Next() + if err != nil { + return err + } + op.Actor = storeKeys[bucket] + ops[j] = op + } + msg := &benchmark.MsgLoadTest{ + Caller: clientCtx.FromAddress, + Ops: ops, + } + txf = txf.WithSequence(accSeq) + tx, err := txf.BuildUnsignedTx(msg) + if err != nil { + return err + } + err = clienttx.Sign(clientCtx, txf, clientCtx.From, tx, true) + if err != nil { + return err + } + txBytes, err := clientCtx.TxConfig.TxEncoder()(tx.GetTx()) + if err != nil { + return err + } + res, err := clientCtx.BroadcastTxAsync(txBytes) + if err != nil { + return err + } + if res.Code != 0 { + if verbose { + err = clientCtx.PrintProto(res) + if err != nil { + return err + } + } + errCount++ + } else { + accSeq++ + successCount++ + } + if pause > 0 { + time.Sleep(time.Duration(pause) * time.Millisecond) + } + } + }, + } + + flags.AddTxFlagsToCmd(cmd) + cmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "print the response") + cmd.Flags().Uint64Var(&numOps, "ops", 1, "number of operations per transaction") + cmd.Flags().Int64Var(&pause, "pause", 0, "pause between transactions in milliseconds") + + return cmd +} diff --git a/tools/benchmark/generator/gen.go b/tools/benchmark/generator/gen.go new file mode 100644 index 000000000000..c8c4e2c00c27 --- /dev/null +++ b/tools/benchmark/generator/gen.go @@ -0,0 +1,381 @@ +package gen + +import ( + "encoding" + "encoding/binary" + "errors" + "fmt" + "io" + "iter" + "math/rand/v2" + "os" + + "github.com/cespare/xxhash/v2" + + module "cosmossdk.io/api/cosmos/benchmark/module/v1" + "cosmossdk.io/tools/benchmark" +) + +// Options is the configuration for the generator. +type Options struct { + *module.GeneratorParams + // HomeDir is for reading/writing state + HomeDir string + + InsertWeight float64 + UpdateWeight float64 + GetWeight float64 + DeleteWeight float64 +} + +// State is the state of the generator. +// It can be marshaled and unmarshaled to/from a binary format. +type State struct { + Src interface { + rand.Source + encoding.BinaryMarshaler + encoding.BinaryUnmarshaler + } + Keys [][]Payload +} + +// Marshal writes the state to w. +func (s *State) Marshal(w io.Writer) error { + srcBz, err := s.Src.MarshalBinary() + if err != nil { + return err + } + var n int + n, err = w.Write(srcBz) + if err != nil { + return err + } + if n != 20 { + return fmt.Errorf("expected 20 bytes, got %d", n) + } + if err = binary.Write(w, binary.LittleEndian, uint64(len(s.Keys))); err != nil { + return err + } + for _, bucket := range s.Keys { + if err = binary.Write(w, binary.LittleEndian, uint64(len(bucket))); err != nil { + return err + } + for _, key := range bucket { + if err = binary.Write(w, binary.LittleEndian, key); err != nil { + return err + } + } + } + return nil +} + +// Unmarshal reads the state from r. +func (s *State) Unmarshal(r io.Reader) error { + srcBz := make([]byte, 20) + if _, err := r.Read(srcBz); err != nil { + return err + } + s.Src = rand.NewPCG(0, 0) + if err := s.Src.UnmarshalBinary(srcBz); err != nil { + return err + } + + var n uint64 + if err := binary.Read(r, binary.LittleEndian, &n); err != nil { + return err + } + s.Keys = make([][]Payload, n) + for i := uint64(0); i < n; i++ { + var m uint64 + if err := binary.Read(r, binary.LittleEndian, &m); err != nil { + return err + } + s.Keys[i] = make([]Payload, m) + for j := uint64(0); j < m; j++ { + if err := binary.Read(r, binary.LittleEndian, &s.Keys[i][j]); err != nil { + return err + } + } + } + return nil +} + +// Generator generates operations for a benchmark transaction. +// The generator is stateful, keeping track of which keys have been inserted +// so that meaningful gets and deletes can be generated. +type Generator struct { + Options + + rand *rand.Rand + state *State +} + +type opt func(*Generator) + +// NewGenerator creates a new generator with the given options. +func NewGenerator(opts Options, f ...opt) *Generator { + g := &Generator{ + Options: opts, + state: &State{ + Src: rand.NewPCG(opts.Seed, opts.Seed>>32), + }, + } + g.rand = rand.New(g.state.Src) + for _, fn := range f { + fn(g) + } + return g +} + +// WithGenesis sets the generator state to the genesis seed. +// When the generator is created, it will sync to genesis state. +// The benchmark client needs to do this so that it can generate meaningful tx operations. +func WithGenesis() func(*Generator) { + return func(g *Generator) { + // sync state to genesis seed + g.state.Keys = make([][]Payload, g.BucketCount) + if g.GeneratorParams != nil { + for kv := range g.GenesisSet() { + g.state.Keys[kv.StoreKey] = append(g.state.Keys[kv.StoreKey], kv.Key) + } + } + } +} + +// WithSeed sets the seed for the generator. +func WithSeed(seed uint64) func(*Generator) { + return func(g *Generator) { + g.state.Src = rand.NewPCG(seed, seed>>32) + g.rand = rand.New(g.state.Src) + } +} + +// Load loads the generator state from disk. +func (g *Generator) Load() error { + f := fmt.Sprintf("%s/data/generator_state.bin", g.HomeDir) + r, err := os.Open(f) + if err != nil { + if errors.Is(err, os.ErrNotExist) { + return nil + } + return err + } + return g.state.Unmarshal(r) +} + +// Payload is a 2-tuple of seed and length. +// A seed is uint64 which is used to generate a byte slice of size length. +type Payload [2]uint64 + +// Seed returns the seed in the payload. +func (p Payload) Seed() uint64 { + return p[0] +} + +// Length returns the length in the payload. +func (p Payload) Length() uint64 { + return p[1] +} + +// Bytes returns the byte slice generated from the seed and length. +// The underlying byte slice is deterministically generated using the (very fast) xxhash algorithm. +func (p Payload) Bytes() []byte { + return Bytes(p.Seed(), p.Length()) +} + +func (p Payload) String() string { + return fmt.Sprintf("(%d, %d)", p.Seed(), p.Length()) +} + +func NewPayload(seed, length uint64) Payload { + return Payload{seed, length} +} + +// KV is a key-value pair with a store key. +type KV struct { + StoreKey uint64 + Key Payload + Value Payload +} + +func (g *Generator) fetchKey(bucket uint64) (idx uint64, key Payload, err error) { + bucketLen := uint64(len(g.state.Keys[bucket])) + if bucketLen == 0 { + return 0, Payload{}, fmt.Errorf("no keys in bucket %d", bucket) + } + idx = g.rand.Uint64N(bucketLen) + return idx, g.state.Keys[bucket][idx], nil +} + +func (g *Generator) deleteKey(bucket, idx uint64) { + g.state.Keys[bucket] = append(g.state.Keys[bucket][:idx], g.state.Keys[bucket][idx+1:]...) +} + +func (g *Generator) setKey(bucket uint64, payload Payload) { + g.state.Keys[bucket] = append(g.state.Keys[bucket], payload) +} + +// GenesisSet returns a sequence of key-value pairs for the genesis state. +// It is called by the server during InitGenesis to generate and set the initial state. +// The client uses WithGenesis to sync to the genesis state. +func (g *Generator) GenesisSet() iter.Seq[*KV] { + return func(yield func(*KV) bool) { + for range g.GenesisCount { + seed := g.rand.Uint64() + if !yield(&KV{ + StoreKey: g.UintN(g.BucketCount), + Key: NewPayload(seed, g.getLength(g.KeyMean, g.KeyStdDev)), + Value: NewPayload(seed, g.getLength(g.ValueMean, g.ValueStdDev)), + }) { + return + } + } + } +} + +// Next generates the next benchmark operation. +// The operation is one of insert, update, get, or delete. +// The tx client calls this function to deterministically generate the next operation. +func (g *Generator) Next() (uint64, *benchmark.Op, error) { + if g.InsertWeight+g.UpdateWeight+g.GetWeight+g.DeleteWeight != 1 { + return 0, nil, fmt.Errorf("weights must sum to 1") + } + + var ( + err error + key Payload + ) + x := g.rand.Float64() + bucket := g.UintN(g.BucketCount) + op := &benchmark.Op{ + Exists: true, + } + + switch { + case x < g.InsertWeight: + // insert + op.Seed = g.rand.Uint64() + op.KeyLength = g.getLength(g.KeyMean, g.KeyStdDev) + op.ValueLength = g.getLength(g.ValueMean, g.ValueStdDev) + op.Exists = false + g.setKey(bucket, NewPayload(op.Seed, op.KeyLength)) + case x < g.InsertWeight+g.UpdateWeight: + // update + _, key, err = g.fetchKey(bucket) + if err != nil { + return 0, nil, err + } + op.Seed = key.Seed() + op.KeyLength = key.Length() + op.ValueLength = g.getLength(g.ValueMean, g.ValueStdDev) + case x < g.InsertWeight+g.UpdateWeight+g.GetWeight: + // get + _, key, err = g.fetchKey(bucket) + if err != nil { + return 0, nil, err + } + op.Seed = key.Seed() + op.KeyLength = key.Length() + default: + // delete + var idx uint64 + idx, key, err = g.fetchKey(bucket) + if err != nil { + return 0, nil, err + } + op.Delete = true + op.Seed = key.Seed() + op.KeyLength = key.Length() + g.deleteKey(bucket, idx) + } + + return bucket, op, nil +} + +// NormUint64 returns a random uint64 with a normal distribution. +func (g *Generator) NormUint64(mean, stdDev uint64) uint64 { + return uint64(g.rand.NormFloat64()*float64(stdDev) + float64(mean)) +} + +func (g *Generator) getLength(mean, stdDev uint64) uint64 { + length := g.NormUint64(mean, stdDev) + if length == 0 { + length = 1 + } + return length +} + +// UintN returns a random uint64 in the range [0, n). +func (g *Generator) UintN(n uint64) uint64 { + return g.rand.Uint64N(n) +} + +func (g *Generator) Close() error { + f := fmt.Sprintf("%s/data/generator_state.bin", g.HomeDir) + w, err := os.Create(f) + if err != nil { + return err + } + return g.state.Marshal(w) +} + +func encodeUint64(x uint64) []byte { + var b [8]byte + b[0] = byte(x) + b[1] = byte(x >> 8) + b[2] = byte(x >> 16) + b[3] = byte(x >> 24) + b[4] = byte(x >> 32) + b[5] = byte(x >> 40) + b[6] = byte(x >> 48) + b[7] = byte(x >> 56) + return b[:] +} + +const maxStoreKeyGenIterations = 100 + +// StoreKeys deterministically generates a set of unique store keys from seed. +func StoreKeys(prefix string, seed, count uint64) ([]string, error) { + r := rand.New(rand.NewPCG(seed, seed>>32)) + keys := make([]string, count) + seen := make(map[string]struct{}) + + var i, j uint64 + for i < count { + if j > maxStoreKeyGenIterations { + return nil, fmt.Errorf("failed to generate %d unique store keys", count) + } + sk := fmt.Sprintf("%s_%x", prefix, Bytes(r.Uint64(), 8)) + if _, ok := seen[sk]; ok { + j++ + continue + } + keys[i] = sk + seen[sk] = struct{}{} + i++ + j++ + } + return keys, nil +} + +// Bytes generates a byte slice of length length from seed. +// The byte slice is deterministically generated using the (very fast) xxhash algorithm. +func Bytes(seed, length uint64) []byte { + b := make([]byte, length) + rounds := length / 8 + remainder := length % 8 + var h uint64 + for i := uint64(0); i < rounds; i++ { + h = xxhash.Sum64(encodeUint64(seed + i)) + for j := uint64(0); j < 8; j++ { + b[i*8+j] = byte(h >> (8 * j)) + } + } + if remainder > 0 { + h = xxhash.Sum64(encodeUint64(seed + rounds)) + for j := uint64(0); j < remainder; j++ { + b[rounds*8+j] = byte(h >> (8 * j)) + } + } + return b +} diff --git a/tools/benchmark/generator/gen_test.go b/tools/benchmark/generator/gen_test.go new file mode 100644 index 000000000000..3a0ee8ca1571 --- /dev/null +++ b/tools/benchmark/generator/gen_test.go @@ -0,0 +1,138 @@ +package gen + +import ( + "bytes" + "testing" + + "github.com/cespare/xxhash/v2" + "github.com/stretchr/testify/require" + + benchmarkmodulev1 "cosmossdk.io/api/cosmos/benchmark/module/v1" +) + +func Test_Genesis(t *testing.T) { + params := &benchmarkmodulev1.GeneratorParams{ + Seed: 34, + BucketCount: 10, + GenesisCount: 2_000_000, + KeyMean: 64, + KeyStdDev: 8, + ValueMean: 1024, + ValueStdDev: 256, + } + g := NewGenerator(Options{GeneratorParams: params}) + db := make(map[uint64]map[uint64]bool) + for kv := range g.GenesisSet() { + if _, ok := db[kv.StoreKey]; !ok { + db[kv.StoreKey] = make(map[uint64]bool) + } + db[kv.StoreKey][kv.Key[0]] = true + } + + g = NewGenerator(Options{ + GeneratorParams: params, + InsertWeight: 0.25, + DeleteWeight: 0.05, + UpdateWeight: 0.50, + GetWeight: 0.20, + }, WithGenesis()) + for range 100_000 { + sk, op, err := g.Next() + require.NoError(t, err) + switch { + case op.Delete: + require.True(t, db[sk][op.Seed]) + delete(db[sk], op.Seed) + case op.ValueLength > 0: + if op.Exists { + // update + require.True(t, db[sk][op.Seed]) + } else { + // insert + require.False(t, db[sk][op.Seed]) + } + db[sk][op.Seed] = true + case op.ValueLength == 0: + // get + require.True(t, db[sk][op.Seed]) + default: + t.Fatalf("unexpected op: %v", op) + } + } + + // Test state Marshal/Unmarshal + var buf bytes.Buffer + require.NoError(t, g.state.Marshal(&buf)) + s := &State{} + require.NoError(t, s.Unmarshal(bytes.NewReader(buf.Bytes()))) + require.Equal(t, len(g.state.Keys), len(s.Keys)) + for i := range g.state.Keys { + require.Equal(t, len(g.state.Keys[i]), len(s.Keys[i])) + for j := range g.state.Keys[i] { + require.Equal(t, g.state.Keys[i][j], s.Keys[i][j]) + } + } +} + +func Test_Genesis_BytesKey(t *testing.T) { + params := &benchmarkmodulev1.GeneratorParams{ + Seed: 34, + BucketCount: 10, + GenesisCount: 2_000_000, + KeyMean: 64, + KeyStdDev: 8, + ValueMean: 1024, + ValueStdDev: 256, + } + g := NewGenerator(Options{GeneratorParams: params}) + db := make(map[uint64]map[uint64]bool) + for kv := range g.GenesisSet() { + if _, ok := db[kv.StoreKey]; !ok { + db[kv.StoreKey] = make(map[uint64]bool) + } + key := xxhash.Sum64(Bytes(kv.Key.Seed(), kv.Key.Length())) + db[kv.StoreKey][key] = true + } + + g = NewGenerator(Options{ + GeneratorParams: params, + InsertWeight: 0.25, + DeleteWeight: 0.05, + UpdateWeight: 0.50, + GetWeight: 0.20, + }, WithGenesis()) + for range 1_000_000 { + sk, op, err := g.Next() + require.NoError(t, err) + key := xxhash.Sum64(Bytes(op.Seed, op.KeyLength)) + switch { + case op.Delete: + require.True(t, db[sk][key]) + delete(db[sk], key) + case op.ValueLength > 0: + if op.Exists { + // update + require.True(t, db[sk][key]) + } else { + // insert + require.False(t, db[sk][key]) + } + db[sk][key] = true + case op.ValueLength == 0: + // get + require.True(t, db[sk][key]) + default: + t.Fatalf("unexpected op: %v", op) + } + } +} + +func Test_Bytes_Deterministic(t *testing.T) { + seed := uint64(12345) + length := uint64(53) + expected := Bytes(seed, length) + for i := 0; i < 100; i++ { + result := Bytes(seed, length) + require.Equal(t, expected, result, "Bytes() should be deterministic") + } +} diff --git a/tools/benchmark/go.mod b/tools/benchmark/go.mod new file mode 100644 index 000000000000..dc5e5bda5937 --- /dev/null +++ b/tools/benchmark/go.mod @@ -0,0 +1,158 @@ +module cosmossdk.io/tools/benchmark + +go 1.23.2 + +require ( + cosmossdk.io/api v0.7.6 + cosmossdk.io/core v1.0.0-alpha.6 + cosmossdk.io/depinject v1.1.0 + cosmossdk.io/log v1.5.0 + github.com/cespare/xxhash/v2 v2.3.0 + github.com/cosmos/cosmos-sdk v0.53.0 + github.com/cosmos/gogoproto v1.7.0 + github.com/grpc-ecosystem/grpc-gateway v1.16.0 + github.com/spf13/cobra v1.8.1 + github.com/stretchr/testify v1.10.0 + google.golang.org/grpc v1.68.1 +) + +require ( + buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1 // indirect + buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1 // indirect + cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b // indirect + cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e // indirect + cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/math v1.4.0 // indirect + cosmossdk.io/schema v0.4.0 // indirect + cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc // indirect + cosmossdk.io/x/tx v1.0.0-alpha.1 // indirect + filippo.io/edwards25519 v1.1.0 // indirect + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/DataDog/datadog-go v4.8.3+incompatible // indirect + github.com/DataDog/zstd v1.5.5 // indirect + github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bgentry/speakeasy v0.2.0 // indirect + github.com/btcsuite/btcd/btcec/v2 v2.3.4 // indirect + github.com/bytedance/sonic v1.12.4 // indirect + github.com/bytedance/sonic/loader v0.2.1 // indirect + github.com/cloudwego/base64x v0.1.4 // indirect + github.com/cloudwego/iasm v0.2.0 // indirect + github.com/cockroachdb/errors v1.11.3 // indirect + github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce // indirect + github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect + github.com/cockroachdb/pebble v1.1.2 // indirect + github.com/cockroachdb/redact v1.1.5 // indirect + github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect + github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9 // indirect + github.com/cometbft/cometbft-db v1.0.1 // indirect + github.com/cometbft/cometbft/api v1.0.0-rc2 // indirect + github.com/cosmos/btcutil v1.0.5 // indirect + github.com/cosmos/cosmos-proto v1.0.0-beta.5 // indirect + github.com/cosmos/go-bip39 v1.0.0 // indirect + github.com/cosmos/iavl v1.3.2 // indirect + github.com/cosmos/ics23/go v0.11.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect + github.com/danieljoos/wincred v1.2.1 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect + github.com/dgraph-io/badger/v4 v4.4.0 // indirect + github.com/dgraph-io/ristretto/v2 v2.0.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/emicklei/dot v1.6.2 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect + github.com/getsentry/sentry-go v0.27.0 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.6.0 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/btree v1.1.3 // indirect + github.com/google/flatbuffers v24.3.25+incompatible // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/gorilla/websocket v1.5.3 // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-metrics v0.5.3 // indirect + github.com/hashicorp/golang-lru v1.0.2 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect + github.com/hdevalence/ed25519consensus v0.2.0 // indirect + github.com/iancoleman/strcase v0.3.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/jmhodges/levigo v1.0.0 // indirect + github.com/klauspost/compress v1.17.11 // indirect + github.com/klauspost/cpuid/v2 v2.2.9 // indirect + github.com/kr/pretty v0.3.1 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/linxGnu/grocksdb v1.9.3 // indirect + github.com/magiconair/properties v1.8.9 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mtibben/percent v0.2.1 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect + github.com/pelletier/go-toml/v2 v2.2.3 // indirect + github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.20.5 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.61.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect + github.com/rs/zerolog v1.33.0 // indirect + github.com/sagikazarmark/locafero v0.4.0 // indirect + github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/sasha-s/go-deadlock v0.3.5 // indirect + github.com/sourcegraph/conc v0.3.0 // indirect + github.com/spf13/afero v1.11.0 // indirect + github.com/spf13/cast v1.7.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.19.0 // indirect + github.com/subosito/gotenv v1.6.0 // indirect + github.com/supranational/blst v0.3.13 // indirect + github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect + github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect + 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/arch v0.12.0 // indirect + golang.org/x/crypto v0.31.0 // indirect + golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect + golang.org/x/mod v0.22.0 // indirect + golang.org/x/net v0.32.0 // indirect + golang.org/x/sync v0.10.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/term v0.27.0 // indirect + golang.org/x/text v0.21.0 // indirect + golang.org/x/tools v0.27.0 // indirect + google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a // indirect + google.golang.org/protobuf v1.35.2 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect + gotest.tools/v3 v3.5.1 // indirect + pgregory.net/rapid v1.1.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect +) + +replace ( + cosmossdk.io/api => ../../api + cosmossdk.io/store => ../../store + cosmossdk.io/x/bank => ../../x/bank + cosmossdk.io/x/staking => ../../x/staking + github.com/cosmos/cosmos-sdk => ../../ +) diff --git a/tools/benchmark/go.sum b/tools/benchmark/go.sum new file mode 100644 index 000000000000..55a476ac0849 --- /dev/null +++ b/tools/benchmark/go.sum @@ -0,0 +1,622 @@ +buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1 h1:kAu+bRyXqQWarx/4mAdKFYW6bgvjGKhzvIXJvMHivC4= +buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.35.2-20241120201313-68e42a58b301.1/go.mod h1:wqOtclGXqh+7m/L6fn0SatBJ+m9E5muF/41a3LgIPVI= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1 h1:FYhA+EOS18QBdffLVpisUjBGsCtUljMx4bFOsZT81ZM= +buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.35.2-20240130113600-88ef6483f90f.1/go.mod h1:17Ax38yd8pg56din4ecwSDBRCSX0qLcif5Cdf8ayto4= +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b h1:MgU4EDOo/pXgepHCUFQFnIfUCxk/JO0AJGDTUQhhEhg= +cosmossdk.io/collections v0.4.1-0.20241128094659-bd76b47e1d8b/go.mod h1:uf12i1yKvzEIHt2ok7poNqFDQTb71O00RQLitSynmrg= +cosmossdk.io/core v1.0.0-alpha.6 h1:5ukC4JcQKmemLQXcAgu/QoOvJI50hpBkIIg4ZT2EN8E= +cosmossdk.io/core v1.0.0-alpha.6/go.mod h1:3u9cWq1FAVtiiCrDPpo4LhR+9V6k/ycSG4/Y/tREWCY= +cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e h1:F+ScucYxwrrDJU8guJXQXpGhdpziYSbxW6HMP2wCNxs= +cosmossdk.io/core/testing v0.0.0-20241108153815-606544c7be7e/go.mod h1:3YvVv9aJayjPhdX0DY1IMrGse4sR63hNBWx2VtDWjGQ= +cosmossdk.io/depinject v1.1.0 h1:wLan7LG35VM7Yo6ov0jId3RHWCGRhe8E8bsuARorl5E= +cosmossdk.io/depinject v1.1.0/go.mod h1:kkI5H9jCGHeKeYWXTqYdruogYrEeWvBQCw1Pj4/eCFI= +cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= +cosmossdk.io/errors v1.0.1/go.mod h1:MeelVSZThMi4bEakzhhhE/CKqVv3nOJDA25bIqRDu/U= +cosmossdk.io/log v1.5.0 h1:dVdzPJW9kMrnAYyMf1duqacoidB9uZIl+7c6z0mnq0g= +cosmossdk.io/log v1.5.0/go.mod h1:Tr46PUJjiUthlwQ+hxYtUtPn4D/oCZXAkYevBeh5+FI= +cosmossdk.io/math v1.4.0 h1:XbgExXFnXmF/CccPPEto40gOO7FpWu9yWNAZPN3nkNQ= +cosmossdk.io/math v1.4.0/go.mod h1:O5PkD4apz2jZs4zqFdTr16e1dcaQCc5z6lkEnrrppuk= +cosmossdk.io/schema v0.4.0 h1:TrBs5BUnGqniAwEBVsjiisrAk3h3DK/zHLU1O8fRnO0= +cosmossdk.io/schema v0.4.0/go.mod h1:RDAhxIeNB4bYqAlF4NBJwRrgtnciMcyyg0DOKnhNZQQ= +cosmossdk.io/x/tx v1.0.0-alpha.1 h1:5w61etWMQbdCSR7uveWXCnGnD5eQ/64B2vzIhqA80yo= +cosmossdk.io/x/tx v1.0.0-alpha.1/go.mod h1:xlJjZV1wxZBTCP+ygZx9pNT/XxsfHDPf1H0VhHaUp5w= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= +github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= +github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ= +github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= +github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bgentry/speakeasy v0.2.0 h1:tgObeVOf8WAvtuAX6DhJ4xks4CFNwPDZiqzGqIHE51E= +github.com/bgentry/speakeasy v0.2.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/btcsuite/btcd/btcec/v2 v2.3.4 h1:3EJjcN70HCu/mwqlUsGK8GcNVyLVxFDlWurTXGPFfiQ= +github.com/btcsuite/btcd/btcec/v2 v2.3.4/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= +github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/AYFd6c= +github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE= +github.com/bytedance/sonic v1.12.4 h1:9Csb3c9ZJhfUWeMtpCDCq6BUoH5ogfDFLUgQ/jG+R0k= +github.com/bytedance/sonic v1.12.4/go.mod h1:B8Gt/XvtZ3Fqj+iSKMypzymZxw/FVwgIGKzMzT9r/rk= +github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/bytedance/sonic/loader v0.2.1 h1:1GgorWTqf12TA8mma4DDSbaQigE2wOgQo7iCjjJv3+E= +github.com/bytedance/sonic/loader v0.2.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y= +github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w= +github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg= +github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f h1:otljaYPt5hWxV3MUfO5dFPFiOXg9CyG5/kCfayTqsJ4= +github.com/cockroachdb/datadriven v1.0.3-0.20230413201302-be42291fc80f/go.mod h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU= +github.com/cockroachdb/errors v1.11.3 h1:5bA+k2Y6r+oz/6Z/RFlNeVCesGARKuC6YymtcDrbC/I= +github.com/cockroachdb/errors v1.11.3/go.mod h1:m4UIW4CDjx+R5cybPsNrRbreomiFqt8o1h1wUVazSd8= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce h1:giXvy4KSc/6g/esnpM7Geqxka4WSqI1SZc7sMJFd3y4= +github.com/cockroachdb/fifo v0.0.0-20240606204812-0bbfbd93a7ce/go.mod h1:9/y3cnZ5GKakj/H4y9r9GTjCvAFta7KLgSHPJJYc52M= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= +github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= +github.com/cockroachdb/pebble v1.1.2 h1:CUh2IPtR4swHlEj48Rhfzw6l/d0qA31fItcIszQVIsA= +github.com/cockroachdb/pebble v1.1.2/go.mod h1:4exszw1r40423ZsmkG/09AFEG83I0uDgfujJdbL6kYU= +github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= +github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= +github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1:7nc4anLGjupUW/PeY5qiNYsdNXj7zopG+eqsS7To5IQ= +github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9 h1:moNybQ29M6OzirXBd7DBg1FERRECndXCEnlJSCIaMvo= +github.com/cometbft/cometbft v1.0.0-rc2.0.20241127125717-4ce33b646ac9/go.mod h1:GMmx+Ol327wKu+M/aMIZgOaagm8CC24CqVaC4zTpEok= +github.com/cometbft/cometbft-db v1.0.1 h1:SylKuLseMLQKw3+i8y8KozZyJcQSL98qEe2CGMCGTYE= +github.com/cometbft/cometbft-db v1.0.1/go.mod h1:EBrFs1GDRiTqrWXYi4v90Awf/gcdD5ExzdPbg4X8+mk= +github.com/cometbft/cometbft/api v1.0.0-rc2 h1:ThzvNaJq37htjzfSsohhDoEebW94p0lEjA39CMDJ4xs= +github.com/cometbft/cometbft/api v1.0.0-rc2/go.mod h1:EkQiqVSu/p2ebrZEnB2z6Re7r8XNe//M7ylR0qEwWm0= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= +github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= +github.com/cosmos/cosmos-db v1.1.0 h1:KLHNVQ73h7vawXTpj9UJ7ZR2IXv51tsEHkQJJ9EBDzI= +github.com/cosmos/cosmos-db v1.1.0/go.mod h1:t7c4A6cfGdpUwwVxrQ0gQLeRQqGUBJu0yvE4F/26REg= +github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+RC5W7ZfmxJLA= +github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= +github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= +github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= +github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= +github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= +github.com/cosmos/gogoproto v1.7.0 h1:79USr0oyXAbxg3rspGh/m4SWNyoz/GLaAh0QlCe2fro= +github.com/cosmos/gogoproto v1.7.0/go.mod h1:yWChEv5IUEYURQasfyBW5ffkMHR/90hiHgbNgrtp4j0= +github.com/cosmos/iavl v1.3.2 h1:pQyZMG+N/dzmpSV0IXXpSa86Dz7AmIwNjXku3xBrL60= +github.com/cosmos/iavl v1.3.2/go.mod h1:T6SfBcyhulVIY2G/ZtAtQm/QiJvsuhIos52V4dWYk88= +github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU= +github.com/cosmos/ics23/go v0.11.0/go.mod h1:A8OjxPE67hHST4Icw94hOxxFEJMBG031xIGF/JHNIY0= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= +github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/decred/dcrd/crypto/blake256 v1.0.1 h1:7PltbUIQB7u/FfZ39+DGa/ShuMyJ5ilcvdfma9wOH6Y= +github.com/decred/dcrd/crypto/blake256 v1.0.1/go.mod h1:2OfgNZ5wDpcsFmHmCK5gZTPcCXqlm2ArzUIkw9czNJo= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 h1:rpfIENRNNilwHwZeG5+P150SMrnNEcHYvcCuK6dPZSg= +github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0/go.mod h1:v57UDF4pDQJcEfFUCRop3lJL149eHGSe9Jvczhzjo/0= +github.com/dgraph-io/badger/v4 v4.4.0 h1:rA48XiDynZLyMdlaJl67p9+lqfqwxlgKtCpYLAio7Zk= +github.com/dgraph-io/badger/v4 v4.4.0/go.mod h1:sONMmPPfbnj9FPwS/etCqky/ULth6CQJuAZSuWCmixE= +github.com/dgraph-io/ristretto/v2 v2.0.0 h1:l0yiSOtlJvc0otkqyMaDNysg8E9/F/TYZwMbxscNOAQ= +github.com/dgraph-io/ristretto/v2 v2.0.0/go.mod h1:FVFokF2dRqXyPyeMnK1YDy8Fc6aTe0IKgbcd03CYeEk= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= +github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A= +github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= +github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/getsentry/sentry-go v0.27.0 h1:Pv98CIbtB3LkMWmXi4Joa5OOcwbmnX88sF5qbK3r3Ps= +github.com/getsentry/sentry-go v0.27.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= +github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= +github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI= +github.com/google/flatbuffers v24.3.25+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= +github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= +github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= +github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= +github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= +github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-metrics v0.5.3 h1:M5uADWMOGCTUNU1YuC4hfknOeHNaX54LDm4oYSucoNE= +github.com/hashicorp/go-metrics v0.5.3/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= +github.com/hashicorp/go-plugin v1.6.2 h1:zdGAEd0V1lCaU0u+MxWQhtSDQmahpkwOun8U8EiRVog= +github.com/hashicorp/go-plugin v1.6.2/go.mod h1:CkgLQ5CZqNmdL9U9JzM532t8ZiYQ35+pj3b1FD37R0Q= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8= +github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns= +github.com/hdevalence/ed25519consensus v0.2.0 h1:37ICyZqdyj0lAZ8P4D1d1id3HqbbG1N3iBb1Tb4rdcU= +github.com/hdevalence/ed25519consensus v0.2.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/huandu/skiplist v1.2.1 h1:dTi93MgjwErA/8idWTzIw4Y1kZsMWx35fmI2c8Rij7w= +github.com/huandu/skiplist v1.2.1/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= +github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY= +github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8= +github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/linxGnu/grocksdb v1.9.3 h1:s1cbPcOd0cU2SKXRG1nEqCOWYAELQjdqg3RVI2MH9ik= +github.com/linxGnu/grocksdb v1.9.3/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= +github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM= +github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/minio/highwayhash v1.0.3 h1:kbnuUMoHYyVl7szWjSxJnxw11k2U709jqFPPmIUyD6Q= +github.com/minio/highwayhash v1.0.3/go.mod h1:GGYsuwP/fPD6Y9hMiXuapVvlIUEhFhMTh0rxU3ik1LQ= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.28.1 h1:MijcGUbfYuznzK/5R4CPNoUP/9Xvuo20sXfEm6XxoTA= +github.com/onsi/gomega v1.28.1/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= +github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7 h1:Dx7Ovyv/SFnMFw3fD4oEoeorXc6saIiQ23LrGLth0Gw= +github.com/petermattis/goid v0.0.0-20240813172612-4fcff4a6cae7/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= +github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+bR9r+8l63Y= +github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= +github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= +github.com/prometheus/common v0.61.0 h1:3gv/GThfX0cV2lpO7gkTUwZru38mxevy90Bj8YFSRQQ= +github.com/prometheus/common v0.61.0/go.mod h1:zr29OCN/2BsJRaFwG8QOBr41D6kkchKbpeNH7pAjb/s= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= +github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= +github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= +github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= +github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= +github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= +github.com/sasha-s/go-deadlock v0.3.5 h1:tNCOEEDG6tBqrNDOX35j/7hL5FcFViG6awUGROb2NsU= +github.com/sasha-s/go-deadlock v0.3.5/go.mod h1:bugP6EGbdGYObIlx7pUZtWqlvo8k9H6vCBBsiChJQ5U= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= +github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= +github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= +github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= +github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/supranational/blst v0.3.13 h1:AYeSxdOMacwu7FBmpfloBz5pbFXDmJL33RuwnKtmTjk= +github.com/supranational/blst v0.3.13/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= +github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= +github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= +github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b h1:CzigHMRySiX3drau9C6Q5CAbNIApmLdat5jPMqChvDA= +gitlab.com/yawning/secp256k1-voi v0.0.0-20230925100816-f2616030848b/go.mod h1:/y/V339mxv2sZmYYR64O07VuCpdNZqCTwO8ZcouTMI8= +gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02 h1:qwDnMxjkyLmAFgcfgTnfJrmYKWhHnci3GjDqcZp1M3Q= +gitlab.com/yawning/tuplehash v0.0.0-20230713102510-df83abbf9a02/go.mod h1:JTnUj0mpYiAsuZLmKjTx/ex3AtMowcCgnE7YNyCEP0I= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 h1:qxen9oVGzDdIRP6ejyAJc760RwW4SnVDiTYTzwnXuxo= +go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5/go.mod h1:eW0HG9/oHQhvRCvb1/pIXW4cOvtDqeQK+XSi3TnwaXY= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU= +go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +golang.org/x/arch v0.12.0 h1:UsYJhbzPYGsT0HbEdmYcqtCv8UNGvnaL561NnIUvaKg= +golang.org/x/arch v0.12.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= +golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f h1:XdNn9LlyWAhLVp6P/i8QYBW+hlyhrhei9uErw2B5GJo= +golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f/go.mod h1:D5SMRVC3C2/4+F/DB1wZsLRnSNimn2Sp/NPsCrsv8ak= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= +golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o= +golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de h1:F6qOa9AZTYJXOUEr4jDysRDLrm4PHePlge4v4TGAlxY= +google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:VUhTRKeHn9wwcdrk73nvdC9gF178Tzhmt/qyaFcPLSo= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a h1:hgh8P4EuoxpsuKMXX/To36nOFD7vixReXgn8lPGnt+o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241202173237-19429a94021a/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= +google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= +pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= +pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/tools/benchmark/module/depinject.go b/tools/benchmark/module/depinject.go new file mode 100644 index 000000000000..815248cc5993 --- /dev/null +++ b/tools/benchmark/module/depinject.go @@ -0,0 +1,69 @@ +package module + +import ( + "unsafe" + + modulev1 "cosmossdk.io/api/cosmos/benchmark/module/v1" + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/store" + "cosmossdk.io/depinject" + "cosmossdk.io/depinject/appconfig" + "cosmossdk.io/log" + gen "cosmossdk.io/tools/benchmark/generator" +) + +const ( + ModuleName = "benchmark" + maxStoreKeyGenIterations = 100 +) + +func init() { + appconfig.RegisterModule( + &modulev1.Module{}, + appconfig.Provide( + ProvideModule, + ), + ) +} + +type StoreKeyRegistrar interface { + RegisterKey(string) +} + +type Input struct { + depinject.In + + Logger log.Logger + Cfg *modulev1.Module + Registrar StoreKeyRegistrar `optional:"true"` + StoreFactory store.KVStoreServiceFactory +} + +func ProvideModule( + in Input, +) (appmodule.AppModule, error) { + cfg := in.Cfg + kvMap := make(KVServiceMap) + storeKeys, err := gen.StoreKeys(ModuleName, cfg.GenesisParams.Seed, cfg.GenesisParams.BucketCount) + if err != nil { + return nil, err + } + for _, sk := range storeKeys { + // app v2 case + if in.Registrar != nil { + in.Registrar.RegisterKey(sk) + } + kvService := in.StoreFactory(unsafeStrToBytes(sk)) + kvMap[sk] = kvService + } + + return NewAppModule(cfg.GenesisParams, storeKeys, kvMap, in.Logger), nil +} + +type KVServiceMap map[string]store.KVStoreService + +// unsafeStrToBytes uses unsafe to convert string into byte array. Returned bytes +// must not be altered after this function is called as it will cause a segmentation fault. +func unsafeStrToBytes(s string) []byte { + return unsafe.Slice(unsafe.StringData(s), len(s)) // ref https://github.com/golang/go/issues/53003#issuecomment-1140276077 +} diff --git a/tools/benchmark/module/keeper.go b/tools/benchmark/module/keeper.go new file mode 100644 index 000000000000..e5c62543e3da --- /dev/null +++ b/tools/benchmark/module/keeper.go @@ -0,0 +1,119 @@ +package module + +import ( + "context" + "fmt" + + "cosmossdk.io/tools/benchmark" + gen "cosmossdk.io/tools/benchmark/generator" + + "github.com/cosmos/cosmos-sdk/telemetry" +) + +var ( + _ benchmark.MsgServer = &Keeper{} + metricOpKey = []string{"benchmark", "op"} + metricGetKey = append(metricOpKey, "get") + metricDelete = append(metricOpKey, "delete") + metricInsertKey = append(metricOpKey, "insert") + metricUpdateKey = append(metricOpKey, "update") + metricTotalKey = []string{"benchmark", "total"} + metricMissKey = []string{"benchmark", "miss"} +) + +type Keeper struct { + kvServiceMap KVServiceMap + validate bool + errExit bool +} + +func NewKeeper(kvMap KVServiceMap) *Keeper { + k := &Keeper{ + kvServiceMap: kvMap, + validate: false, + errExit: false, + } + return k +} + +func (k *Keeper) LoadTest(ctx context.Context, msg *benchmark.MsgLoadTest) (*benchmark.MsgLoadTestResponse, error) { + res := &benchmark.MsgLoadTestResponse{} + for _, op := range msg.Ops { + telemetry.IncrCounter(1, metricTotalKey...) + err := k.executeOp(ctx, op) + if err != nil { + return res, err + } + } + return res, nil +} + +func (k *Keeper) executeOp(ctx context.Context, op *benchmark.Op) error { + svc, ok := k.kvServiceMap[op.Actor] + key := gen.Bytes(op.Seed, op.KeyLength) + if !ok { + return fmt.Errorf("actor %s not found", op.Actor) + } + kv := svc.OpenKVStore(ctx) + switch { + case op.Delete: + telemetry.IncrCounter(1, metricDelete...) + if k.validate { + exists, err := kv.Has(key) + if err != nil { + return err + } + if !exists { + telemetry.IncrCounter(1, metricMissKey...) + if k.errExit { + return fmt.Errorf("key %d not found", op.Seed) + } + } + } + return kv.Delete(key) + case op.ValueLength > 0: + metricKey := metricInsertKey + if op.Exists { + metricKey = metricUpdateKey + } + telemetry.IncrCounter(1, metricKey...) + if k.validate { + exists, err := kv.Has(key) + if err != nil { + return err + } + if exists != op.Exists { + telemetry.IncrCounter(1, metricMissKey...) + if k.errExit { + return fmt.Errorf("key %d exists=%t, expected=%t", op.Seed, exists, op.Exists) + } + } + } + value := gen.Bytes(op.Seed, op.ValueLength) + return kv.Set(key, value) + case op.Iterations > 0: + return fmt.Errorf("iterator not implemented") + case op.ValueLength == 0: + telemetry.IncrCounter(1, metricGetKey...) + v, err := kv.Get(key) + if v == nil { + // always count a miss on GET since it requires no extra I/O + telemetry.IncrCounter(1, metricMissKey...) + if k.errExit { + return fmt.Errorf("key %s not found", key) + } + } + return err + default: + return fmt.Errorf("invalid op: %+v", op) + } +} + +func (k *Keeper) set(ctx context.Context, actor string, key, value []byte) error { + svc, ok := k.kvServiceMap[actor] + if !ok { + return fmt.Errorf("actor %s not found", actor) + } + kv := svc.OpenKVStore(ctx) + return kv.Set(key, value) +} diff --git a/tools/benchmark/module/module.go b/tools/benchmark/module/module.go new file mode 100644 index 000000000000..5bf1910d6362 --- /dev/null +++ b/tools/benchmark/module/module.go @@ -0,0 +1,107 @@ +package module + +import ( + "context" + "encoding/json" + + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + "google.golang.org/grpc" + + modulev1 "cosmossdk.io/api/cosmos/benchmark/module/v1" + _ "cosmossdk.io/api/cosmos/benchmark/v1" // for some reason this is required to make msg server registration work + "cosmossdk.io/core/appmodule" + "cosmossdk.io/core/registry" + "cosmossdk.io/core/transaction" + "cosmossdk.io/log" + "cosmossdk.io/tools/benchmark" + "cosmossdk.io/tools/benchmark/client/cli" + gen "cosmossdk.io/tools/benchmark/generator" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/types/module" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +var ( + _ module.HasGRPCGateway = &AppModule{} + _ appmodule.AppModule = &AppModule{} + _ appmodule.HasGenesis = &AppModule{} +) + +type AppModule struct { + keeper *Keeper + storeKeys []string + genesisParams *modulev1.GeneratorParams + log log.Logger +} + +func NewAppModule( + genesisParams *modulev1.GeneratorParams, + storeKeys []string, + kvMap KVServiceMap, + logger log.Logger, +) *AppModule { + return &AppModule{ + genesisParams: genesisParams, + keeper: NewKeeper(kvMap), + storeKeys: storeKeys, + log: logger, + } +} + +// DefaultGenesis implements appmodulev2.HasGenesis. +func (a *AppModule) DefaultGenesis() json.RawMessage { + return nil +} + +// ExportGenesis implements appmodulev2.HasGenesis. +func (a *AppModule) ExportGenesis(context.Context) (json.RawMessage, error) { return nil, nil } + +// InitGenesis implements appmodulev2.HasGenesis. +func (a *AppModule) InitGenesis(ctx context.Context, _ json.RawMessage) error { + a.genesisParams.BucketCount = uint64(len(a.storeKeys)) + g := gen.NewGenerator(gen.Options{GeneratorParams: a.genesisParams}) + i := 0 + for kv := range g.GenesisSet() { + i++ + if i%100_000 == 0 { + a.log.Warn("benchmark: init genesis", "progress", i, "total", a.genesisParams.GenesisCount) + } + sk := a.storeKeys[kv.StoreKey] + key := gen.Bytes(kv.Key.Seed(), kv.Key.Length()) + value := gen.Bytes(kv.Value.Seed(), kv.Value.Length()) + err := a.keeper.set(ctx, sk, key, value) + if err != nil { + return err + } + } + return nil +} + +// ValidateGenesis implements appmodulev2.HasGenesis. +func (a *AppModule) ValidateGenesis(data json.RawMessage) error { return nil } + +func (a *AppModule) RegisterGRPCGatewayRoutes(client.Context, *runtime.ServeMux) { +} + +// RegisterServices registers module services. +func (a *AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { + benchmark.RegisterMsgServer(registrar, a.keeper) + return nil +} + +func (a *AppModule) RegisterInterfaces(registrar registry.InterfaceRegistrar) { + registrar.RegisterImplementations( + (*transaction.Msg)(nil), + &benchmark.MsgLoadTest{}) + msgservice.RegisterMsgServiceDesc(registrar, &benchmark.Msg_serviceDesc) +} + +func (a *AppModule) GetTxCmd() *cobra.Command { + return cli.NewTxCmd(a.genesisParams) +} + +func (a *AppModule) IsOnePerModuleType() {} + +func (a *AppModule) IsAppModule() {} diff --git a/tools/benchmark/proto/buf.gen.gogo.yaml b/tools/benchmark/proto/buf.gen.gogo.yaml new file mode 100644 index 000000000000..db36231d0c82 --- /dev/null +++ b/tools/benchmark/proto/buf.gen.gogo.yaml @@ -0,0 +1,8 @@ +version: v1 +plugins: + - name: gocosmos + out: .. + opt: plugins=grpc,Mgoogle/protobuf/any.proto=github.com/cosmos/gogoproto/types/any + - name: grpc-gateway + out: .. + opt: logtostderr=true,allow_colon_final_segments=true diff --git a/tools/benchmark/proto/buf.gen.pulsar.yaml b/tools/benchmark/proto/buf.gen.pulsar.yaml new file mode 100644 index 000000000000..cb908f80c9f0 --- /dev/null +++ b/tools/benchmark/proto/buf.gen.pulsar.yaml @@ -0,0 +1,19 @@ +version: v1 +managed: + enabled: true + go_package_prefix: + default: cosmossdk.io/api + except: + - buf.build/googleapis/googleapis + - buf.build/cosmos/gogo-proto + - buf.build/cosmos/cosmos-proto + override: + buf.build/cosmos/cosmos-sdk: cosmossdk.io/api + buf.build/cometbft/cometbft: buf.build/gen/go/cometbft/cometbft/protocolbuffers/go +plugins: + - name: go-pulsar + out: .. + opt: paths=source_relative + - name: go-grpc + out: .. + opt: paths=source_relative diff --git a/tools/benchmark/proto/buf.lock b/tools/benchmark/proto/buf.lock new file mode 100644 index 000000000000..02bbfddc729d --- /dev/null +++ b/tools/benchmark/proto/buf.lock @@ -0,0 +1,38 @@ +# Generated by buf. DO NOT EDIT. +version: v1 +deps: + - remote: buf.build + owner: cometbft + repository: cometbft + commit: c0d3497e35d649538679874acdd86660 + digest: shake256:05d2fb9e6b6bf82385ac26b250afbba281a2ca79f51729291373d24ca676d743183bf70a921daae6feafd5f9917120e2548a7c477d9743f668bca27cc1e12fdf + - remote: buf.build + owner: cosmos + repository: cosmos-proto + commit: 04467658e59e44bbb22fe568206e1f70 + digest: shake256:73a640bd60e0c523b0f8237ff34eab67c45a38b64bbbde1d80224819d272dbf316ac183526bd245f994af6608b025f5130483d0133c5edd385531326b5990466 + - remote: buf.build + owner: cosmos + repository: cosmos-sdk + commit: 05419252bcc241ea8023acf1ed4cadc5 + digest: shake256:1e54a48c19a8b59d35e0a7efa76402939f515f2d8005df099856f24c37c20a52800308f025abb8cffcd014d437b49707388aaca4865d9d063d8f25d5d4eb77d5 + - remote: buf.build + owner: cosmos + repository: gogo-proto + commit: 88ef6483f90f478fb938c37dde52ece3 + digest: shake256:89c45df2aa11e0cff97b0d695436713db3d993d76792e9f8dc1ae90e6ab9a9bec55503d48ceedd6b86069ab07d3041b32001b2bfe0227fa725dd515ff381e5ba + - remote: buf.build + owner: googleapis + repository: googleapis + commit: f52d4f76a8434cc5966798b1d3b4f110 + digest: shake256:71566dd80e39b7d85fdaa9b7f82107385181d5b6d17ea56c0aacce61099b35f9f1bcf7333ad9838ca19d24d7f076b039de7c9c09c55d23bb4c2fddfceff4d2c2 + - remote: buf.build + owner: protocolbuffers + repository: wellknowntypes + commit: 657250e6a39648cbb169d079a60bd9ba + digest: shake256:00de25001b8dd2e29d85fc4bcc3ede7aed886d76d67f5e0f7a9b320b90f871d3eb73507d50818d823a0512f3f8db77a11c043685528403e31ff3fef18323a9fb + - remote: buf.build + owner: tendermint + repository: tendermint + commit: 33ed361a90514289beabf3189e1d7665 + digest: shake256:038267e06294714fd883610626554b04a127b576b4e253befb4206cb72d5d3c1eeccacd4b9ec8e3fb891f7c14e1cb0f770c077d2989638995b0a61c85afedb1d diff --git a/tools/benchmark/proto/buf.yaml b/tools/benchmark/proto/buf.yaml new file mode 100644 index 000000000000..ae83b8045617 --- /dev/null +++ b/tools/benchmark/proto/buf.yaml @@ -0,0 +1,19 @@ +version: v1 +name: buf.build/mods/benchmark +deps: + - buf.build/cosmos/cosmos-sdk # pin the Cosmos SDK version + - buf.build/cometbft/cometbft:4a62c99d422068a5165429b62a7eb824df46cca9 # CometBFT v0.38 + - buf.build/cosmos/cosmos-proto + - buf.build/cosmos/gogo-proto + - buf.build/googleapis/googleapis +lint: + use: + - DEFAULT + - COMMENTS + - FILE_LOWER_SNAKE_CASE + except: + - UNARY_RPC + - COMMENT_FIELD + - SERVICE_SUFFIX + - PACKAGE_VERSION_SUFFIX + - RPC_REQUEST_STANDARD_NAME diff --git a/tools/benchmark/proto/cosmos/benchmark/module/v1/module.proto b/tools/benchmark/proto/cosmos/benchmark/module/v1/module.proto new file mode 100644 index 000000000000..c0bc93f0dfb5 --- /dev/null +++ b/tools/benchmark/proto/cosmos/benchmark/module/v1/module.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; + +package cosmos.benchmark.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the config object of the benchmark module. +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import: "cosmossdk.io/tools/benchmark" + }; + + GeneratorParams genesis_params = 1; +} + +// GenesisParams defines the genesis parameters for the benchmark module. +message GeneratorParams { + // seed is the seed for the random number generator. + uint64 seed = 1; + // bucket_count is the number of store keys to uniformly distribute genesis_count keys across. + uint64 bucket_count = 2; + + // key_mean is the mean size (in normal distribution) of keys in each bucket. + uint64 key_mean = 3; + // key_std_dev is the standard deviation of key sizes in each bucket. + uint64 key_std_dev = 4; + // value_mean is the mean size (in normal distribution) of values in each bucket. + uint64 value_mean = 6; + // value_std_dev is the standard deviation of value sizes in each bucket. + uint64 value_std_dev = 7; + + // genesis_count is the number of keys to insert in the store, distributed across all buckets. + uint64 genesis_count = 8; + + // insert_weight is the weight of insert operations. + float insert_weight = 9; + // update_weight is the weight of update operations. + float update_weight = 10; + // get_weight is the weight of get operations. + float get_weight = 12; + // delete_weight is the weight of delete operations. + float delete_weight = 11; +} \ No newline at end of file diff --git a/tools/benchmark/proto/cosmos/benchmark/v1/benchmark.proto b/tools/benchmark/proto/cosmos/benchmark/v1/benchmark.proto new file mode 100644 index 000000000000..db77c229fe34 --- /dev/null +++ b/tools/benchmark/proto/cosmos/benchmark/v1/benchmark.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package cosmos.benchmark.v1; + +option go_package = "cosmossdk.io/tools/benchmark"; + +// Op is a message describing a benchmark operation. +message Op { + uint64 seed = 1; + string actor = 2; + + uint64 key_length = 3; + uint64 value_length = 4; + uint32 iterations = 5; + bool delete = 6; + bool exists = 7; +} \ No newline at end of file diff --git a/tools/benchmark/proto/cosmos/benchmark/v1/tx.proto b/tools/benchmark/proto/cosmos/benchmark/v1/tx.proto new file mode 100644 index 000000000000..50c2cb1a7b6d --- /dev/null +++ b/tools/benchmark/proto/cosmos/benchmark/v1/tx.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package cosmos.benchmark.v1; + +import "cosmos/benchmark/v1/benchmark.proto"; +import "cosmos/msg/v1/msg.proto"; +import "amino/amino.proto"; + +option go_package = "cosmossdk.io/tools/benchmark"; + +// MsgLoadTestOps defines a message containing a sequence of load test operations. +message MsgLoadTest { + option (cosmos.msg.v1.signer) = "caller"; + option (amino.name) = "cosmos-sdk/tools/benchmark/v1/MsgLoadTest"; + + bytes caller = 1; + + repeated Op ops = 2; +} + +// MsgLoadTestResponse defines a message containing the results of a load test operation. +message MsgLoadTestResponse { + uint64 total_time = 1; + uint64 total_errors = 2; +} + +// Msg defines the benchmark Msg service. +service Msg { + option (cosmos.msg.v1.service) = true; + + // LoadTest defines a method for executing a sequence of load test operations. + rpc LoadTest(MsgLoadTest) returns (MsgLoadTestResponse); +} diff --git a/tools/benchmark/sonar-project.properties b/tools/benchmark/sonar-project.properties new file mode 100644 index 000000000000..6756fe89872e --- /dev/null +++ b/tools/benchmark/sonar-project.properties @@ -0,0 +1,16 @@ +sonar.projectKey=cosmos-sdk-tools-benchmark +sonar.organization=cosmos + +sonar.projectName=Cosmos SDK - tools/benchmark +sonar.project.monorepo.enabled=true + +sonar.sources=. +sonar.exclusions=**/*_test.go,**/*.pb.go,**/*.pulsar.go,**/*.pb.gw.go +sonar.coverage.exclusions=**/*_test.go,**/testutil/**,**/*.pb.go,**/*.pb.gw.go,**/*.pulsar.go,test_helpers.go,docs/** +sonar.tests=. +sonar.test.inclusions=**/*_test.go +sonar.go.coverage.reportPaths=coverage.out + +sonar.sourceEncoding=UTF-8 +sonar.scm.provider=git +sonar.scm.forceReloadAll=true diff --git a/tools/benchmark/tx.pb.go b/tools/benchmark/tx.pb.go new file mode 100644 index 000000000000..3a3b76a8d6ec --- /dev/null +++ b/tools/benchmark/tx.pb.go @@ -0,0 +1,670 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmos/benchmark/v1/tx.proto + +package benchmark + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + 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 + +// MsgLoadTestOps defines a message containing a sequence of load test operations. +type MsgLoadTest struct { + Caller []byte `protobuf:"bytes,1,opt,name=caller,proto3" json:"caller,omitempty"` + Ops []*Op `protobuf:"bytes,2,rep,name=ops,proto3" json:"ops,omitempty"` +} + +func (m *MsgLoadTest) Reset() { *m = MsgLoadTest{} } +func (m *MsgLoadTest) String() string { return proto.CompactTextString(m) } +func (*MsgLoadTest) ProtoMessage() {} +func (*MsgLoadTest) Descriptor() ([]byte, []int) { + return fileDescriptor_481e3d7f7138b75b, []int{0} +} +func (m *MsgLoadTest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLoadTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLoadTest.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 *MsgLoadTest) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLoadTest.Merge(m, src) +} +func (m *MsgLoadTest) XXX_Size() int { + return m.Size() +} +func (m *MsgLoadTest) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLoadTest.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLoadTest proto.InternalMessageInfo + +func (m *MsgLoadTest) GetCaller() []byte { + if m != nil { + return m.Caller + } + return nil +} + +func (m *MsgLoadTest) GetOps() []*Op { + if m != nil { + return m.Ops + } + return nil +} + +// MsgLoadTestResponse defines a message containing the results of a load test operation. +type MsgLoadTestResponse struct { + TotalTime uint64 `protobuf:"varint,1,opt,name=total_time,json=totalTime,proto3" json:"total_time,omitempty"` + TotalErrors uint64 `protobuf:"varint,2,opt,name=total_errors,json=totalErrors,proto3" json:"total_errors,omitempty"` +} + +func (m *MsgLoadTestResponse) Reset() { *m = MsgLoadTestResponse{} } +func (m *MsgLoadTestResponse) String() string { return proto.CompactTextString(m) } +func (*MsgLoadTestResponse) ProtoMessage() {} +func (*MsgLoadTestResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_481e3d7f7138b75b, []int{1} +} +func (m *MsgLoadTestResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgLoadTestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgLoadTestResponse.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 *MsgLoadTestResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgLoadTestResponse.Merge(m, src) +} +func (m *MsgLoadTestResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgLoadTestResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgLoadTestResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgLoadTestResponse proto.InternalMessageInfo + +func (m *MsgLoadTestResponse) GetTotalTime() uint64 { + if m != nil { + return m.TotalTime + } + return 0 +} + +func (m *MsgLoadTestResponse) GetTotalErrors() uint64 { + if m != nil { + return m.TotalErrors + } + return 0 +} + +func init() { + proto.RegisterType((*MsgLoadTest)(nil), "cosmos.benchmark.v1.MsgLoadTest") + proto.RegisterType((*MsgLoadTestResponse)(nil), "cosmos.benchmark.v1.MsgLoadTestResponse") +} + +func init() { proto.RegisterFile("cosmos/benchmark/v1/tx.proto", fileDescriptor_481e3d7f7138b75b) } + +var fileDescriptor_481e3d7f7138b75b = []byte{ + // 322 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xce, 0x2f, 0xce, + 0xcd, 0x2f, 0xd6, 0x4f, 0x4a, 0xcd, 0x4b, 0xce, 0xc8, 0x4d, 0x2c, 0xca, 0xd6, 0x2f, 0x33, 0xd4, + 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x86, 0xc8, 0xea, 0xc1, 0x65, 0xf5, + 0xca, 0x0c, 0xa5, 0x94, 0xb1, 0x69, 0x41, 0xa8, 0x00, 0xeb, 0x94, 0x12, 0x87, 0x2a, 0xca, 0x2d, + 0x4e, 0x07, 0x49, 0xe7, 0x16, 0xa7, 0x43, 0x25, 0x04, 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, + 0x24, 0x44, 0x48, 0xa9, 0x9b, 0x91, 0x8b, 0xdb, 0xb7, 0x38, 0xdd, 0x27, 0x3f, 0x31, 0x25, 0x24, + 0xb5, 0xb8, 0x44, 0x48, 0x8c, 0x8b, 0x2d, 0x39, 0x31, 0x27, 0x27, 0xb5, 0x48, 0x82, 0x51, 0x81, + 0x51, 0x83, 0x27, 0x08, 0xca, 0x13, 0xd2, 0xe4, 0x62, 0xce, 0x2f, 0x28, 0x96, 0x60, 0x52, 0x60, + 0xd6, 0xe0, 0x36, 0x12, 0xd7, 0xc3, 0xe2, 0x36, 0x3d, 0xff, 0x82, 0x20, 0x90, 0x1a, 0x2b, 0xcb, + 0xa6, 0xe7, 0x1b, 0xb4, 0xa0, 0xfa, 0xba, 0x9e, 0x6f, 0xd0, 0xd2, 0x84, 0x28, 0xd6, 0x2d, 0x4e, + 0xc9, 0xd6, 0x2f, 0xc9, 0xcf, 0xcf, 0x41, 0x73, 0x3d, 0x92, 0xed, 0x4a, 0xe1, 0x5c, 0xc2, 0x48, + 0xdc, 0xa0, 0xd4, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0x21, 0x59, 0x2e, 0xae, 0x92, 0xfc, 0x92, + 0xc4, 0x9c, 0xf8, 0x92, 0xcc, 0xdc, 0x54, 0xb0, 0xc3, 0x58, 0x82, 0x38, 0xc1, 0x22, 0x21, 0x99, + 0xb9, 0xa9, 0x42, 0x8a, 0x5c, 0x3c, 0x10, 0xe9, 0xd4, 0xa2, 0xa2, 0xfc, 0x22, 0x90, 0x23, 0x41, + 0x0a, 0xb8, 0xc1, 0x62, 0xae, 0x60, 0x21, 0xa3, 0x14, 0x2e, 0x66, 0xdf, 0xe2, 0x74, 0xa1, 0x30, + 0x2e, 0x0e, 0xb8, 0x4f, 0x15, 0xb0, 0x7a, 0x02, 0xc9, 0x7a, 0x29, 0x0d, 0x42, 0x2a, 0x60, 0x0e, + 0x94, 0x62, 0x6d, 0x78, 0xbe, 0x41, 0x8b, 0xd1, 0xc9, 0xec, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, + 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, + 0x8f, 0xe5, 0x18, 0xa2, 0xa0, 0x51, 0x5d, 0x9c, 0x92, 0xad, 0x97, 0x99, 0x8f, 0x1e, 0x0a, 0x49, + 0x6c, 0xe0, 0xb8, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x15, 0x3a, 0xfe, 0x19, 0x11, 0x02, + 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 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // LoadTest defines a method for executing a sequence of load test operations. + LoadTest(ctx context.Context, in *MsgLoadTest, opts ...grpc.CallOption) (*MsgLoadTestResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) LoadTest(ctx context.Context, in *MsgLoadTest, opts ...grpc.CallOption) (*MsgLoadTestResponse, error) { + out := new(MsgLoadTestResponse) + err := c.cc.Invoke(ctx, "/cosmos.benchmark.v1.Msg/LoadTest", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // LoadTest defines a method for executing a sequence of load test operations. + LoadTest(context.Context, *MsgLoadTest) (*MsgLoadTestResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) LoadTest(ctx context.Context, req *MsgLoadTest) (*MsgLoadTestResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LoadTest not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_LoadTest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLoadTest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LoadTest(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmos.benchmark.v1.Msg/LoadTest", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LoadTest(ctx, req.(*MsgLoadTest)) + } + return interceptor(ctx, in, info, handler) +} + +var Msg_serviceDesc = _Msg_serviceDesc +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "cosmos.benchmark.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "LoadTest", + Handler: _Msg_LoadTest_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "cosmos/benchmark/v1/tx.proto", +} + +func (m *MsgLoadTest) 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 *MsgLoadTest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLoadTest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Ops) > 0 { + for iNdEx := len(m.Ops) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Ops[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Caller) > 0 { + i -= len(m.Caller) + copy(dAtA[i:], m.Caller) + i = encodeVarintTx(dAtA, i, uint64(len(m.Caller))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgLoadTestResponse) 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 *MsgLoadTestResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgLoadTestResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.TotalErrors != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TotalErrors)) + i-- + dAtA[i] = 0x10 + } + if m.TotalTime != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.TotalTime)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgLoadTest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Caller) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Ops) > 0 { + for _, e := range m.Ops { + l = e.Size() + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func (m *MsgLoadTestResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.TotalTime != 0 { + n += 1 + sovTx(uint64(m.TotalTime)) + } + if m.TotalErrors != 0 { + n += 1 + sovTx(uint64(m.TotalErrors)) + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgLoadTest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgLoadTest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgLoadTest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Caller", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Caller = append(m.Caller[:0], dAtA[iNdEx:postIndex]...) + if m.Caller == nil { + m.Caller = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ops", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ops = append(m.Ops, &Op{}) + if err := m.Ops[len(m.Ops)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgLoadTestResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgLoadTestResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgLoadTestResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalTime", wireType) + } + m.TotalTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalTime |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TotalErrors", wireType) + } + m.TotalErrors = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TotalErrors |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + 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, ErrIntOverflowTx + } + 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, ErrIntOverflowTx + } + 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, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) From 629106eb84fe8a2c3697895069d667c82f4eb68e Mon Sep 17 00:00:00 2001 From: Matt Kocubinski Date: Thu, 12 Dec 2024 12:20:56 -0600 Subject: [PATCH 2/2] fix(x/tx): fallback to injected resolver for placeholder descriptors (#22852) --- x/tx/CHANGELOG.md | 6 ++++++ x/tx/decode/unknown.go | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/x/tx/CHANGELOG.md b/x/tx/CHANGELOG.md index 92245db8f77b..7120fe357497 100644 --- a/x/tx/CHANGELOG.md +++ b/x/tx/CHANGELOG.md @@ -33,6 +33,12 @@ Since v0.13.0, x/tx follows Cosmos SDK semver: https://github.com/cosmos/cosmos- ## [Unreleased] +## [v1.0.0-alpha.3](https://github.com/cosmos/cosmos-sdk/releases/tag/x/tx/v1.0.0-alpha.3) - 2024-12-12 + +### Bug Fixes + +* [#22852](https://github.com/cosmos/cosmos-sdk/pull/22852) Fallback to injected resolver for placeholder descriptors. + ## [v1.0.0-alpha.2](https://github.com/cosmos/cosmos-sdk/releases/tag/x/tx/v1.0.0-alpha.2) - 2024-11-01 * [#22311](https://github.com/cosmos/cosmos-sdk/pull/22311) Fix add feePayer as signer. diff --git a/x/tx/decode/unknown.go b/x/tx/decode/unknown.go index fed2c1be8ff8..cd0ed0ba7aa1 100644 --- a/x/tx/decode/unknown.go +++ b/x/tx/decode/unknown.go @@ -82,6 +82,17 @@ func RejectUnknownFields(bz []byte, desc protoreflect.MessageDescriptor, allowUn if fieldMessage == nil { continue } + // if a message descriptor is a placeholder resolve it using the injected resolver. + // this can happen when a descriptor has been registered in the + // "google.golang.org/protobuf" resgistry but not in "github.com/cosmos/gogoproto". + // fixes: https://github.com/cosmos/cosmos-sdk/issues/22574 + if fieldMessage.IsPlaceholder() { + gogoDesc, err := resolver.FindDescriptorByName(fieldMessage.FullName()) + if err != nil { + return hasUnknownNonCriticals, fmt.Errorf("could not resolve placeholder descriptor: %v: %w", fieldMessage, err) + } + fieldMessage = gogoDesc.(protoreflect.MessageDescriptor) + } // consume length prefix of nested message _, o := protowire.ConsumeVarint(fieldBytes)