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

Get block caching #158

Closed
stolpa4 opened this issue Nov 19, 2021 · 2 comments
Closed

Get block caching #158

stolpa4 opened this issue Nov 19, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@stolpa4
Copy link

stolpa4 commented Nov 19, 2021

Hello, it seems to me that caching get_block function can get broken, because in some cases this function may return None (e.g. when the block is not found, like here:

try:
self.init_runtime(block_hash=block_hash)
except BlockNotFound:
return None
). So once you have not found the block, there's no way to retry, as this None value is cached. We should do something with it.

@arjanz
Copy link
Member

arjanz commented Nov 22, 2021

You mean when the node is not in sync yet or after a reorg? That is indeed undesirable, what I will try first is to never cache when None is returned. If that still doesn't work I will disable cache all together, as it does then more harm than good

@arjanz arjanz added the bug Something isn't working label Nov 22, 2021
arjanz added a commit that referenced this issue Dec 1, 2021
@arjanz
Copy link
Member

arjanz commented Dec 16, 2021

Caching is removed in latest release

@arjanz arjanz closed this as completed Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants