Skip to content

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

Merged
tao-stones merged 3 commits intoanza-xyz:masterfrom
tao-stones:simd0096-feature-gating
Apr 17, 2024
Merged

add feature gate to collect and reward priority fee fully#583
tao-stones merged 3 commits intoanza-xyz:masterfrom
tao-stones:simd0096-feature-gating

Conversation

@tao-stones
Copy link
Copy Markdown

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

Copy link
Copy Markdown

@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
Copy Markdown
Author

Good call! something like this:
c4ea1fb

Comment thread core/src/banking_stage/transaction_scheduler/scheduler_controller.rs Outdated
@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
@tao-stones tao-stones force-pushed the simd0096-feature-gating branch from 34424a1 to 8445ca3 Compare April 16, 2024 16:39
bank.feature_set
.is_active(&remove_rounding_in_fee_calculation::id()),
);
let reward = bank.calculate_reward_for_transaction(transaction, fee_budget_limits);
Copy link
Copy Markdown
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

Copy link
Copy Markdown

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 requested a review from apfitzge April 16, 2024 18:39
@tao-stones tao-stones merged commit 62dfb0e into anza-xyz:master Apr 17, 2024
@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants