Skip to content
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

Support additional CLI query commands for the ratelimit module #241

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

jaybxyz
Copy link
Contributor

@jaybxyz jaybxyz commented Sep 25, 2023

Description

This PR resolves #240

Tasks

  • Remove redundant message validation in msgServer level
  • Organize types/msgs.go
  • Define msgServer and queryServer to enhance clarify
  • Add test targets in Makefile
  • Add CLI query commands for unsupported gRPC query services
  • Add test cases for gRPC query services

@jaybxyz jaybxyz self-assigned this Sep 25, 2023
@jaybxyz
Copy link
Contributor Author

jaybxyz commented Oct 2, 2023

I'm currently stuck while adding the final test cases for RateLimitsByChainID.

In the RateLimitsByChainID query service, it validates if the channel has been created and retrieves the channel client state using the provided port id (it uses the default port id transport) and channel id. As I'm adding test cases for this, in order to bypass the validation check, I need to mock two different chains and initialize a channel using the ibctesting package. When i try with the upstream ibctesting package from ibc-go, it seems to work well; however, i find it strange that it doesn't work with the internal customized ibctesting package that we have due to the following error message Error: could not retrieve module from port-id: ports/mock: capability not found. I am debugging this line by line, comparing it with the upstream code to identify any issues, but the issue is not immediately apparent.

@vuong177 @GNaD13 @anhductn2001 Could you lend me a hand with this when you have a moment? I'd appreciate your insights into why this might be happening. You can refer to this test case TestChanOpenInit() that i am debugging with. I will give an update if i find any.

Copy link
Contributor

@GNaD13 GNaD13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jaybxyz , I have some comment. Could you check that pls?

func (s *KeeperTestSuite) TestChanOpenInit() {
// Create client and connections on both chains
path := ibctesting.NewPath(s.chainA, s.chainB)
s.coordinator.SetupConnections(path)
Copy link
Contributor

@GNaD13 GNaD13 Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this current path doesn't set portID which is used to retrieve capability. In our app.go, we didn't add port mock like ibc-go app.go. This port is only using for testing, not in product.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support CLI query commands for the other query services for ratelimit module
2 participants