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

sdk/params: add lazy caching with LRU #3023

Open
moul opened this issue Oct 25, 2024 · 0 comments · May be fixed by #3120
Open

sdk/params: add lazy caching with LRU #3023

moul opened this issue Oct 25, 2024 · 0 comments · May be fixed by #3120
Assignees

Comments

@moul
Copy link
Member

moul commented Oct 25, 2024

sdk/params will be used in various parts of the project to enable dynamic configuration of the chain, controlled by GovDAO.
To avoid managing event-based logic and to ensure good performance, we should implement a lazy caching mechanism for sdk/params.

This mechanism will allow each call to the param getters to first check the cache and return the value if it is available. If not, it will retrieve the value from the store and save it in the cache. We should also implement automatic cache invalidation at the end of the block when a variable changes.
Additionally, there should be an LRU system that allows a node operator to select a maximum cache size.

Related with #3003

zivkovicmilos pushed a commit that referenced this issue Nov 12, 2024
- [x] add `r/sys/params`
- [x] add `genesis/genesis_params.toml`
- [x] port some existing configurations
- [x] open issue: add LRU lazy caching with instant invalidation using a
transient store (#3023)

Depends on #2920 
Depends on #3003 (cherry-picked)
Blocking #2911

---------

Signed-off-by: moul <[email protected]>
Co-authored-by: Morgan <[email protected]>
@moul moul linked a pull request Nov 14, 2024 that will close this issue
@Kouteki Kouteki moved this from Triage to In Progress in 🧙‍♂️gno.land core team Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📥 Inbox
Status: In Progress
Development

Successfully merging a pull request may close this issue.

1 participant