Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Add a feature to disable rent collection #33945

Merged
merged 17 commits into from
Nov 16, 2023
Merged

Conversation

HaoranYi
Copy link
Contributor

@HaoranYi HaoranYi commented Nov 3, 2023

Problem

The rent paying accounts on solana are phasing out.

Add a feature gate to disable rent collection. When there are no longer any rent
paying accounts on the network, we can enable this feature.

Summary of Changes

  • Add disable_rent_collection feature
  • when the feature is enabled, all accounts are treated rent-exempt. No rent fees will be collected and distributed.

Note: This feature only disables rent collection (not rewrite), all accounts are still being rewritten. To skip account rewrite, please refer to skip_rent_rewrite feature #26599.

Feature Gate Issue: #33946

@HaoranYi HaoranYi added the feature-gate Pull Request adds or modifies a runtime feature gate label Nov 3, 2023
@HaoranYi HaoranYi changed the title add a feature to disable rent collection Add a feature to disable rent collection Nov 3, 2023
Copy link

codecov bot commented Nov 3, 2023

Codecov Report

Merging #33945 (2cb7153) into master (7ba9fbc) will increase coverage by 0.1%.
Report is 1337 commits behind head on master.
The diff coverage is 91.1%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #33945      +/-   ##
==========================================
+ Coverage    81.8%    81.9%    +0.1%     
==========================================
  Files         766      812      +46     
  Lines      209154   219664   +10510     
==========================================
+ Hits       171206   180038    +8832     
- Misses      37948    39626    +1678     

@brooksprumo brooksprumo self-requested a review November 14, 2023 22:35
Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

Looking good!

HaoranYi added 4 commits November 15, 2023 20:10
When rent fee collection is disabled, we won't collect rent for any account. If there are any rent paying accounts, their `rent_epoch` won't change too.
brooksprumo
brooksprumo previously approved these changes Nov 15, 2023
Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

Lgtm!

@brooksprumo brooksprumo self-requested a review November 15, 2023 22:02
@brooksprumo brooksprumo dismissed their stale review November 15, 2023 22:05

I overlooked a thing

Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

Lgtm

@HaoranYi HaoranYi merged commit 60fdd85 into solana-labs:master Nov 16, 2023
@CriesofCarrots
Copy link
Contributor

Why did this land before the SIMD?

@jeffwashington
Copy link
Contributor

Why did this land before the SIMD?

yes, seems like it should've had simd. The whole goal was to ease the way for other clients, and was done after discussions with fd... Ha.

@HaoranYi
Copy link
Contributor Author

@CriesofCarrots
Copy link
Contributor

I am on that repo, and did see that SIMD. It looks like you’ve done some work on it today, but as of my comment this morning, it didn’t describe a design aside from linking to this PR, hadn’t had any discussion, and isn’t approved and merged.

@HaoranYi
Copy link
Contributor Author

HaoranYi commented Nov 16, 2023

I am on that repo, and did see that SIMD. It looks like you’ve done some work on it today, but as of my comment this morning, it didn’t describe a design aside from linking to this PR, hadn’t had any discussion, and isn’t approved and merged.

Yeah. I worked on the SIMD today. Hopefully, it won't take us too long to get SIMD approved, since today we don't have any rent paying accounts on the mainnet. In retrospect, we should have merged SIMD PR before merging this PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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.

5 participants