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 CProvider impl #2002

Closed
corverroos opened this issue Sep 30, 2024 · 0 comments · Fixed by #2216
Closed

Add gRPC CProvider impl #2002

corverroos opened this issue Sep 30, 2024 · 0 comments · Fixed by #2216
Assignees
Labels
good first issue Good for newcomers

Comments

@corverroos
Copy link
Collaborator

Problem to Solve

CProvider currently uses the CometBFT RPC to query CosmosSDK application state (attest/portal/valsync modules).

CometBFT however implements a sequential concurrency model. So queries and block processing compete for time resources. See cosmos/cosmos-sdk#10859.

Queries are therefore slower, and high query load can negatively affect block building latency. See #1865 .

Local simnet testing showed that gRPC is 2x~3x faster than CometBFT.

Proposed Solution

  • Add a second gRPC based CProvider implementation.
  • Note we'll need to remove the CometClient method (only used by xconnector).
  • We don't expose gRPC API publicly on staging or omega yet, so all external use still need to use the CometBFT impl.
  • First usage of gRPC could be validators querying themselves.
  • Second could be relayer querying archive nodes (ensure firewall is open)
  • Third, think about and discuss exposing the gRPC API publicly (and create subsequent ticket).
@corverroos corverroos added the good first issue Good for newcomers label Sep 30, 2024
@kc1116 kc1116 self-assigned this Oct 3, 2024
@corverroos corverroos assigned corverroos and unassigned kc1116 Oct 17, 2024
@corverroos corverroos added this to the 1.1 - Mainnet Beta milestone Oct 18, 2024
corverroos added a commit that referenced this issue Oct 18, 2024
Revert to only using cometBFT cprovider since gRPC based cprovider is
causing data races in CI.

issue: #2002
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants