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

[chainstate] memoize block-commit descendancy information for SortitionHandleTx::descended_from #3045

Closed
jcnelson opened this issue Feb 11, 2022 · 1 comment
Assignees

Comments

@jcnelson
Copy link
Member

jcnelson commented Feb 11, 2022

The method SortitionHandleTx::descended_from is particularly slow, since it can do lots of MARF reads in the sortition DB. Looking at the log files, it seems to be the biggest contributor to sortition-processing -- even more so than downloading the Bitcoin block! Fortunately, we can easily memoize the PoX anchor block that a block-commit descends from; this should remove the need to query the MARF at all.

@jcnelson jcnelson self-assigned this Feb 11, 2022
@jcnelson jcnelson changed the title [chainstate] memoize block-commit descendancy information for SortitionHandleTx::descends_from [chainstate] memoize block-commit descendancy information for SortitionHandleTx::descended_from Feb 13, 2022
@gregorycoppola
Copy link
Contributor

Related: This issue is the line of work suggested in #3014, which suggests looking for ways to cache the MARF in RAM to improve performance.

@jcnelson jcnelson closed this as completed May 5, 2022
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

No branches or pull requests

2 participants