rent-collector: Deprecate everything except the struct#226
Closed
joncinque wants to merge 1 commit intoanza-xyz:masterfrom
Closed
rent-collector: Deprecate everything except the struct#226joncinque wants to merge 1 commit intoanza-xyz:masterfrom
joncinque wants to merge 1 commit intoanza-xyz:masterfrom
Conversation
#### 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.
Contributor
|
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/agave
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.
Collaborator
Author
|
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/agave
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/agave
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/agave
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
joncinque
added a commit
that referenced
this pull request
Aug 13, 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
that referenced
this pull request
Aug 14, 2025
* rent-collector: Deprecate the crate (#262) #### 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) * Add allow(deprecated) to re-export in the sdk --------- Co-authored-by: Jon C <me@jonc.dev>
ksn6
pushed a commit
to ksn6/alpenglow
that referenced
this pull request
Aug 26, 2025
* rent-collector: Inline struct and const, remove dep As outlined in anza-xyz/solana-sdk#226, the RentCollector is no longer needed, and with #6782, it's needed even less. 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 101c5bfa331510fd0f642c1939c9e75ce8d4d370. * Put accidentally removed comment back in post-rebase * Also remove it from snapshot_package.rs
febo
pushed a commit
to febo/solana-sdk
that referenced
this pull request
Sep 21, 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.
mircea-c
pushed a commit
to mircea-c/svm
that referenced
this pull request
Jan 26, 2026
* 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 101c5bfa331510fd0f642c1939c9e75ce8d4d370. * Put accidentally removed comment back in post-rebase * Also remove it from snapshot_package.rs
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
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
Rentfor 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
RentCollectorstruct, 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.