From 4857ea1f61826baf2281dc5e4065defa3d7ae7ab Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Tue, 9 Jul 2024 13:20:31 +0200 Subject: [PATCH] feat(schema): indexing API (#20647) --- baseapp/streaming.go | 79 +++++++++++++++++++ client/v2/go.mod | 6 +- go.mod | 2 + schema/decoding/resolver.go | 66 ++++++++++++++++ schema/decoding/resolver_test.go | 124 ++++++++++++++++++++++++++++++ schema/decoding/sync.go | 8 ++ schema/indexer/README.md | 15 ++++ schema/indexer/indexer.go | 78 +++++++++++++++++++ schema/indexer/manager.go | 44 +++++++++++ schema/indexer/registry.go | 14 ++++ schema/indexer/registry_test.go | 26 +++++++ schema/logutil/logger.go | 35 +++++++++ server/v2/cometbft/go.mod | 2 + server/v2/go.mod | 1 + simapp/app_di.go | 21 ++++- simapp/go.mod | 2 + simapp/v2/go.mod | 2 + tests/go.mod | 2 + x/accounts/defaults/lockup/go.mod | 2 + x/accounts/go.mod | 6 +- x/auth/go.mod | 2 + x/authz/go.mod | 6 +- x/bank/go.mod | 6 +- x/circuit/go.mod | 2 + x/consensus/go.mod | 2 + x/distribution/go.mod | 2 + x/epochs/go.mod | 2 + x/evidence/go.mod | 2 + x/feegrant/go.mod | 6 +- x/gov/go.mod | 6 +- x/group/go.mod | 2 + x/mint/go.mod | 2 + x/nft/go.mod | 2 + x/params/go.mod | 2 + x/protocolpool/go.mod | 2 + x/slashing/go.mod | 2 + x/staking/go.mod | 6 +- x/upgrade/go.mod | 2 + 38 files changed, 581 insertions(+), 10 deletions(-) create mode 100644 schema/decoding/resolver.go create mode 100644 schema/decoding/resolver_test.go create mode 100644 schema/decoding/sync.go create mode 100644 schema/indexer/README.md create mode 100644 schema/indexer/indexer.go create mode 100644 schema/indexer/manager.go create mode 100644 schema/indexer/registry.go create mode 100644 schema/indexer/registry_test.go create mode 100644 schema/logutil/logger.go diff --git a/baseapp/streaming.go b/baseapp/streaming.go index c978d959aa7c..9c5c3d5d1742 100644 --- a/baseapp/streaming.go +++ b/baseapp/streaming.go @@ -1,12 +1,18 @@ package baseapp import ( + "context" "fmt" "sort" "strings" + abci "github.com/cometbft/cometbft/api/cometbft/abci/v1" "github.com/spf13/cast" + "cosmossdk.io/schema" + "cosmossdk.io/schema/appdata" + "cosmossdk.io/schema/decoding" + "cosmossdk.io/schema/indexer" "cosmossdk.io/store/streaming" storetypes "cosmossdk.io/store/types" @@ -22,6 +28,31 @@ const ( StreamingABCIStopNodeOnErrTomlKey = "stop-node-on-err" ) +// EnableIndexer enables the built-in indexer with the provided options (usually from the app.toml indexer key), +// kv-store keys, and app modules. Using the built-in indexer framework is mutually exclusive from using other +// types of streaming listeners. +func (app *BaseApp) EnableIndexer(indexerOpts interface{}, keys map[string]*storetypes.KVStoreKey, appModules map[string]any) error { + listener, err := indexer.StartManager(indexer.ManagerOptions{ + Config: indexerOpts, + Resolver: decoding.ModuleSetDecoderResolver(appModules), + SyncSource: nil, + Logger: app.logger.With("module", "indexer"), + }) + if err != nil { + return err + } + + exposedKeys := exposeStoreKeysSorted([]string{"*"}, keys) + app.cms.AddListeners(exposedKeys) + + app.streamingManager = storetypes.StreamingManager{ + ABCIListeners: []storetypes.ABCIListener{listenerWrapper{listener}}, + StopNodeOnErr: true, + } + + return nil +} + // RegisterStreamingServices registers streaming services with the BaseApp. func (app *BaseApp) RegisterStreamingServices(appOpts servertypes.AppOptions, keys map[string]*storetypes.KVStoreKey) error { // register streaming services @@ -110,3 +141,51 @@ func exposeStoreKeysSorted(keysStr []string, keys map[string]*storetypes.KVStore return exposeStoreKeys } + +type listenerWrapper struct { + listener appdata.Listener +} + +func (p listenerWrapper) ListenFinalizeBlock(_ context.Context, req abci.FinalizeBlockRequest, res abci.FinalizeBlockResponse) error { + if p.listener.StartBlock != nil { + err := p.listener.StartBlock(appdata.StartBlockData{ + Height: uint64(req.Height), + }) + if err != nil { + return err + } + } + + //// TODO txs, events + + return nil +} + +func (p listenerWrapper) ListenCommit(ctx context.Context, res abci.CommitResponse, changeSet []*storetypes.StoreKVPair) error { + if cb := p.listener.OnKVPair; cb != nil { + updates := make([]appdata.ModuleKVPairUpdate, len(changeSet)) + for i, pair := range changeSet { + updates[i] = appdata.ModuleKVPairUpdate{ + ModuleName: pair.StoreKey, + Update: schema.KVPairUpdate{ + Key: pair.Key, + Value: pair.Value, + Delete: pair.Delete, + }, + } + } + err := cb(appdata.KVPairData{Updates: updates}) + if err != nil { + return err + } + } + + if p.listener.Commit != nil { + err := p.listener.Commit(appdata.CommitData{}) + if err != nil { + return err + } + } + + return nil +} diff --git a/client/v2/go.mod b/client/v2/go.mod index 97c1c76d7852..3c3e9ad8f953 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -170,7 +170,10 @@ require ( pgregory.net/rapid v1.1.0 // indirect ) -require github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +require ( + cosmossdk.io/schema v0.0.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +) replace github.com/cosmos/cosmos-sdk => ./../../ @@ -181,6 +184,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ./../../depinject cosmossdk.io/log => ./../../log + cosmossdk.io/schema => ./../../schema cosmossdk.io/store => ./../../store cosmossdk.io/x/accounts => ./../../x/accounts cosmossdk.io/x/auth => ./../../x/auth diff --git a/go.mod b/go.mod index c78efc9c329e..75b1cb1c9651 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ require ( cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.3.1 cosmossdk.io/math v1.3.0 + cosmossdk.io/schema v0.0.0 cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 @@ -189,6 +190,7 @@ replace ( cosmossdk.io/core/testing => ./core/testing cosmossdk.io/depinject => ./depinject cosmossdk.io/log => ./log + cosmossdk.io/schema => ./schema cosmossdk.io/store => ./store cosmossdk.io/x/accounts => ./x/accounts cosmossdk.io/x/auth => ./x/auth diff --git a/schema/decoding/resolver.go b/schema/decoding/resolver.go new file mode 100644 index 000000000000..db0ec0bb1726 --- /dev/null +++ b/schema/decoding/resolver.go @@ -0,0 +1,66 @@ +package decoding + +import ( + "sort" + + "cosmossdk.io/schema" +) + +// DecoderResolver is an interface that allows indexers to discover and use module decoders. +type DecoderResolver interface { + // IterateAll iterates over all available module decoders. + IterateAll(func(moduleName string, cdc schema.ModuleCodec) error) error + + // LookupDecoder looks up a specific module decoder. + LookupDecoder(moduleName string) (decoder schema.ModuleCodec, found bool, err error) +} + +// ModuleSetDecoderResolver returns DecoderResolver that will discover modules implementing +// DecodeableModule in the provided module set. +func ModuleSetDecoderResolver(moduleSet map[string]interface{}) DecoderResolver { + return &moduleSetDecoderResolver{ + moduleSet: moduleSet, + } +} + +type moduleSetDecoderResolver struct { + moduleSet map[string]interface{} +} + +func (a moduleSetDecoderResolver) IterateAll(f func(string, schema.ModuleCodec) error) error { + keys := make([]string, 0, len(a.moduleSet)) + for k := range a.moduleSet { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + module := a.moduleSet[k] + dm, ok := module.(schema.HasModuleCodec) + if ok { + decoder, err := dm.ModuleCodec() + if err != nil { + return err + } + err = f(k, decoder) + if err != nil { + return err + } + } + } + return nil +} + +func (a moduleSetDecoderResolver) LookupDecoder(moduleName string) (schema.ModuleCodec, bool, error) { + mod, ok := a.moduleSet[moduleName] + if !ok { + return schema.ModuleCodec{}, false, nil + } + + dm, ok := mod.(schema.HasModuleCodec) + if !ok { + return schema.ModuleCodec{}, false, nil + } + + decoder, err := dm.ModuleCodec() + return decoder, true, err +} diff --git a/schema/decoding/resolver_test.go b/schema/decoding/resolver_test.go new file mode 100644 index 000000000000..ecea614d1999 --- /dev/null +++ b/schema/decoding/resolver_test.go @@ -0,0 +1,124 @@ +package decoding + +import ( + "fmt" + "testing" + + "cosmossdk.io/schema" +) + +type modA struct{} + +func (m modA) ModuleCodec() (schema.ModuleCodec, error) { + return schema.ModuleCodec{ + Schema: schema.ModuleSchema{ObjectTypes: []schema.ObjectType{{Name: "A"}}}, + }, nil +} + +type modB struct{} + +func (m modB) ModuleCodec() (schema.ModuleCodec, error) { + return schema.ModuleCodec{ + Schema: schema.ModuleSchema{ObjectTypes: []schema.ObjectType{{Name: "B"}}}, + }, nil +} + +type modC struct{} + +var moduleSet = map[string]interface{}{ + "modA": modA{}, + "modB": modB{}, + "modC": modC{}, +} + +var resolver = ModuleSetDecoderResolver(moduleSet) + +func TestModuleSetDecoderResolver_IterateAll(t *testing.T) { + objectTypes := map[string]bool{} + err := resolver.IterateAll(func(moduleName string, cdc schema.ModuleCodec) error { + objectTypes[cdc.Schema.ObjectTypes[0].Name] = true + return nil + }) + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + if len(objectTypes) != 2 { + t.Fatalf("expected 2 object types, got %d", len(objectTypes)) + } + + if !objectTypes["A"] { + t.Fatalf("expected object type A") + } + + if !objectTypes["B"] { + t.Fatalf("expected object type B") + } +} + +func TestModuleSetDecoderResolver_LookupDecoder(t *testing.T) { + decoder, found, err := resolver.LookupDecoder("modA") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + if !found { + t.Fatalf("expected to find decoder for modA") + } + + if decoder.Schema.ObjectTypes[0].Name != "A" { + t.Fatalf("expected object type A, got %s", decoder.Schema.ObjectTypes[0].Name) + } + + decoder, found, err = resolver.LookupDecoder("modB") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + if !found { + t.Fatalf("expected to find decoder for modB") + } + + if decoder.Schema.ObjectTypes[0].Name != "B" { + t.Fatalf("expected object type B, got %s", decoder.Schema.ObjectTypes[0].Name) + } + + decoder, found, err = resolver.LookupDecoder("modC") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + if found { + t.Fatalf("expected not to find decoder") + } + + decoder, found, err = resolver.LookupDecoder("modD") + if err != nil { + t.Fatalf("unexpected error: %v", err) + } + + if found { + t.Fatalf("expected not to find decoder") + } +} + +type modD struct{} + +func (m modD) ModuleCodec() (schema.ModuleCodec, error) { + return schema.ModuleCodec{}, fmt.Errorf("an error") +} + +func TestModuleSetDecoderResolver_IterateAll_Error(t *testing.T) { + resolver := ModuleSetDecoderResolver(map[string]interface{}{ + "modD": modD{}, + }) + err := resolver.IterateAll(func(moduleName string, cdc schema.ModuleCodec) error { + if moduleName == "modD" { + t.Fatalf("expected error") + } + return nil + }) + if err == nil { + t.Fatalf("expected error") + } +} diff --git a/schema/decoding/sync.go b/schema/decoding/sync.go new file mode 100644 index 000000000000..85e6b4d74ba0 --- /dev/null +++ b/schema/decoding/sync.go @@ -0,0 +1,8 @@ +package decoding + +// SyncSource is an interface that allows indexers to start indexing modules with pre-existing state. +// It should generally be a wrapper around the key-value store. +type SyncSource interface { + // IterateAllKVPairs iterates over all key-value pairs for a given module. + IterateAllKVPairs(moduleName string, fn func(key, value []byte) error) error +} diff --git a/schema/indexer/README.md b/schema/indexer/README.md new file mode 100644 index 000000000000..9fdec6753a27 --- /dev/null +++ b/schema/indexer/README.md @@ -0,0 +1,15 @@ +# Indexer Framework + +# Defining an Indexer + +Indexer implementations should be registered with the `indexer.Register` function with a unique type name. Indexers take the configuration options defined by `indexer.Config` which defines a common set of configuration options as well as indexer-specific options under the `config` sub-key. Indexers do not need to manage the common filtering options specified in `Config` - the indexer manager will manage these for the indexer. Indexer implementations just need to return a correct `InitResult` response. + +# Integrating the Indexer Manager + +The indexer manager should be used for managing all indexers and should be integrated directly with applications wishing to support indexing. The `StartManager` function is used to start the manager. The configuration options for the manager and all indexer targets should be passed as the ManagerOptions.Config field and should match the json structure of ManagerConfig. An example configuration section in `app.toml` might look like this: + +```toml +[indexer.target.postgres] +type = "postgres" +config.database_url = "postgres://user:password@localhost:5432/dbname" +``` diff --git a/schema/indexer/indexer.go b/schema/indexer/indexer.go new file mode 100644 index 000000000000..ba3d0db704fa --- /dev/null +++ b/schema/indexer/indexer.go @@ -0,0 +1,78 @@ +package indexer + +import ( + "context" + + "cosmossdk.io/schema/appdata" + "cosmossdk.io/schema/logutil" +) + +// Config species the configuration passed to an indexer initialization function. +// It includes both common configuration options related to include or excluding +// parts of the data stream as well as indexer specific options under the config +// subsection. +// +// NOTE: it is an error for an indexer to change its common options, such as adding +// or removing indexed modules, after the indexer has been initialized because this +// could result in an inconsistent state. +type Config struct { + // Type is the name of the indexer type as registered with Register. + Type string `json:"type"` + + // Config are the indexer specific config options specified by the user. + Config map[string]interface{} `json:"config"` + + // ExcludeState specifies that the indexer will not receive state updates. + ExcludeState bool `json:"exclude_state"` + + // ExcludeEvents specifies that the indexer will not receive events. + ExcludeEvents bool `json:"exclude_events"` + + // ExcludeTxs specifies that the indexer will not receive transaction's. + ExcludeTxs bool `json:"exclude_txs"` + + // ExcludeBlockHeaders specifies that the indexer will not receive block headers, + // although it will still receive StartBlock and Commit callbacks, just without + // the header data. + ExcludeBlockHeaders bool `json:"exclude_block_headers"` + + // IncludeModules specifies a list of modules whose state the indexer will + // receive state updates for. + // Only one of include or exclude modules should be specified. + IncludeModules []string `json:"include_modules"` + + // ExcludeModules specifies a list of modules whose state the indexer will not + // receive state updates for. + // Only one of include or exclude modules should be specified. + ExcludeModules []string `json:"exclude_modules"` +} + +type InitFunc = func(InitParams) (InitResult, error) + +// InitParams is the input to the indexer initialization function. +type InitParams struct { + // Config is the indexer config. + Config Config + + // Context is the context that the indexer should use to listen for a shutdown signal via Context.Done(). Other + // parameters may also be passed through context from the app if necessary. + Context context.Context + + // Logger is a logger the indexer can use to write log messages. + Logger logutil.Logger +} + +// InitResult is the indexer initialization result and includes the indexer's listener implementation. +type InitResult struct { + // Listener is the indexer's app data listener. + Listener appdata.Listener + + // LastBlockPersisted indicates the last block that the indexer persisted (if it is persisting data). It + // should be 0 if the indexer has no data stored and wants to start syncing state. It should be -1 if the indexer + // does not care to persist state at all and is just listening for some other streaming purpose. If the indexer + // has persisted state and has missed some blocks, a runtime error will occur to prevent the indexer from continuing + // in an invalid state. If an indexer starts indexing after a chain's genesis (returning 0), the indexer manager + // will attempt to perform a catch-up sync of state. Historical events will not be replayed, but an accurate + // representation of the current state at the height at which indexing began can be reproduced. + LastBlockPersisted int64 +} diff --git a/schema/indexer/manager.go b/schema/indexer/manager.go new file mode 100644 index 000000000000..5a7e39faad0a --- /dev/null +++ b/schema/indexer/manager.go @@ -0,0 +1,44 @@ +package indexer + +import ( + "context" + + "cosmossdk.io/schema/appdata" + "cosmossdk.io/schema/decoding" + "cosmossdk.io/schema/logutil" +) + +// ManagerOptions are the options for starting the indexer manager. +type ManagerOptions struct { + // Config is the user configuration for all indexing. It should generally be an instance of map[string]interface{} + // and match the json structure of ManagerConfig. The manager will attempt to convert it to ManagerConfig. + Config interface{} + + // Resolver is the decoder resolver that will be used to decode the data. It is required. + Resolver decoding.DecoderResolver + + // SyncSource is a representation of the current state of key-value data to be used in a catch-up sync. + // Catch-up syncs will be performed at initialization when necessary. SyncSource is optional but if + // it is omitted, indexers will only be able to start indexing state from genesis. + SyncSource decoding.SyncSource + + // Logger is the logger that indexers can use to write logs. It is optional. + Logger logutil.Logger + + // Context is the context that indexers should use for shutdown signals via Context.Done(). It can also + // be used to pass down other parameters to indexers if necessary. If it is omitted, context.Background + // will be used. + Context context.Context +} + +// ManagerConfig is the configuration of the indexer manager and contains the configuration for each indexer target. +type ManagerConfig struct { + // Target is a map of named indexer targets to their configuration. + Target map[string]Config +} + +// StartManager starts the indexer manager with the given options. The state machine should write all relevant app data to +// the returned listener. +func StartManager(opts ManagerOptions) (appdata.Listener, error) { + panic("TODO: this will be implemented in a follow-up PR, this function is just a stub to demonstrate the API") +} diff --git a/schema/indexer/registry.go b/schema/indexer/registry.go new file mode 100644 index 000000000000..445f56876add --- /dev/null +++ b/schema/indexer/registry.go @@ -0,0 +1,14 @@ +package indexer + +import "fmt" + +// Register registers an indexer type with the given initialization function. +func Register(indexerType string, initFunc InitFunc) { + if _, ok := indexerRegistry[indexerType]; ok { + panic(fmt.Sprintf("indexer %s already registered", indexerType)) + } + + indexerRegistry[indexerType] = initFunc +} + +var indexerRegistry = map[string]InitFunc{} diff --git a/schema/indexer/registry_test.go b/schema/indexer/registry_test.go new file mode 100644 index 000000000000..b9f46910c8fd --- /dev/null +++ b/schema/indexer/registry_test.go @@ -0,0 +1,26 @@ +package indexer + +import "testing" + +func TestRegister(t *testing.T) { + Register("test", func(params InitParams) (InitResult, error) { + return InitResult{}, nil + }) + + if indexerRegistry["test"] == nil { + t.Fatalf("expected to find indexer") + } + + if indexerRegistry["test2"] != nil { + t.Fatalf("expected not to find indexer") + } + + defer func() { + if r := recover(); r == nil { + t.Fatalf("expected to panic") + } + }() + Register("test", func(params InitParams) (InitResult, error) { + return InitResult{}, nil + }) +} diff --git a/schema/logutil/logger.go b/schema/logutil/logger.go new file mode 100644 index 000000000000..cb6b34ebfd2b --- /dev/null +++ b/schema/logutil/logger.go @@ -0,0 +1,35 @@ +// Package logutil defines the Logger interface expected by indexer implementations. +// It is implemented by cosmossdk.io/log which is not imported to minimize dependencies. +package logutil + +// Logger is the logger interface expected by indexer implementations. +type Logger interface { + // Info takes a message and a set of key/value pairs and logs with level INFO. + // The key of the tuple must be a string. + Info(msg string, keyVals ...interface{}) + + // Warn takes a message and a set of key/value pairs and logs with level WARN. + // The key of the tuple must be a string. + Warn(msg string, keyVals ...interface{}) + + // Error takes a message and a set of key/value pairs and logs with level ERR. + // The key of the tuple must be a string. + Error(msg string, keyVals ...interface{}) + + // Debug takes a message and a set of key/value pairs and logs with level DEBUG. + // The key of the tuple must be a string. + Debug(msg string, keyVals ...interface{}) +} + +// NoopLogger is a logger that doesn't do anything. +type NoopLogger struct{} + +func (n NoopLogger) Info(string, ...interface{}) {} + +func (n NoopLogger) Warn(string, ...interface{}) {} + +func (n NoopLogger) Error(string, ...interface{}) {} + +func (n NoopLogger) Debug(string, ...interface{}) {} + +var _ Logger = NoopLogger{} diff --git a/server/v2/cometbft/go.mod b/server/v2/cometbft/go.mod index 6e3509c7c406..e2e19e6442f0 100644 --- a/server/v2/cometbft/go.mod +++ b/server/v2/cometbft/go.mod @@ -8,6 +8,7 @@ replace ( cosmossdk.io/core/testing => ../../../core/testing cosmossdk.io/depinject => ../../../depinject cosmossdk.io/log => ../../../log + cosmossdk.io/schema => ../../../schema cosmossdk.io/server/v2 => ../ cosmossdk.io/server/v2/appmanager => ../appmanager cosmossdk.io/store => ../../../store @@ -53,6 +54,7 @@ require ( cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/log v1.3.1 // indirect cosmossdk.io/math v1.3.0 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect diff --git a/server/v2/go.mod b/server/v2/go.mod index 9a7210318e07..0a73d099c41a 100644 --- a/server/v2/go.mod +++ b/server/v2/go.mod @@ -7,6 +7,7 @@ replace ( cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/server/v2/appmanager => ./appmanager cosmossdk.io/server/v2/stf => ./stf cosmossdk.io/x/tx => ../../x/tx diff --git a/simapp/app_di.go b/simapp/app_di.go index ac73c5af53fb..52c9917fd186 100644 --- a/simapp/app_di.go +++ b/simapp/app_di.go @@ -12,6 +12,7 @@ import ( "github.com/spf13/cast" clienthelpers "cosmossdk.io/client/v2/helpers" + "cosmossdk.io/core/appmodule" "cosmossdk.io/core/legacy" "cosmossdk.io/depinject" "cosmossdk.io/log" @@ -179,8 +180,10 @@ func NewSimApp( ) ) + var appModules map[string]appmodule.AppModule if err := depinject.Inject(appConfig, &appBuilder, + &appModules, &app.appCodec, &app.legacyAmino, &app.txConfig, @@ -242,9 +245,21 @@ func NewSimApp( app.App = appBuilder.Build(db, traceStore, baseAppOptions...) - // register streaming services - if err := app.RegisterStreamingServices(appOpts, app.kvStoreKeys()); err != nil { - panic(err) + if indexerOpts := appOpts.Get("indexer"); indexerOpts != nil { + // if we have indexer options in app.toml, then enable the built-in indexer framework + moduleSet := map[string]any{} + for modName, mod := range appModules { + moduleSet[modName] = mod + } + err := app.EnableIndexer(indexerOpts, app.kvStoreKeys(), moduleSet) + if err != nil { + panic(err) + } + } else { + // register legacy streaming services if we don't have the built-in indexer enabled + if err := app.RegisterStreamingServices(appOpts, app.kvStoreKeys()); err != nil { + panic(err) + } } /**** Module Options ****/ diff --git a/simapp/go.mod b/simapp/go.mod index c99893cbb88f..17fa6050b400 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -60,6 +60,7 @@ require ( cloud.google.com/go/storage v1.42.0 // indirect cosmossdk.io/core/testing v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/schema v0.0.0 // 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 @@ -246,6 +247,7 @@ replace ( cosmossdk.io/core/testing => ../core/testing cosmossdk.io/depinject => ../depinject cosmossdk.io/log => ../log + cosmossdk.io/schema => ../schema cosmossdk.io/store => ../store cosmossdk.io/tools/confix => ../tools/confix cosmossdk.io/x/accounts => ../x/accounts diff --git a/simapp/v2/go.mod b/simapp/v2/go.mod index 7f8309ceab17..b3a476344404 100644 --- a/simapp/v2/go.mod +++ b/simapp/v2/go.mod @@ -62,6 +62,7 @@ require ( cloud.google.com/go/storage v1.42.0 // indirect cosmossdk.io/core/testing v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/errors v1.0.1 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/server/v2/appmanager v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/server/v2/stf v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/store v1.1.1-0.20240418092142-896cdf1971bc // indirect @@ -251,6 +252,7 @@ replace ( cosmossdk.io/collections => ../../collections cosmossdk.io/core => ../../core cosmossdk.io/depinject => ../../depinject + cosmossdk.io/schema => ../../schema cosmossdk.io/tools/confix => ../../tools/confix cosmossdk.io/x/accounts => ../../x/accounts cosmossdk.io/x/accounts/defaults/lockup => ../../x/accounts/defaults/lockup diff --git a/tests/go.mod b/tests/go.mod index 20ae5e3ae144..b9fa1b4bc9cf 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -64,6 +64,7 @@ require ( cloud.google.com/go/storage v1.42.0 // indirect cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 // indirect cosmossdk.io/core/testing v0.0.0-00010101000000-000000000000 // indirect + cosmossdk.io/schema v0.0.0 // 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 @@ -241,6 +242,7 @@ replace ( cosmossdk.io/core/testing => ../core/testing cosmossdk.io/depinject => ../depinject cosmossdk.io/log => ../log + cosmossdk.io/schema => ../schema cosmossdk.io/store => ../store cosmossdk.io/x/accounts => ../x/accounts cosmossdk.io/x/accounts/defaults/lockup => ../x/accounts/defaults/lockup diff --git a/x/accounts/defaults/lockup/go.mod b/x/accounts/defaults/lockup/go.mod index c8789e951229..eef1094c6ce8 100644 --- a/x/accounts/defaults/lockup/go.mod +++ b/x/accounts/defaults/lockup/go.mod @@ -19,6 +19,7 @@ require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect cosmossdk.io/core/testing v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect + cosmossdk.io/schema v0.0.0 // indirect github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect github.com/cosmos/crypto v0.1.1 // indirect github.com/dgraph-io/badger/v4 v4.2.0 // indirect @@ -177,6 +178,7 @@ replace ( cosmossdk.io/core/testing => ../../../../core/testing cosmossdk.io/depinject => ../../../../depinject cosmossdk.io/log => ../../../../log + cosmossdk.io/schema => ../../../../schema cosmossdk.io/x/accounts => ../../. cosmossdk.io/x/auth => ../../../auth cosmossdk.io/x/bank => ../../../bank diff --git a/x/accounts/go.mod b/x/accounts/go.mod index b2ca8c8b5592..6408a0e7dc33 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -21,7 +21,10 @@ require ( require github.com/golang/mock v1.6.0 // indirect -require github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +require ( + cosmossdk.io/schema v0.0.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +) require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect @@ -182,6 +185,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus diff --git a/x/auth/go.mod b/x/auth/go.mod index 5546bd71de46..1d5adf28f81d 100644 --- a/x/auth/go.mod +++ b/x/auth/go.mod @@ -38,6 +38,7 @@ require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/log v1.3.1 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect filippo.io/edwards25519 v1.1.0 // indirect @@ -178,6 +179,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/bank => ../bank cosmossdk.io/x/consensus => ../consensus diff --git a/x/authz/go.mod b/x/authz/go.mod index f76a67cac84b..62614342a819 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -167,7 +167,10 @@ require ( sigs.k8s.io/yaml v1.4.0 // indirect ) -require github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +require ( + cosmossdk.io/schema v0.0.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +) replace github.com/cosmos/cosmos-sdk => ../../. @@ -179,6 +182,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/bank/go.mod b/x/bank/go.mod index b6a0be5f191c..f61da35636a2 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -166,7 +166,10 @@ require ( sigs.k8s.io/yaml v1.4.0 // indirect ) -require github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +require ( + cosmossdk.io/schema v0.0.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +) replace github.com/cosmos/cosmos-sdk => ../../. @@ -178,6 +181,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/consensus => ../consensus diff --git a/x/circuit/go.mod b/x/circuit/go.mod index 18714f7e8ac4..e6705e023aa9 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -24,6 +24,7 @@ require ( buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/log v1.3.1 // indirect cosmossdk.io/math v1.3.0 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -177,6 +178,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/consensus/go.mod b/x/consensus/go.mod index 6adbd307ae80..64dc7bf7eb2a 100644 --- a/x/consensus/go.mod +++ b/x/consensus/go.mod @@ -26,6 +26,7 @@ require ( cosmossdk.io/errors v1.0.1 // indirect cosmossdk.io/log v1.3.1 // indirect cosmossdk.io/math v1.3.0 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -174,6 +175,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/distribution/go.mod b/x/distribution/go.mod index 8a0e9df7c681..dc870f41f747 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -30,6 +30,7 @@ require ( ) require ( + cosmossdk.io/schema v0.0.0 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect @@ -182,6 +183,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/epochs/go.mod b/x/epochs/go.mod index 7aaf3ebad844..2be559903268 100644 --- a/x/epochs/go.mod +++ b/x/epochs/go.mod @@ -165,6 +165,7 @@ require ( require ( cosmossdk.io/log v1.3.1 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect @@ -179,6 +180,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/evidence/go.mod b/x/evidence/go.mod index 2e45731e33c4..3202a5a72deb 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -28,6 +28,7 @@ require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/log v1.3.1 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -177,6 +178,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index 0082f43338db..9f8b3315fca8 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -171,7 +171,10 @@ require ( sigs.k8s.io/yaml v1.4.0 // indirect ) -require github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +require ( + cosmossdk.io/schema v0.0.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +) replace github.com/cosmos/cosmos-sdk => ../../. @@ -183,6 +186,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/gov/go.mod b/x/gov/go.mod index 92efbf8c3c80..9a4c46ea4bd4 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -170,7 +170,10 @@ require ( sigs.k8s.io/yaml v1.4.0 // indirect ) -require github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +require ( + cosmossdk.io/schema v0.0.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +) replace github.com/cosmos/cosmos-sdk => ../../. @@ -182,6 +185,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/group/go.mod b/x/group/go.mod index 37eccf21f606..dd490ce5dbc1 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -43,6 +43,7 @@ require ( buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core/testing v0.0.0-00010101000000-000000000000 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 // indirect cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 // indirect cosmossdk.io/x/tx v0.13.3 // indirect @@ -188,6 +189,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/authz => ../authz diff --git a/x/mint/go.mod b/x/mint/go.mod index f286acecd279..92d629616826 100644 --- a/x/mint/go.mod +++ b/x/mint/go.mod @@ -159,6 +159,7 @@ require ( require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect github.com/cometbft/cometbft/api v1.0.0-rc.1 // indirect github.com/cosmos/crypto v0.1.1 // indirect @@ -181,6 +182,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/nft/go.mod b/x/nft/go.mod index 10037c6b0749..aae6cb4809cc 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -25,6 +25,7 @@ require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect @@ -177,6 +178,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/params/go.mod b/x/params/go.mod index fc95311d927b..458d703a99a0 100644 --- a/x/params/go.mod +++ b/x/params/go.mod @@ -29,6 +29,7 @@ require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/collections v0.4.0 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect @@ -178,6 +179,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index ec89c50376d1..09e197cd0eed 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -28,6 +28,7 @@ require ( require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect @@ -177,6 +178,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/slashing/go.mod b/x/slashing/go.mod index 1d9ebe756497..af4bddc02852 100644 --- a/x/slashing/go.mod +++ b/x/slashing/go.mod @@ -30,6 +30,7 @@ require ( buf.build/gen/go/cometbft/cometbft/protocolbuffers/go v1.34.2-20240701160653-fedbb9acfd2f.2 // indirect buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.34.2-20240130113600-88ef6483f90f.2 // indirect cosmossdk.io/log v1.3.1 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/consensus v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.3 // indirect @@ -178,6 +179,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/staking/go.mod b/x/staking/go.mod index 1d077317e32c..a43f71232d90 100644 --- a/x/staking/go.mod +++ b/x/staking/go.mod @@ -169,7 +169,10 @@ require ( go.opencensus.io v0.24.0 // indirect ) -require github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +require ( + cosmossdk.io/schema v0.0.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect +) replace github.com/cosmos/cosmos-sdk => ../../. @@ -181,6 +184,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index 11324a6d7465..091180ed5671 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -44,6 +44,7 @@ require ( cloud.google.com/go/storage v1.42.0 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/math v1.3.0 // indirect + cosmossdk.io/schema v0.0.0 // indirect cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 // indirect cosmossdk.io/x/staking v0.0.0-00010101000000-000000000000 // indirect cosmossdk.io/x/tx v0.13.3 // indirect @@ -208,6 +209,7 @@ replace ( cosmossdk.io/core/testing => ../../core/testing cosmossdk.io/depinject => ../../depinject cosmossdk.io/log => ../../log + cosmossdk.io/schema => ../../schema cosmossdk.io/x/accounts => ../accounts cosmossdk.io/x/auth => ../auth cosmossdk.io/x/bank => ../bank