Skip to content

rent-collector: Deprecate everything except the struct#226

Closed
joncinque wants to merge 1 commit intoanza-xyz:masterfrom
joncinque:no-rent-collector
Closed

rent-collector: Deprecate everything except the struct#226
joncinque wants to merge 1 commit intoanza-xyz:masterfrom
joncinque:no-rent-collector

Conversation

@joncinque
Copy link
Copy Markdown
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
Copy Markdown
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/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.
@joncinque
Copy link
Copy Markdown
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/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
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