-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(baseapp): fix api break latest schema #21978
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ const ( | |
// 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{ | ||
listener, err := indexer.StartIndexing(indexer.IndexingOptions{ | ||
Config: indexerOpts, | ||
Resolver: decoding.ModuleSetDecoderResolver(appModules), | ||
SyncSource: nil, | ||
|
@@ -47,7 +47,7 @@ func (app *BaseApp) EnableIndexer(indexerOpts interface{}, keys map[string]*stor | |
app.cms.AddListeners(exposedKeys) | ||
|
||
app.streamingManager = storetypes.StreamingManager{ | ||
ABCIListeners: []storetypes.ABCIListener{listenerWrapper{listener}}, | ||
ABCIListeners: []storetypes.ABCIListener{listenerWrapper{listener.Listener}}, | ||
StopNodeOnErr: true, | ||
} | ||
|
||
Comment on lines
+50
to
53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Make
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ require ( | |
cloud.google.com/go/storage v1.43.0 // indirect | ||
cosmossdk.io/client/v2 v2.0.0-20230630094428-02b760776860 // indirect | ||
cosmossdk.io/errors v1.0.1 // indirect | ||
cosmossdk.io/schema v0.3.0 // indirect | ||
cosmossdk.io/schema v0.3.1-0.20240930054013-7c6e0388a3f9 // indirect | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent versions of While the 🔗 Analysis chainApprove the update of cosmossdk.io/schema, but verify compatibility The update of Please ensure that this pre-release version is compatible with other dependencies and doesn't introduce any unexpected behavior in the tests. Consider running the following commands to verify: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify the compatibility of the updated cosmossdk.io/schema version
# Test: Check if there are any compatibility issues or errors related to cosmossdk.io/schema
go mod tidy
go test ./...
# Test: Look for any occurrences of cosmossdk.io/schema in the codebase
rg 'cosmossdk\.io/schema'
Length of output: 20751 |
||
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 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +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/collections v0.4.0 // indirect | ||
cosmossdk.io/schema v0.3.0 // indirect | ||
cosmossdk.io/schema v0.3.1-0.20240930054013-7c6e0388a3f9 // indirect | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Multiple Versions of The
🔗 Analysis chainUpdate to The To ensure this update doesn't introduce any breaking changes or compatibility issues, please run the following verification script: This script will help identify any potential issues arising from the schema update. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify the impact of the schema update on the authz module.
# Test: Check for any changes in import statements or usage of the schema package
rg --type go -i 'cosmossdk.io/schema'
# Test: Run tests to ensure compatibility
go test ./x/authz/...
Length of output: 6185 Script: #!/bin/bash
# Description: Check for dependency constraints and potential version conflicts related to cosmossdk.io/schema.
# List all require statements for dependencies
rg '^require ' go.mod
# Identify replace directives for cosmossdk.io/schema
rg '^replace ' go.mod | rg 'cosmossdk.io/schema'
# Search for all instances of cosmossdk.io/schema in go.mod files within the repository
fd go.mod . | xargs grep 'cosmossdk.io/schema'
Length of output: 4007 Script: #!/bin/bash
# Description: Identify all versions of cosmossdk.io/schema used in the repository and check for replace directives.
# List all unique versions of cosmossdk.io/schema
grep -R 'cosmossdk.io/schema' go.mod | grep -o 'v[0-9]\+\.[0-9]\+\.[0-9]\-*[a-z0-9\-\.]*' | sort | uniq
# Identify all replace directives for cosmossdk.io/schema
rg '^replace ' go.mod | rg 'cosmossdk.io/schema'
# Check for inconsistent versions across different go.mod files
rg 'cosmossdk.io/schema' go.mod | sort | uniq -c | sort -nr
Length of output: 302 |
||
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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
listenerWrapper does not implement the required ABCIListener interface methods.
listenerWrapper
struct does not define theListenFinalizeBlock
andListenCommit
methods required by theABCIListener
interface.listenerWrapper
to ensure correct functionality.🔗 Analysis chain
Ensure Correct Implementation of
listenerWrapper
The
listenerWrapper
is initialized withlistener.Listener
. Verify thatlistener.Listener
correctly implements the necessary interfaces and that wrapping it is required for the desired functionality.Run the following script to confirm the implementation details:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 2316
Script:
Length of output: 2512
Script:
Length of output: 1101