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

Clean up Partitioned Epoch Rewards feature logic #4186

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

CriesofCarrots
Copy link

Problem

The feature gate partitioned_epoch_rewards_superfeature has been activated on all public clusters, but the gating logic remains.

Summary of Changes

  • Remove feature gate logic, primarily in bank.rs, but also the superfeature fix in bank::partitioned_epoch_rewards::sysvar::create_epoch_rewards_sysvar()
  • Fixup some tests to expect PER
  • Remove pre-PER epoch-boundary rewards code, now unused
  • Cherry-pick @HaoranYi 's commit to remove partitioned reward test code

Fixes #426

@CriesofCarrots CriesofCarrots requested a review from a team as a code owner December 20, 2024 01:18
Copy link

mergify bot commented Dec 20, 2024

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@@ -1899,10 +1906,107 @@ fn test_bank_update_vote_stake_rewards() {
});
}

impl Bank {
#[cfg(test)]

Choose a reason for hiding this comment

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

This file already has a top-level #![cfg(test)], is this one also needed?

Suggested change
#[cfg(test)]

Choose a reason for hiding this comment

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

Is the actual logic changing in these tests? If yes, wdyt about making those changes in a separate PR? Or are the changes coupled with removing the featurization logic?

0
};

datapoint_warn!(

Choose a reason for hiding this comment

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

A question out of the scope of this PR - Are those stats useful to us? Should we port them to partitioned reward code path?

Copy link

@HaoranYi HaoranYi left a comment

Choose a reason for hiding this comment

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

Nice cleanup. One of my favorite type of PRs - deleting code!
I have just one question to consider, probably to address in a follow up PR.

Copy link

@pgarg66 pgarg66 left a comment

Choose a reason for hiding this comment

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

Approving from SVM

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.

Feature Gate: Enable partitioned epoch rewards
4 participants