-
Notifications
You must be signed in to change notification settings - Fork 173
sdk: Refactor Rentsysvar
#294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
812d444 to
37d9cc7
Compare
37d9cc7 to
efaad10
Compare
joncinque
left a comment
There was a problem hiding this 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!
9bb767d to
4146158
Compare
4146158 to
1d823f9
Compare
joncinque
left a comment
There was a problem hiding this 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
0cba916 to
2dcc702
Compare
2dcc702 to
2671ac7
Compare
joncinque
left a comment
There was a problem hiding this 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!
joncinque
left a comment
There was a problem hiding this 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
6acecdc to
36cada6
Compare
joncinque
left a comment
There was a problem hiding this 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!
joncinque
left a comment
There was a problem hiding this 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!
Problem
The concept of rent no longer exists, only rent-exemption, and upstream BPF does not support
f64values but currently theRentsysvar implementation uses them.Solution
Refactor the sysvar implementation and remove all references to
f64.