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

add feature gate to collect and reward priority fee fully #583

Merged
merged 3 commits into from
Apr 17, 2024

Conversation

tao-stones
Copy link

Problem

Follow up #178 and #566; Rewarding full priority fee will break consensus.

Summary of Changes

  • add feature gate to new rewarding logic.

Fix Feature Gate Issue: solana-labs#34731

@tao-stones tao-stones added the feature-gate Pull Request adds or modifies a runtime feature gate label Apr 4, 2024
Copy link

@apfitzge apfitzge left a comment

Choose a reason for hiding this comment

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

we should update SchedulerController::calculate_priority_and_cost to appropriately consider the feature-gate.

@tao-stones
Copy link
Author

Good call! something like this:
c4ea1fb

@tao-stones tao-stones force-pushed the simd0096-feature-gating branch 2 times, most recently from 389bad3 to 80c6427 Compare April 8, 2024 15:29
bank.feature_set
.is_active(&remove_rounding_in_fee_calculation::id()),
);
let reward = bank.calculate_reward_for_transaction(transaction, fee_budget_limits);
Copy link
Author

Choose a reason for hiding this comment

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

Simply sharing bank's reward calculation

Choose a reason for hiding this comment

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

there will be some oddity here when the feature gets activated. txs received before feature-activation will still have old calculation (prio 50% burned) those after will not.
This will only be an effect around the epoch boundary.

@tao-stones tao-stones merged commit 62dfb0e into anza-xyz:master Apr 17, 2024
48 checks passed
@tao-stones tao-stones deleted the simd0096-feature-gating branch April 17, 2024 14:14
michaelschem pushed a commit to michaelschem/agave that referenced this pull request Apr 20, 2024
* add feature gate to collect and distribute priority fee fully

* add feature gate logic to SchedulerController::calculate_priority_and_cost()

* set feature gate status correctly for tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-gate Pull Request adds or modifies a runtime feature gate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants