Skip to content

Conversation

@deanmlittle
Copy link
Collaborator

@deanmlittle deanmlittle commented Aug 8, 2025

Implemented SDK changes outlined in SIMD-0194.

This allows us to remove f64 math from rent calculation saving a bunch of CUs in all newly deployed programs and making the rent_exemption_threshold value inert, simplifying any future changes to rent.

Before merging, I will need to:

  • Get this PR approved SIMD-0194: Deprecate rent exemption threshold agave#7373
  • Activate feature gate rent6iVy6PDoViPBeJ6k5EJQrkj62h7DPyLbWGHwjrC on all networks.
  • Update the [deprecated(since = "2.3.X") message in two places once a release candidate has been decided upon.
  • Submit a PR to Pinocchio to replicate the same functionality
  • Make a follow up PR to update the JavaScript client.

Tagging @joncinque for review.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 8, 2025

If this PR represents a change to the sysvar layout, please open a follow-up PR to update the JavaScript client @solana/sysvars (example)
Thank you for keeping the JavaScript clients in sync with the Rust clients.

@febo
Copy link
Contributor

febo commented Aug 24, 2025

@deanmlittle What do you think if we remove completely any reference to f64? We could do this in 2 steps. First a PR to add the deprecation messages followed by a patch release; a second PR with the refactoring to be used when the feature is activated, which eventually is published as a new major release.

@deanmlittle
Copy link
Collaborator Author

deanmlittle commented Aug 25, 2025

@deanmlittle What do you think if we remove completely any reference to f64? We could do this in 2 steps. First a PR to add the deprecation messages followed by a patch release; a second PR with the refactoring to be used when the feature is activated, which eventually is published as a new major release.

I would be very happy to replace it with a [u8;8] instead and place a clippy rule in to disallow floating point arithmetic, but I was originally trying to move as few things as possible. If there's appetite from your end, let's do it? I also think we can deprecate like half of the rent-related convenience functions in there too.

@febo
Copy link
Contributor

febo commented Aug 26, 2025

@deanmlittle What do you think if we remove completely any reference to f64? We could do this in 2 steps. First a PR to add the deprecation messages followed by a patch release; a second PR with the refactoring to be used when the feature is activated, which eventually is published as a new major release.

I would be very happy to replace it with a [u8;8] instead and place a clippy rule in to disallow floating point arithmetic, but I was originally trying to move as few things as possible. If there's appetite from your end, let's do it? I also think we can deprecate like half of the rent-related convenience functions in there too.

I think we should and we can do it in two steps. The first one just deprecate stuff, so we don't actually change anything; then in the refactoring we remove all the stuff that won't be needed anymore after the feature activation.

Somewhat related to this, I had to remove all the f64 things so Alessandro could compile p-token with the upstream rustc ebpf target.

cc: @joncinque

@joncinque
Copy link
Collaborator

I think we should and we can do it in two steps. The first one just deprecate stuff, so we don't actually change anything; then in the refactoring we remove all the stuff that won't be needed anymore after the feature activation.

Yes, let's follow what Pinocchio did with anza-xyz/pinocchio#243 first, by deprecating the field and all rent-paying functions, so that we can rename the field and remove the concept of rent-paying in the next breaking change.

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.

3 participants