Skip to content

Conversation

@satushh
Copy link
Collaborator

@satushh satushh commented Dec 5, 2025

What type of PR is this?

Other

What does this PR do? Why is it needed?

The for loop in MigrateToCold function was brute force in nature. It could be improved by just directly jumping by slotsPerArchivedPoint rather than going over every single slot.

for slot := oldFSlot; slot < fSlot; slot++ {
  ...
   if slot%s.slotsPerArchivedPoint == 0 && slot != 0 {

No need to do the modulo for every single slot.
We could just find the correct starting point and jump by slotsPerArchivedPoint at a time.

Which issues(s) does this PR fix?

Fixes #

Other notes for review

Acknowledgements

@satushh satushh marked this pull request as ready for review December 5, 2025 14:04
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.

2 participants