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

increase rblock cache in root state #938

Merged
merged 1 commit into from
Jan 25, 2022
Merged

increase rblock cache in root state #938

merged 1 commit into from
Jan 25, 2022

Conversation

qizhou
Copy link
Contributor

@qizhou qizhou commented Jan 25, 2022

If some mblocks are not included in root block for a while, e.g., 2 days, then if a new root block includes them, the mblock's prev_root_block will be 2 days away from the latest root block, which causes the is_same_chain check to take a long time.

self.rblock_cache = LRUCache(maxsize=1024)

This diff increases the cache to 8K so that we could accept ~5 days difference of mblock's prev_root_block and the latest root block.

@qizhou qizhou requested a review from a team January 25, 2022 04:16
@qizhou qizhou requested a review from ninjaahhh January 25, 2022 04:31
@qizhou qizhou merged commit c8ae10b into master Jan 25, 2022
@qizhou qizhou deleted the rcache branch January 25, 2022 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants