Skip to content

Conversation

@steveluscher
Copy link

@steveluscher steveluscher commented Aug 28, 2025

Problem

SIMD-215 et al have been activated, making rentEpoch irrelevant. anza-xyz/kit#550 removes the type from the JavaScript SDK.

Summary of Changes

This PR removes it from the RPC's JSON response.

Pubkey::from_str(&self.owner).ok()?,
self.executable,
self.rent_epoch,
u64::MAX,
Copy link
Author

Choose a reason for hiding this comment

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

This is the point at which I stopped tearing it out. From WritableAccount upward, this line hardcodes rent_epoch to u64::MAX.

Choose a reason for hiding this comment

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

Can you please leave a short comment?
I.e. explaining why this is hard coded?

@steveluscher steveluscher force-pushed the remove-rent-epoch-from-rpc-api branch from aacc343 to a2fa9ab Compare August 28, 2025 17:59
@mergify
Copy link

mergify bot commented Aug 28, 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 @steveluscher.

@steveluscher steveluscher force-pushed the remove-rent-epoch-from-rpc-api branch 2 times, most recently from b0ca9da to e8ae180 Compare August 28, 2025 19:10
@steveluscher steveluscher force-pushed the remove-rent-epoch-from-rpc-api branch from e8ae180 to bf0e468 Compare August 28, 2025 19:20
@steveluscher steveluscher marked this pull request as ready for review August 28, 2025 19:55
@steveluscher
Copy link
Author

@brooksprumo, can you route this to whomever is nearest to the ‘rent epoch is now irrelevant’ work?

@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.1%. Comparing base (785455b) to head (bf0e468).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7777   +/-   ##
=======================================
  Coverage    83.1%    83.1%           
=======================================
  Files         812      812           
  Lines      356900   356858   -42     
=======================================
- Hits       296612   296588   -24     
+ Misses      60288    60270   -18     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@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.

Looks good to me. I'm not an expert in the CLI / client-side of RPC, so I'll defer to others on that.

pub data: UiAccountData,
pub owner: String,
pub executable: bool,
pub rent_epoch: u64,

Choose a reason for hiding this comment

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

Does this type get returned by any RPC responses? If yes, does that break any parsing/parsers? Mainly wondering for semver reasons.

If not, then 👍 !

Copy link
Author

Choose a reason for hiding this comment

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

This is the type that gets returned by RPC responses. Any framework that validates on the presence of this field would break.

Removing or modifying the type of a field is generally something you never do, to preserve compatibility with old clients. This PR represents a choice that we have to make:

  1. Remove this field from the response, knowing that response-validating clients will break.
  2. Leave this property/value in the response forever.

Copy link

Choose a reason for hiding this comment

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

@steveluscher if removed, then it will not be returned if someone tries to collect the historical data.
Do we care about that?

Copy link
Author

@steveluscher steveluscher Sep 4, 2025

Choose a reason for hiding this comment

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

I think all accounts that were subject to rent collection (ie. non rent-exempt) have been reaped and no new ones can be created. I can't think of an RPC query that I could make today that would yield a historical rentEpoch value, but someone in this PR: please double check me.

Copy link

Choose a reason for hiding this comment

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

Might be relevant to data providers that collect this data like Dune or Allium.
But I'm not sure.

This has always been an going discussion regarding RPC upgrades, if we should remove fields or not.

@brooksprumo
Copy link

@joncinque - requesting your review to look at the cli/client-side of the RPC stuff.
@alannza - requesting your review, mainly as an FYI for all things RPC.

@steveluscher steveluscher self-assigned this Sep 16, 2025
@steveluscher
Copy link
Author

The downside of leaving this in is wasted space. The downside of removing it is client breakage. We will choose the lesser of these two evils and waste space by leaving it in. One day, when we have #4710 we can safely remove this field in RPC responses.

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