test-validator: add --max-genesis-archive-size flag #7316
+15
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
solana-test-validator is broken in 3.0, at least on typical consumer machines. normal validators have a maximum archive size of 10Mib (
MAX_GENESIS_ARCHIVE_UNPACKED_SIZE
) but test validators allow it to beu64::MAX
. there were some recent changes to how accounts-db memory allocation works where it appears to require that the maximum value be allocated up front. it attempts to adjust the maximum memory locks that can be taken based on this value. this means running the test validator does this:Summary of Changes
use the default value that real validators use, and add a new flag to increase the value if desired. this seems philosophically more correct to me than setting a higher value, because we woudl like the test validator to behave in-line with real validators when practical