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 the latest known power table in certstore #881

Closed
masih opened this issue Feb 7, 2025 · 0 comments · Fixed by #882
Closed

Cache the latest known power table in certstore #881

masih opened this issue Feb 7, 2025 · 0 comments · Fixed by #882
Assignees

Comments

@masih
Copy link
Member

masih commented Feb 7, 2025

A way to significantly speed up certstore.GetPowerTable (in exchange for a small memory footprint) is to cache the latest known powertable in certStore. This would make calls to GetPowerTable for an instance made by consensus inputs in steady state very quick. This call makes up the vast majority of certstore workload.

See: #874

@masih masih added this to the M2: Mainnet Passive Testing milestone Feb 7, 2025
@masih masih self-assigned this Feb 7, 2025
@masih masih added this to F3 Feb 7, 2025
@github-project-automation github-project-automation bot moved this to Todo in F3 Feb 7, 2025
@masih masih moved this from Todo to In progress in F3 Feb 7, 2025
masih added a commit that referenced this issue Feb 7, 2025
Certificate store already keeps track of the latest power table, i.e.,
the power table of the next expected certificate. Use this pre-computed
table whenever the next power table is asked for instead of re-computing
it every time.

This results in a much faster response to `GetPowerTable` for the most
common case: getting the committee as part of monotonic progress of
GPBFT instances.

Fixes #881
@masih masih moved this from In progress to In review in F3 Feb 7, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 7, 2025
…882)

Certificate store already keeps track of the latest power table, i.e.,
the power table of the next expected certificate. Use this pre-computed
table whenever the next power table is asked for instead of re-computing
it every time.

This results in a much faster response to `GetPowerTable` for the most
common case: getting the committee as part of monotonic progress of
GPBFT instances.

Fixes #881
@masih masih closed this as completed in #882 Feb 7, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in F3 Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant