snapshot before rebranding
This commit is contained in:
@@ -19,12 +19,12 @@ use codec::Encode;
|
||||
use pezsc_block_builder::BlockBuilderBuilder;
|
||||
|
||||
use crate::{construct_extrinsic, Client as TestClient};
|
||||
use cumulus_pallet_teyrchain_system::teyrchain_inherent::{
|
||||
use pezcumulus_pallet_teyrchain_system::teyrchain_inherent::{
|
||||
BasicTeyrchainInherentData, InboundMessagesData,
|
||||
};
|
||||
use cumulus_primitives_core::{relay_chain::AccountId, PersistedValidationData};
|
||||
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
|
||||
use cumulus_test_runtime::{
|
||||
use pezcumulus_primitives_core::{relay_chain::AccountId, PersistedValidationData};
|
||||
use pezcumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
|
||||
use pezcumulus_test_runtime::{
|
||||
BalancesCall, GluttonCall, NodeBlock, SudoCall, UncheckedExtrinsic, WASM_BINARY,
|
||||
};
|
||||
use pezframe_system_rpc_runtime_api::AccountNonceApi;
|
||||
@@ -69,9 +69,9 @@ pub fn create_benchmark_accounts() -> (Vec<sr25519::Pair>, Vec<sr25519::Pair>, V
|
||||
pub fn extrinsic_set_time(client: &TestClient) -> OpaqueExtrinsic {
|
||||
let best_number = client.usage_info().chain.best_number;
|
||||
|
||||
let timestamp = best_number as u64 * cumulus_test_runtime::MinimumPeriod::get();
|
||||
cumulus_test_runtime::UncheckedExtrinsic::new_bare(
|
||||
cumulus_test_runtime::RuntimeCall::Timestamp(pezpallet_timestamp::Call::set {
|
||||
let timestamp = best_number as u64 * pezcumulus_test_runtime::MinimumPeriod::get();
|
||||
pezcumulus_test_runtime::UncheckedExtrinsic::new_bare(
|
||||
pezcumulus_test_runtime::RuntimeCall::Timestamp(pezpallet_timestamp::Call::set {
|
||||
now: timestamp,
|
||||
}),
|
||||
)
|
||||
@@ -80,11 +80,11 @@ pub fn extrinsic_set_time(client: &TestClient) -> OpaqueExtrinsic {
|
||||
|
||||
/// Create a set validation data extrinsic
|
||||
pub fn extrinsic_set_validation_data(
|
||||
parent_header: cumulus_test_runtime::Header,
|
||||
parent_header: pezcumulus_test_runtime::Header,
|
||||
) -> OpaqueExtrinsic {
|
||||
let parent_head = HeadData(parent_header.encode());
|
||||
let sproof_builder = RelayStateSproofBuilder {
|
||||
para_id: cumulus_test_runtime::TEYRCHAIN_ID.into(),
|
||||
para_id: pezcumulus_test_runtime::TEYRCHAIN_ID.into(),
|
||||
included_para_head: parent_head.clone().into(),
|
||||
..Default::default()
|
||||
};
|
||||
@@ -107,9 +107,9 @@ pub fn extrinsic_set_validation_data(
|
||||
horizontal_messages: Default::default(),
|
||||
};
|
||||
|
||||
cumulus_test_runtime::UncheckedExtrinsic::new_bare(
|
||||
cumulus_test_runtime::RuntimeCall::TeyrchainSystem(
|
||||
cumulus_pallet_teyrchain_system::Call::set_validation_data {
|
||||
pezcumulus_test_runtime::UncheckedExtrinsic::new_bare(
|
||||
pezcumulus_test_runtime::RuntimeCall::TeyrchainSystem(
|
||||
pezcumulus_pallet_teyrchain_system::Call::set_validation_data {
|
||||
data,
|
||||
inbound_messages_data,
|
||||
},
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
|
||||
#![allow(missing_docs)]
|
||||
|
||||
use cumulus_client_service::TeyrchainHostFunctions;
|
||||
use cumulus_primitives_core::ParaId;
|
||||
use cumulus_test_runtime::AccountId;
|
||||
use pezcumulus_client_service::TeyrchainHostFunctions;
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use pezcumulus_test_runtime::AccountId;
|
||||
use pezsc_chain_spec::GenesisConfigBuilderRuntimeCaller;
|
||||
use pezsc_service::{ChainType, GenericChainSpec};
|
||||
use serde_json::json;
|
||||
@@ -82,7 +82,7 @@ pub fn get_chain_spec(id: Option<ParaId>) -> GenericChainSpec {
|
||||
get_chain_spec_with_extra_endowed(
|
||||
id,
|
||||
Default::default(),
|
||||
cumulus_test_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
|
||||
pezcumulus_test_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ pub fn get_elastic_scaling_chain_spec(id: Option<ParaId>) -> GenericChainSpec {
|
||||
get_chain_spec_with_extra_endowed(
|
||||
id,
|
||||
Default::default(),
|
||||
cumulus_test_runtime::elastic_scaling::WASM_BINARY
|
||||
pezcumulus_test_runtime::elastic_scaling::WASM_BINARY
|
||||
.expect("WASM binary was not built, please build it!"),
|
||||
)
|
||||
}
|
||||
@@ -100,7 +100,7 @@ pub fn get_relay_parent_offset_chain_spec(id: Option<ParaId>) -> GenericChainSpe
|
||||
get_chain_spec_with_extra_endowed(
|
||||
id,
|
||||
Default::default(),
|
||||
cumulus_test_runtime::relay_parent_offset::WASM_BINARY
|
||||
pezcumulus_test_runtime::relay_parent_offset::WASM_BINARY
|
||||
.expect("WASM binary was not built, please build it!"),
|
||||
)
|
||||
}
|
||||
@@ -110,7 +110,7 @@ pub fn get_elastic_scaling_500ms_chain_spec(id: Option<ParaId>) -> GenericChainS
|
||||
get_chain_spec_with_extra_endowed(
|
||||
id,
|
||||
Default::default(),
|
||||
cumulus_test_runtime::elastic_scaling_500ms::WASM_BINARY
|
||||
pezcumulus_test_runtime::elastic_scaling_500ms::WASM_BINARY
|
||||
.expect("WASM binary was not built, please build it!"),
|
||||
)
|
||||
}
|
||||
@@ -120,7 +120,7 @@ pub fn get_elastic_scaling_mvp_chain_spec(id: Option<ParaId>) -> GenericChainSpe
|
||||
get_chain_spec_with_extra_endowed(
|
||||
id,
|
||||
Default::default(),
|
||||
cumulus_test_runtime::elastic_scaling_mvp::WASM_BINARY
|
||||
pezcumulus_test_runtime::elastic_scaling_mvp::WASM_BINARY
|
||||
.expect("WASM binary was not built, please build it!"),
|
||||
)
|
||||
}
|
||||
@@ -129,7 +129,7 @@ pub fn get_elastic_scaling_multi_block_slot_chain_spec(id: Option<ParaId>) -> Ge
|
||||
get_chain_spec_with_extra_endowed(
|
||||
id,
|
||||
Default::default(),
|
||||
cumulus_test_runtime::elastic_scaling_multi_block_slot::WASM_BINARY
|
||||
pezcumulus_test_runtime::elastic_scaling_multi_block_slot::WASM_BINARY
|
||||
.expect("WASM binary was not built, please build it!"),
|
||||
)
|
||||
}
|
||||
@@ -138,7 +138,7 @@ pub fn get_sync_backing_chain_spec(id: Option<ParaId>) -> GenericChainSpec {
|
||||
get_chain_spec_with_extra_endowed(
|
||||
id,
|
||||
Default::default(),
|
||||
cumulus_test_runtime::sync_backing::WASM_BINARY
|
||||
pezcumulus_test_runtime::sync_backing::WASM_BINARY
|
||||
.expect("WASM binary was not built, please build it!"),
|
||||
)
|
||||
}
|
||||
@@ -147,7 +147,7 @@ pub fn get_async_backing_chain_spec(id: Option<ParaId>) -> GenericChainSpec {
|
||||
get_chain_spec_with_extra_endowed(
|
||||
id,
|
||||
Default::default(),
|
||||
cumulus_test_runtime::async_backing::WASM_BINARY
|
||||
pezcumulus_test_runtime::async_backing::WASM_BINARY
|
||||
.expect("WASM binary was not built, please build it!"),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// along with Pezcumulus. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use clap::ValueEnum;
|
||||
use cumulus_client_cli::{ExportGenesisHeadCommand, ExportGenesisWasmCommand};
|
||||
use pezcumulus_client_cli::{ExportGenesisHeadCommand, ExportGenesisWasmCommand};
|
||||
use pezkuwi_service::{ChainSpec, ParaId, PrometheusConfig};
|
||||
use pezsc_cli::{
|
||||
CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams, NetworkParams,
|
||||
@@ -39,7 +39,7 @@ pub struct TestCollatorCli {
|
||||
pub subcommand: Option<Subcommand>,
|
||||
|
||||
#[command(flatten)]
|
||||
pub run: cumulus_client_cli::RunCmd,
|
||||
pub run: pezcumulus_client_cli::RunCmd,
|
||||
|
||||
/// Relay chain arguments
|
||||
#[arg(raw = true)]
|
||||
@@ -286,46 +286,46 @@ impl BizinikiwiCli for TestCollatorCli {
|
||||
Ok(match id {
|
||||
"" => {
|
||||
tracing::info!("Using default test service chain spec.");
|
||||
Box::new(cumulus_test_service::get_chain_spec(Some(ParaId::from(2000)))) as Box<_>
|
||||
Box::new(pezcumulus_test_service::get_chain_spec(Some(ParaId::from(2000)))) as Box<_>
|
||||
},
|
||||
"elastic-scaling-mvp" => {
|
||||
tracing::info!("Using elastic-scaling mvp chain spec.");
|
||||
Box::new(cumulus_test_service::get_elastic_scaling_mvp_chain_spec(Some(
|
||||
Box::new(pezcumulus_test_service::get_elastic_scaling_mvp_chain_spec(Some(
|
||||
ParaId::from(2100),
|
||||
))) as Box<_>
|
||||
},
|
||||
"elastic-scaling" => {
|
||||
tracing::info!("Using elastic-scaling chain spec.");
|
||||
Box::new(cumulus_test_service::get_elastic_scaling_chain_spec(Some(ParaId::from(
|
||||
Box::new(pezcumulus_test_service::get_elastic_scaling_chain_spec(Some(ParaId::from(
|
||||
2200,
|
||||
)))) as Box<_>
|
||||
},
|
||||
"elastic-scaling-500ms" => {
|
||||
tracing::info!("Using elastic-scaling 500ms chain spec.");
|
||||
Box::new(cumulus_test_service::get_elastic_scaling_500ms_chain_spec(Some(
|
||||
Box::new(pezcumulus_test_service::get_elastic_scaling_500ms_chain_spec(Some(
|
||||
ParaId::from(2300),
|
||||
))) as Box<_>
|
||||
},
|
||||
"elastic-scaling-multi-block-slot" => {
|
||||
tracing::info!("Using elastic-scaling multi-block-slot chain spec.");
|
||||
Box::new(cumulus_test_service::get_elastic_scaling_multi_block_slot_chain_spec(
|
||||
Box::new(pezcumulus_test_service::get_elastic_scaling_multi_block_slot_chain_spec(
|
||||
Some(ParaId::from(2400)),
|
||||
)) as Box<_>
|
||||
},
|
||||
"sync-backing" => {
|
||||
tracing::info!("Using sync backing chain spec.");
|
||||
Box::new(cumulus_test_service::get_sync_backing_chain_spec(Some(ParaId::from(
|
||||
Box::new(pezcumulus_test_service::get_sync_backing_chain_spec(Some(ParaId::from(
|
||||
2500,
|
||||
)))) as Box<_>
|
||||
},
|
||||
"async-backing" => {
|
||||
tracing::info!("Using async backing chain spec.");
|
||||
Box::new(cumulus_test_service::get_async_backing_chain_spec(Some(ParaId::from(
|
||||
Box::new(pezcumulus_test_service::get_async_backing_chain_spec(Some(ParaId::from(
|
||||
2500,
|
||||
)))) as Box<_>
|
||||
},
|
||||
"relay-parent-offset" => Box::new(
|
||||
cumulus_test_service::get_relay_parent_offset_chain_spec(Some(ParaId::from(2600))),
|
||||
pezcumulus_test_service::get_relay_parent_offset_chain_spec(Some(ParaId::from(2600))),
|
||||
) as Box<_>,
|
||||
path => {
|
||||
let chain_spec: pezsc_chain_spec::GenericChainSpec =
|
||||
|
||||
@@ -23,8 +23,8 @@ pub mod bench_utils;
|
||||
|
||||
pub mod chain_spec;
|
||||
|
||||
use cumulus_client_collator::service::CollatorService;
|
||||
use cumulus_client_consensus_aura::{
|
||||
use pezcumulus_client_collator::service::CollatorService;
|
||||
use pezcumulus_client_consensus_aura::{
|
||||
collators::{
|
||||
lookahead::{self as aura, Params as AuraParams},
|
||||
slot_based::{
|
||||
@@ -47,20 +47,20 @@ use std::{
|
||||
use url::Url;
|
||||
|
||||
use crate::runtime::Weight;
|
||||
use cumulus_client_cli::{CollatorOptions, RelayChainMode};
|
||||
use cumulus_client_consensus_common::TeyrchainBlockImport as TTeyrchainBlockImport;
|
||||
use cumulus_client_pov_recovery::{RecoveryDelayRange, RecoveryHandle};
|
||||
use cumulus_client_service::{
|
||||
use pezcumulus_client_cli::{CollatorOptions, RelayChainMode};
|
||||
use pezcumulus_client_consensus_common::TeyrchainBlockImport as TTeyrchainBlockImport;
|
||||
use pezcumulus_client_pov_recovery::{RecoveryDelayRange, RecoveryHandle};
|
||||
use pezcumulus_client_service::{
|
||||
build_network, prepare_node_config, start_relay_chain_tasks, BuildNetworkParams,
|
||||
CollatorSybilResistance, DARecoveryProfile, StartRelayChainTasksParams,
|
||||
TeyrchainTracingExecuteBlock,
|
||||
};
|
||||
use cumulus_primitives_core::{relay_chain::ValidationCode, GetTeyrchainInfo, ParaId};
|
||||
use cumulus_relay_chain_inprocess_interface::RelayChainInProcessInterface;
|
||||
use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult};
|
||||
use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node_with_rpc;
|
||||
use pezcumulus_primitives_core::{relay_chain::ValidationCode, GetTeyrchainInfo, ParaId};
|
||||
use pezcumulus_relay_chain_inprocess_interface::RelayChainInProcessInterface;
|
||||
use pezcumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult};
|
||||
use pezcumulus_relay_chain_minimal_node::build_minimal_relay_chain_node_with_rpc;
|
||||
|
||||
use cumulus_test_runtime::{Hash, NodeBlock as Block, RuntimeApi};
|
||||
use pezcumulus_test_runtime::{Hash, NodeBlock as Block, RuntimeApi};
|
||||
|
||||
use pezframe_system_rpc_runtime_api::AccountNonceApi;
|
||||
use pezkuwi_node_subsystem::{errors::RecoveryError, messages::AvailabilityRecoveryMessage};
|
||||
@@ -95,7 +95,7 @@ use bizinikiwi_test_client::{
|
||||
};
|
||||
|
||||
pub use chain_spec::*;
|
||||
pub use cumulus_test_runtime as runtime;
|
||||
pub use pezcumulus_test_runtime as runtime;
|
||||
pub use pezsp_keyring::Sr25519Keyring as Keyring;
|
||||
|
||||
const LOG_TARGET: &str = "pezcumulus-test-service";
|
||||
@@ -104,7 +104,7 @@ const LOG_TARGET: &str = "pezcumulus-test-service";
|
||||
pub type AnnounceBlockFn = Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>;
|
||||
|
||||
type HostFunctions =
|
||||
(pezsp_io::BizinikiwiHostFunctions, cumulus_client_service::storage_proof_size::HostFunctions);
|
||||
(pezsp_io::BizinikiwiHostFunctions, pezcumulus_client_service::storage_proof_size::HostFunctions);
|
||||
/// The client type being used by the test service.
|
||||
pub type Client = TFullClient<runtime::NodeBlock, runtime::RuntimeApi, WasmExecutor<HostFunctions>>;
|
||||
|
||||
@@ -215,7 +215,7 @@ pub fn new_partial(
|
||||
);
|
||||
|
||||
let slot_duration = pezsc_consensus_aura::slot_duration(&*client)?;
|
||||
let import_queue = cumulus_client_consensus_aura::import_queue::<AuthorityPair, _, _, _, _, _>(
|
||||
let import_queue = pezcumulus_client_consensus_aura::import_queue::<AuthorityPair, _, _, _, _, _>(
|
||||
ImportQueueParams {
|
||||
block_import: block_import.clone(),
|
||||
client: client.clone(),
|
||||
@@ -258,7 +258,7 @@ async fn build_relay_chain_interface(
|
||||
task_manager: &mut TaskManager,
|
||||
) -> RelayChainResult<Arc<dyn RelayChainInterface + 'static>> {
|
||||
let relay_chain_node = match collator_options.relay_chain_mode {
|
||||
cumulus_client_cli::RelayChainMode::Embedded => pezkuwi_test_service::new_full(
|
||||
pezcumulus_client_cli::RelayChainMode::Embedded => pezkuwi_test_service::new_full(
|
||||
relay_chain_config,
|
||||
if let Some(ref key) = collator_key {
|
||||
pezkuwi_service::IsTeyrchainNode::Collator(key.clone())
|
||||
@@ -270,7 +270,7 @@ async fn build_relay_chain_interface(
|
||||
Some("Relaychain"),
|
||||
)
|
||||
.map_err(|e| RelayChainError::Application(Box::new(e) as Box<_>))?,
|
||||
cumulus_client_cli::RelayChainMode::ExternalRpc(rpc_target_urls) =>
|
||||
pezcumulus_client_cli::RelayChainMode::ExternalRpc(rpc_target_urls) =>
|
||||
return build_minimal_relay_chain_node_with_rpc(
|
||||
relay_chain_config,
|
||||
teyrchain_prometheus_registry,
|
||||
@@ -770,13 +770,13 @@ pub fn node_config(
|
||||
endowed_accounts: Vec<AccountId>,
|
||||
) -> Result<Configuration, ServiceError> {
|
||||
let base_path = BasePath::new_temp_dir()?;
|
||||
let root = base_path.path().join(format!("cumulus_test_service_{}", key));
|
||||
let root = base_path.path().join(format!("pezcumulus_test_service_{}", key));
|
||||
let role = if is_collator { Role::Authority } else { Role::Full };
|
||||
let key_seed = key.to_seed();
|
||||
let mut spec = Box::new(chain_spec::get_chain_spec_with_extra_endowed(
|
||||
Some(para_id),
|
||||
endowed_accounts,
|
||||
cumulus_test_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
|
||||
pezcumulus_test_runtime::WASM_BINARY.expect("WASM binary was not built, please build it!"),
|
||||
));
|
||||
|
||||
let mut storage = spec.as_storage_builder().build_storage().expect("could not build storage");
|
||||
|
||||
@@ -19,8 +19,8 @@ mod cli;
|
||||
use std::sync::Arc;
|
||||
|
||||
use cli::{AuthoringPolicy, RelayChainCli, Subcommand, TestCollatorCli};
|
||||
use cumulus_primitives_core::relay_chain::CollatorPair;
|
||||
use cumulus_test_service::{new_partial, AnnounceBlockFn};
|
||||
use pezcumulus_primitives_core::relay_chain::CollatorPair;
|
||||
use pezcumulus_test_service::{new_partial, AnnounceBlockFn};
|
||||
use pezsc_cli::{CliConfiguration, BizinikiwiCli};
|
||||
use pezsp_core::Pair;
|
||||
|
||||
@@ -101,7 +101,7 @@ fn main() -> Result<(), pezsc_cli::Error> {
|
||||
.block_on(async move {
|
||||
match relay_chain_config.network.network_backend {
|
||||
pezsc_network::config::NetworkBackendType::Libp2p =>
|
||||
cumulus_test_service::start_node_impl::<
|
||||
pezcumulus_test_service::start_node_impl::<
|
||||
_,
|
||||
pezsc_network::NetworkWorker<_, _>,
|
||||
>(
|
||||
@@ -117,7 +117,7 @@ fn main() -> Result<(), pezsc_cli::Error> {
|
||||
)
|
||||
.await,
|
||||
pezsc_network::config::NetworkBackendType::Litep2p =>
|
||||
cumulus_test_service::start_node_impl::<
|
||||
pezcumulus_test_service::start_node_impl::<
|
||||
_,
|
||||
pezsc_network::Litep2pNetworkBackend,
|
||||
>(
|
||||
|
||||
Reference in New Issue
Block a user