clean up disable_rent_fees_collection feature#6622
Conversation
a7a9aea to
0223326
Compare
| collector_fees: self.collector_fees.load(Relaxed), | ||
| fee_rate_governor: self.fee_rate_governor.clone(), | ||
| collected_rent: self.collected_rent.load(Relaxed), | ||
| collected_rent: 0u64, |
There was a problem hiding this comment.
We haven't collected rent for many epochs so it's safe to assume that any loaded snapshot will have 0 collected rent.
There was a problem hiding this comment.
Are we just going to serialize a 0 from now on, since we can't get the field out of the deserialize side? Or can we?
There was a problem hiding this comment.
Oops I meant to put this comment in the deserialization path not the serialization path. Anyways, yes, since rent fee collection was turned off we have been only serializing 0 for quite awhile so explicitly serializing 0 isn't a behavior change. Because of always serializing 0 for awhile, we can safely ignore whatever value we deserialize here where I meant to write this comment.
- collected_rent: AtomicU64::new(fields.collected_rent),We can ignore it because fields.collected_rent should be 0 and even if it wasn't, we never used the collected_rent field after a bank was frozen anyways so it was kinda pointless to have put it in snapshots in the first place (other than for debugging).
There was a problem hiding this comment.
IMO we should remove collected_rent from BankFieldsToSerialize and hard code to 0 later on SerializableVersionedBank.
(And we can also rename SerializableVersionedBank::collected_rent to SerializableVersionedBank::unused_collected_rent.)
Is that too much of a pain for this PR? If yes, we can also do it as a follow-up.
There was a problem hiding this comment.
I got confused and thought this struct was serialized and needed to keep the field. It was simple to remove, thanks for calling out: 72546df
| assert_eq!( | ||
| bank.hash().to_string(), | ||
| "5b72TRrdMhGED3boghe55CyX8hmnpYt7RTMrwrHTrNpP", | ||
| "CTg8Vq5RjXhfp332YC9DHQjAfFueLPimszv9i6xBFgPW", |
There was a problem hiding this comment.
These hashes changed because after removing the old rent collection path, we no longer update rent epoch for executable accounts which do not have a min rent exempt balance (this applies to builtin programs).
| collector_fees: self.collector_fees.load(Relaxed), | ||
| fee_rate_governor: self.fee_rate_governor.clone(), | ||
| collected_rent: self.collected_rent.load(Relaxed), | ||
| collected_rent: 0u64, |
There was a problem hiding this comment.
Are we just going to serialize a 0 from now on, since we can't get the field out of the deserialize side? Or can we?
0223326 to
13bcd14
Compare
|
Force pushed to resolve a conflict in |
brooksprumo
left a comment
There was a problem hiding this comment.
I didn't look at the SVM nor RPC files, but did scan the rest. I need to go back and do another pass on bank.rs and fee_distribution.rs too.
| collector_fees: self.collector_fees.load(Relaxed), | ||
| fee_rate_governor: self.fee_rate_governor.clone(), | ||
| collected_rent: self.collected_rent.load(Relaxed), | ||
| collected_rent: 0u64, |
There was a problem hiding this comment.
IMO we should remove collected_rent from BankFieldsToSerialize and hard code to 0 later on SerializableVersionedBank.
(And we can also rename SerializableVersionedBank::collected_rent to SerializableVersionedBank::unused_collected_rent.)
Is that too much of a pain for this PR? If yes, we can also do it as a follow-up.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6622 +/- ##
=========================================
Coverage 82.8% 82.8%
=========================================
Files 849 849
Lines 379373 377938 -1435
=========================================
- Hits 314300 313232 -1068
+ Misses 65073 64706 -367 🚀 New features to boost your workflow:
|
Problem
The
disable_rent_fees_collectionfeature is activated on all clusters and can be cleaned upSummary of Changes
disable_rent_fees_collectionfrom svm feature setFixes #