Skip to content

Allow setting custom fixed inflation rate to solana-test-validator #6661

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

Merged

Conversation

svenski123
Copy link

Problem

solana-test-validator allows some configuration of its generated genesis however the inflation is set to the hard-coded default.

Summary of Changes

Add a member to TestValidatorGenesis to allow setting the Inflation object in the generated Genesis.
Add an optional option --inflation-fixed <RATE> to solana-test-validator which when specified sets the inflation to Inflation::new_fixed(RATE) instead of the default.

Add --inflation-fixed <RATE> option to solana-test-validator.
@mergify mergify bot requested a review from a team June 20, 2025 03:03
@0xbrw
Copy link

0xbrw commented Jun 23, 2025

@jstarry is this something we want to enable?

@jstarry
Copy link

jstarry commented Jun 23, 2025

@jstarry is this something we want to enable?

Yeah makes sense to me and seems useful. Thanks @svenski123!

@jstarry jstarry added the CI Pull Request is ready to enter CI label Jun 24, 2025
@anza-team anza-team removed the CI Pull Request is ready to enter CI label Jun 24, 2025
jstarry
jstarry previously approved these changes Jun 24, 2025
@jstarry
Copy link

jstarry commented Jun 24, 2025

Oh can you update the lock files please? You can run this: ./scripts/cargo-for-all-lock-files.sh tree

@svenski123
Copy link
Author

Huh, I didn't realise there were multiple Cargo.lock files in the repo. Anyways I've run that script and pushed the commits.

@jstarry jstarry added the CI Pull Request is ready to enter CI label Jun 24, 2025
@anza-team anza-team removed the CI Pull Request is ready to enter CI label Jun 24, 2025
jstarry
jstarry previously approved these changes Jun 24, 2025
@jstarry
Copy link

jstarry commented Jun 24, 2025

Some clippy errors need to be fixed

@svenski123
Copy link
Author

Fair enough for clippy to complain about sprintf() when strlcpy() will do (or rather Rust equivalents thereof), but the whole point of negating the operator based comparison result was to handle the unordered IEEE-754 cases correctly...
Clippy has been satisfied with PartialOrd::partial_cmp().

@jstarry jstarry added the CI Pull Request is ready to enter CI label Jun 24, 2025
@anza-team anza-team removed the CI Pull Request is ready to enter CI label Jun 24, 2025
@jstarry
Copy link

jstarry commented Jun 24, 2025

Should have mentioned it's ok to ignore some clippy errors, but looks like the partial cmp approach will work fine

@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2025

Codecov Report

Attention: Patch coverage is 10.71429% with 25 lines in your changes missing coverage. Please review.

Project coverage is 83.3%. Comparing base (354071e) to head (8f12b58).
Report is 44 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6661   +/-   ##
=======================================
  Coverage    83.3%    83.3%           
=======================================
  Files         849      849           
  Lines      379469   379497   +28     
=======================================
+ Hits       316189   316264   +75     
+ Misses      63280    63233   -47     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

@jstarry jstarry left a comment

Choose a reason for hiding this comment

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

sorry for the delay, lost track of this one

@jstarry jstarry merged commit bb5f9dc into anza-xyz:master Jul 8, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants