feat: Rebrand Polkadot/Substrate references to PezkuwiChain

This commit systematically rebrands various references from Parity Technologies'
Polkadot/Substrate ecosystem to PezkuwiChain within the kurdistan-sdk.

Key changes include:
- Updated external repository URLs (zombienet-sdk, parity-db, parity-scale-codec, wasm-instrument) to point to pezkuwichain forks.
- Modified internal documentation and code comments to reflect PezkuwiChain naming and structure.
- Replaced direct references to  with  or specific paths within the  for XCM, Pezkuwi, and other modules.
- Cleaned up deprecated  issue and PR references in various  and  files, particularly in  and  modules.
- Adjusted image and logo URLs in documentation to point to PezkuwiChain assets.
- Removed or rephrased comments related to external Polkadot/Substrate PRs and issues.

This is a significant step towards fully customizing the SDK for the PezkuwiChain ecosystem.
This commit is contained in:
2025-12-14 00:04:10 +03:00
parent 286de54384
commit 1c0e57d984
9084 changed files with 997839 additions and 997557 deletions
+8 -8
View File
@@ -36,7 +36,7 @@
- ⏫ This template provides a starting point to build a [teyrchain](https://wiki.network.pezkuwichain.io/docs/learn-parachains).
- ☁️ It is based on the
[Cumulus](https://docs.pezkuwichain.io/sdk/master/polkadot_sdk_docs/polkadot_sdk/cumulus/index.html) framework.
[Pezcumulus](https://docs.pezkuwichain.io/sdk/master/polkadot_sdk_docs/polkadot_sdk/pezcumulus/index.html) framework.
- 🔧 Its runtime is configured with a single custom pallet as a starting point, and a handful of ready-made pallets
such as a [Balances pallet](https://docs.pezkuwichain.io/sdk/master/pallet_balances/index.html).
@@ -99,13 +99,13 @@ cargo install pezkuwi-omni-node
cargo build --profile production
```
#### Install `staging-chain-spec-builder`
#### Install `pezstaging-chain-spec-builder`
```sh
cargo install staging-chain-spec-builder
cargo install pezstaging-chain-spec-builder
```
> For more advanced options, please see the installation section at [`crates.io/staging-chain-spec-builder`](https://crates.io/crates/staging-chain-spec-builder).
> For more advanced options, please see the installation section at [`crates.io/pezstaging-chain-spec-builder`](https://crates.io/crates/pezstaging-chain-spec-builder).
#### Use `chain-spec-builder` to generate the `chain_spec.json` file
@@ -152,7 +152,7 @@ export PATH="$PATH:<path/to/binaries>"
To simplify the process of using the teyrchain-template with zombienet and Omni Node, we've added a pre-configured
development chain spec (dev_chain_spec.json) to the teyrchain template. The zombienet-omni-node.toml file of this
template points to it, but you can update it to an updated chain spec generated on your machine. To generate a
chain spec refer to [staging-chain-spec-builder](https://crates.io/crates/staging-chain-spec-builder)
chain spec refer to [pezstaging-chain-spec-builder](https://crates.io/crates/pezstaging-chain-spec-builder)
Then make the changes in the network specification like so:
@@ -195,7 +195,7 @@ zombienet --provider native spawn zombienet.toml
### Connect with the Pezkuwi-JS Apps Front-End
- 🌐 You can interact with your local node using the
hosted version of the Pezkuwi/Substrate Portal:
hosted version of the Pezkuwi/Bizinikiwi Portal:
[relay chain](https://pezkuwichain.io/#/explorer?rpc=ws://localhost:9944)
and [teyrchain](https://pezkuwichain.io/#/explorer?rpc=ws://localhost:9988).
@@ -263,6 +263,6 @@ relay chain network (see [Teyrchain Template node](#teyrchain-template-node) set
the Pezkuwi SDK documentation resources.
- 👥 Additionally, there are [GitHub issues](https://github.com/pezkuwichain/pezkuwi-sdk/issues) and
[Substrate StackExchange](https://exchange.pezkuwichain.app/).
[Bizinikiwi StackExchange](https://exchange.pezkuwichain.app/).
- 👥You can also reach out on the [Official Pezkuwi discord server](https://polkadot-discord.w3f.tools/)
- 🧑Reach out on [Telegram](https://t.me/substratedevs) for more questions and discussions
- 🧑Reach out on [Telegram](https://t.me/bizinikiwidevs) for more questions and discussions
+8 -8
View File
@@ -36,7 +36,7 @@
- ⏫ This template provides a starting point to build a [teyrchain](https://wiki.network.pezkuwichain.io/docs/learn-parachains).
- ☁️ It is based on the
[Cumulus](https://docs.pezkuwichain.io/sdk/master/polkadot_sdk_docs/polkadot_sdk/cumulus/index.html) framework.
[Pezcumulus](https://docs.pezkuwichain.io/sdk/master/polkadot_sdk_docs/polkadot_sdk/pezcumulus/index.html) framework.
- 🔧 Its runtime is configured with a single custom pallet as a starting point, and a handful of ready-made pallets
such as a [Balances pallet](https://docs.pezkuwichain.io/sdk/master/pallet_balances/index.html).
@@ -101,13 +101,13 @@ cargo install pezkuwi-omni-node
cargo build --profile production
```
#### Install `staging-chain-spec-builder`
#### Install `pezstaging-chain-spec-builder`
```sh
cargo install staging-chain-spec-builder
cargo install pezstaging-chain-spec-builder
```
> For more advanced options, please see the installation section at [`crates.io/staging-chain-spec-builder`](https://crates.io/crates/staging-chain-spec-builder).
> For more advanced options, please see the installation section at [`crates.io/pezstaging-chain-spec-builder`](https://crates.io/crates/pezstaging-chain-spec-builder).
#### Use `chain-spec-builder` to generate the `chain_spec.json` file
@@ -154,7 +154,7 @@ export PATH="$PATH:<path/to/binaries>"
To simplify the process of using the teyrchain-template with zombienet and Omni Node, we've added a pre-configured
development chain spec (dev_chain_spec.json) to the teyrchain template. The zombienet-omni-node.toml file of this
template points to it, but you can update it to an updated chain spec generated on your machine. To generate a
chain spec refer to [staging-chain-spec-builder](https://crates.io/crates/staging-chain-spec-builder)
chain spec refer to [pezstaging-chain-spec-builder](https://crates.io/crates/pezstaging-chain-spec-builder)
Then make the changes in the network specification like so:
@@ -197,7 +197,7 @@ zombienet --provider native spawn zombienet.toml
### Connect with the Pezkuwi-JS Apps Front-End
- 🌐 You can interact with your local node using the
hosted version of the Pezkuwi/Substrate Portal:
hosted version of the Pezkuwi/Bizinikiwi Portal:
[relay chain](https://pezkuwichain.io/#/explorer?rpc=ws://localhost:9944)
and [teyrchain](https://pezkuwichain.io/#/explorer?rpc=ws://localhost:9988).
@@ -265,6 +265,6 @@ relay chain network (see [Teyrchain Template node](#teyrchain-template-node) set
the Pezkuwi SDK documentation resources.
- 👥 Additionally, there are [GitHub issues](https://github.com/pezkuwichain/pezkuwi-sdk/issues) and
[Substrate StackExchange](https://exchange.pezkuwichain.app/).
[Bizinikiwi StackExchange](https://exchange.pezkuwichain.app/).
- 👥You can also reach out on the [Official Pezkuwi discord server](https://polkadot-discord.w3f.tools/)
- 🧑Reach out on [Telegram](https://t.me/substratedevs) for more questions and discussions
- 🧑Reach out on [Telegram](https://t.me/bizinikiwidevs) for more questions and discussions
+3 -3
View File
@@ -1,6 +1,6 @@
[package]
name = "teyrchain-template-node"
description = "A teyrchain node template built with Substrate and Cumulus, part of Pezkuwi Sdk."
description = "A teyrchain node template built with Bizinikiwi and Pezcumulus, part of Pezkuwi Sdk."
version = "0.0.0"
license = "Unlicense"
authors.workspace = true
@@ -27,11 +27,11 @@ pezkuwi-sdk = { workspace = true, features = ["node", "pezkuwi-primitives"] }
teyrchain-template-runtime = { workspace = true }
# Substrate
# Bizinikiwi
prometheus-endpoint = { workspace = true, default-features = true }
[build-dependencies]
pezkuwi-sdk = { workspace = true, features = ["substrate-build-script-utils"] }
pezkuwi-sdk = { workspace = true, features = ["bizinikiwi-build-script-utils"] }
[features]
default = ["std"]
+1 -1
View File
@@ -1,4 +1,4 @@
use pezkuwi_sdk::substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
use pezkuwi_sdk::bizinikiwi_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
fn main() {
generate_cargo_keys();
+9 -9
View File
@@ -1,12 +1,12 @@
use pezkuwi_sdk::*;
use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use sc_service::ChainType;
use pezsc_chain_spec::{ChainSpecExtension, ChainSpecGroup};
use pezsc_service::ChainType;
use serde::{Deserialize, Serialize};
use teyrchain_template_runtime as runtime;
/// Specialized `ChainSpec` for the normal teyrchain runtime.
pub type ChainSpec = sc_service::GenericChainSpec<Extensions>;
pub type ChainSpec = pezsc_service::GenericChainSpec<Extensions>;
/// The relay chain that you want to configure this teyrchain to connect to.
pub const RELAY_CHAIN: &str = "pezkuwichain-local";
@@ -20,14 +20,14 @@ pub struct Extensions {
impl Extensions {
/// Try to get the extension from the given `ChainSpec`.
pub fn try_get(chain_spec: &dyn sc_service::ChainSpec) -> Option<&Self> {
sc_chain_spec::get_extension(chain_spec.extensions())
pub fn try_get(chain_spec: &dyn pezsc_service::ChainSpec) -> Option<&Self> {
pezsc_chain_spec::get_extension(chain_spec.extensions())
}
}
pub fn development_chain_spec() -> ChainSpec {
// Give your base currency a unit name and decimal places
let mut properties = sc_chain_spec::Properties::new();
let mut properties = pezsc_chain_spec::Properties::new();
properties.insert("tokenSymbol".into(), "UNIT".into());
properties.insert("tokenDecimals".into(), 12.into());
properties.insert("ss58Format".into(), 42.into());
@@ -39,14 +39,14 @@ pub fn development_chain_spec() -> ChainSpec {
.with_name("Development")
.with_id("dev")
.with_chain_type(ChainType::Development)
.with_genesis_config_preset_name(sp_genesis_builder::DEV_RUNTIME_PRESET)
.with_genesis_config_preset_name(pezsp_genesis_builder::DEV_RUNTIME_PRESET)
.with_properties(properties)
.build()
}
pub fn local_chain_spec() -> ChainSpec {
// Give your base currency a unit name and decimal places
let mut properties = sc_chain_spec::Properties::new();
let mut properties = pezsc_chain_spec::Properties::new();
properties.insert("tokenSymbol".into(), "UNIT".into());
properties.insert("tokenDecimals".into(), 12.into());
properties.insert("ss58Format".into(), 42.into());
@@ -58,7 +58,7 @@ pub fn local_chain_spec() -> ChainSpec {
.with_name("Local Testnet")
.with_id("local_testnet")
.with_chain_type(ChainType::Local)
.with_genesis_config_preset_name(sc_chain_spec::LOCAL_TESTNET_RUNTIME_PRESET)
.with_genesis_config_preset_name(pezsc_chain_spec::LOCAL_TESTNET_RUNTIME_PRESET)
.with_protocol_id("template-local")
.with_properties(properties)
.build()
+9 -9
View File
@@ -11,25 +11,25 @@ pub enum Subcommand {
#[deprecated(
note = "build-spec command will be removed after 1/04/2026. Use export-chain-spec command instead"
)]
BuildSpec(sc_cli::BuildSpecCmd),
BuildSpec(pezsc_cli::BuildSpecCmd),
/// Export the chain specification.
ExportChainSpec(sc_cli::ExportChainSpecCmd),
ExportChainSpec(pezsc_cli::ExportChainSpecCmd),
/// Validate blocks.
CheckBlock(sc_cli::CheckBlockCmd),
CheckBlock(pezsc_cli::CheckBlockCmd),
/// Export blocks.
ExportBlocks(sc_cli::ExportBlocksCmd),
ExportBlocks(pezsc_cli::ExportBlocksCmd),
/// Export the state of a given block into a chain spec.
ExportState(sc_cli::ExportStateCmd),
ExportState(pezsc_cli::ExportStateCmd),
/// Import blocks.
ImportBlocks(sc_cli::ImportBlocksCmd),
ImportBlocks(pezsc_cli::ImportBlocksCmd),
/// Revert the chain to a previous state.
Revert(sc_cli::RevertCmd),
Revert(pezsc_cli::RevertCmd),
/// Remove the whole chain.
PurgeChain(cumulus_client_cli::PurgeChainCmd),
@@ -46,7 +46,7 @@ pub enum Subcommand {
/// Sub-commands concerned with benchmarking.
/// The pallet benchmarking moved to the `pallet` sub-command.
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
Benchmark(pezframe_benchmarking_cli::BenchmarkCmd),
}
const AFTER_HELP_EXAMPLE: &str = color_print::cstr!(
@@ -105,7 +105,7 @@ pub struct RelayChainCli {
impl RelayChainCli {
/// Parse the relay chain CLI parameters using the para chain `Configuration`.
pub fn new<'a>(
para_config: &sc_service::Configuration,
para_config: &pezsc_service::Configuration,
relay_chain_args: impl Iterator<Item = &'a String>,
) -> Self {
let extension = crate::chain_spec::Extensions::try_get(&*para_config.chain_spec);
+22 -22
View File
@@ -1,13 +1,13 @@
use pezkuwi_sdk::*;
use cumulus_client_service::storage_proof_size::HostFunctions as ReclaimHostFunctions;
use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
use pezframe_benchmarking_cli::{BenchmarkCmd, BIZINIKIWI_REFERENCE_HARDWARE};
use log::info;
use sc_cli::{
use pezsc_cli::{
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
NetworkParams, Result, RpcEndpoint, SharedParams, SubstrateCli,
NetworkParams, Result, RpcEndpoint, SharedParams, BizinikiwiCli,
};
use sc_service::config::{BasePath, PrometheusConfig};
use pezsc_service::config::{BasePath, PrometheusConfig};
use teyrchain_template_runtime::Block;
use crate::{
@@ -25,13 +25,13 @@ fn load_spec(id: &str) -> std::result::Result<Box<dyn ChainSpec>, String> {
})
}
impl SubstrateCli for Cli {
impl BizinikiwiCli for Cli {
fn impl_name() -> String {
"Teyrchain Collator Template".into()
}
fn impl_version() -> String {
env!("SUBSTRATE_CLI_IMPL_VERSION").into()
env!("BIZINIKIWI_CLI_IMPL_VERSION").into()
}
fn description() -> String {
@@ -56,18 +56,18 @@ impl SubstrateCli for Cli {
2020
}
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn pezsc_service::ChainSpec>, String> {
load_spec(id)
}
}
impl SubstrateCli for RelayChainCli {
impl BizinikiwiCli for RelayChainCli {
fn impl_name() -> String {
"Teyrchain Collator Template".into()
}
fn impl_version() -> String {
env!("SUBSTRATE_CLI_IMPL_VERSION").into()
env!("BIZINIKIWI_CLI_IMPL_VERSION").into()
}
fn description() -> String {
@@ -92,7 +92,7 @@ impl SubstrateCli for RelayChainCli {
2020
}
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn pezsc_service::ChainSpec>, String> {
pezkuwi_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id)
}
}
@@ -156,7 +156,7 @@ pub fn run() -> Result<()> {
[RelayChainCli::executable_name()].iter().chain(cli.relay_chain_args.iter()),
);
let pezkuwi_config = SubstrateCli::create_configuration(
let pezkuwi_config = BizinikiwiCli::create_configuration(
&pezkuwi_cli,
&pezkuwi_cli,
config.tokio_handle.clone(),
@@ -187,7 +187,7 @@ pub fn run() -> Result<()> {
match cmd {
BenchmarkCmd::Pallet(cmd) =>
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| cmd.run_with_spec::<sp_runtime::traits::HashingFor<Block>, ReclaimHostFunctions>(Some(config.chain_spec)))
runner.sync_run(|config| cmd.run_with_spec::<pezsp_runtime::traits::HashingFor<Block>, ReclaimHostFunctions>(Some(config.chain_spec)))
} else {
Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
@@ -198,7 +198,7 @@ pub fn run() -> Result<()> {
cmd.run(partials.client)
}),
#[cfg(not(feature = "runtime-benchmarks"))]
BenchmarkCmd::Storage(_) => Err(sc_cli::Error::Input(
BenchmarkCmd::Storage(_) => Err(pezsc_cli::Error::Input(
"Compile with --features=runtime-benchmarks \
to enable storage benchmarks."
.into(),
@@ -213,7 +213,7 @@ pub fn run() -> Result<()> {
cmd.run(config, partials.client.clone(), db, storage, shared_cache)
}),
BenchmarkCmd::Machine(cmd) =>
runner.sync_run(|config| cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone())),
runner.sync_run(|config| cmd.run(&config, BIZINIKIWI_REFERENCE_HARDWARE.clone())),
// NOTE: this allows the Client to leniently implement
// new benchmark commands without requiring a companion MR.
#[allow(unreachable_patterns)]
@@ -229,9 +229,9 @@ pub fn run() -> Result<()> {
.then(|| {
config.database.path().map(|database_path| {
let _ = std::fs::create_dir_all(database_path);
sc_sysinfo::gather_hwbench(
pezsc_sysinfo::gather_hwbench(
Some(database_path),
&SUBSTRATE_REFERENCE_HARDWARE,
&BIZINIKIWI_REFERENCE_HARDWARE,
)
})
})
@@ -244,7 +244,7 @@ pub fn run() -> Result<()> {
let tokio_handle = config.tokio_handle.clone();
let pezkuwi_config =
SubstrateCli::create_configuration(&pezkuwi_cli, &pezkuwi_cli, tokio_handle)
BizinikiwiCli::create_configuration(&pezkuwi_cli, &pezkuwi_cli, tokio_handle)
.map_err(|err| format!("Relay chain argument error: {err}"))?;
info!("Is collating: {}", if config.role.is_authority() { "yes" } else { "no" });
@@ -315,7 +315,7 @@ impl CliConfiguration<Self> for RelayChainCli {
fn init<F>(&self, _support_url: &String, _impl_version: &String, _logger_hook: F) -> Result<()>
where
F: FnOnce(&mut sc_cli::LoggerBuilder),
F: FnOnce(&mut pezsc_cli::LoggerBuilder),
{
unreachable!("PezkuwiCli is never initialized; qed");
}
@@ -326,11 +326,11 @@ impl CliConfiguration<Self> for RelayChainCli {
Ok(if chain_id.is_empty() { self.chain_id.clone().unwrap_or_default() } else { chain_id })
}
fn role(&self, is_dev: bool) -> Result<sc_service::Role> {
fn role(&self, is_dev: bool) -> Result<pezsc_service::Role> {
self.base.base.role(is_dev)
}
fn transaction_pool(&self, is_dev: bool) -> Result<sc_service::config::TransactionPoolOptions> {
fn transaction_pool(&self, is_dev: bool) -> Result<pezsc_service::config::TransactionPoolOptions> {
self.base.base.transaction_pool(is_dev)
}
@@ -338,7 +338,7 @@ impl CliConfiguration<Self> for RelayChainCli {
self.base.base.trie_cache_maximum_size()
}
fn rpc_methods(&self) -> Result<sc_service::config::RpcMethods> {
fn rpc_methods(&self) -> Result<pezsc_service::config::RpcMethods> {
self.base.base.rpc_methods()
}
@@ -373,7 +373,7 @@ impl CliConfiguration<Self> for RelayChainCli {
fn telemetry_endpoints(
&self,
chain_spec: &Box<dyn ChainSpec>,
) -> Result<Option<sc_telemetry::TelemetryEndpoints>> {
) -> Result<Option<pezsc_telemetry::TelemetryEndpoints>> {
self.base.base.telemetry_endpoints(chain_spec)
}
+2 -2
View File
@@ -1,4 +1,4 @@
//! Substrate Teyrchain Node Template CLI
//! Bizinikiwi Teyrchain Node Template CLI
#![warn(missing_docs)]
@@ -10,6 +10,6 @@ mod command;
mod rpc;
mod service;
fn main() -> sc_cli::Result<()> {
fn main() -> pezsc_cli::Result<()> {
command::run()
}
+10 -10
View File
@@ -1,6 +1,6 @@
//! A collection of node-specific RPC methods.
//! Substrate provides the `sc-rpc` crate, which defines the core RPC layer
//! used by Substrate nodes. This file extends those RPC definitions with
//! Bizinikiwi provides the `sc-rpc` crate, which defines the core RPC layer
//! used by Bizinikiwi nodes. This file extends those RPC definitions with
//! capabilities that are specific to this project's runtime configuration.
#![warn(missing_docs)]
@@ -11,10 +11,10 @@ use teyrchain_template_runtime::{opaque::Block, AccountId, Balance, Nonce};
use pezkuwi_sdk::*;
use sc_transaction_pool_api::TransactionPool;
use sp_api::ProvideRuntimeApi;
use sp_block_builder::BlockBuilder;
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
use pezsc_transaction_pool_api::TransactionPool;
use pezsp_api::ProvideRuntimeApi;
use pezsp_block_builder::BlockBuilder;
use pezsp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
/// A type representing all RPC extensions.
pub type RpcExtension = jsonrpsee::RpcModule<()>;
@@ -38,13 +38,13 @@ where
+ Send
+ Sync
+ 'static,
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
C::Api: pezpallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
C::Api: bizinikiwi_frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
C::Api: BlockBuilder<Block>,
P: TransactionPool + Sync + Send + 'static,
{
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use substrate_frame_rpc_system::{System, SystemApiServer};
use pezpallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
use bizinikiwi_frame_rpc_system::{System, SystemApiServer};
let mut module = RpcExtension::new(());
let FullDeps { client, pool } = deps;
+40 -40
View File
@@ -1,4 +1,4 @@
//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
//! Service and ServiceFactory implementation. Specialized wrapper over bizinikiwi service.
// std
use std::{sync::Arc, time::Duration};
@@ -12,7 +12,7 @@ use teyrchain_template_runtime::{
use codec::Encode;
use pezkuwi_sdk::{cumulus_client_service::TeyrchainTracingExecuteBlock, *};
// Cumulus Imports
// Pezcumulus Imports
use cumulus_client_bootnodes::{start_bootnode_tasks, StartBootnodeTasksParams};
use cumulus_client_cli::CollatorOptions;
use cumulus_client_collator::service::CollatorService;
@@ -31,19 +31,19 @@ use cumulus_primitives_core::{
};
use cumulus_relay_chain_interface::{OverseerHandle, RelayChainInterface};
// Substrate Imports
use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE;
use pezkuwi_sdk::sc_network::PeerId;
// Bizinikiwi Imports
use pezframe_benchmarking_cli::BIZINIKIWI_REFERENCE_HARDWARE;
use pezkuwi_sdk::pezsc_network::PeerId;
use prometheus_endpoint::Registry;
use sc_client_api::Backend;
use sc_consensus::ImportQueue;
use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};
use sc_network::{NetworkBackend, NetworkBlock};
use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager};
use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
use sc_transaction_pool_api::OffchainTransactionPoolFactory;
use sp_api::ProvideRuntimeApi;
use sp_keystore::KeystorePtr;
use pezsc_client_api::Backend;
use pezsc_consensus::ImportQueue;
use pezsc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};
use pezsc_network::{NetworkBackend, NetworkBlock};
use pezsc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager};
use pezsc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
use pezsc_transaction_pool_api::OffchainTransactionPoolFactory;
use pezsp_api::ProvideRuntimeApi;
use pezsp_keystore::KeystorePtr;
#[docify::export(wasm_executor)]
type TeyrchainExecutor = WasmExecutor<TeyrchainHostFunctions>;
@@ -59,8 +59,8 @@ pub type Service = PartialComponents<
TeyrchainClient,
TeyrchainBackend,
(),
sc_consensus::DefaultImportQueue<Block>,
sc_transaction_pool::TransactionPoolHandle<Block, TeyrchainClient>,
pezsc_consensus::DefaultImportQueue<Block>,
pezsc_transaction_pool::TransactionPoolHandle<Block, TeyrchainClient>,
(TeyrchainBlockImport, Option<Telemetry>, Option<TelemetryWorkerHandle>),
>;
@@ -69,12 +69,12 @@ pub type Service = PartialComponents<
/// Use this macro if you don't actually need the full service, but just the builder in order to
/// be able to perform chain operations.
#[docify::export(component_instantiation)]
pub fn new_partial(config: &Configuration) -> Result<Service, sc_service::Error> {
pub fn new_partial(config: &Configuration) -> Result<Service, pezsc_service::Error> {
let telemetry = config
.telemetry_endpoints
.clone()
.filter(|x| !x.is_empty())
.map(|endpoints| -> Result<_, sc_telemetry::Error> {
.map(|endpoints| -> Result<_, pezsc_telemetry::Error> {
let worker = TelemetryWorker::new(16)?;
let telemetry = worker.handle().new_telemetry(endpoints);
Ok((worker, telemetry))
@@ -95,7 +95,7 @@ pub fn new_partial(config: &Configuration) -> Result<Service, sc_service::Error>
.build();
let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts_record_import::<Block, RuntimeApi, _>(
pezsc_service::new_full_parts_record_import::<Block, RuntimeApi, _>(
config,
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
executor,
@@ -111,7 +111,7 @@ pub fn new_partial(config: &Configuration) -> Result<Service, sc_service::Error>
});
let transaction_pool = Arc::from(
sc_transaction_pool::Builder::new(
pezsc_transaction_pool::Builder::new(
task_manager.spawn_essential_handle(),
client.clone(),
config.role.is_authority().into(),
@@ -150,9 +150,9 @@ fn build_import_queue(
config: &Configuration,
telemetry: Option<TelemetryHandle>,
task_manager: &TaskManager,
) -> sc_consensus::DefaultImportQueue<Block> {
) -> pezsc_consensus::DefaultImportQueue<Block> {
cumulus_client_consensus_aura::equivocation_import_queue::fully_verifying_import_queue::<
sp_consensus_aura::sr25519::AuthorityPair,
pezsp_consensus_aura::sr25519::AuthorityPair,
_,
_,
_,
@@ -161,7 +161,7 @@ fn build_import_queue(
client,
block_import,
move |_, _| async move {
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
let timestamp = pezsp_timestamp::InherentDataProvider::from_system_time();
Ok(timestamp)
},
&task_manager.spawn_essential_handle(),
@@ -179,7 +179,7 @@ fn start_consensus(
telemetry: Option<TelemetryHandle>,
task_manager: &TaskManager,
relay_chain_interface: Arc<dyn RelayChainInterface>,
transaction_pool: Arc<sc_transaction_pool::TransactionPoolHandle<Block, TeyrchainClient>>,
transaction_pool: Arc<pezsc_transaction_pool::TransactionPoolHandle<Block, TeyrchainClient>>,
keystore: KeystorePtr,
relay_chain_slot_duration: Duration,
para_id: ParaId,
@@ -187,8 +187,8 @@ fn start_consensus(
collator_peer_id: PeerId,
overseer_handle: OverseerHandle,
announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
) -> Result<(), sc_service::Error> {
let proposer = sc_basic_authorship::ProposerFactory::with_proof_recording(
) -> Result<(), pezsc_service::Error> {
let proposer = pezsc_basic_authorship::ProposerFactory::with_proof_recording(
task_manager.spawn_handle(),
client.clone(),
transaction_pool,
@@ -223,7 +223,7 @@ fn start_consensus(
reinitialize: false,
max_pov_percentage: None,
};
let fut = aura::run::<Block, sp_consensus_aura::sr25519::AuthorityPair, _, _, _, _, _, _, _, _>(
let fut = aura::run::<Block, pezsp_consensus_aura::sr25519::AuthorityPair, _, _, _, _, _, _, _, _>(
params,
);
task_manager.spawn_essential_handle().spawn("aura", None, fut);
@@ -232,23 +232,23 @@ fn start_consensus(
}
/// Start a node with the given teyrchain `Configuration` and relay chain `Configuration`.
#[sc_tracing::logging::prefix_logs_with("Teyrchain")]
#[pezsc_tracing::logging::prefix_logs_with("Teyrchain")]
pub async fn start_teyrchain_node(
teyrchain_config: Configuration,
pezkuwi_config: Configuration,
collator_options: CollatorOptions,
hwbench: Option<sc_sysinfo::HwBench>,
) -> sc_service::error::Result<(TaskManager, Arc<TeyrchainClient>)> {
hwbench: Option<pezsc_sysinfo::HwBench>,
) -> pezsc_service::error::Result<(TaskManager, Arc<TeyrchainClient>)> {
let teyrchain_config = prepare_node_config(teyrchain_config);
let params = new_partial(&teyrchain_config)?;
let (block_import, mut telemetry, telemetry_worker_handle) = params.other;
let prometheus_registry = teyrchain_config.prometheus_registry().cloned();
let net_config = sc_network::config::FullNetworkConfiguration::<
let net_config = pezsc_network::config::FullNetworkConfiguration::<
_,
_,
sc_network::NetworkWorker<Block, Hash>,
pezsc_network::NetworkWorker<Block, Hash>,
>::new(&teyrchain_config.network, prometheus_registry.clone());
let client = params.client.clone();
@@ -270,7 +270,7 @@ pub async fn start_teyrchain_node(
hwbench.clone(),
)
.await
.map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?;
.map_err(|e| pezsc_service::Error::Application(Box::new(e) as Box<_>))?;
let validator = teyrchain_config.role.is_authority();
let transaction_pool = params.transaction_pool.clone();
@@ -296,7 +296,7 @@ pub async fn start_teyrchain_node(
relay_chain_interface: relay_chain_interface.clone(),
import_queue: params.import_queue,
sybil_resistance_level: CollatorSybilResistance::Resistant, // because of Aura
metrics: sc_network::NetworkWorker::<Block, Hash>::register_notification_metrics(
metrics: pezsc_network::NetworkWorker::<Block, Hash>::register_notification_metrics(
teyrchain_config.prometheus_config.as_ref().map(|config| &config.registry),
),
})
@@ -307,7 +307,7 @@ pub async fn start_teyrchain_node(
use futures::FutureExt;
let offchain_workers =
sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions {
pezsc_offchain::OffchainWorkers::new(pezsc_offchain::OffchainWorkerOptions {
runtime_api_provider: client.clone(),
keystore: Some(params.keystore_container.keystore()),
offchain_db: backend.offchain_storage(),
@@ -338,7 +338,7 @@ pub async fn start_teyrchain_node(
})
};
sc_service::spawn_tasks(sc_service::SpawnTasksParams {
pezsc_service::spawn_tasks(pezsc_service::SpawnTasksParams {
rpc_builder,
client: client.clone(),
transaction_pool: transaction_pool.clone(),
@@ -355,11 +355,11 @@ pub async fn start_teyrchain_node(
})?;
if let Some(hwbench) = hwbench {
sc_sysinfo::print_hwbench(&hwbench);
pezsc_sysinfo::print_hwbench(&hwbench);
// Here you can check whether the hardware meets your chains' requirements. Putting a link
// in there and swapping out the requirements for your own are probably a good idea. The
// requirements for a para-chain are dictated by its relay-chain.
match SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench, false) {
match BIZINIKIWI_REFERENCE_HARDWARE.check_hardware(&hwbench, false) {
Err(err) if validator => {
log::warn!(
"⚠️ The hardware does not meet the minimal requirements {} for role 'Authority'.",
@@ -374,7 +374,7 @@ pub async fn start_teyrchain_node(
task_manager.spawn_handle().spawn(
"telemetry_hwbench",
None,
sc_sysinfo::initialize_hwbench_telemetry(telemetry_handle, hwbench),
pezsc_sysinfo::initialize_hwbench_telemetry(telemetry_handle, hwbench),
);
}
}
@@ -388,7 +388,7 @@ pub async fn start_teyrchain_node(
let overseer_handle = relay_chain_interface
.overseer_handle()
.map_err(|e| sc_service::Error::Application(Box::new(e)))?;
.map_err(|e| pezsc_service::Error::Application(Box::new(e)))?;
start_relay_chain_tasks(StartRelayChainTasksParams {
client: client.clone(),
@@ -1,5 +1,5 @@
[package]
name = "pallet-teyrchain-template"
name = "pezpallet-teyrchain-template"
description = "FRAME pallet template for defining custom runtime logic."
version = "0.0.0"
license = "Unlicense"
@@ -1,14 +1,14 @@
//! Benchmarking setup for pallet-template
//! Benchmarking setup for pezpallet-template
use super::*;
use frame::{deps::frame_benchmarking::v2::*, prelude::*};
use frame::{deps::pezframe_benchmarking::v2::*, prelude::*};
#[benchmarks]
mod benchmarks {
use super::*;
#[cfg(test)]
use crate::pallet::Pallet as Template;
use frame_system::RawOrigin;
use pezframe_system::RawOrigin;
#[benchmark]
fn do_something() {
+10 -10
View File
@@ -25,7 +25,7 @@
//!
//! <https://docs.pezkuwichain.io/sdk/master/polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html>
//!
//! And looking at the frame [`kitchen-sink`](https://docs.pezkuwichain.io/sdk/master/pallet_example_kitchensink/index.html)
//! And looking at the frame [`kitchen-sink`](https://docs.pezkuwichain.io/sdk/master/pezpallet_example_kitchensink/index.html)
//! pallet, a showcase of all pallet macros.
//!
//! ### Pallet Sections
@@ -34,7 +34,7 @@
//!
//! - A **configuration trait** that defines the types and parameters which the pallet depends on
//! (denoted by the `#[pallet::config]` attribute). See: [`Config`].
//! - A **means to store pallet-specific data** (denoted by the `#[pallet::storage]` attribute).
//! - A **means to store pezpallet-specific data** (denoted by the `#[pallet::storage]` attribute).
//! See: [`storage_types`].
//! - A **declaration of the events** this pallet emits (denoted by the `#[pallet::event]`
//! attribute). See: [`Event`].
@@ -43,7 +43,7 @@
//! - A **set of dispatchable functions** that define the pallet's functionality (denoted by the
//! `#[pallet::call]` attribute). See: [`dispatchables`].
//!
//! Run `cargo doc --package pallet-template --open` to view this pallet's documentation.
//! Run `cargo doc --package pezpallet-template --open` to view this pallet's documentation.
#![cfg_attr(not(feature = "std"), no_std)]
@@ -64,17 +64,17 @@ mod benchmarking;
// <https://docs.pezkuwichain.io/sdk/master/polkadot_sdk_docs/guides/your_first_pallet/index.html>
//
// To see a full list of `pallet` macros and their use cases, see:
// <https://docs.pezkuwichain.io/sdk/master/pallet_example_kitchensink/index.html>
// <https://docs.pezkuwichain.io/sdk/master/frame_support/pallet_macros/index.html>
// <https://docs.pezkuwichain.io/sdk/master/pezpallet_example_kitchensink/index.html>
// <https://docs.pezkuwichain.io/sdk/master/pezframe_support/pezpallet_macros/index.html>
#[frame::pallet]
pub mod pallet {
use frame::prelude::*;
/// Configure the pallet by specifying the parameters and types on which it depends.
#[pallet::config]
pub trait Config: frame_system::Config {
pub trait Config: pezframe_system::Config {
#[allow(deprecated)]
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type RuntimeEvent: From<Event<Self>> + IsType<<Self as pezframe_system::Config>::RuntimeEvent>;
/// A type representing the weights required by the dispatchables of this pallet.
type WeightInfo: crate::weights::WeightInfo;
@@ -96,7 +96,7 @@ pub mod pallet {
/// The pallet's storage items.
/// <https://docs.pezkuwichain.io/sdk/master/polkadot_sdk_docs/guides/your_first_pallet/index.html#storage>
/// <https://docs.pezkuwichain.io/sdk/master/frame_support/pallet_macros/attr.storage.html>
/// <https://docs.pezkuwichain.io/sdk/master/pezframe_support/pezpallet_macros/attr.storage.html>
#[pallet::storage]
pub type Something<T: Config> = StorageValue<_, CompositeStruct<T>>;
@@ -139,7 +139,7 @@ pub mod pallet {
let who = ensure_signed(origin)?;
// Convert the u32 into a block number. This is possible because the set of trait bounds
// defined in [`frame_system::Config::BlockNumber`].
// defined in [`pezframe_system::Config::BlockNumber`].
let block_number: BlockNumberFor<T> = bn.into();
// Update storage.
@@ -174,7 +174,7 @@ pub mod pallet {
// Update the value in storage with the incremented result.
<Something<T>>::put(old);
// Explore how you can rewrite this using
// [`frame_support::storage::StorageValue::mutate`].
// [`pezframe_support::storage::StorageValue::mutate`].
Ok(().into())
},
}
@@ -1,5 +1,5 @@
use frame::{
deps::{frame_support::weights::constants::RocksDbWeight, frame_system::GenesisConfig},
deps::{pezframe_support::weights::constants::RocksDbWeight, pezframe_system::GenesisConfig},
prelude::*,
runtime::prelude::*,
testing_prelude::*,
@@ -23,14 +23,14 @@ mod test_runtime {
)]
pub struct Test;
#[runtime::pallet_index(0)]
pub type System = frame_system;
#[runtime::pallet_index(1)]
#[runtime::pezpallet_index(0)]
pub type System = pezframe_system;
#[runtime::pezpallet_index(1)]
pub type Template = crate;
}
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
impl frame_system::Config for Test {
#[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)]
impl pezframe_system::Config for Test {
type Nonce = u64;
type Block = MockBlock<Test>;
type BlockHashCount = ConstU64<250>;
@@ -1,7 +1,7 @@
//! Autogenerated weights for pallet_template
//! Autogenerated weights for pezpallet_template
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
//! THIS FILE WAS AUTO-GENERATED USING THE BIZINIKIWI BENCHMARK CLI VERSION 4.0.0-dev
//! DATE: 2023-04-06, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `_`, CPU: `<UNKNOWN>`
@@ -14,7 +14,7 @@
// --chain
// dev
// --pallet
// pallet_template
// pezpallet_template
// --extrinsic
// *
// --steps=50
@@ -29,24 +29,24 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame::{deps::frame_support::weights::constants::RocksDbWeight, prelude::*};
use frame::{deps::pezframe_support::weights::constants::RocksDbWeight, prelude::*};
use core::marker::PhantomData;
/// Weight functions needed for pallet_template.
/// Weight functions needed for pezpallet_template.
pub trait WeightInfo {
fn do_something() -> Weight;
fn cause_error() -> Weight;
}
/// Weights for pallet_template using the Substrate node and recommended hardware.
/// Weights for pezpallet_template using the Bizinikiwi node and recommended hardware.
#[cfg_attr(
not(feature = "std"),
deprecated(
note = "SubstrateWeight is auto-generated and should not be used in production. Replace it with runtime benchmarked weights."
note = "BizinikiwiWeight is auto-generated and should not be used in production. Replace it with runtime benchmarked weights."
)
)]
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
pub struct BizinikiwiWeight<T>(PhantomData<T>);
impl<T: pezframe_system::Config> WeightInfo for BizinikiwiWeight<T> {
/// Storage: Template Something (r:0 w:1)
/// Proof: Template Something (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
fn do_something() -> Weight {
+37 -37
View File
@@ -1,6 +1,6 @@
[package]
name = "teyrchain-template-runtime"
description = "A teyrchain runtime template built with Substrate and Cumulus, part of Pezkuwi Sdk."
description = "A teyrchain runtime template built with Bizinikiwi and Pezcumulus, part of Pezkuwi Sdk."
version = "0.0.0"
license = "Unlicense"
authors.workspace = true
@@ -27,70 +27,70 @@ serde_json = { workspace = true, default-features = false, features = [
smallvec = { workspace = true, default-features = true }
# Local
pallet-teyrchain-template = { workspace = true }
pezpallet-teyrchain-template = { workspace = true }
pezkuwi-sdk = { workspace = true, default-features = false, features = [
"pallet-aura",
"pallet-authorship",
"pallet-balances",
"pallet-message-queue",
"pallet-session",
"pallet-sudo",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"pezpallet-aura",
"pezpallet-authorship",
"pezpallet-balances",
"pezpallet-message-queue",
"pezpallet-session",
"pezpallet-sudo",
"pezpallet-timestamp",
"pezpallet-transaction-payment",
"pezpallet-transaction-payment-rpc-runtime-api",
"pallet-xcm",
"pezpallet-xcm",
"pezkuwi-runtime-common",
"pezkuwi-teyrchain-primitives",
"staging-xcm",
"staging-xcm-builder",
"staging-xcm-executor",
"pezstaging-xcm",
"pezstaging-xcm-builder",
"pezstaging-xcm-executor",
"cumulus-pallet-aura-ext",
"cumulus-pallet-session-benchmarking",
"cumulus-pallet-weight-reclaim",
"cumulus-pallet-xcm",
"cumulus-pallet-xcmp-queue",
"cumulus-primitives-aura",
"cumulus-primitives-core",
"cumulus-primitives-utility",
"pallet-collator-selection",
"staging-teyrchain-info",
"pezcumulus-pezpallet-aura-ext",
"pezcumulus-pezpallet-session-benchmarking",
"pezcumulus-pezpallet-weight-reclaim",
"pezcumulus-pezpallet-xcm",
"pezcumulus-pezpallet-xcmp-queue",
"pezcumulus-primitives-aura",
"pezcumulus-primitives-core",
"pezcumulus-primitives-utility",
"pezpallet-collator-selection",
"pezstaging-teyrchain-info",
"teyrchains-common",
"runtime",
] }
# Cumulus
cumulus-pallet-teyrchain-system = { workspace = true }
# Pezcumulus
pezcumulus-pezpallet-teyrchain-system = { workspace = true }
[build-dependencies]
docify = { workspace = true }
substrate-wasm-builder = { optional = true, workspace = true, default-features = true }
bizinikiwi-wasm-builder = { optional = true, workspace = true, default-features = true }
[features]
default = ["std"]
std = [
"codec/std",
"cumulus-pallet-teyrchain-system/std",
"pezcumulus-pezpallet-teyrchain-system/std",
"log/std",
"pallet-teyrchain-template/std",
"pezpallet-teyrchain-template/std",
"pezkuwi-sdk/std",
"scale-info/std",
"serde_json/std",
"substrate-wasm-builder",
"bizinikiwi-wasm-builder",
]
runtime-benchmarks = [
"cumulus-pallet-teyrchain-system/runtime-benchmarks",
"pezcumulus-pezpallet-teyrchain-system/runtime-benchmarks",
"hex-literal",
"pallet-teyrchain-template/runtime-benchmarks",
"pezpallet-teyrchain-template/runtime-benchmarks",
"pezkuwi-sdk/runtime-benchmarks",
"substrate-wasm-builder?/runtime-benchmarks",
"bizinikiwi-wasm-builder?/runtime-benchmarks",
]
try-runtime = [
"cumulus-pallet-teyrchain-system/try-runtime",
"pallet-teyrchain-template/try-runtime",
"pezcumulus-pezpallet-teyrchain-system/try-runtime",
"pezpallet-teyrchain-template/try-runtime",
"pezkuwi-sdk/try-runtime",
]
@@ -101,7 +101,7 @@ try-runtime = [
# generate the metadata hash and then a second time with the
# `RUNTIME_METADATA_HASH` environment variable set for the `CheckMetadataHash`
# extension.
metadata-hash = ["substrate-wasm-builder/metadata-hash"]
metadata-hash = ["bizinikiwi-wasm-builder/metadata-hash"]
# A convenience feature for enabling things when doing a build
# for an on-chain release.
+2 -2
View File
@@ -1,14 +1,14 @@
#[cfg(all(feature = "std", feature = "metadata-hash"))]
#[docify::export(template_enable_metadata_hash)]
fn main() {
substrate_wasm_builder::WasmBuilder::init_with_defaults()
bizinikiwi_wasm_builder::WasmBuilder::init_with_defaults()
.enable_metadata_hash("UNIT", 12)
.build();
}
#[cfg(all(feature = "std", not(feature = "metadata-hash")))]
fn main() {
substrate_wasm_builder::WasmBuilder::build_using_defaults();
bizinikiwi_wasm_builder::WasmBuilder::build_using_defaults();
}
/// The wasm builder is deactivated when compiling
+50 -50
View File
@@ -26,23 +26,23 @@
// External crates imports
use alloc::vec::Vec;
use pezkuwi_sdk::{staging_teyrchain_info as teyrchain_info, *};
use pezkuwi_sdk::{pezstaging_teyrchain_info as teyrchain_info, *};
use cumulus_primitives_core::ParaId;
use frame_support::{
use pezframe_support::{
genesis_builder_helper::{build_state, get_preset},
weights::Weight,
};
use pallet_aura::Authorities;
use sp_api::impl_runtime_apis;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
use sp_runtime::{
use pezpallet_aura::Authorities;
use pezsp_api::impl_runtime_apis;
use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
use pezsp_core::{crypto::KeyTypeId, OpaqueMetadata};
use pezsp_runtime::{
traits::Block as BlockT,
transaction_validity::{TransactionSource, TransactionValidity},
ApplyExtrinsicResult,
};
use sp_version::RuntimeVersion;
use pezsp_version::RuntimeVersion;
// Local module imports
use super::{
@@ -54,8 +54,8 @@ use super::{
// we move some impls outside so we can easily use them with `docify`.
impl Runtime {
#[docify::export]
fn impl_slot_duration() -> sp_consensus_aura::SlotDuration {
sp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION)
fn impl_slot_duration() -> pezsp_consensus_aura::SlotDuration {
pezsp_consensus_aura::SlotDuration::from_millis(SLOT_DURATION)
}
#[docify::export]
@@ -68,8 +68,8 @@ impl Runtime {
}
impl_runtime_apis! {
impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
fn slot_duration() -> sp_consensus_aura::SlotDuration {
impl pezsp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
fn slot_duration() -> pezsp_consensus_aura::SlotDuration {
Runtime::impl_slot_duration()
}
@@ -93,7 +93,7 @@ impl_runtime_apis! {
}
}
impl sp_api::Core<Block> for Runtime {
impl pezsp_api::Core<Block> for Runtime {
fn version() -> RuntimeVersion {
VERSION
}
@@ -102,12 +102,12 @@ impl_runtime_apis! {
Executive::execute_block(block)
}
fn initialize_block(header: &<Block as BlockT>::Header) -> sp_runtime::ExtrinsicInclusionMode {
fn initialize_block(header: &<Block as BlockT>::Header) -> pezsp_runtime::ExtrinsicInclusionMode {
Executive::initialize_block(header)
}
}
impl sp_api::Metadata<Block> for Runtime {
impl pezsp_api::Metadata<Block> for Runtime {
fn metadata() -> OpaqueMetadata {
OpaqueMetadata::new(Runtime::metadata().into())
}
@@ -121,13 +121,13 @@ impl_runtime_apis! {
}
}
impl frame_support::view_functions::runtime_api::RuntimeViewFunction<Block> for Runtime {
fn execute_view_function(id: frame_support::view_functions::ViewFunctionId, input: Vec<u8>) -> Result<Vec<u8>, frame_support::view_functions::ViewFunctionDispatchError> {
impl pezframe_support::view_functions::runtime_api::RuntimeViewFunction<Block> for Runtime {
fn execute_view_function(id: pezframe_support::view_functions::ViewFunctionId, input: Vec<u8>) -> Result<Vec<u8>, pezframe_support::view_functions::ViewFunctionDispatchError> {
Runtime::execute_view_function(id, input)
}
}
impl sp_block_builder::BlockBuilder<Block> for Runtime {
impl pezsp_block_builder::BlockBuilder<Block> for Runtime {
fn apply_extrinsic(extrinsic: <Block as BlockT>::Extrinsic) -> ApplyExtrinsicResult {
Executive::apply_extrinsic(extrinsic)
}
@@ -136,19 +136,19 @@ impl_runtime_apis! {
Executive::finalize_block()
}
fn inherent_extrinsics(data: sp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
fn inherent_extrinsics(data: pezsp_inherents::InherentData) -> Vec<<Block as BlockT>::Extrinsic> {
data.create_extrinsics()
}
fn check_inherents(
block: <Block as BlockT>::LazyBlock,
data: sp_inherents::InherentData,
) -> sp_inherents::CheckInherentsResult {
data: pezsp_inherents::InherentData,
) -> pezsp_inherents::CheckInherentsResult {
data.check_extrinsics(&block)
}
}
impl sp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
impl pezsp_transaction_pool::runtime_api::TaggedTransactionQueue<Block> for Runtime {
fn validate_transaction(
source: TransactionSource,
tx: <Block as BlockT>::Extrinsic,
@@ -158,13 +158,13 @@ impl_runtime_apis! {
}
}
impl sp_offchain::OffchainWorkerApi<Block> for Runtime {
impl pezsp_offchain::OffchainWorkerApi<Block> for Runtime {
fn offchain_worker(header: &<Block as BlockT>::Header) {
Executive::offchain_worker(header)
}
}
impl sp_session::SessionKeys<Block> for Runtime {
impl pezsp_session::SessionKeys<Block> for Runtime {
fn generate_session_keys(seed: Option<Vec<u8>>) -> Vec<u8> {
SessionKeys::generate(seed)
}
@@ -176,23 +176,23 @@ impl_runtime_apis! {
}
}
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
impl pezframe_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
fn account_nonce(account: AccountId) -> Nonce {
System::account_nonce(account)
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
impl pezpallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<Block, Balance> for Runtime {
fn query_info(
uxt: <Block as BlockT>::Extrinsic,
len: u32,
) -> pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
) -> pezpallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_info(uxt, len)
}
fn query_fee_details(
uxt: <Block as BlockT>::Extrinsic,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
) -> pezpallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_fee_details(uxt, len)
}
fn query_weight_to_fee(weight: Weight) -> Balance {
@@ -203,19 +203,19 @@ impl_runtime_apis! {
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
impl pezpallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi<Block, Balance, RuntimeCall>
for Runtime
{
fn query_call_info(
call: RuntimeCall,
len: u32,
) -> pallet_transaction_payment::RuntimeDispatchInfo<Balance> {
) -> pezpallet_transaction_payment::RuntimeDispatchInfo<Balance> {
TransactionPayment::query_call_info(call, len)
}
fn query_call_fee_details(
call: RuntimeCall,
len: u32,
) -> pallet_transaction_payment::FeeDetails<Balance> {
) -> pezpallet_transaction_payment::FeeDetails<Balance> {
TransactionPayment::query_call_fee_details(call, len)
}
fn query_weight_to_fee(weight: Weight) -> Balance {
@@ -233,8 +233,8 @@ impl_runtime_apis! {
}
#[cfg(feature = "try-runtime")]
impl frame_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
impl pezframe_try_runtime::TryRuntime<Block> for Runtime {
fn on_runtime_upgrade(checks: pezframe_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
use super::configs::RuntimeBlockWeights;
let weight = Executive::try_runtime_upgrade(checks).unwrap();
@@ -245,7 +245,7 @@ impl_runtime_apis! {
block: <Block as BlockT>::LazyBlock,
state_root_check: bool,
signature_check: bool,
select: frame_try_runtime::TryStateSelect,
select: pezframe_try_runtime::TryStateSelect,
) -> Weight {
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
// have a backtrace here.
@@ -254,14 +254,14 @@ impl_runtime_apis! {
}
#[cfg(feature = "runtime-benchmarks")]
impl frame_benchmarking::Benchmark<Block> for Runtime {
impl pezframe_benchmarking::Benchmark<Block> for Runtime {
fn benchmark_metadata(extra: bool) -> (
Vec<frame_benchmarking::BenchmarkList>,
Vec<pezkuwi_sdk::frame_support::traits::StorageInfo>,
Vec<pezframe_benchmarking::BenchmarkList>,
Vec<pezkuwi_sdk::pezframe_support::traits::StorageInfo>,
) {
use frame_benchmarking::BenchmarkList;
use pezkuwi_sdk::frame_support::traits::StorageInfoTrait;
use frame_system_benchmarking::Pallet as SystemBench;
use pezframe_benchmarking::BenchmarkList;
use pezkuwi_sdk::pezframe_support::traits::StorageInfoTrait;
use pezframe_system_benchmarking::Pallet as SystemBench;
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
use super::*;
@@ -274,13 +274,13 @@ impl_runtime_apis! {
#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
use frame_benchmarking::{BenchmarkError, BenchmarkBatch};
config: pezframe_benchmarking::BenchmarkConfig
) -> Result<Vec<pezframe_benchmarking::BenchmarkBatch>, alloc::string::String> {
use pezframe_benchmarking::{BenchmarkError, BenchmarkBatch};
use super::*;
use frame_system_benchmarking::Pallet as SystemBench;
impl frame_system_benchmarking::Config for Runtime {
use pezframe_system_benchmarking::Pallet as SystemBench;
impl pezframe_system_benchmarking::Config for Runtime {
fn setup_set_code_requirements(code: &Vec<u8>) -> Result<(), BenchmarkError> {
TeyrchainSystem::initialize_for_set_code_benchmark(code.len() as u32);
Ok(())
@@ -294,7 +294,7 @@ impl_runtime_apis! {
use cumulus_pallet_session_benchmarking::Pallet as SessionBench;
impl cumulus_pallet_session_benchmarking::Config for Runtime {}
use pezkuwi_sdk::frame_support::traits::WhitelistedStorageKeys;
use pezkuwi_sdk::pezframe_support::traits::WhitelistedStorageKeys;
let whitelist = AllPalletsWithSystem::whitelisted_storage_keys();
let mut batches = Vec::<BenchmarkBatch>::new();
@@ -306,16 +306,16 @@ impl_runtime_apis! {
}
}
impl sp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
impl pezsp_genesis_builder::GenesisBuilder<Block> for Runtime {
fn build_state(config: Vec<u8>) -> pezsp_genesis_builder::Result {
build_state::<RuntimeGenesisConfig>(config)
}
fn get_preset(id: &Option<sp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
fn get_preset(id: &Option<pezsp_genesis_builder::PresetId>) -> Option<Vec<u8>> {
get_preset::<RuntimeGenesisConfig>(id, crate::genesis_config_presets::get_preset)
}
fn preset_names() -> Vec<sp_genesis_builder::PresetId> {
fn preset_names() -> Vec<pezsp_genesis_builder::PresetId> {
crate::genesis_config_presets::preset_names()
}
}
@@ -23,14 +23,14 @@
//
// For more information, please refer to <http://unlicense.org>
pezkuwi_sdk::frame_benchmarking::define_benchmarks!(
[frame_system, SystemBench::<Runtime>]
[pallet_balances, Balances]
[pallet_session, SessionBench::<Runtime>]
[pallet_timestamp, Timestamp]
[pallet_message_queue, MessageQueue]
[pallet_sudo, Sudo]
[pallet_collator_selection, CollatorSelection]
pezkuwi_sdk::pezframe_benchmarking::define_benchmarks!(
[pezframe_system, SystemBench::<Runtime>]
[pezpallet_balances, Balances]
[pezpallet_session, SessionBench::<Runtime>]
[pezpallet_timestamp, Timestamp]
[pezpallet_message_queue, MessageQueue]
[pezpallet_sudo, Sudo]
[pezpallet_collator_selection, CollatorSelection]
[cumulus_pallet_teyrchain_system, TeyrchainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[cumulus_pallet_weight_reclaim, WeightReclaim]
+43 -43
View File
@@ -25,14 +25,14 @@
mod xcm_config;
use pezkuwi_sdk::{staging_teyrchain_info as teyrchain_info, staging_xcm as xcm, *};
use pezkuwi_sdk::{pezstaging_teyrchain_info as teyrchain_info, pezstaging_xcm as xcm, *};
#[cfg(not(feature = "runtime-benchmarks"))]
use pezkuwi_sdk::{staging_xcm_builder as xcm_builder, staging_xcm_executor as xcm_executor};
use pezkuwi_sdk::{pezstaging_xcm_builder as xcm_builder, pezstaging_xcm_executor as xcm_executor};
// Substrate and Pezkuwi dependencies
// Bizinikiwi and Pezkuwi dependencies
use cumulus_pallet_teyrchain_system::RelayNumberMonotonicallyIncreases;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use frame_support::{
use pezframe_support::{
derive_impl,
dispatch::DispatchClass,
parameter_types,
@@ -42,17 +42,17 @@ use frame_support::{
weights::{ConstantMultiplier, Weight},
PalletId,
};
use frame_system::{
use pezframe_system::{
limits::{BlockLength, BlockWeights},
EnsureRoot,
};
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
use pezpallet_xcm::{EnsureXcm, IsVoiceOfBody};
use pezkuwi_runtime_common::{
xcm_sender::ExponentialPrice, BlockHashCount, SlowAdjustingFeeUpdate,
};
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_runtime::Perbill;
use sp_version::RuntimeVersion;
use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
use pezsp_runtime::Perbill;
use pezsp_version::RuntimeVersion;
use teyrchains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling};
use xcm::latest::prelude::{AssetId, BodyId};
@@ -70,7 +70,7 @@ use xcm_config::{RelayLocation, XcmOriginToTransactDispatchOrigin};
parameter_types! {
pub const Version: RuntimeVersion = VERSION;
// This part is copied from Substrate's `bin/node/runtime/src/lib.rs`.
// This part is copied from Bizinikiwi's `bin/node/runtime/src/lib.rs`.
// The `RuntimeBlockLength` and `RuntimeBlockWeights` exist here because the
// `DeletionWeightLimit` and `DeletionQueueDepth` depend on those to parameterize
// the lazy contract deletion.
@@ -103,11 +103,11 @@ parameter_types! {
#[allow(unused_parens)]
type SingleBlockMigrations = ();
/// The default types are being injected by [`derive_impl`](`frame_support::derive_impl`) from
/// [`TeyrchainDefaultConfig`](`struct@frame_system::config_preludes::TeyrchainDefaultConfig`),
/// The default types are being injected by [`derive_impl`](`pezframe_support::derive_impl`) from
/// [`TeyrchainDefaultConfig`](`struct@pezframe_system::config_preludes::TeyrchainDefaultConfig`),
/// but overridden as needed.
#[derive_impl(frame_system::config_preludes::TeyrchainDefaultConfig)]
impl frame_system::Config for Runtime {
#[derive_impl(pezframe_system::config_preludes::TeyrchainDefaultConfig)]
impl pezframe_system::Config for Runtime {
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
/// The index type for storing how many extrinsics an account has signed.
@@ -121,18 +121,18 @@ impl frame_system::Config for Runtime {
/// Runtime version.
type Version = Version;
/// The data to be stored in an account.
type AccountData = pallet_balances::AccountData<Balance>;
type AccountData = pezpallet_balances::AccountData<Balance>;
/// The weight of database operations that the runtime can invoke.
type DbWeight = RocksDbWeight;
/// Block & extrinsics weights: base values and limits.
type BlockWeights = RuntimeBlockWeights;
/// The maximum length of a block (in bytes).
type BlockLength = RuntimeBlockLength;
/// This is used as an identifier of the chain. 42 is the generic substrate prefix.
/// This is used as an identifier of the chain. 42 is the generic bizinikiwi prefix.
type SS58Prefix = SS58Prefix;
/// The action to take on a Runtime Upgrade
type OnSetCode = cumulus_pallet_teyrchain_system::TeyrchainSetCode<Self>;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type MaxConsumers = pezframe_support::traits::ConstU32<16>;
type SingleBlockMigrations = SingleBlockMigrations;
}
@@ -141,7 +141,7 @@ impl cumulus_pallet_weight_reclaim::Config for Runtime {
type WeightInfo = ();
}
impl pallet_timestamp::Config for Runtime {
impl pezpallet_timestamp::Config for Runtime {
/// A timestamp: milliseconds since the unix epoch.
type Moment = u64;
type OnTimestampSet = Aura;
@@ -149,8 +149,8 @@ impl pallet_timestamp::Config for Runtime {
type WeightInfo = ();
}
impl pallet_authorship::Config for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
impl pezpallet_authorship::Config for Runtime {
type FindAuthor = pezpallet_session::FindAccountFromAuthorIndex<Self, Aura>;
type EventHandler = (CollatorSelection,);
}
@@ -158,7 +158,7 @@ parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
}
impl pallet_balances::Config for Runtime {
impl pezpallet_balances::Config for Runtime {
type MaxLocks = ConstU32<50>;
/// The type for recording an account's balance.
type Balance = Balance;
@@ -167,7 +167,7 @@ impl pallet_balances::Config for Runtime {
type DustRemoval = ();
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
type WeightInfo = pezpallet_balances::weights::BizinikiwiWeight<Runtime>;
type MaxReserves = ConstU32<50>;
type ReserveIdentifier = [u8; 8];
type RuntimeHoldReason = RuntimeHoldReason;
@@ -182,9 +182,9 @@ parameter_types! {
pub const TransactionByteFee: Balance = 10 * MICRO_UNIT;
}
impl pallet_transaction_payment::Config for Runtime {
impl pezpallet_transaction_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter<Balances, ()>;
type OnChargeTransaction = pezpallet_transaction_payment::FungibleAdapter<Balances, ()>;
type WeightToFee = WeightToFee;
type LengthToFee = ConstantMultiplier<Balance, TransactionByteFee>;
type FeeMultiplierUpdate = SlowAdjustingFeeUpdate<Self>;
@@ -192,7 +192,7 @@ impl pallet_transaction_payment::Config for Runtime {
type WeightInfo = ();
}
impl pallet_sudo::Config for Runtime {
impl pezpallet_sudo::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type WeightInfo = ();
@@ -210,7 +210,7 @@ impl cumulus_pallet_teyrchain_system::Config for Runtime {
type OnSystemEvent = ();
type SelfParaId = teyrchain_info::Pallet<Runtime>;
type OutboundXcmpMessageSource = XcmpQueue;
type DmpQueue = frame_support::traits::EnqueueWithOrigin<MessageQueue, RelayOrigin>;
type DmpQueue = pezframe_support::traits::EnqueueWithOrigin<MessageQueue, RelayOrigin>;
type ReservedDmpWeight = ReservedDmpWeight;
type XcmpMessageHandler = XcmpQueue;
type ReservedXcmpWeight = ReservedXcmpWeight;
@@ -225,11 +225,11 @@ parameter_types! {
pub MessageQueueServiceWeight: Weight = Perbill::from_percent(35) * RuntimeBlockWeights::get().max_block;
}
impl pallet_message_queue::Config for Runtime {
impl pezpallet_message_queue::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
#[cfg(feature = "runtime-benchmarks")]
type MessageProcessor = pallet_message_queue::mock_helpers::NoopMessageProcessor<
type MessageProcessor = pezpallet_message_queue::mock_helpers::NoopMessageProcessor<
cumulus_primitives_core::AggregateMessageOrigin,
>;
#[cfg(not(feature = "runtime-benchmarks"))]
@@ -242,8 +242,8 @@ impl pallet_message_queue::Config for Runtime {
// The XCMP queue pallet is only ever able to handle the `Sibling(ParaId)` origin:
type QueueChangeHandler = NarrowOriginToSibling<XcmpQueue>;
type QueuePausedQuery = NarrowOriginToSibling<XcmpQueue>;
type HeapSize = sp_core::ConstU32<{ 103 * 1024 }>;
type MaxStale = sp_core::ConstU32<8>;
type HeapSize = pezsp_core::ConstU32<{ 103 * 1024 }>;
type MaxStale = pezsp_core::ConstU32<8>;
type ServiceWeight = MessageQueueServiceWeight;
type IdleMaxServiceWeight = ();
}
@@ -272,7 +272,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
type VersionWrapper = ();
// Enqueue XCMP messages from siblings for later processing.
type XcmpQueue = TransformOrigin<MessageQueue, AggregateMessageOrigin, ParaId, ParaIdToSibling>;
type MaxInboundSuspended = sp_core::ConstU32<1_000>;
type MaxInboundSuspended = pezsp_core::ConstU32<1_000>;
type MaxActiveOutboundChannels = ConstU32<128>;
type MaxPageSize = ConstU32<{ 1 << 16 }>;
type ControllerOrigin = EnsureRoot<AccountId>;
@@ -286,16 +286,16 @@ parameter_types! {
pub const Offset: u32 = 0;
}
impl pallet_session::Config for Runtime {
impl pezpallet_session::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ValidatorId = <Self as frame_system::Config>::AccountId;
type ValidatorId = <Self as pezframe_system::Config>::AccountId;
// we don't have stash and controller, thus we don't need the convert as well.
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
type ShouldEndSession = pallet_session::PeriodicSessions<Period, Offset>;
type NextSessionRotation = pallet_session::PeriodicSessions<Period, Offset>;
type ValidatorIdOf = pezpallet_collator_selection::IdentityCollator;
type ShouldEndSession = pezpallet_session::PeriodicSessions<Period, Offset>;
type NextSessionRotation = pezpallet_session::PeriodicSessions<Period, Offset>;
type SessionManager = CollatorSelection;
// Essentially just Aura, but let's be pedantic.
type SessionHandler = <SessionKeys as sp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
type SessionHandler = <SessionKeys as pezsp_runtime::traits::OpaqueKeys>::KeyTypeIdProviders;
type Keys = SessionKeys;
type DisablingStrategy = ();
type WeightInfo = ();
@@ -304,7 +304,7 @@ impl pallet_session::Config for Runtime {
}
#[docify::export(aura_config)]
impl pallet_aura::Config for Runtime {
impl pezpallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<100_000>;
@@ -325,7 +325,7 @@ pub type CollatorSelectionUpdateOrigin = EitherOfDiverse<
EnsureXcm<IsVoiceOfBody<RelayLocation, StakingAdminBodyId>>,
>;
impl pallet_collator_selection::Config for Runtime {
impl pezpallet_collator_selection::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type UpdateOrigin = CollatorSelectionUpdateOrigin;
@@ -335,14 +335,14 @@ impl pallet_collator_selection::Config for Runtime {
type MaxInvulnerables = ConstU32<20>;
// should be a multiple of session or things will get inconsistent
type KickThreshold = Period;
type ValidatorId = <Self as frame_system::Config>::AccountId;
type ValidatorIdOf = pallet_collator_selection::IdentityCollator;
type ValidatorId = <Self as pezframe_system::Config>::AccountId;
type ValidatorIdOf = pezpallet_collator_selection::IdentityCollator;
type ValidatorRegistration = Session;
type WeightInfo = ();
}
/// Configure the pallet template in pallets/template.
impl pallet_teyrchain_template::Config for Runtime {
impl pezpallet_teyrchain_template::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_teyrchain_template::weights::SubstrateWeight<Runtime>;
type WeightInfo = pezpallet_teyrchain_template::weights::BizinikiwiWeight<Runtime>;
}
@@ -5,20 +5,20 @@ use crate::{
};
use pezkuwi_sdk::{
staging_xcm as xcm, staging_xcm_builder as xcm_builder, staging_xcm_executor as xcm_executor, *,
pezstaging_xcm as xcm, pezstaging_xcm_builder as xcm_builder, pezstaging_xcm_executor as xcm_executor, *,
};
use frame_support::{
use pezframe_support::{
parameter_types,
traits::{ConstU32, Contains, Everything, Nothing},
weights::Weight,
};
use frame_system::EnsureRoot;
use pallet_xcm::XcmPassthrough;
use pezframe_system::EnsureRoot;
use pezpallet_xcm::XcmPassthrough;
use pezkuwi_runtime_common::impls::ToAuthor;
use pezkuwi_sdk::{
pezkuwi_sdk_frame::traits::Disabled,
staging_xcm_builder::{DenyRecursively, DenyThenTry},
pezstaging_xcm_builder::{DenyRecursively, DenyThenTry},
};
use pezkuwi_teyrchain_primitives::primitives::Sibling;
use xcm::latest::prelude::*;
@@ -169,7 +169,7 @@ pub type XcmRouter = WithUniqueTopic<(
XcmpQueue,
)>;
impl pallet_xcm::Config for Runtime {
impl pezpallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
type XcmRouter = XcmRouter;
@@ -187,13 +187,13 @@ impl pallet_xcm::Config for Runtime {
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
// ^ Override for AdvertisedXcmVersion default
type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
type AdvertisedXcmVersion = pezpallet_xcm::CurrentXcmVersion;
type Currency = Balances;
type CurrencyMatcher = ();
type TrustedLockers = ();
type SovereignAccountOf = LocationToAccountId;
type MaxLockers = ConstU32<8>;
type WeightInfo = pallet_xcm::TestWeightInfo;
type WeightInfo = pezpallet_xcm::TestWeightInfo;
type AdminOrigin = EnsureRoot<AccountId>;
type MaxRemoteLockConsumers = ConstU32<0>;
type RemoteLockConsumerIdentifier = ();
@@ -5,13 +5,13 @@ use crate::{
use alloc::{vec, vec::Vec};
use pezkuwi_sdk::{staging_xcm as xcm, *};
use pezkuwi_sdk::{pezstaging_xcm as xcm, *};
use cumulus_primitives_core::ParaId;
use frame_support::build_struct_json_patch;
use pezframe_support::build_struct_json_patch;
use serde_json::Value;
use sp_genesis_builder::PresetId;
use sp_keyring::Sr25519Keyring;
use pezsp_genesis_builder::PresetId;
use pezsp_keyring::Sr25519Keyring;
use teyrchains_common::AuraId;
/// The default XCM version to set in genesis config.
@@ -92,8 +92,8 @@ fn development_config_genesis() -> Value {
/// Provides the JSON representation of predefined genesis config for given `id`.
pub fn get_preset(id: &PresetId) -> Option<vec::Vec<u8>> {
let patch = match id.as_ref() {
sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => local_testnet_genesis(),
sp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => local_testnet_genesis(),
pezsp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
_ => return None,
};
Some(
@@ -106,7 +106,7 @@ pub fn get_preset(id: &PresetId) -> Option<vec::Vec<u8>> {
/// List of supported presets.
pub fn preset_names() -> Vec<PresetId> {
vec![
PresetId::from(sp_genesis_builder::DEV_RUNTIME_PRESET),
PresetId::from(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET),
PresetId::from(pezsp_genesis_builder::DEV_RUNTIME_PRESET),
PresetId::from(pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET),
]
}
+55 -55
View File
@@ -17,25 +17,25 @@ extern crate alloc;
use alloc::vec::Vec;
use smallvec::smallvec;
use pezkuwi_sdk::{staging_teyrchain_info as teyrchain_info, *};
use pezkuwi_sdk::{pezstaging_teyrchain_info as teyrchain_info, *};
use sp_runtime::{
use pezsp_runtime::{
generic, impl_opaque_keys,
traits::{BlakeTwo256, IdentifyAccount, Verify},
MultiSignature,
};
#[cfg(feature = "std")]
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;
use pezsp_version::NativeVersion;
use pezsp_version::RuntimeVersion;
use frame_support::weights::{
use pezframe_support::weights::{
constants::WEIGHT_REF_TIME_PER_SECOND, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients,
WeightToFeePolynomial,
};
pub use genesis_config_presets::TEYRCHAIN_ID;
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
pub use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use pezsp_runtime::{MultiAddress, Perbill, Permill};
use weights::ExtrinsicBaseWeight;
@@ -53,7 +53,7 @@ pub type Balance = u128;
pub type Nonce = u32;
/// A hash of some data used by the chain.
pub type Hash = sp_core::H256;
pub type Hash = pezsp_core::H256;
/// An index to a block.
pub type BlockNumber = u32;
@@ -78,16 +78,16 @@ pub type BlockId = generic::BlockId<Block>;
pub type TxExtension = cumulus_pallet_weight_reclaim::StorageWeightReclaim<
Runtime,
(
frame_system::AuthorizeCall<Runtime>,
frame_system::CheckNonZeroSender<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckEra<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
frame_metadata_hash_extension::CheckMetadataHash<Runtime>,
pezframe_system::AuthorizeCall<Runtime>,
pezframe_system::CheckNonZeroSender<Runtime>,
pezframe_system::CheckSpecVersion<Runtime>,
pezframe_system::CheckTxVersion<Runtime>,
pezframe_system::CheckGenesis<Runtime>,
pezframe_system::CheckEra<Runtime>,
pezframe_system::CheckNonce<Runtime>,
pezframe_system::CheckWeight<Runtime>,
pezpallet_transaction_payment::ChargeTransactionPayment<Runtime>,
pezframe_metadata_hash_extension::CheckMetadataHash<Runtime>,
),
>;
@@ -96,10 +96,10 @@ pub type UncheckedExtrinsic =
generic::UncheckedExtrinsic<Address, RuntimeCall, Signature, TxExtension>;
/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
pub type Executive = pezframe_executive::Executive<
Runtime,
Block,
frame_system::ChainContext<Runtime>,
pezframe_system::ChainContext<Runtime>,
Runtime,
AllPalletsWithSystem,
>;
@@ -137,8 +137,8 @@ impl WeightToFeePolynomial for WeightToFee {
/// to even the core data structures.
pub mod opaque {
use super::*;
pub use pezkuwi_sdk::sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
use pezkuwi_sdk::sp_runtime::{
pub use pezkuwi_sdk::pezsp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
use pezkuwi_sdk::pezsp_runtime::{
generic,
traits::{BlakeTwo256, Hash as HashT},
};
@@ -159,7 +159,7 @@ impl_opaque_keys! {
}
}
#[sp_version::runtime_version]
#[pezsp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: alloc::borrow::Cow::Borrowed("teyrchain-template-runtime"),
impl_name: alloc::borrow::Cow::Borrowed("teyrchain-template-runtime"),
@@ -175,7 +175,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
mod block_times {
/// This determines the average expected block time that we are targeting. Blocks will be
/// produced at a minimum duration defined by `SLOT_DURATION`. `SLOT_DURATION` is picked up by
/// `pallet_timestamp` which is in turn picked up by `pallet_aura` to implement `fn
/// `pezpallet_timestamp` which is in turn picked up by `pezpallet_aura` to implement `fn
/// slot_duration()`.
///
/// Change this to adjust the block time.
@@ -245,7 +245,7 @@ pub fn native_version() -> NativeVersion {
}
// Create the runtime by composing the FRAME pallets that were previously configured.
#[frame_support::runtime]
#[pezframe_support::runtime]
mod runtime {
#[runtime::runtime]
#[runtime::derive(
@@ -262,52 +262,52 @@ mod runtime {
)]
pub struct Runtime;
#[runtime::pallet_index(0)]
pub type System = frame_system;
#[runtime::pallet_index(1)]
#[runtime::pezpallet_index(0)]
pub type System = pezframe_system;
#[runtime::pezpallet_index(1)]
pub type TeyrchainSystem = cumulus_pallet_teyrchain_system;
#[runtime::pallet_index(2)]
pub type Timestamp = pallet_timestamp;
#[runtime::pallet_index(3)]
#[runtime::pezpallet_index(2)]
pub type Timestamp = pezpallet_timestamp;
#[runtime::pezpallet_index(3)]
pub type TeyrchainInfo = teyrchain_info;
#[runtime::pallet_index(4)]
#[runtime::pezpallet_index(4)]
pub type WeightReclaim = cumulus_pallet_weight_reclaim;
// Monetary stuff.
#[runtime::pallet_index(10)]
pub type Balances = pallet_balances;
#[runtime::pallet_index(11)]
pub type TransactionPayment = pallet_transaction_payment;
#[runtime::pezpallet_index(10)]
pub type Balances = pezpallet_balances;
#[runtime::pezpallet_index(11)]
pub type TransactionPayment = pezpallet_transaction_payment;
// Governance
#[runtime::pallet_index(15)]
pub type Sudo = pallet_sudo;
#[runtime::pezpallet_index(15)]
pub type Sudo = pezpallet_sudo;
// Collator support. The order of these 4 are important and shall not change.
#[runtime::pallet_index(20)]
pub type Authorship = pallet_authorship;
#[runtime::pallet_index(21)]
pub type CollatorSelection = pallet_collator_selection;
#[runtime::pallet_index(22)]
pub type Session = pallet_session;
#[runtime::pallet_index(23)]
pub type Aura = pallet_aura;
#[runtime::pallet_index(24)]
#[runtime::pezpallet_index(20)]
pub type Authorship = pezpallet_authorship;
#[runtime::pezpallet_index(21)]
pub type CollatorSelection = pezpallet_collator_selection;
#[runtime::pezpallet_index(22)]
pub type Session = pezpallet_session;
#[runtime::pezpallet_index(23)]
pub type Aura = pezpallet_aura;
#[runtime::pezpallet_index(24)]
pub type AuraExt = cumulus_pallet_aura_ext;
// XCM helpers.
#[runtime::pallet_index(30)]
#[runtime::pezpallet_index(30)]
pub type XcmpQueue = cumulus_pallet_xcmp_queue;
#[runtime::pallet_index(31)]
pub type PezkuwiXcm = pallet_xcm;
#[runtime::pallet_index(32)]
#[runtime::pezpallet_index(31)]
pub type PezkuwiXcm = pezpallet_xcm;
#[runtime::pezpallet_index(32)]
pub type CumulusXcm = cumulus_pallet_xcm;
#[runtime::pallet_index(33)]
pub type MessageQueue = pallet_message_queue;
#[runtime::pezpallet_index(33)]
pub type MessageQueue = pezpallet_message_queue;
// Template
#[runtime::pallet_index(50)]
pub type TemplatePallet = pallet_teyrchain_template;
#[runtime::pezpallet_index(50)]
pub type TemplatePallet = pezpallet_teyrchain_template;
}
#[docify::export(register_validate_block)]
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -18,7 +18,7 @@
pub mod constants {
use pezkuwi_sdk::*;
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, Weight},
};
@@ -33,7 +33,7 @@ pub mod constants {
mod test_weights {
use pezkuwi_sdk::*;
use frame_support::weights::constants;
use pezframe_support::weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -18,7 +18,7 @@
pub mod constants {
use pezkuwi_sdk::*;
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, Weight},
};
@@ -33,7 +33,7 @@ pub mod constants {
mod test_weights {
use pezkuwi_sdk::*;
use frame_support::weights::constants;
use pezframe_support::weights::constants;
/// Checks that the weight exists and is sane.
// NOTE: If this test fails but you are sure that the generated values are fine,
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -18,7 +18,7 @@
pub mod constants {
use pezkuwi_sdk::*;
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, RuntimeDbWeight},
};
@@ -37,7 +37,7 @@ pub mod constants {
use pezkuwi_sdk::*;
use super::constants::ParityDbWeight as W;
use frame_support::weights::constants;
use pezframe_support::weights::constants;
/// Checks that all weights exist and have sane values.
// NOTE: If this test fails but you are sure that the generated values are fine,
@@ -1,4 +1,4 @@
// This file is part of Substrate.
// This file is part of Bizinikiwi.
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
@@ -18,13 +18,13 @@
pub mod constants {
use pezkuwi_sdk::*;
use frame_support::{
use pezframe_support::{
parameter_types,
weights::{constants, RuntimeDbWeight},
};
parameter_types! {
/// By default, Substrate uses `RocksDB`, so this will be the weight used throughout
/// By default, Bizinikiwi uses `RocksDB`, so this will be the weight used throughout
/// the runtime.
pub const RocksDbWeight: RuntimeDbWeight = RuntimeDbWeight {
read: 25_000 * constants::WEIGHT_REF_TIME_PER_NANOS,
@@ -37,7 +37,7 @@ pub mod constants {
use pezkuwi_sdk::*;
use super::constants::RocksDbWeight as W;
use frame_support::weights::constants;
use pezframe_support::weights::constants;
/// Checks that all weights exist and have sane values.
// NOTE: If this test fails but you are sure that the generated values are fine,
+4 -4
View File
@@ -1,18 +1,18 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Cumulus.
// This file is part of Pezcumulus.
// Cumulus is free software: you can redistribute it and/or modify
// Pezcumulus 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.
// Cumulus is distributed in the hope that it will be useful,
// Pezcumulus 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 Cumulus. If not, see <http://www.gnu.org/licenses/>.
// along with Pezcumulus. If not, see <http://www.gnu.org/licenses/>.
// The teyrchain-template crate helps with keeping the README.md in sync
// with code sections across the components under the template: node,