Skip to content

[Queries] Fix queries blocked by heavy EndBlockers #3

@Olshansk

Description

@Olshansk

tl;dr Fix CosmosSDK and/or CometBFT so RPC queries aren't blocked by slow EndBlockers.


Original thread from slack: https://buildwithgrove.slack.com/archives/C047X1T6ERK/p1754138512577569


tl;dr I paired in-person with @adi and we put together a hack in CometBFT that proved out the root cause. Next step is to upstream a version of the changes correctly.

--- Context from Slack ---

Context:

  1. Here is a mutex related hack in a fork of CometBFT v0.38 that fixes the issue: https://github.com/pokt-network/cometbft/pull/2/files
  2. The correct short-term solution is to productionize (1) behind a flag.
  3. The correct long-term solution is use unsync_local_client.go and modify how R/W mutexes are handeled from the CosmoSDK side.
  4. Bonus: I learnt a few interesting things at Paradigm Frontiers on how reth accounts for these issues and would propose (and implement if supported) a channel based solution to (3)

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Bug.

Projects

Status
🏗 In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions