mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-24 17:11:05 +00:00
Adds integration test based on adder collator (#1928)
* Adds integration test based on adder collator This adds an integration test for parachains that uses the adder collator. The test will start two relay chain nodes and one collator and waits until 4 blocks are build and enacted by the parachain. * Make sure the integration test is run in CI * Fix wasm compilation * Update parachain/test-parachains/adder/collator/src/lib.rs Co-authored-by: Sergei Shulepov <sergei@parity.io> * Update cli/src/command.rs Co-authored-by: Sergei Shulepov <sergei@parity.io>
This commit is contained in:
@@ -771,7 +771,7 @@ fn rococo_staging_testnet_config_genesis(wasm_binary: &[u8]) -> rococo_runtime::
|
||||
pallet_sudo: Some(rococo_runtime::SudoConfig {
|
||||
key: endowed_accounts[0].clone(),
|
||||
}),
|
||||
parachains_configuration: Some(rococo_runtime::ParachainConfigConfig {
|
||||
parachains_configuration: Some(rococo_runtime::ParachainsConfigurationConfig {
|
||||
config: polkadot_runtime_parachains::configuration::HostConfiguration {
|
||||
validation_upgrade_frequency: 600u32,
|
||||
validation_upgrade_delay: 300,
|
||||
@@ -1223,7 +1223,7 @@ pub fn rococo_testnet_genesis(
|
||||
}),
|
||||
pallet_staking: Some(Default::default()),
|
||||
pallet_sudo: Some(rococo_runtime::SudoConfig { key: root_key }),
|
||||
parachains_configuration: Some(rococo_runtime::ParachainConfigConfig {
|
||||
parachains_configuration: Some(rococo_runtime::ParachainsConfigurationConfig {
|
||||
config: polkadot_runtime_parachains::configuration::HostConfiguration {
|
||||
validation_upgrade_frequency: 600u32,
|
||||
validation_upgrade_delay: 300,
|
||||
|
||||
@@ -50,7 +50,7 @@ use service::RpcHandlers;
|
||||
pub use self::client::{AbstractClient, Client, ClientHandle, ExecuteWithClient, RuntimeApiCollection};
|
||||
pub use chain_spec::{PolkadotChainSpec, KusamaChainSpec, WestendChainSpec, RococoChainSpec};
|
||||
pub use consensus_common::{Proposal, SelectChain, BlockImport, RecordProof, block_validation::Chain};
|
||||
pub use polkadot_parachain::wasm_executor::run_worker as run_validation_worker;
|
||||
pub use polkadot_parachain::wasm_executor::ExecutionMode;
|
||||
pub use polkadot_primitives::v1::{Block, BlockId, CollatorId, Hash, Id as ParaId};
|
||||
pub use sc_client_api::{Backend, ExecutionStrategy, CallExecutor};
|
||||
pub use sc_consensus::LongestChain;
|
||||
@@ -296,6 +296,7 @@ fn real_overseer<Spawner, RuntimeClient>(
|
||||
registry: Option<&Registry>,
|
||||
spawner: Spawner,
|
||||
_: IsCollator,
|
||||
_: ExecutionMode,
|
||||
) -> Result<(Overseer<Spawner>, OverseerHandler), Error>
|
||||
where
|
||||
RuntimeClient: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,
|
||||
@@ -321,6 +322,7 @@ fn real_overseer<Spawner, RuntimeClient>(
|
||||
registry: Option<&Registry>,
|
||||
spawner: Spawner,
|
||||
is_collator: IsCollator,
|
||||
execution_mode: ExecutionMode,
|
||||
) -> Result<(Overseer<Spawner>, OverseerHandler), Error>
|
||||
where
|
||||
RuntimeClient: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block>,
|
||||
@@ -375,6 +377,7 @@ where
|
||||
candidate_validation: CandidateValidationSubsystem::new(
|
||||
spawner.clone(),
|
||||
Metrics::register(registry)?,
|
||||
execution_mode,
|
||||
),
|
||||
chain_api: ChainApiSubsystem::new(
|
||||
runtime_client.clone(),
|
||||
@@ -476,6 +479,7 @@ pub fn new_full<RuntimeApi, Executor>(
|
||||
is_collator: IsCollator,
|
||||
grandpa_pause: Option<(u32, u32)>,
|
||||
authority_discovery_config: Option<AuthorityWorkerConfig>,
|
||||
execution_mode: ExecutionMode,
|
||||
) -> Result<NewFull<Arc<FullClient<RuntimeApi, Executor>>>, Error>
|
||||
where
|
||||
RuntimeApi: ConstructRuntimeApi<Block, FullClient<RuntimeApi, Executor>> + Send + Sync + 'static,
|
||||
@@ -611,6 +615,7 @@ pub fn new_full<RuntimeApi, Executor>(
|
||||
prometheus_registry.as_ref(),
|
||||
spawner,
|
||||
is_collator,
|
||||
execution_mode,
|
||||
)?;
|
||||
let overseer_handler_clone = overseer_handler.clone();
|
||||
|
||||
@@ -910,6 +915,7 @@ pub fn build_full(
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
authority_discovery_config,
|
||||
Default::default(),
|
||||
).map(|full| full.with_client(Client::Rococo))
|
||||
} else if config.chain_spec.is_kusama() {
|
||||
new_full::<kusama_runtime::RuntimeApi, KusamaExecutor>(
|
||||
@@ -917,6 +923,7 @@ pub fn build_full(
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
authority_discovery_config,
|
||||
Default::default(),
|
||||
).map(|full| full.with_client(Client::Kusama))
|
||||
} else if config.chain_spec.is_westend() {
|
||||
new_full::<westend_runtime::RuntimeApi, WestendExecutor>(
|
||||
@@ -924,6 +931,7 @@ pub fn build_full(
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
authority_discovery_config,
|
||||
Default::default(),
|
||||
).map(|full| full.with_client(Client::Westend))
|
||||
} else {
|
||||
new_full::<polkadot_runtime::RuntimeApi, PolkadotExecutor>(
|
||||
@@ -931,6 +939,7 @@ pub fn build_full(
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
authority_discovery_config,
|
||||
Default::default(),
|
||||
).map(|full| full.with_client(Client::Polkadot))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user