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

Add gRPC query for Counterparty for a given client identifier #7116

Closed
crodriguezvega opened this issue Aug 9, 2024 · 4 comments
Closed
Assignees
Labels
feat: ibc-eureka gRPC Issues for gRPC endpoints type: feature New features, sub-features or integrations
Milestone

Comments

@crodriguezvega
Copy link
Contributor

Given a request with a client identifier, the gRPC query returns the stored Counterparty (if it exists).

@crodriguezvega crodriguezvega added type: feature New features, sub-features or integrations gRPC Issues for gRPC endpoints feat: ibc-eureka labels Aug 9, 2024
@crodriguezvega crodriguezvega added this to the Eureka beta milestone Aug 9, 2024
@crodriguezvega crodriguezvega changed the title Add gRPC query for Counterparty Add gRPC query for Counterparty for a given client identifier Aug 9, 2024
@vishal-kanna
Copy link
Contributor

@crodriguezvega I would like to work on it

@crodriguezvega
Copy link
Contributor Author

Hi @vishal-kanna. Thank you for volunteering to take the issue! After I wrote the issue I was thinking that it might be nice to have this gRPC endpoint do something slightly different. I will explain.

When a light client is created for the first time, it will not have any counterparty information, but we store the signer of the party that submitted the (the "creator" of the light client). So I was thinking that it could be better to have a gRPC query with a request like:

message QueryClientRequest {
  // client unique identifier
  string client_id = 1;
}

And a response like this:

message QueryClientResponse {
  string creator = 1;
  Counterparty counterparty = 2;
}

Then if one queries for a light client after it has been created but before the counterparty has been registered, then the response would contain only the creator. Once the counterparty has been provided and the creator address has been deleted (since it is not needed anymore), the response will have an empty creator and the information for the counterparty.

The query endpoint would then be something like:

rpc Client(QueryClientRequest) returns (QueryClientResponse) {
  option (google.api.http).get = "/ibc/core/client/v1/clients/{client_id}";
}

Let me check with the team what they think and if they agree, then I will ping you back here to work on it. Thanks!

@crodriguezvega
Copy link
Contributor Author

@vishal-kanna Got quick positive replies about the proposal in the comment above, so you can go ahead and work on it. Thank you!

@DimitrisJim
Copy link
Contributor

handled in #7120

@github-project-automation github-project-automation bot moved this from Todo 🏃 to Done 🥳 in IBC Eureka Aug 26, 2024
@tankcdr tankcdr moved this to Backlog in IBC Sep 27, 2024
@tankcdr tankcdr added this to IBC Sep 27, 2024
@damiannolan damiannolan moved this from Backlog to Done in IBC Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: ibc-eureka gRPC Issues for gRPC endpoints type: feature New features, sub-features or integrations
Projects
Status: Done
Archived in project
Development

No branches or pull requests

3 participants