-
Notifications
You must be signed in to change notification settings - Fork 110
rent-collector: Deprecate everything except the struct #226
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### Problem The rent collector is still being used in Agave to hold onto the `Rent` for the cluster, but is otherwise unused. #### Summary of changes Deprecate all functions and constants that should be redefined elsewhere. I decided to not deprecate the whole thing since Agave still needs the struct, but full deprecation is also an option. This will be backported to maintenance/v2.x. If we decide on full deprecation, then we can also remove the crate entirely.
I think we should migrate Agave away from using the sdk rent collector crate and use an internal agave crate instead (if at all). Then just deprecate the whole crate here |
joncinque
added a commit
to joncinque/solana
that referenced
this pull request
Aug 4, 2025
#### Problem As outlined in anza-xyz/solana-sdk#226, the RentCollector is no longer needed, and with solana-labs#6782, it's needed even less. #### Summary of changes Inline the `RentCollector` struct into `solana-runtime` with the few functions needed. This changes the frozen-abi hash because the type now comes from a different crate. The only other usage was the `RENT_EXEMPT_RENT_EPOCH` constant, which is used in svm and accounts-db. Since there's no good common crate that both of these use, I inlined the const in both places, along with a test to make sure they don't diverge. Finally, remove solana-rent-collector usage everywhere.
joncinque
added a commit
to joncinque/solana-sdk
that referenced
this pull request
Aug 4, 2025
#### Problem As noted in anza-xyz#226, the rent collector crate and struct are no longer needed, and with anza-xyz/agave#7297, will no longer be used. #### Summary of changes Mark the crate as deprecated, so that we can backport and release the change, then delete the crate entirely.
Closing in favor of #262 |
joncinque
added a commit
to joncinque/solana-sdk
that referenced
this pull request
Aug 4, 2025
#### Problem As noted in anza-xyz#226, the rent collector crate and struct are no longer needed, and with anza-xyz/agave#7297, will no longer be used. #### Summary of changes Mark the crate as deprecated, so that we can backport and release the change, then delete the crate entirely.
joncinque
added a commit
to joncinque/solana
that referenced
this pull request
Aug 5, 2025
#### Problem As outlined in anza-xyz/solana-sdk#226, the RentCollector is no longer needed, and with solana-labs#6782, it's needed even less. #### Summary of changes Inline the `RentCollector` struct into `solana-runtime` with the few functions needed. This changes the frozen-abi hash because the type now comes from a different crate. The only other usage was the `RENT_EXEMPT_RENT_EPOCH` constant, which is used in svm and accounts-db. Since there's no good common crate that both of these use, I inlined the const in both places, along with a test to make sure they don't diverge. Finally, remove solana-rent-collector usage everywhere.
joncinque
added a commit
to joncinque/solana
that referenced
this pull request
Aug 5, 2025
#### Problem As outlined in anza-xyz/solana-sdk#226, the RentCollector is no longer needed, and with solana-labs#6782, it's needed even less. #### Summary of changes Inline the `RentCollector` struct into `solana-runtime` with the few functions needed. This changes the frozen-abi hash because the type now comes from a different crate. The only other usage was the `RENT_EXEMPT_RENT_EPOCH` constant, which is used in svm and accounts-db. Since there's no good common crate that both of these use, I inlined the const in both places, along with a test to make sure they don't diverge. Finally, remove solana-rent-collector usage everywhere.
joncinque
added a commit
that referenced
this pull request
Aug 7, 2025
#### Problem As noted in #226, the rent collector crate and struct are no longer needed, and with anza-xyz/agave#7297, will no longer be used. #### Summary of changes Mark the crate as deprecated, so that we can backport and release the change, then delete the crate entirely.
github-actions bot
pushed a commit
that referenced
this pull request
Aug 7, 2025
#### Problem As noted in #226, the rent collector crate and struct are no longer needed, and with anza-xyz/agave#7297, will no longer be used. #### Summary of changes Mark the crate as deprecated, so that we can backport and release the change, then delete the crate entirely. (cherry picked from commit 0cabe5d)
joncinque
added a commit
to joncinque/solana
that referenced
this pull request
Aug 8, 2025
#### Problem As outlined in anza-xyz/solana-sdk#226, the RentCollector is no longer needed, and with solana-labs#6782, it's needed even less. #### Summary of changes Inline the `RentCollector` struct into `solana-runtime` with the few functions needed. This changes the frozen-abi hash because the type now comes from a different crate. The only other usage was the `RENT_EXEMPT_RENT_EPOCH` constant, which is used in svm and accounts-db. Since there's no good common crate that both of these use, I inlined the const in both places, along with a test to make sure they don't diverge. Finally, remove solana-rent-collector usage everywhere.
joncinque
added a commit
to anza-xyz/agave
that referenced
this pull request
Aug 12, 2025
* rent-collector: Inline struct and const, remove dep #### Problem As outlined in anza-xyz/solana-sdk#226, the RentCollector is no longer needed, and with #6782, it's needed even less. #### Summary of changes Inline the `RentCollector` struct into `solana-runtime` with the few functions needed. This changes the frozen-abi hash because the type now comes from a different crate. The only other usage was the `RENT_EXEMPT_RENT_EPOCH` constant, which is used in svm and accounts-db. Since there's no good common crate that both of these use, I inlined the const in both places, along with a test to make sure they don't diverge. Finally, remove solana-rent-collector usage everywhere. * Make `RentCollector` crate-private, expose rent() directly * Revert "Make `RentCollector` crate-private, expose rent() directly" This reverts commit 101c5bf. * Put accidentally removed comment back in post-rebase * Also remove it from snapshot_package.rs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
The rent collector is still being used in Agave to hold onto the
Rent
for the cluster, but is otherwise unused.Summary of changes
Deprecate all functions and constants that should be redefined elsewhere.
I decided to not deprecate the whole thing since Agave still needs the
RentCollector
struct, but full deprecation is also an option.This will be backported to maintenance/v2.x. If we decide on full deprecation, then we can also remove the crate entirely.