-
Notifications
You must be signed in to change notification settings - Fork 823
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
fork-aware-tx-pool: add heavy load tests based on zombienet #7257
base: master
Are you sure you want to change the base?
Changes from 16 commits
0283ab9
67c2ee9
7afefe1
6d10819
0e084ab
daba086
f73874a
21fda5f
ef9b658
90ab08d
94b8891
136b95a
5556573
13cffe6
8ec35b9
0b81d99
5f82daf
e90b9d6
11fee80
fbc25ff
b912e05
bf02c0b
c30f602
f275ba3
8de7754
e59e4bf
2507d2c
032e631
0e5b5a9
3f27669
9a665b6
b1c9938
7cbf852
63a9943
2b06198
254ae67
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// This file is part of Substrate. | ||
|
||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 | ||
|
||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
// Testsuite of fatp integration tests. | ||
|
||
pub mod zombienet; | ||
|
||
use std::time::Duration; | ||
|
||
use zombienet::NetworkSpawner; | ||
use zombienet_sdk::NetworkConfigExt; | ||
|
||
#[tokio::test(flavor = "multi_thread")] | ||
// TODO: continue this scenario | ||
async fn send_future_and_then_ready() { | ||
let _ = env_logger::try_init_from_env( | ||
env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), | ||
); | ||
let net = NetworkSpawner::init_from_asset_hub_fatp_low_pool_limit_spec().await.unwrap(); | ||
pepoviola marked this conversation as resolved.
Show resolved
Hide resolved
|
||
tokio::time::sleep(Duration::from_secs(1400)).await; | ||
} |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// This file is part of Substrate. | ||
|
||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 | ||
|
||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
// Integration tests for fork-aware transaction pool. | ||
iulianbarbu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
use anyhow::anyhow; | ||
use zombienet_sdk::{LocalFileSystem, Network, NetworkConfig, NetworkConfigExt}; | ||
|
||
const DEFAULT_BASE_DIR: &'static str = "/tmp/zn-spawner"; | ||
|
||
const ASSET_HUB_LOW_POOL_LIMIT_FATP_SPEC_PATH: &'static str = | ||
"tests/zombienet/network-specs/asset-hub-low-pool-limit-fatp.toml"; | ||
|
||
#[derive(thiserror::Error, Debug)] | ||
pub enum Error { | ||
#[error("Network initialization failure: {0}")] | ||
NetworkInit(anyhow::Error), | ||
} | ||
|
||
type Result<T> = std::result::Result<T, Error>; | ||
|
||
pub struct NetworkSpawner; | ||
iulianbarbu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
impl NetworkSpawner { | ||
pub async fn init_from_asset_hub_fatp_low_pool_limit_spec() -> Result<Network<LocalFileSystem>> | ||
{ | ||
let net_config = NetworkConfig::load_from_toml(ASSET_HUB_LOW_POOL_LIMIT_FATP_SPEC_PATH) | ||
.map_err(Error::NetworkInit)?; | ||
net_config | ||
.spawn_native() | ||
.await | ||
.map_err(|err| Error::NetworkInit(anyhow!(err.to_string()))) | ||
iulianbarbu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,61 @@ | ||||||
[relaychain] | ||||||
# single-state | ||||||
# fork-aware | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
default_image = "parity/polkadot:latest" | ||||||
default_command = "polkadot" | ||||||
chain = "rococo-local" | ||||||
|
||||||
[[relaychain.nodes]] | ||||||
name = "alice" | ||||||
ws_port = 9944 | ||||||
validator = true | ||||||
|
||||||
[[relaychain.nodes]] | ||||||
name = "bob" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should expose rpc port for bob too? I think we can also enabled Some scenarios sending to the relay-chain would nice. As discussed in element they can also be quicker for development (no need to wait for 10 blocks). |
||||||
validator = true | ||||||
|
||||||
[[parachains]] | ||||||
id = 2000 | ||||||
default_command = "polkadot-parachain" | ||||||
default_image = "parity/polkadot-parachain:latest" | ||||||
# run charlie as parachain collatorid = 2000 | ||||||
cumulus_based = true | ||||||
genesis_wasm_path = "target/release/asset-hub-rococo-runtime/asset_hub_rococo_runtime.wasm" | ||||||
default_args = [ | ||||||
"--force-authoring", | ||||||
"--pool-kbytes 2048000", | ||||||
"--pool-limit 500000", | ||||||
"--pool-type=fork-aware", | ||||||
"--rpc-max-connections 15000", | ||||||
"--rpc-max-response-size 150", | ||||||
"--rpc-max-subscriptions-per-connection=128000", | ||||||
"--state-pruning=1024", | ||||||
"-laura::cumulus=debug", | ||||||
"-lbasic-authorship=debug", | ||||||
"-lpeerset=trace", | ||||||
"-lsub-libp2p=debug", | ||||||
"-lsync=trace", | ||||||
"-ltxpool=trace", | ||||||
] | ||||||
|
||||||
|
||||||
[[parachains.collators]] | ||||||
name = "charlie" | ||||||
validator = false | ||||||
ws_port = 9933 | ||||||
|
||||||
|
||||||
[[parachains.collators]] | ||||||
name = "dave" | ||||||
validator = true | ||||||
ws_port = 9934 | ||||||
|
||||||
[[parachains.collators]] | ||||||
name = "eve" | ||||||
validator = true | ||||||
ws_port = 9935 | ||||||
|
||||||
[[parachains.collators]] | ||||||
name = "ferdie" | ||||||
validator = true | ||||||
ws_port = 9936 |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,53 @@ | ||||||
[relaychain] | ||||||
# single-state | ||||||
# fork-aware | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
default_image = "parity/polkadot:latest" | ||||||
default_command = "polkadot" | ||||||
chain = "rococo-local" | ||||||
|
||||||
[[relaychain.nodes]] | ||||||
name = "alice" | ||||||
ws_port = 9944 | ||||||
validator = true | ||||||
|
||||||
[[relaychain.nodes]] | ||||||
name = "bob" | ||||||
validator = true | ||||||
|
||||||
[[parachains]] | ||||||
id = 2000 | ||||||
cumulus_based = true | ||||||
chain = "tests/zombienet/chain-specs/asset-hub-rococo-local-20k.json" | ||||||
default_image = "parity/polkadot-parachain:latest" | ||||||
default_command = "polkadot-parachain" | ||||||
default_args = [ | ||||||
"--force-authoring", | ||||||
"--pool-kbytes 2048000", | ||||||
"--pool-limit 500000", | ||||||
"--rpc-max-connections 15000", | ||||||
"--rpc-max-response-size 150", | ||||||
"--rpc-max-subscriptions-per-connection=128000", | ||||||
"--state-pruning=1024", | ||||||
"-laura::cumulus=debug", | ||||||
"-lbasic-authorship=info", | ||||||
"-lpeerset=trace", | ||||||
"-lsub-libp2p=debug", | ||||||
"-lsync=trace", | ||||||
"-ltxpool=debug", | ||||||
] | ||||||
|
||||||
# run charlie as parachain collator | ||||||
[[parachains.collators]] | ||||||
name = "charlie" | ||||||
validator = false | ||||||
ws_port = 9933 | ||||||
|
||||||
[[parachains.collators]] | ||||||
name = "dave" | ||||||
validator = true | ||||||
ws_port = 9934 | ||||||
|
||||||
[[parachains.collators]] | ||||||
name = "eve" | ||||||
validator = true | ||||||
ws_port = 9935 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is
chrono
used?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I can see, some of other crates seems to be not used, too.