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

Optimize retrieval and caching #4

Open
anomit opened this issue Jan 10, 2025 · 1 comment · May be fixed by #5
Open

Optimize retrieval and caching #4

anomit opened this issue Jan 10, 2025 · 1 comment · May be fixed by #5
Assignees
Labels
enhancement New feature or request

Comments

@anomit
Copy link
Member

anomit commented Jan 10, 2025

Is your feature request related to a problem?
The cacher was written as a quick drop in to pull certain values required by different components. But, it follows a stupidly simple design of repeated polling for the same values without any consideration for difference in states etc.

This is unnecessary and puts major load on the underlying RPC.

Describe the solution you'd like

  • Fetch all slot/node information only once on startup
    • Subsequent updates can follow from event log updates and a minor range of backtracking on block ranges from the current head for error correction.
    • identify data market states that don't change, do not poll for them.

Describe alternatives you've considered
There is no alternative. This has to be done.

Additional context
NA

@anomit anomit added the enhancement New feature or request label Jan 10, 2025
@chetna-mittal
Copy link

Completed implementation including separating static and dynamic state variables along with adding a flag to poll for static state variables too (for devnet/staging environments).

Implemented fetching blocks and processing events mechanism, have to include the offset fetching part and test the application.

@chetna-mittal chetna-mittal linked a pull request Jan 16, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants