Skip to content

Conversation

@febo
Copy link
Collaborator

@febo febo commented Dec 5, 2025

Problem

The concept of rent no longer exists, only rent-exemption, and upstream BPF does not support f64 values but currently the Rent sysvar implementation uses them.

Solution

Refactor the sysvar implementation and remove all references to f64.

@febo febo requested a review from joncinque December 5, 2025 01:08
@febo febo force-pushed the febo/upstream-rent branch 2 times, most recently from 812d444 to 37d9cc7 Compare December 5, 2025 01:43
@febo febo force-pushed the febo/upstream-rent branch from 37d9cc7 to efaad10 Compare December 5, 2025 01:46
Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Just one question about the target_os = solana part, the rest looks great!

@febo febo force-pushed the febo/upstream-rent branch from 9bb767d to 4146158 Compare December 6, 2025 01:19
@febo febo force-pushed the febo/upstream-rent branch from 4146158 to 1d823f9 Compare December 6, 2025 01:20
joncinque
joncinque previously approved these changes Dec 6, 2025
Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great! Just the bit about saturating math, but we can address later

@febo febo force-pushed the febo/upstream-rent branch from 0cba916 to 2dcc702 Compare December 12, 2025 06:34
@febo febo force-pushed the febo/upstream-rent branch from 2dcc702 to 2671ac7 Compare December 12, 2025 06:47
Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Mostly just bits about overflowing due to a huge lamports_per_byte, everything else looks good!

Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

A few more ideas, let me know what you think! Maybe I'm too focused on silly usage of Rent, but it doesn't feel good to provide a try_ function in an SDK that could overflow

@febo febo force-pushed the febo/upstream-rent branch from 6acecdc to 36cada6 Compare December 17, 2025 01:49
@febo febo requested a review from joncinque December 17, 2025 01:57
Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

One last thing, and we can land this!

Copy link
Collaborator

@joncinque joncinque left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for all the revisions!

@febo febo merged commit 1626db1 into main Dec 17, 2025
8 checks passed
@febo febo deleted the febo/upstream-rent branch December 17, 2025 10:39
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