Skip to content

Add gRPC CProvider impl #2002

@corverroos

Description

@corverroos

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).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions