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

Compute MinPowerToOptIn in EndBlock and cache, instead of computing on-the-fly #1842

Closed
p-offtermatt opened this issue May 1, 2024 · 0 comments · Fixed by #1952
Closed
Assignees
Labels
S: ImprovingThings Improving things: Customer requests, performance improvements, reliability and usability scope: provider Issues related to the provider chain scope: UI Addressing UX changes and improvements to user interface source: codereview To indicate an issue found during a code review.

Comments

@p-offtermatt
Copy link
Contributor

p-offtermatt commented May 1, 2024

The call to ComputeMinPowerToOptIn is expensive. It requires getting the list of all bonded validators and iterate twice over it. It might be better to cache the value in EndBlock when sending VSCPackets. Note that it also needs to be initialized during the migration as it might be needed in BeginBlock for proposals.

Originally posted by @mpoke in #1809 (comment)

@github-project-automation github-project-automation bot moved this to 🩹 F1: Triage in Cosmos Hub May 1, 2024
@p-offtermatt p-offtermatt moved this from 🩹 F1: Triage to 🤔 F1: Investigate in Cosmos Hub May 1, 2024
@p-offtermatt p-offtermatt moved this from 🤔 F1: Investigate to 📥 F2: Todo in Cosmos Hub May 1, 2024
@p-offtermatt p-offtermatt added S: ImprovingThings Improving things: Customer requests, performance improvements, reliability and usability source: codereview To indicate an issue found during a code review. labels May 1, 2024
@p-offtermatt p-offtermatt self-assigned this May 1, 2024
@mpoke mpoke added the scope: provider Issues related to the provider chain label May 16, 2024
@mpoke mpoke added the scope: UI Addressing UX changes and improvements to user interface label Jun 7, 2024
@mpoke mpoke assigned mpoke and unassigned p-offtermatt Jun 7, 2024
@mpoke mpoke moved this from 📥 F2: Todo to 🏗 F3: InProgress in Cosmos Hub Jun 7, 2024
@mpoke mpoke assigned p-offtermatt and unassigned mpoke Jun 7, 2024
@github-project-automation github-project-automation bot moved this from 🏗 F3: InProgress to 👍 F4: Assessment in Cosmos Hub Jun 12, 2024
@mpoke mpoke moved this from 👍 F4: Assessment to ✅ Done in Cosmos Hub Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S: ImprovingThings Improving things: Customer requests, performance improvements, reliability and usability scope: provider Issues related to the provider chain scope: UI Addressing UX changes and improvements to user interface source: codereview To indicate an issue found during a code review.
Projects
Status: ✅ Done
2 participants