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

Replace /abci_info RPC call with either /status or /abci_query gRPC call #3236

Open
6 tasks
seanchen1991 opened this issue Apr 11, 2023 · 0 comments
Open
6 tasks
Assignees
Labels
I: dependencies Internal: related to dependencies I: refactoring
Milestone

Comments

@seanchen1991
Copy link
Contributor

seanchen1991 commented Apr 11, 2023

Summary

Problem Definition

The query_application_status function currently needs to perform two separate status queries in order to obtain the latest info regarding application status. More specifically:

  1. It calls into the /abci_info RPC endpoint that Comet exposes in order to obtain the latest height h that the application executed.
    let abci_info = self
    .block_on(self.rpc_client.abci_info())
    .map_err(|e| Error::rpc(self.config.rpc_addr.clone(), e))?;
  2. It then calls into the /blockchain?minHeight={h}&maxHeight={h} RPC endpoint, also exposed by Comet, in order to extract the timestamp from the header of the block at height h.
    let blocks = self
    .block_on(
    self.rpc_client
    .blockchain(abci_info.last_block_height, abci_info.last_block_height),
    )
    .map_err(|e| Error::rpc(self.config.rpc_addr.clone(), e))?
    .block_metas;

This logic should ideally changed to utilize either the /status gRPC endpoint or the /abci_query gRPC endpoint.

The /status endpoint currently does not provide the metatdata that we need, though it will make sense to switch to it if it is changed to match the requirements listed in this comment.

The /abci_query endpoint also cannot currently be used in its current form, as it does not offer support for proofs.

Acceptance Criteria

  • Change the query_application_status function to utilize either the /status or /abci_query gRPC endpoint when one becomes appropriate for our use case.

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@github-project-automation github-project-automation bot moved this to 🩹 Triage in Hermes Apr 11, 2023
@seanchen1991 seanchen1991 added I: dependencies Internal: related to dependencies I: refactoring labels Apr 11, 2023
@seanchen1991 seanchen1991 self-assigned this Apr 11, 2023
@seanchen1991 seanchen1991 moved this from 🩹 Triage to 📥 Todo in Hermes Apr 11, 2023
@seanchen1991 seanchen1991 added this to the v1.6 milestone Apr 11, 2023
@seanchen1991 seanchen1991 modified the milestones: v1.6, v1.7 Jul 10, 2023
@romac romac modified the milestones: v1.7, v1.8 Aug 31, 2023
@romac romac modified the milestones: v1.8, Backlog Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: dependencies Internal: related to dependencies I: refactoring
Projects
Status: 📥 Todo
Development

No branches or pull requests

2 participants