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.18: Add rpc support for partitioned rewards (backport of #34773) #34960

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 25, 2024

This is an automatic backport of pull request #34773 done by Mergify.


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

* Check feature_set for enable_partitioned_epoch_reward

* Keep common variable outside if case

* Keep common early return out of if case, since the first_slot_in_epoch must exist for partiion PDA to exist

* Get and parse epoch partition data PDA

* Find partition index for all addresses

* Pull relevant blocks and get rewards

* Reuse ordering and reformatting

* Remove feature deactivation from TestValidator

* Restore rewards iteration in first block in epoch for feature case to catch Voting rewards

* Add fn get_reward_map helper to dedupe code

* No need to start 2nd get_block_with_limit call with first block again

* Replace filter_map to parameterize RewardType filter expression

* Weird thing to make clippy and compiler agree (rust-lang/rust-clippy#8098)

* Use activated_slot to ensure the right approach for past rewards epochs

(cherry picked from commit 22500c2)
Copy link

codecov bot commented Jan 25, 2024

Codecov Report

Attention: 82 lines in your changes are missing coverage. Please review.

Comparison is base (2c5f24a) 81.6% compared to head (7a271f2) 81.6%.
Report is 1 commits behind head on v1.18.

Additional details and impacted files
@@            Coverage Diff            @@
##            v1.18   #34960     +/-   ##
=========================================
- Coverage    81.6%    81.6%   -0.1%     
=========================================
  Files         828      828             
  Lines      223859   223922     +63     
=========================================
+ Hits       182796   182812     +16     
- Misses      41063    41110     +47     

Copy link
Contributor

@t-nelson t-nelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@CriesofCarrots CriesofCarrots merged commit 7cee926 into v1.18 Jan 26, 2024
35 checks passed
@CriesofCarrots CriesofCarrots deleted the mergify/bp/v1.18/pr-34773 branch January 26, 2024 06:08
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.

None yet

2 participants