-
Notifications
You must be signed in to change notification settings - Fork 767
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
121 additions
and
106 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#[subxt::subxt(runtime_metadata_path = "metadata-files/rococo-local.scale")] | ||
pub mod rococo {} | ||
|
||
mod basic_3cores; | ||
mod doesnt_break_parachains; | ||
mod helpers; | ||
mod mixed_receipt_versions; | ||
mod slot_based_3cores; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
mod sync_backing; |
72 changes: 72 additions & 0 deletions
72
polkadot/zombienet-sdk-tests/tests/functional/sync_backing.rs
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,72 @@ | ||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
// Test we are producing 12-second parachain blocks if using an old collator, pre async-backing. | ||
|
||
use anyhow::anyhow; | ||
|
||
use crate::helpers::{assert_finalized_block_height, assert_para_throughput}; | ||
use serde_json::json; | ||
use subxt::{OnlineClient, PolkadotConfig}; | ||
use zombienet_sdk::NetworkConfigBuilder; | ||
|
||
#[tokio::test(flavor = "multi_thread")] | ||
async fn sync_backing_test() -> Result<(), anyhow::Error> { | ||
let _ = env_logger::try_init_from_env( | ||
env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), | ||
); | ||
|
||
let images = zombienet_sdk::environment::get_images_from_env(); | ||
|
||
let config = NetworkConfigBuilder::new() | ||
.with_relaychain(|r| { | ||
let r = r | ||
.with_chain("rococo-local") | ||
.with_default_command("polkadot") | ||
.with_default_image(images.polkadot.as_str()) | ||
.with_default_args(vec![("-lparachain=debug").into()]) | ||
.with_genesis_overrides(json!({ | ||
"configuration": { | ||
"config": { | ||
"scheduler_params": { | ||
"group_rotation_frequency": 4, | ||
}, | ||
} | ||
} | ||
})) | ||
.with_node(|node| node.with_name("validator-0")); | ||
|
||
(1..5).fold(r, |acc, i| acc.with_node(|node| node.with_name(&format!("validator-{i}")))) | ||
}) | ||
.with_parachain(|p| { | ||
p.with_id(2000) | ||
.with_default_command("polkadot-parachain") | ||
// This must be a very old polkadot-parachain image, pre async backing | ||
.with_default_image(images.cumulus.as_str()) | ||
.with_default_args(vec![("-lparachain=debug,aura=debug").into()]) | ||
.with_collator(|n| n.with_name("collator-2000")) | ||
}) | ||
.build() | ||
.map_err(|e| { | ||
let errs = e.into_iter().map(|e| e.to_string()).collect::<Vec<_>>().join(" "); | ||
anyhow!("config errs: {errs}") | ||
})?; | ||
|
||
let spawn_fn = zombienet_sdk::environment::get_spawn_fn(); | ||
let network = spawn_fn(config).await?; | ||
|
||
let relay_node = network.get_node("validator-0")?; | ||
let para_node = network.get_node("collator-2000")?; | ||
|
||
let relay_client: OnlineClient<PolkadotConfig> = relay_node.wait_client().await?; | ||
|
||
assert_para_throughput(&relay_client, 15, [(2000, 6..9)].into_iter().collect()).await?; | ||
|
||
// Assert the parachain finalized block height is also on par with the number of backed | ||
// candidates. | ||
assert_finalized_block_height(¶_node.wait_client().await?, 6..9).await?; | ||
|
||
log::info!("Test finished successfully"); | ||
|
||
Ok(()) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#[cfg(feature = "zombie-metadata")] | ||
mod helpers; | ||
|
||
#[cfg(feature = "zombie-metadata")] | ||
mod elastic_scaling; | ||
#[cfg(feature = "zombie-metadata")] | ||
mod functional; | ||
#[cfg(feature = "zombie-metadata")] | ||
mod smoke; |
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
48 changes: 0 additions & 48 deletions
48
polkadot/zombienet_tests/functional/0017-sync-backing.toml
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
polkadot/zombienet_tests/functional/0017-sync-backing.zndsl
This file was deleted.
Oops, something went wrong.