forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Elastic scaling: add e2e test (paritytech#3929)
On top of paritytech#3879 I've also moved the previous test where we ensure multiple cores per para doesn't break non elastic parachains. --------- Signed-off-by: Andrei Sandu <[email protected]> Co-authored-by: Javier Viola <[email protected]>
- Loading branch information
Showing
6 changed files
with
86 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
polkadot/zombienet_tests/elastic_scaling/0001-basic-3cores-6s-blocks.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[settings] | ||
timeout = 1000 | ||
|
||
[relaychain.genesis.runtimeGenesis.patch.configuration.config.async_backing_params] | ||
max_candidate_depth = 6 | ||
allowed_ancestry_len = 2 | ||
|
||
[relaychain.genesis.runtimeGenesis.patch.configuration.config.scheduler_params] | ||
max_validators_per_core = 1 | ||
scheduling_lookahead = 2 | ||
num_cores = 3 | ||
|
||
[relaychain.genesis.runtimeGenesis.patch.configuration.config.approval_voting_params] | ||
needed_approvals = 3 | ||
max_approval_coalesce_count = 5 | ||
|
||
[relaychain] | ||
default_image = "{{ZOMBIENET_INTEGRATION_TEST_IMAGE}}" | ||
chain = "rococo-local" | ||
default_command = "polkadot" | ||
|
||
[relaychain.default_resources] | ||
limits = { memory = "4G", cpu = "2" } | ||
requests = { memory = "2G", cpu = "1" } | ||
|
||
[[relaychain.node_groups]] | ||
name = "elastic-validator" | ||
count = 5 | ||
args = [ "-lparachain=debug,parachain::candidate-backing=trace,parachain::provisioner=trace,parachain::prospective-parachains=trace,runtime=debug"] | ||
|
||
{% for id in range(2000,2002) %} | ||
[[parachains]] | ||
id = {{id}} | ||
addToGenesis = true | ||
|
||
[parachains.collator] | ||
name = "some-parachain" | ||
image = "{{COL_IMAGE}}" | ||
command = "adder-collator" | ||
args = ["-lparachain::collation-generation=trace,parachain::collator-protocol=trace,parachain=debug"] | ||
{% endfor %} | ||
|
24 changes: 24 additions & 0 deletions
24
polkadot/zombienet_tests/elastic_scaling/0001-basic-3cores-6s-blocks.zndsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Description: Test with adder collator using 3 cores and async backing | ||
Network: ./0001-basic-3cores-6s-blocks.toml | ||
Creds: config | ||
|
||
# Check authority status. | ||
elastic-validator-0: reports node_roles is 4 | ||
elastic-validator-1: reports node_roles is 4 | ||
elastic-validator-2: reports node_roles is 4 | ||
elastic-validator-3: reports node_roles is 4 | ||
elastic-validator-4: reports node_roles is 4 | ||
|
||
|
||
# Register 2 extra cores to this some-parachain. | ||
elastic-validator-0: js-script ./assign-core.js with "2000,0" return is 0 within 600 seconds | ||
elastic-validator-0: js-script ./assign-core.js with "2000,1" return is 0 within 600 seconds | ||
|
||
# Wait for 10 relay chain blocks | ||
elastic-validator-0: reports substrate_block_height{status="best"} is at least 20 within 120 seconds | ||
|
||
# Parachain should progress with 3 blocks per relay chain block, so it's reasonable to expect state to be | ||
# at least 50, assuming some tolerance | ||
some-parachain: log line contains "BlockData { state: 50, add: 2 }" within 10 seconds | ||
some-parachain-1: count of log lines containing "BlockData { state: 24, add: 2 }" is 0 within 10 seconds | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters