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

[RelayMiner] Implement relayminer query caching #1050

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

red-0ne
Copy link
Contributor

@red-0ne red-0ne commented Jan 31, 2025

Summary

Implements caching layer for query clients to reduce network calls and improve performance

Primary Changes:

  • Added generic KeyValueCache and ParamsCache interfaces with thread-safe implementations
  • Integrated caching across all query clients (Account, Application, Bank, Service, etc.)
  • Added cache clearing on new blocks via WithNewBlockCacheClearing option

Secondary Changes:

  • Replaced manual sync.Mutex implementation in accQuerier with new cache interface
  • Added cache configuration to integration tests
  • Updated relayer dependencies to include cache initialization

Issue

The RelayMiner RPC queries are not cached, which puts excessive load on the configured full node, degrading the performance of both off-chain and on-chain components.

Type of change

Select one or more from the following:

Sanity Checklist

  • I have updated the GitHub Issue assignees, reviewers, labels, project, iteration and milestone
  • For docs, I have run make docusaurus_start
  • For code, I have run make go_develop_and_test and make test_e2e
  • For code, I have added the devnet-test-e2e label to run E2E tests in CI
  • For configurations, I have update the documentation
  • I added TODOs where applicable

@red-0ne red-0ne added the relayminer Changes related to the Relayminer label Jan 31, 2025
@red-0ne red-0ne added this to the Beta TestNet Iteration milestone Jan 31, 2025
@red-0ne red-0ne requested review from Olshansk and adshmh January 31, 2025 04:38
@red-0ne red-0ne self-assigned this Jan 31, 2025
@red-0ne red-0ne added the push-image CI related - pushes images to ghcr.io label Jan 31, 2025
Copy link

The image is going to be pushed after the next commit.

You can use make trigger_ci to push an empty commit.

If you also want to run E2E tests, please add devnet-test-e2e label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push-image CI related - pushes images to ghcr.io relayminer Changes related to the Relayminer
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

1 participant