Skip to content

rent-collector: Inline struct and const, remove dep#7297

Merged
joncinque merged 5 commits intoanza-xyz:masterfrom
joncinque:no-rent-collector
Aug 12, 2025
Merged

rent-collector: Inline struct and const, remove dep#7297
joncinque merged 5 commits intoanza-xyz:masterfrom
joncinque:no-rent-collector

Conversation

@joncinque
Copy link
Copy Markdown

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.

@brooksprumo can you look at the accounts db changes?

@joncinque joncinque requested a review from jstarry August 4, 2025 16:30
@joncinque joncinque requested a review from a team as a code owner August 4, 2025 16:30
@brooksprumo brooksprumo self-requested a review August 4, 2025 16:34
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-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.
Copy link
Copy Markdown

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The accounts-db changes are fine. We don't actually need the rent epoch field in tiered storage at all anymore. But since it is still there, copying the RENT_EXEMPT_RENT_EPOCH constant is fine.

Comment thread runtime/src/lib.rs
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.3%. Comparing base (357d2c0) to head (841427b).
⚠️ Report is 2566 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #7297     +/-   ##
=========================================
- Coverage    83.3%    83.3%   -0.1%     
=========================================
  Files         798      799      +1     
  Lines      362986   363014     +28     
=========================================
+ Hits       302372   302391     +19     
- Misses      60614    60623      +9     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mergify
Copy link
Copy Markdown

mergify Bot commented Aug 4, 2025

If this PR represents a change to the public RPC API:

  1. Make sure it includes a complementary update to rpc-client/ (example)
  2. Open a follow-up PR to update the JavaScript client @solana/kit (example)

Thank you for keeping the RPC clients in sync with the server API @joncinque.

@LucasSte LucasSte requested a review from buffalojoec August 5, 2025 13:53
@joncinque joncinque force-pushed the no-rent-collector branch 2 times, most recently from 0d578ff to 05366eb Compare August 5, 2025 21:35
joncinque added a commit to anza-xyz/solana-sdk 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 to anza-xyz/solana-sdk 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)
buffalojoec
buffalojoec previously approved these changes 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
Copy link
Copy Markdown
Author

Can I get another approval on this? I'll need to publish rent-collector v3 if this doesn't land 😅

@joncinque joncinque merged commit c372da2 into anza-xyz:master Aug 12, 2025
51 checks passed
@joncinque joncinque deleted the no-rent-collector branch August 12, 2025 11:09
joncinque added a commit to anza-xyz/solana-sdk 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 to anza-xyz/solana-sdk 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>
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.
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.

4 participants