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

cache apiAt in blockCache #1044

Open
shunjizhan opened this issue Nov 6, 2024 · 1 comment
Open

cache apiAt in blockCache #1044

shunjizhan opened this issue Nov 6, 2024 · 1 comment
Labels
Lv. 1 easy peasy, solution should be quite straightforward polish code or feature polish

Comments

@shunjizhan
Copy link
Collaborator

according to our assumption, most requests are targeting recent blocks, why not just construct and cache apiAt in blockCache on new block, so querying recent blocks should be much faster. Querying old blocks will construct new apiAt, which is fine and do not need to cache

@shunjizhan shunjizhan added polish code or feature polish Lv. 1 easy peasy, solution should be quite straightforward labels Nov 6, 2024
@shunjizhan
Copy link
Collaborator Author

shunjizhan commented Nov 7, 2024

can also trigger getBlock, getHeader, etc on new head to cache the result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lv. 1 easy peasy, solution should be quite straightforward polish code or feature polish
Projects
None yet
Development

No branches or pull requests

1 participant