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

v1.16: moves new_warmup_cooldown_rate_epoch outside iterators and for loops (backport of #33259) #33262

Merged
merged 2 commits into from
Sep 15, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Sep 15, 2023

This is an automatic backport of pull request #33259 done by Mergify.
Cherry-pick of c1090d3 has failed:

On branch mergify/bp/v1.16/pr-33259
Your branch is up to date with 'origin/v1.16'.

You are currently cherry-picking commit c1090d3959.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   programs/stake/src/stake_instruction.rs
	modified:   sdk/src/feature_set.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   programs/stake/src/stake_state.rs
	both modified:   runtime/src/bank.rs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

…33259)

Recalculating new_warmup_cooldown_rate_epoch for each item is redundant
and wasteful and instead can be done only once outside the iterators and
for loops.
Also NewWarmupCooldownRateEpoch is unnecessary and verbose and is
removed in this commit.

(cherry picked from commit c1090d3)

# Conflicts:
#	programs/stake/src/stake_state.rs
#	runtime/src/bank.rs
@behzadnouri
Copy link
Contributor

Backporting this not to introduce any performance regression in the epoch boundary rewards calculation.

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #33262 (4b68eb8) into v1.16 (988641d) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@           Coverage Diff           @@
##            v1.16   #33262   +/-   ##
=======================================
  Coverage    81.9%    81.9%           
=======================================
  Files         762      762           
  Lines      207833   207835    +2     
=======================================
+ Hits       170320   170365   +45     
+ Misses      37513    37470   -43     

@behzadnouri behzadnouri merged commit 1e8a544 into v1.16 Sep 15, 2023
@behzadnouri behzadnouri deleted the mergify/bp/v1.16/pr-33259 branch September 15, 2023 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants