Closed czarcas7ic closed 1 week ago
Important Notice
This PR modifies an in-repo Go module. It is one of:
The dependent Go modules, especially the root one, will have to be updated to reflect the changes. Failing to do so might cause e2e to fail.
Please follow the instructions below:
Please let us know if you need any help.
The recent update enhances the InitNormalKeepers
function in the AppKeepers
struct. This involves adding a call to icaHostKeeper.WithQueryRouter(bApp.GRPCQueryRouter())
, injecting the gRPC query router into the ICA Host Keeper. This change ensures better integration and functionality of the Interchain Accounts (ICA) Host within the application's greater architecture.
Files | Change Summary |
---|---|
app/keepers/keepers.go |
Updated InitNormalKeepers to include icaHostKeeper.WithQueryRouter(bApp.GRPCQueryRouter()) , improving ICA Host integration. |
sequenceDiagram
participant Client
participant GRPCQueryRouter
participant bApp
participant AppKeepers
participant icaHostKeeper
Client->>bApp: Initialize Application
bApp->>AppKeepers: InitNormalKeepers(...)
AppKeepers->>icaHostKeeper: WithQueryRouter(bApp.GRPCQueryRouter())
icaHostKeeper->>GRPCQueryRouter: Register Query Router
GRPCQueryRouter-->>icaHostKeeper: Query Router Integrated
icaHostKeeper-->>AppKeepers: Initialization Complete
app/keepers/keepers.go (2)
`343-343`: **Ensure proper integration of `icaHostKeeper.WithQueryRouter` method call.** The addition of `icaHostKeeper.WithQueryRouter(bApp.GRPCQueryRouter())` integrates the `icaHostKeeper` with the gRPC query router of `bApp`. This is crucial for enabling query routing functionalities for the interchain accounts host module. Ensure that this integration does not interfere with existing functionalities and that it aligns with the intended architectural changes.Verification successful
--- **Ensure proper integration of `icaHostKeeper.WithQueryRouter` method call.** The integration of `icaHostKeeper` with the gRPC query router appears to be correctly implemented without affecting existing functionalities. The initialization, configuration, and assignment of `icaHostKeeper` are consistent and do not show any unintended side effects. - Initialization: `icaHostKeeper := icahostkeeper.NewKeeper(...)` - Configuration: `icaHostKeeper.WithQueryRouter(bApp.GRPCQueryRouter())` - Assignment: `appKeepers.ICAHostKeeper = &icaHostKeeper`--- `340-345`: **Check the placement and context of the new method call.** The method `icaHostKeeper.WithQueryRouter(bApp.GRPCQueryRouter())` is placed within the `InitNormalKeepers` function. It's important to ensure that this method is called at the right point in the lifecycle of `icaHostKeeper` initialization. Verify that the query router is available and fully configured at this point in the execution.Scripts executed
The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Description: Verify that the integration does not affect existing functionalities. # Test: Search for usage of `icaHostKeeper` and related configurations. rg --type go $'icaHostKeeper' ``` Length of output: 238 --- --- Script: ```shell #!/bin/bash # Description: Verify the initialization and configuration of icaHostKeeper and its impact on the system. # Test: Search for initialization of icaHostKeeper. rg --type go 'icahostkeeper.NewKeeper' # Test: Search for assignment to appKeepers.ICAHostKeeper. rg --type go 'appKeepers.ICAHostKeeper' # Test: Search for other usages of icaHostKeeper. rg --type go 'icaHostKeeper' ``` Length of output: 537Verification successful
### Actions: 1. Search for the definition and initialization of `bApp.GRPCQueryRouter()` to verify its configuration status before being passed to `icaHostKeeper`. --- ### Actions: 1. Search for the initialization of `GRPCQueryRouter` within `app/app.go` to confirm its setup. --- ### Actions: 1. Check the function call order to ensure `OsmosisApp` setup is completed before `InitNormalKeepers`. --- **Initialization Order Verified** The `bApp.GRPCQueryRouter()` is properly initialized within the `OsmosisApp` setup process and is configured before being used in the `InitNormalKeepers` function. The initialization sequence in `app/app.go` confirms that the `GRPCQueryRouter` is set up as part of the application configuration, ensuring it is available and fully configured before being passed to `icaHostKeeper`. - `app/app.go`: Initialization of `GRPCQueryRouter` occurs during the setup of `OsmosisApp`. - `app/keepers/keepers.go`: The `InitNormalKeepers` function, which includes the call to `icaHostKeeper.WithQueryRouter(bApp.GRPCQueryRouter())`, is called after the `OsmosisApp` setup is complete.Scripts executed
The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Description: Ensure the query router is available and configured before being passed to `icaHostKeeper`. # Test: Check the initialization order and configuration of `bApp.GRPCQueryRouter()`. rg --type go $'bApp.GRPCQueryRouter()' ``` Length of output: 385 --- --- Script: ```shell #!/bin/bash # Find the definition and initialization of `bApp.GRPCQueryRouter()` rg --type go 'GRPCQueryRouter' --context 5 ``` Length of output: 10189 --- --- Script: ```shell #!/bin/bash # Find the exact initialization point of `GRPCQueryRouter` within `app/app.go` rg --type go 'GRPCQueryRouter' app/app.go --context 10 ``` Length of output: 3393 --- --- Script: ```shell #!/bin/bash # Verify the order of function calls to ensure `OsmosisApp` setup is completed before `InitNormalKeepers`. rg --type go 'InitNormalKeepers' --context 20 ``` Length of output: 8766
Closes: #XXX
What is the purpose of the change
Since we are using comet 0.38.x branch it makes sense to use v8.3.x line of ibc go rather than v8.2.x