Skip to content

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
wants to merge 1 commit into from

Conversation

joncinque
Copy link
Collaborator

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.

#### 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.
@jstarry
Copy link
Contributor

jstarry commented Jul 16, 2025

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.
@joncinque
Copy link
Collaborator Author

Closing in favor of #262

@joncinque joncinque closed this Aug 4, 2025
@joncinque joncinque deleted the no-rent-collector branch August 4, 2025 16:36
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants