Add churn tests for when churn limit scales with v-set size #2586
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.
We were missing tests for the churn limit when it begin to scales at the v-set size -- that is, when
len(active_validators) >= CHURN_LIMIT_QUOTIENT * (1 + MIN_PER_VALIDATOR_CHURN_LIMIT)
. This doesn't happen on mainnet config until327680
validators but better to get it in now than later!To achieve this in a "minimal" way for our
minimal
config it required adjustingCHURN_LIMIT_QUOTIENT
down from65536
to32
. This allows for this scaled case to be triggered at 160 validators instead of ~300k. Although this would break anyminimal
testnets, as far as I know we do not have any persistentminimal
testnets today and thus can safely modify this config for testing purposes.This PR involves duplicating existing queue churn limit tests so that one test runs for min-churn-limit and one runs for scaled-churn-limit.
get_validator_churn_limit
is called withinprocess_registry_updates
andinitiate_validator_exit
so we identified tests intest_process_registry_updates
andtest_voluntary_exit
for this scaled-churn-limit extension.