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 e4778b4576
commit 379cb741ed
9082 changed files with 997824 additions and 997542 deletions
+3 -3
View File
@@ -108,7 +108,7 @@ zombienet --provider native spawn zombienet-multi-node.toml
### Connect with the PezkuwiChain-JS Apps Front-End
- 🌐 You can interact with your local node using the
hosted version of the [PezkuwiChain/Substrate
hosted version of the [PezkuwiChain/Bizinikiwi
Portal](https://pezkuwichain.io/#/explorer?rpc=ws://localhost:9944).
- 🪐 A hosted version is also
@@ -144,6 +144,6 @@ Previously minimal template's development chains:
the Pezkuwi SDK documentation resources.
- 👥 Additionally, there are [GitHub issues](https://github.com/pezkuwichain/pezkuwi-sdk/issues) and
[Substrate StackExchange](https://pezkuwichain.app/community/).
[Bizinikiwi StackExchange](https://pezkuwichain.app/community/).
- 👥You can also reach out on the [Official PezkuwiChain 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
+2 -2
View File
@@ -1,6 +1,6 @@
[package]
name = "minimal-template-node"
description = "A minimal Substrate-based Substrate node, ready for hacking."
description = "A minimal Bizinikiwi-based Bizinikiwi node, ready for hacking."
version = "0.0.0"
license = "Unlicense"
authors.workspace = true
@@ -27,7 +27,7 @@ minimal-template-runtime = { workspace = true }
pezkuwi-sdk = { workspace = true, features = ["experimental", "node"] }
[build-dependencies]
pezkuwi-sdk = { workspace = true, features = ["substrate-build-script-utils"] }
pezkuwi-sdk = { workspace = true, features = ["bizinikiwi-build-script-utils"] }
[features]
default = ["std"]
+2 -2
View File
@@ -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
@@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
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();
+5 -5
View File
@@ -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
@@ -17,12 +17,12 @@
use minimal_template_runtime::WASM_BINARY;
use pezkuwi_sdk::{
sc_service::{ChainType, Properties},
pezsc_service::{ChainType, Properties},
*,
};
/// This is a specialization of the general Substrate ChainSpec type.
pub type ChainSpec = sc_service::GenericChainSpec;
/// This is a specialization of the general Bizinikiwi ChainSpec type.
pub type ChainSpec = pezsc_service::GenericChainSpec;
fn props() -> Properties {
let mut properties = Properties::new();
@@ -36,7 +36,7 @@ pub fn development_chain_spec() -> Result<ChainSpec, String> {
.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(props())
.build())
}
+12 -12
View File
@@ -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
@@ -49,14 +49,14 @@ pub struct Cli {
pub consensus: Consensus,
#[clap(flatten)]
pub run: sc_cli::RunCmd,
pub run: pezsc_cli::RunCmd,
}
#[derive(Debug, clap::Subcommand)]
pub enum Subcommand {
/// Key management cli utilities
#[command(subcommand)]
Key(sc_cli::KeySubcommand),
Key(pezsc_cli::KeySubcommand),
/// Build a chain specification.
/// DEPRECATED: `build-spec` command will be removed after 1/04/2026. Use `export-chain-spec`
@@ -64,29 +64,29 @@ 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),
/// Remove the whole chain.
PurgeChain(sc_cli::PurgeChainCmd),
PurgeChain(pezsc_cli::PurgeChainCmd),
/// Revert the chain to a previous state.
Revert(sc_cli::RevertCmd),
Revert(pezsc_cli::RevertCmd),
/// Db meta columns information.
ChainInfo(sc_cli::ChainInfoCmd),
ChainInfo(pezsc_cli::ChainInfoCmd),
}
+13 -13
View File
@@ -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
@@ -20,15 +20,15 @@ use crate::{
cli::{Cli, Subcommand},
service,
};
use pezkuwi_sdk::{sc_cli::SubstrateCli, sc_service::PartialComponents, *};
use pezkuwi_sdk::{pezsc_cli::BizinikiwiCli, pezsc_service::PartialComponents, *};
impl SubstrateCli for Cli {
impl BizinikiwiCli for Cli {
fn impl_name() -> String {
"Substrate Node".into()
"Bizinikiwi Node".into()
}
fn impl_version() -> String {
env!("SUBSTRATE_CLI_IMPL_VERSION").into()
env!("BIZINIKIWI_CLI_IMPL_VERSION").into()
}
fn description() -> String {
@@ -47,7 +47,7 @@ impl SubstrateCli for Cli {
2017
}
fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {
fn load_spec(&self, id: &str) -> Result<Box<dyn pezsc_service::ChainSpec>, String> {
Ok(match id {
"dev" => Box::new(chain_spec::development_chain_spec()?),
path =>
@@ -57,7 +57,7 @@ impl SubstrateCli for Cli {
}
/// Parse and run command line arguments
pub fn run() -> sc_cli::Result<()> {
pub fn run() -> pezsc_cli::Result<()> {
let cli = Cli::from_args();
match &cli.subcommand {
@@ -123,13 +123,13 @@ pub fn run() -> sc_cli::Result<()> {
let runner = cli.create_runner(&cli.run)?;
runner.run_node_until_exit(|config| async move {
match config.network.network_backend {
sc_network::config::NetworkBackendType::Libp2p =>
service::new_full::<sc_network::NetworkWorker<_, _>>(config, cli.consensus)
.map_err(sc_cli::Error::Service),
sc_network::config::NetworkBackendType::Litep2p => service::new_full::<
sc_network::Litep2pNetworkBackend,
pezsc_network::config::NetworkBackendType::Libp2p =>
service::new_full::<pezsc_network::NetworkWorker<_, _>>(config, cli.consensus)
.map_err(pezsc_cli::Error::Service),
pezsc_network::config::NetworkBackendType::Litep2p => service::new_full::<
pezsc_network::Litep2pNetworkBackend,
>(config, cli.consensus)
.map_err(sc_cli::Error::Service),
.map_err(pezsc_cli::Error::Service),
}
})
},
+3 -3
View File
@@ -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
@@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//! Substrate Node Template CLI library.
//! Bizinikiwi Node Template CLI library.
#![warn(missing_docs)]
mod chain_spec;
@@ -24,6 +24,6 @@ mod command;
mod rpc;
mod service;
fn main() -> pezkuwi_sdk::sc_cli::Result<()> {
fn main() -> pezkuwi_sdk::pezsc_cli::Result<()> {
command::run()
}
+9 -9
View File
@@ -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
@@ -16,8 +16,8 @@
// limitations under the License.
//! 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)]
@@ -25,8 +25,8 @@
use jsonrpsee::RpcModule;
use minimal_template_runtime::interface::{AccountId, Nonce, OpaqueBlock};
use pezkuwi_sdk::{
sc_transaction_pool_api::TransactionPool,
sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata},
pezsc_transaction_pool_api::TransactionPool,
pezsp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata},
*,
};
use std::sync::Arc;
@@ -48,15 +48,15 @@ where
C: Send
+ Sync
+ 'static
+ sp_api::ProvideRuntimeApi<OpaqueBlock>
+ pezsp_api::ProvideRuntimeApi<OpaqueBlock>
+ HeaderBackend<OpaqueBlock>
+ HeaderMetadata<OpaqueBlock, Error = BlockChainError>
+ 'static,
C::Api: sp_block_builder::BlockBuilder<OpaqueBlock>,
C::Api: substrate_frame_rpc_system::AccountNonceApi<OpaqueBlock, AccountId, Nonce>,
C::Api: pezsp_block_builder::BlockBuilder<OpaqueBlock>,
C::Api: bizinikiwi_frame_rpc_system::AccountNonceApi<OpaqueBlock, AccountId, Nonce>,
P: TransactionPool + 'static,
{
use pezkuwi_sdk::substrate_frame_rpc_system::{System, SystemApiServer};
use pezkuwi_sdk::bizinikiwi_frame_rpc_system::{System, SystemApiServer};
let mut module = RpcModule::new(());
let FullDeps { client, pool } = deps;
+35 -35
View File
@@ -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
@@ -19,32 +19,32 @@ use crate::cli::Consensus;
use futures::FutureExt;
use minimal_template_runtime::{interface::OpaqueBlock as Block, RuntimeApi};
use pezkuwi_sdk::{
sc_client_api::backend::Backend,
sc_executor::WasmExecutor,
sc_service::{error::Error as ServiceError, Configuration, TaskManager},
sc_telemetry::{Telemetry, TelemetryWorker},
sc_transaction_pool_api::OffchainTransactionPoolFactory,
sp_runtime::traits::Block as BlockT,
pezsc_client_api::backend::Backend,
pezsc_executor::WasmExecutor,
pezsc_service::{error::Error as ServiceError, Configuration, TaskManager},
pezsc_telemetry::{Telemetry, TelemetryWorker},
pezsc_transaction_pool_api::OffchainTransactionPoolFactory,
pezsp_runtime::traits::Block as BlockT,
*,
};
use std::sync::Arc;
type HostFunctions = sp_io::SubstrateHostFunctions;
type HostFunctions = pezsp_io::BizinikiwiHostFunctions;
#[docify::export]
pub(crate) type FullClient =
sc_service::TFullClient<Block, RuntimeApi, WasmExecutor<HostFunctions>>;
pezsc_service::TFullClient<Block, RuntimeApi, WasmExecutor<HostFunctions>>;
type FullBackend = sc_service::TFullBackend<Block>;
type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;
type FullBackend = pezsc_service::TFullBackend<Block>;
type FullSelectChain = pezsc_consensus::LongestChain<FullBackend, Block>;
/// Assembly of PartialComponents (enough to run chain ops subcommands)
pub type Service = sc_service::PartialComponents<
pub type Service = pezsc_service::PartialComponents<
FullClient,
FullBackend,
FullSelectChain,
sc_consensus::DefaultImportQueue<Block>,
sc_transaction_pool::TransactionPoolHandle<Block, FullClient>,
pezsc_consensus::DefaultImportQueue<Block>,
pezsc_transaction_pool::TransactionPoolHandle<Block, FullClient>,
Option<Telemetry>,
>;
@@ -53,17 +53,17 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
.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))
})
.transpose()?;
let executor = sc_service::new_wasm_executor(&config.executor);
let executor = pezsc_service::new_wasm_executor(&config.executor);
let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, _>(
pezsc_service::new_full_parts::<Block, RuntimeApi, _>(
config,
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
executor,
@@ -75,10 +75,10 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
telemetry
});
let select_chain = sc_consensus::LongestChain::new(backend.clone());
let select_chain = pezsc_consensus::LongestChain::new(backend.clone());
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(),
@@ -88,13 +88,13 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
.build(),
);
let import_queue = sc_consensus_manual_seal::import_queue(
let import_queue = pezsc_consensus_manual_seal::import_queue(
Box::new(client.clone()),
&task_manager.spawn_essential_handle(),
config.prometheus_registry(),
);
Ok(sc_service::PartialComponents {
Ok(pezsc_service::PartialComponents {
client,
backend,
task_manager,
@@ -107,11 +107,11 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
}
/// Builds a new service for a full client.
pub fn new_full<Network: sc_network::NetworkBackend<Block, <Block as BlockT>::Hash>>(
pub fn new_full<Network: pezsc_network::NetworkBackend<Block, <Block as BlockT>::Hash>>(
config: Configuration,
consensus: Consensus,
) -> Result<TaskManager, ServiceError> {
let sc_service::PartialComponents {
let pezsc_service::PartialComponents {
client,
backend,
mut task_manager,
@@ -122,7 +122,7 @@ pub fn new_full<Network: sc_network::NetworkBackend<Block, <Block as BlockT>::Ha
other: mut telemetry,
} = new_partial(&config)?;
let net_config = sc_network::config::FullNetworkConfiguration::<
let net_config = pezsc_network::config::FullNetworkConfiguration::<
Block,
<Block as BlockT>::Hash,
Network,
@@ -135,7 +135,7 @@ pub fn new_full<Network: sc_network::NetworkBackend<Block, <Block as BlockT>::Ha
);
let (network, system_rpc_tx, tx_handler_controller, sync_service) =
sc_service::build_network(sc_service::BuildNetworkParams {
pezsc_service::build_network(pezsc_service::BuildNetworkParams {
config: &config,
net_config,
client: client.clone(),
@@ -150,7 +150,7 @@ pub fn new_full<Network: sc_network::NetworkBackend<Block, <Block as BlockT>::Ha
if config.offchain_worker.enabled {
let offchain_workers =
sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions {
pezsc_offchain::OffchainWorkers::new(pezsc_offchain::OffchainWorkerOptions {
runtime_api_provider: client.clone(),
is_validator: config.role.is_authority(),
keystore: Some(keystore_container.keystore()),
@@ -181,7 +181,7 @@ pub fn new_full<Network: sc_network::NetworkBackend<Block, <Block as BlockT>::Ha
let prometheus_registry = config.prometheus_registry().cloned();
let _rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams {
let _rpc_handlers = pezsc_service::spawn_tasks(pezsc_service::SpawnTasksParams {
network,
client: client.clone(),
keystore: keystore_container.keystore(),
@@ -197,7 +197,7 @@ pub fn new_full<Network: sc_network::NetworkBackend<Block, <Block as BlockT>::Ha
tracing_execute_block: None,
})?;
let proposer = sc_basic_authorship::ProposerFactory::new(
let proposer = pezsc_basic_authorship::ProposerFactory::new(
task_manager.spawn_handle(),
client.clone(),
transaction_pool.clone(),
@@ -207,7 +207,7 @@ pub fn new_full<Network: sc_network::NetworkBackend<Block, <Block as BlockT>::Ha
match consensus {
Consensus::InstantSeal => {
let params = sc_consensus_manual_seal::InstantSealParams {
let params = pezsc_consensus_manual_seal::InstantSealParams {
block_import: client.clone(),
env: proposer,
client,
@@ -215,11 +215,11 @@ pub fn new_full<Network: sc_network::NetworkBackend<Block, <Block as BlockT>::Ha
select_chain,
consensus_data_provider: None,
create_inherent_data_providers: move |_, ()| async move {
Ok(sp_timestamp::InherentDataProvider::from_system_time())
Ok(pezsp_timestamp::InherentDataProvider::from_system_time())
},
};
let authorship_future = sc_consensus_manual_seal::run_instant_seal(params);
let authorship_future = pezsc_consensus_manual_seal::run_instant_seal(params);
task_manager.spawn_essential_handle().spawn_blocking(
"instant-seal",
@@ -232,7 +232,7 @@ pub fn new_full<Network: sc_network::NetworkBackend<Block, <Block as BlockT>::Ha
task_manager.spawn_handle().spawn("block_authoring", None, async move {
loop {
futures_timer::Delay::new(std::time::Duration::from_millis(block_time)).await;
sink.try_send(sc_consensus_manual_seal::EngineCommand::SealNewBlock {
sink.try_send(pezsc_consensus_manual_seal::EngineCommand::SealNewBlock {
create_empty: true,
finalize: true,
parent_hash: None,
@@ -242,7 +242,7 @@ pub fn new_full<Network: sc_network::NetworkBackend<Block, <Block as BlockT>::Ha
}
});
let params = sc_consensus_manual_seal::ManualSealParams {
let params = pezsc_consensus_manual_seal::ManualSealParams {
block_import: client.clone(),
env: proposer,
client,
@@ -251,10 +251,10 @@ pub fn new_full<Network: sc_network::NetworkBackend<Block, <Block as BlockT>::Ha
commands_stream: Box::pin(commands_stream),
consensus_data_provider: None,
create_inherent_data_providers: move |_, ()| async move {
Ok(sp_timestamp::InherentDataProvider::from_system_time())
Ok(pezsp_timestamp::InherentDataProvider::from_system_time())
},
};
let authorship_future = sc_consensus_manual_seal::run_manual_seal(params);
let authorship_future = pezsc_consensus_manual_seal::run_manual_seal(params);
task_manager.spawn_essential_handle().spawn_blocking(
"manual-seal",
@@ -1,5 +1,5 @@
[package]
name = "pallet-minimal-template"
name = "pezpallet-minimal-template"
description = "A minimal pallet built with FRAME, part of Pezkuwi Sdk."
version = "0.0.0"
license = "Unlicense"
@@ -16,7 +16,7 @@ pub mod pallet {
use super::*;
#[pallet::config]
pub trait Config: pezkuwi_sdk::frame_system::Config {}
pub trait Config: pezkuwi_sdk::pezframe_system::Config {}
#[pallet::pallet]
pub struct Pallet<T>(_);
+10 -10
View File
@@ -1,6 +1,6 @@
[package]
name = "minimal-template-runtime"
description = "A solochain runtime template built with Substrate, part of Pezkuwi Sdk."
description = "A solochain runtime template built with Bizinikiwi, part of Pezkuwi Sdk."
version = "0.0.0"
license = "Unlicense"
authors.workspace = true
@@ -15,11 +15,11 @@ workspace = true
[dependencies]
codec = { workspace = true }
pezkuwi-sdk = { workspace = true, features = [
"pallet-balances",
"pallet-sudo",
"pallet-timestamp",
"pallet-transaction-payment",
"pallet-transaction-payment-rpc-runtime-api",
"pezpallet-balances",
"pezpallet-sudo",
"pezpallet-timestamp",
"pezpallet-transaction-payment",
"pezpallet-transaction-payment-rpc-runtime-api",
"runtime",
] }
scale-info = { workspace = true }
@@ -28,23 +28,23 @@ serde_json = { workspace = true, default-features = false, features = [
] }
# local pallet templates
pallet-minimal-template = { workspace = true }
pezpallet-minimal-template = { workspace = true }
[build-dependencies]
pezkuwi-sdk = { optional = true, workspace = true, features = [
"substrate-wasm-builder",
"bizinikiwi-wasm-builder",
] }
[features]
default = ["std"]
std = [
"codec/std",
"pallet-minimal-template/std",
"pezpallet-minimal-template/std",
"pezkuwi-sdk/std",
"scale-info/std",
"serde_json/std",
]
runtime-benchmarks = [
"pallet-minimal-template/runtime-benchmarks",
"pezpallet-minimal-template/runtime-benchmarks",
"pezkuwi-sdk/runtime-benchmarks",
]
+2 -2
View File
@@ -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,6 +18,6 @@
fn main() {
#[cfg(feature = "std")]
{
pezkuwi_sdk::substrate_wasm_builder::WasmBuilder::build_using_defaults();
pezkuwi_sdk::bizinikiwi_wasm_builder::WasmBuilder::build_using_defaults();
}
}
+55 -55
View File
@@ -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
@@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//! A minimal runtime that includes the template [`pallet`](`pallet_minimal_template`).
//! A minimal runtime that includes the template [`pallet`](`pezpallet_minimal_template`).
#![cfg_attr(not(feature = "std"), no_std)]
@@ -26,11 +26,11 @@ include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));
extern crate alloc;
use alloc::vec::Vec;
use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
use pezpallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo};
use pezkuwi_sdk::{
pezkuwi_sdk_frame::{
self as frame,
deps::sp_genesis_builder,
deps::pezsp_genesis_builder,
runtime::{apis, prelude::*},
},
*,
@@ -41,7 +41,7 @@ pub mod genesis_config_presets {
use super::*;
use crate::{
interface::{Balance, MinimumBalance},
sp_keyring::Sr25519Keyring,
pezsp_keyring::Sr25519Keyring,
BalancesConfig, RuntimeGenesisConfig, SudoConfig,
};
@@ -51,7 +51,7 @@ pub mod genesis_config_presets {
/// Returns a development genesis config preset.
pub fn development_config_genesis() -> Value {
let endowment = <MinimumBalance as Get<Balance>>::get().max(1) * 1000;
frame_support::build_struct_json_patch!(RuntimeGenesisConfig {
pezframe_support::build_struct_json_patch!(RuntimeGenesisConfig {
balances: BalancesConfig {
balances: Sr25519Keyring::iter()
.map(|a| (a.to_account_id(), endowment))
@@ -64,7 +64,7 @@ pub mod genesis_config_presets {
/// Get the set of the available genesis config presets.
pub fn get_preset(id: &PresetId) -> Option<Vec<u8>> {
let patch = match id.as_ref() {
sp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
pezsp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
_ => return None,
};
Some(
@@ -76,7 +76,7 @@ pub mod genesis_config_presets {
/// List of supported presets.
pub fn preset_names() -> Vec<PresetId> {
vec![PresetId::from(sp_genesis_builder::DEV_RUNTIME_PRESET)]
vec![PresetId::from(pezsp_genesis_builder::DEV_RUNTIME_PRESET)]
}
}
@@ -102,28 +102,28 @@ pub fn native_version() -> NativeVersion {
/// The transaction extensions that are added to the runtime.
type TxExtension = (
// Authorize calls that validate themselves.
frame_system::AuthorizeCall<Runtime>,
pezframe_system::AuthorizeCall<Runtime>,
// Checks that the sender is not the zero address.
frame_system::CheckNonZeroSender<Runtime>,
pezframe_system::CheckNonZeroSender<Runtime>,
// Checks that the runtime version is correct.
frame_system::CheckSpecVersion<Runtime>,
pezframe_system::CheckSpecVersion<Runtime>,
// Checks that the transaction version is correct.
frame_system::CheckTxVersion<Runtime>,
pezframe_system::CheckTxVersion<Runtime>,
// Checks that the genesis hash is correct.
frame_system::CheckGenesis<Runtime>,
pezframe_system::CheckGenesis<Runtime>,
// Checks that the era is valid.
frame_system::CheckEra<Runtime>,
pezframe_system::CheckEra<Runtime>,
// Checks that the nonce is valid.
frame_system::CheckNonce<Runtime>,
pezframe_system::CheckNonce<Runtime>,
// Checks that the weight is valid.
frame_system::CheckWeight<Runtime>,
pezframe_system::CheckWeight<Runtime>,
// Ensures that the sender has enough funds to pay for the transaction
// and deducts the fee from the sender's account.
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
pezpallet_transaction_payment::ChargeTransactionPayment<Runtime>,
// Reclaim the unused weight from the block using post dispatch information.
// It must be last in the pipeline in order to catch the refund in previous transaction
// extensions
frame_system::WeightReclaim<Runtime>,
pezframe_system::WeightReclaim<Runtime>,
);
// Composes the runtime by adding all the used pallets and deriving necessary types.
@@ -146,28 +146,28 @@ mod runtime {
pub struct Runtime;
/// Mandatory system pallet that should always be included in a FRAME runtime.
#[runtime::pallet_index(0)]
pub type System = frame_system::Pallet<Runtime>;
#[runtime::pezpallet_index(0)]
pub type System = pezframe_system::Pallet<Runtime>;
/// Provides a way for consensus systems to set and check the onchain time.
#[runtime::pallet_index(1)]
pub type Timestamp = pallet_timestamp::Pallet<Runtime>;
#[runtime::pezpallet_index(1)]
pub type Timestamp = pezpallet_timestamp::Pallet<Runtime>;
/// Provides the ability to keep track of balances.
#[runtime::pallet_index(2)]
pub type Balances = pallet_balances::Pallet<Runtime>;
#[runtime::pezpallet_index(2)]
pub type Balances = pezpallet_balances::Pallet<Runtime>;
/// Provides a way to execute privileged functions.
#[runtime::pallet_index(3)]
pub type Sudo = pallet_sudo::Pallet<Runtime>;
#[runtime::pezpallet_index(3)]
pub type Sudo = pezpallet_sudo::Pallet<Runtime>;
/// Provides the ability to charge for extrinsic execution.
#[runtime::pallet_index(4)]
pub type TransactionPayment = pallet_transaction_payment::Pallet<Runtime>;
#[runtime::pezpallet_index(4)]
pub type TransactionPayment = pezpallet_transaction_payment::Pallet<Runtime>;
/// A minimal pallet template.
#[runtime::pallet_index(5)]
pub type Template = pallet_minimal_template::Pallet<Runtime>;
#[runtime::pezpallet_index(5)]
pub type Template = pezpallet_minimal_template::Pallet<Runtime>;
}
parameter_types! {
@@ -175,46 +175,46 @@ parameter_types! {
}
/// Implements the types required for the system pallet.
#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig)]
impl frame_system::Config for Runtime {
#[derive_impl(pezframe_system::config_preludes::SolochainDefaultConfig)]
impl pezframe_system::Config for Runtime {
type Block = Block;
type Version = Version;
// Use the account data from the balances pallet
type AccountData = pallet_balances::AccountData<<Runtime as pallet_balances::Config>::Balance>;
type AccountData = pezpallet_balances::AccountData<<Runtime as pezpallet_balances::Config>::Balance>;
}
// Implements the types required for the balances pallet.
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
impl pallet_balances::Config for Runtime {
#[derive_impl(pezpallet_balances::config_preludes::TestDefaultConfig)]
impl pezpallet_balances::Config for Runtime {
type AccountStore = System;
}
// Implements the types required for the sudo pallet.
#[derive_impl(pallet_sudo::config_preludes::TestDefaultConfig)]
impl pallet_sudo::Config for Runtime {}
#[derive_impl(pezpallet_sudo::config_preludes::TestDefaultConfig)]
impl pezpallet_sudo::Config for Runtime {}
// Implements the types required for the sudo pallet.
#[derive_impl(pallet_timestamp::config_preludes::TestDefaultConfig)]
impl pallet_timestamp::Config for Runtime {}
#[derive_impl(pezpallet_timestamp::config_preludes::TestDefaultConfig)]
impl pezpallet_timestamp::Config for Runtime {}
// Implements the types required for the transaction payment pallet.
#[derive_impl(pallet_transaction_payment::config_preludes::TestDefaultConfig)]
impl pallet_transaction_payment::Config for Runtime {
type OnChargeTransaction = pallet_transaction_payment::FungibleAdapter<Balances, ()>;
#[derive_impl(pezpallet_transaction_payment::config_preludes::TestDefaultConfig)]
impl pezpallet_transaction_payment::Config for Runtime {
type OnChargeTransaction = pezpallet_transaction_payment::FungibleAdapter<Balances, ()>;
// Setting fee as independent of the weight of the extrinsic for demo purposes
type WeightToFee = NoFee<<Self as pallet_balances::Config>::Balance>;
type WeightToFee = NoFee<<Self as pezpallet_balances::Config>::Balance>;
// Setting fee as fixed for any length of the call data for demo purposes
type LengthToFee = FixedFee<1, <Self as pallet_balances::Config>::Balance>;
type LengthToFee = FixedFee<1, <Self as pezpallet_balances::Config>::Balance>;
}
// Implements the types required for the template pallet.
impl pallet_minimal_template::Config for Runtime {}
impl pezpallet_minimal_template::Config for Runtime {}
type Block = frame::runtime::types_common::BlockOf<Runtime, TxExtension>;
type Header = HeaderFor<Runtime>;
type RuntimeExecutive =
Executive<Runtime, Block, frame_system::ChainContext<Runtime>, Runtime, AllPalletsWithSystem>;
Executive<Runtime, Block, pezframe_system::ChainContext<Runtime>, Runtime, AllPalletsWithSystem>;
impl_runtime_apis! {
impl apis::Core<Block> for Runtime {
@@ -269,7 +269,7 @@ impl_runtime_apis! {
fn validate_transaction(
source: TransactionSource,
tx: ExtrinsicFor<Runtime>,
block_hash: <Runtime as frame_system::Config>::Hash,
block_hash: <Runtime as pezframe_system::Config>::Hash,
) -> TransactionValidity {
RuntimeExecutive::validate_transaction(source, tx, block_hash)
}
@@ -299,7 +299,7 @@ impl_runtime_apis! {
}
}
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<
impl pezpallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<
Block,
interface::Balance,
> for Runtime {
@@ -318,7 +318,7 @@ impl_runtime_apis! {
}
impl apis::GenesisBuilder<Block> for Runtime {
fn build_state(config: Vec<u8>) -> sp_genesis_builder::Result {
fn build_state(config: Vec<u8>) -> pezsp_genesis_builder::Result {
build_state::<RuntimeGenesisConfig>(config)
}
@@ -336,16 +336,16 @@ impl_runtime_apis! {
///
/// Other types should preferably be private.
// TODO: this should be standardized in some way, see:
// https://github.com/paritytech/substrate/issues/10579#issuecomment-1600537558
// https://github.com/pezkuwichain/kurdistan-sdk/issues/3
pub mod interface {
use super::Runtime;
use pezkuwi_sdk::{pezkuwi_sdk_frame as frame, *};
pub type Block = super::Block;
pub use frame::runtime::types_common::OpaqueBlock;
pub type AccountId = <Runtime as frame_system::Config>::AccountId;
pub type Nonce = <Runtime as frame_system::Config>::Nonce;
pub type Hash = <Runtime as frame_system::Config>::Hash;
pub type Balance = <Runtime as pallet_balances::Config>::Balance;
pub type MinimumBalance = <Runtime as pallet_balances::Config>::ExistentialDeposit;
pub type AccountId = <Runtime as pezframe_system::Config>::AccountId;
pub type Nonce = <Runtime as pezframe_system::Config>::Nonce;
pub type Hash = <Runtime as pezframe_system::Config>::Hash;
pub type Balance = <Runtime as pezpallet_balances::Config>::Balance;
pub type MinimumBalance = <Runtime as pezpallet_balances::Config>::ExistentialDeposit;
}
+23 -23
View File
@@ -1,18 +1,18 @@
# Substrate Node Template
# Bizinikiwi Node Template
A fresh [Substrate](https://substrate.pezkuwichain.app/) node, ready for hacking :rocket:
A fresh [Bizinikiwi](https://bizinikiwi.pezkuwichain.app/) node, ready for hacking :rocket:
A standalone version of this template is available for each release of PezkuwiChain
in the [Substrate Developer Hub Teyrchain
Template](https://github.com/substrate-developer-hub/substrate-node-template/)
in the [Bizinikiwi Developer Hub Teyrchain
Template](https://github.com/bizinikiwi-developer-hub/bizinikiwi-node-template/)
repository. The teyrchain template is generated directly at each PezkuwiChain
release branch from the [Solochain Template in
Substrate](https://github.com/pezkuwichain/pezkuwi-sdk/tree/master/templates/solochain)
Bizinikiwi](https://github.com/pezkuwichain/pezkuwi-sdk/tree/master/templates/solochain)
upstream
It is usually best to use the stand-alone version to start a new project. All
bugs, suggestions, and feature requests should be made upstream in the
[Substrate](https://github.com/pezkuwichain/pezkuwi-sdk/tree/master/substrate)
[Bizinikiwi](https://github.com/pezkuwichain/pezkuwi-sdk/tree/master/bizinikiwi)
repository.
## Getting Started
@@ -108,7 +108,7 @@ db keystore network
### Connect with PezkuwiChain-JS Apps Front-End
After you start the node template locally, you can interact with it using the
hosted version of the [PezkuwiChain/Substrate
hosted version of the [PezkuwiChain/Bizinikiwi
Portal](https://pezkuwichain.io/#/explorer?rpc=ws://localhost:9944)
front-end by connecting to the local node endpoint. A hosted version is also
available on [IPFS](https://dotapps.io/). You can
@@ -122,32 +122,32 @@ network](https://docs.pezkuwichain.io/tutorials/build-a-blockchain/simulate-netw
## Template Structure
A Substrate project such as this consists of a number of components that are
A Bizinikiwi project such as this consists of a number of components that are
spread across a few directories.
### Node
A blockchain node is an application that allows users to participate in a
blockchain network. Substrate-based blockchain nodes expose a number of
blockchain network. Bizinikiwi-based blockchain nodes expose a number of
capabilities:
- Networking: Substrate nodes use the [`libp2p`](https://libp2p.io/) networking
- Networking: Bizinikiwi nodes use the [`libp2p`](https://libp2p.io/) networking
stack to allow the nodes in the network to communicate with one another.
- Consensus: Blockchains must have a way to come to
[consensus](https://docs.pezkuwichain.io/fundamentals/consensus/) on the state of
the network. Substrate makes it possible to supply custom consensus engines
the network. Bizinikiwi makes it possible to supply custom consensus engines
and also ships with several consensus mechanisms that have been built on top
of [Web3 Foundation
research](https://research.web3.foundation/PezkuwiChain/protocols/NPoS).
- RPC Server: A remote procedure call (RPC) server is used to interact with
Substrate nodes.
Bizinikiwi nodes.
There are several files in the `node` directory. Take special note of the
following:
- [`chain_spec.rs`](./node/src/chain_spec.rs): A [chain
specification](https://docs.pezkuwichain.io/build/chain-spec/) is a source code
file that defines a Substrate chain's initial (genesis) state. Chain
file that defines a Bizinikiwi chain's initial (genesis) state. Chain
specifications are useful for development and testing, and critical when
architecting the launch of a production chain. Take note of the
`development_config` and `testnet_genesis` functions. These functions are
@@ -167,16 +167,16 @@ following:
### Runtime
In Substrate, the terms "runtime" and "state transition function" are analogous.
In Bizinikiwi, the terms "runtime" and "state transition function" are analogous.
Both terms refer to the core logic of the blockchain that is responsible for
validating blocks and executing the state changes they define. The Substrate
validating blocks and executing the state changes they define. The Bizinikiwi
project in this repository uses
[FRAME](https://docs.pezkuwichain.io/learn/runtime-development/#frame) to construct
a blockchain runtime. FRAME allows runtime developers to declare domain-specific
logic in modules called "pallets". At the heart of FRAME is a helpful [macro
language](https://docs.pezkuwichain.io/reference/frame-macros/) that makes it easy
to create pallets and flexibly compose them to create blockchains that can
address [a variety of needs](https://substrate.pezkuwichain.app/ecosystem/projects/).
address [a variety of needs](https://bizinikiwi.pezkuwichain.app/ecosystem/projects/).
Review the [FRAME runtime implementation](./runtime/src/lib.rs) included in this
template and note the following:
@@ -192,8 +192,8 @@ template and note the following:
### Pallets
The runtime in this project is constructed using many FRAME pallets that ship
with [the Substrate
repository](https://github.com/pezkuwichain/pezkuwi-sdk/tree/master/substrate/frame) and a
with [the Bizinikiwi
repository](https://github.com/pezkuwichain/pezkuwi-sdk/tree/master/bizinikiwi/frame) and a
template pallet that is [defined in the
`pallets`](./pallets/template/src/lib.rs) directory.
@@ -201,11 +201,11 @@ A FRAME pallet is comprised of a number of blockchain primitives, including:
- Storage: FRAME defines a rich set of powerful [storage
abstractions](https://docs.pezkuwichain.io/build/runtime-storage/) that makes it
easy to use Substrate's efficient key-value database to manage the evolving
easy to use Bizinikiwi's efficient key-value database to manage the evolving
state of a blockchain.
- Dispatchables: FRAME pallets define special types of functions that can be
invoked (dispatched) from outside of the runtime in order to update its state.
- Events: Substrate uses
- Events: Bizinikiwi uses
[events](https://docs.pezkuwichain.io/build/events-and-errors/) to notify users
of significant state changes.
- Errors: When a dispatchable fails, it returns an error.
@@ -227,6 +227,6 @@ the correct dependencies, activate direnv `direnv allow`.
### Docker
Please follow the [Substrate Docker instructions
here](https://github.com/pezkuwichain/pezkuwi-sdk/blob/master/substrate/docker/README.md) to
build the Docker container with the Substrate Node Template binary.
Please follow the [Bizinikiwi Docker instructions
here](https://github.com/pezkuwichain/pezkuwi-sdk/blob/master/bizinikiwi/docker/README.md) to
build the Docker container with the Bizinikiwi Node Template binary.
+20 -20
View File
@@ -1,17 +1,17 @@
# Installation
This guide is for reference only, please check the latest information on getting started with Substrate [here](https://docs.pezkuwichain.io/main-docs/install/).
This guide is for reference only, please check the latest information on getting started with Bizinikiwi [here](https://docs.pezkuwichain.io/main-docs/install/).
This page will guide you through the **2 steps** needed to prepare a computer for **Substrate** development. Since
Substrate is built with [the Rust programming language](https://www.rust-lang.org/), the first thing you will need to do
This page will guide you through the **2 steps** needed to prepare a computer for **Bizinikiwi** development. Since
Bizinikiwi is built with [the Rust programming language](https://www.rust-lang.org/), the first thing you will need to do
is prepare the computer for Rust development - these steps will vary based on the computer's operating system. Once Rust
is configured, you will use its toolchains to interact with Rust projects; the commands for Rust's toolchains will be
the same for all supported, Unix-based operating systems.
## Build dependencies
Substrate development is easiest on Unix-based operating systems like macOS or Linux. The examples in the [Substrate
Docs](https://github.com/pezkuwichain/docs.pezkuwichain.io) use Unix-style terminals to demonstrate how to interact with Substrate from the command
Bizinikiwi development is easiest on Unix-based operating systems like macOS or Linux. The examples in the [Bizinikiwi
Docs](https://github.com/pezkuwichain/docs.pezkuwichain.io) use Unix-style terminals to demonstrate how to interact with Bizinikiwi from the command
line.
### Ubuntu/Debian
@@ -68,7 +68,7 @@ brew install openssl
### Windows
**_PLEASE NOTE:_** Native Windows development of Substrate is _not_ very well supported! It is _highly_
**_PLEASE NOTE:_** Native Windows development of Bizinikiwi is _not_ very well supported! It is _highly_
recommended to use [Windows Subsystem Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10)
(WSL) and follow the instructions for [Ubuntu/Debian](#ubuntudebian).
Please refer to the separate
@@ -97,12 +97,12 @@ rustup target add wasm32-unknown-unknown --toolchain nightly
## Test your set-up
Now the best way to ensure that you have successfully prepared a computer for Substrate development is to follow the
steps in [our first Substrate tutorial](https://docs.pezkuwichain.io/tutorials/v3/create-your-first-substrate-chain/).
Now the best way to ensure that you have successfully prepared a computer for Bizinikiwi development is to follow the
steps in [our first Bizinikiwi tutorial](https://docs.pezkuwichain.io/tutorials/v3/create-your-first-bizinikiwi-chain/).
## Troubleshooting Substrate builds
## Troubleshooting Bizinikiwi builds
Sometimes you can't get the Substrate node template to compile out of the box. Here are some tips to help you work
Sometimes you can't get the Bizinikiwi node template to compile out of the box. Here are some tips to help you work
through that.
### Rust configuration check
@@ -146,18 +146,18 @@ version](#specifying-nightly-version) section.
### WebAssembly compilation
Substrate uses [WebAssembly](https://webassembly.org) (Wasm) to produce portable blockchain runtimes. You will need to
Bizinikiwi uses [WebAssembly](https://webassembly.org) (Wasm) to produce portable blockchain runtimes. You will need to
configure your Rust compiler to use [`nightly` builds](https://doc.rust-lang.org/book/appendix-07-nightly-rust.html) to
allow you to compile Substrate runtime code to the Wasm target.
allow you to compile Bizinikiwi runtime code to the Wasm target.
> There are upstream issues in Rust that need to be resolved before all of Substrate can use the stable Rust toolchain.
> [This is our tracking issue](https://github.com/paritytech/substrate/issues/1252) if you're curious as to why and how
> There are upstream issues in Rust that need to be resolved before all of Bizinikiwi can use the stable Rust toolchain.
> [This is our tracking issue](https://github.com/pezkuwichain/kurdistan-sdk/issues/9) if you're curious as to why and how
> this will be resolved.
#### Latest nightly for Substrate `master`
#### Latest nightly for Bizinikiwi `master`
Developers who are building Substrate _itself_ should always use the latest bug-free versions of Rust stable and
nightly. This is because the Substrate codebase follows the tip of Rust nightly, which means that changes in Substrate
Developers who are building Bizinikiwi _itself_ should always use the latest bug-free versions of Rust stable and
nightly. This is because the Bizinikiwi codebase follows the tip of Rust nightly, which means that changes in Bizinikiwi
often depend on upstream changes in the Rust nightly compiler. To ensure your Rust compiler is always up to date, you
should run:
@@ -167,7 +167,7 @@ rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly
```
> NOTE: It may be necessary to occasionally rerun `rustup update` if a change in the upstream Substrate codebase depends
> NOTE: It may be necessary to occasionally rerun `rustup update` if a change in the upstream Bizinikiwi codebase depends
> on a new feature of the Rust compiler. When you do this, both your nightly and stable toolchains will be pulled to the
> most recent release, and for nightly, it is generally _not_ expected to compile WASM without error (although it very
> often does). Be sure to [specify your nightly version](#specifying-nightly-version) if you get WASM build errors from
@@ -176,7 +176,7 @@ rustup target add wasm32-unknown-unknown --toolchain nightly
#### Rust nightly toolchain
If you want to guarantee that your build works on your computer as you update Rust and other dependencies, you should
use a specific Rust nightly version that is known to be compatible with the version of Substrate they are using; this
use a specific Rust nightly version that is known to be compatible with the version of Bizinikiwi they are using; this
version will vary from project to project and different projects may use different mechanisms to communicate this
version to developers. For instance, the Pezkuwi client specifies this information in its [release
notes](https://github.com/pezkuwichain/pezkuwi-sdk/releases).
@@ -196,7 +196,7 @@ rustup target add wasm32-unknown-unknown --toolchain nightly-<yyyy-MM-dd>
### Specifying nightly version
Use the `WASM_BUILD_TOOLCHAIN` environment variable to specify the Rust nightly version a Substrate project should use
Use the `WASM_BUILD_TOOLCHAIN` environment variable to specify the Rust nightly version a Bizinikiwi project should use
for Wasm compilation:
```bash
+65 -65
View File
@@ -1,6 +1,6 @@
[package]
name = "solochain-template-node"
description = "A solochain node template built with Substrate, part of Pezkuwi Sdk."
description = "A solochain node template built with Bizinikiwi, part of Pezkuwi Sdk."
version = "0.0.0"
license = "Unlicense"
authors.workspace = true
@@ -22,90 +22,90 @@ clap = { features = ["derive"], workspace = true }
futures = { features = ["thread-pool"], workspace = true }
jsonrpsee = { features = ["server"], workspace = true }
# substrate client
sc-basic-authorship = { workspace = true, default-features = true }
sc-cli = { workspace = true, default-features = true }
sc-client-api = { workspace = true, default-features = true }
sc-consensus = { workspace = true, default-features = true }
sc-consensus-aura = { workspace = true, default-features = true }
sc-consensus-grandpa = { workspace = true, default-features = true }
sc-executor = { workspace = true, default-features = true }
sc-network = { workspace = true, default-features = true }
sc-offchain = { workspace = true, default-features = true }
sc-service = { workspace = true, default-features = true }
sc-telemetry = { workspace = true, default-features = true }
sc-transaction-pool = { workspace = true, default-features = true }
sc-transaction-pool-api = { workspace = true, default-features = true }
sp-consensus-aura = { workspace = true, default-features = true }
sp-core = { workspace = true, default-features = true }
sp-genesis-builder = { workspace = true, default-features = true }
# bizinikiwi client
pezsc-basic-authorship = { workspace = true, default-features = true }
pezsc-cli = { workspace = true, default-features = true }
pezsc-client-api = { workspace = true, default-features = true }
pezsc-consensus = { workspace = true, default-features = true }
pezsc-consensus-aura = { workspace = true, default-features = true }
pezsc-consensus-grandpa = { workspace = true, default-features = true }
pezsc-executor = { workspace = true, default-features = true }
pezsc-network = { workspace = true, default-features = true }
pezsc-offchain = { workspace = true, default-features = true }
pezsc-service = { workspace = true, default-features = true }
pezsc-telemetry = { workspace = true, default-features = true }
pezsc-transaction-pool = { workspace = true, default-features = true }
pezsc-transaction-pool-api = { workspace = true, default-features = true }
pezsp-consensus-aura = { workspace = true, default-features = true }
pezsp-core = { workspace = true, default-features = true }
pezsp-genesis-builder = { workspace = true, default-features = true }
# substrate primitives
sp-api = { workspace = true, default-features = true }
sp-block-builder = { workspace = true, default-features = true }
sp-blockchain = { workspace = true, default-features = true }
sp-inherents = { workspace = true, default-features = true }
sp-io = { workspace = true, default-features = true }
sp-keyring = { workspace = true, default-features = true }
sp-runtime = { workspace = true, default-features = true }
sp-timestamp = { workspace = true, default-features = true }
# bizinikiwi primitives
pezsp-api = { workspace = true, default-features = true }
pezsp-block-builder = { workspace = true, default-features = true }
pezsp-blockchain = { workspace = true, default-features = true }
pezsp-inherents = { workspace = true, default-features = true }
pezsp-io = { workspace = true, default-features = true }
pezsp-keyring = { workspace = true, default-features = true }
pezsp-runtime = { workspace = true, default-features = true }
pezsp-timestamp = { workspace = true, default-features = true }
# frame and pallets
frame-metadata-hash-extension = { workspace = true, default-features = true }
frame-system = { workspace = true, default-features = true }
pallet-transaction-payment = { workspace = true, default-features = true }
pallet-transaction-payment-rpc = { workspace = true, default-features = true }
substrate-frame-rpc-system = { workspace = true, default-features = true }
pezframe-metadata-hash-extension = { workspace = true, default-features = true }
pezframe-system = { workspace = true, default-features = true }
pezpallet-transaction-payment = { workspace = true, default-features = true }
pezpallet-transaction-payment-rpc = { workspace = true, default-features = true }
bizinikiwi-frame-rpc-system = { workspace = true, default-features = true }
# These dependencies are used for runtime benchmarking
frame-benchmarking-cli = { workspace = true, default-features = true }
pezframe-benchmarking-cli = { workspace = true, default-features = true }
# Local Dependencies
solochain-template-runtime = { workspace = true }
[build-dependencies]
substrate-build-script-utils = { workspace = true, default-features = true }
bizinikiwi-build-script-utils = { workspace = true, default-features = true }
[features]
default = ["std"]
std = ["solochain-template-runtime/std"]
# Dependencies that are only required if runtime benchmarking should be build.
runtime-benchmarks = [
"frame-benchmarking-cli/runtime-benchmarks",
"frame-metadata-hash-extension/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-transaction-payment-rpc/runtime-benchmarks",
"pallet-transaction-payment/runtime-benchmarks",
"sc-basic-authorship/runtime-benchmarks",
"sc-cli/runtime-benchmarks",
"sc-client-api/runtime-benchmarks",
"sc-consensus-aura/runtime-benchmarks",
"sc-consensus-grandpa/runtime-benchmarks",
"sc-consensus/runtime-benchmarks",
"sc-executor/runtime-benchmarks",
"sc-network/runtime-benchmarks",
"sc-offchain/runtime-benchmarks",
"sc-service/runtime-benchmarks",
"sc-transaction-pool-api/runtime-benchmarks",
"sc-transaction-pool/runtime-benchmarks",
"pezframe-benchmarking-cli/runtime-benchmarks",
"pezframe-metadata-hash-extension/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
"pezpallet-transaction-payment-rpc/runtime-benchmarks",
"pezpallet-transaction-payment/runtime-benchmarks",
"pezsc-basic-authorship/runtime-benchmarks",
"pezsc-cli/runtime-benchmarks",
"pezsc-client-api/runtime-benchmarks",
"pezsc-consensus-aura/runtime-benchmarks",
"pezsc-consensus-grandpa/runtime-benchmarks",
"pezsc-consensus/runtime-benchmarks",
"pezsc-executor/runtime-benchmarks",
"pezsc-network/runtime-benchmarks",
"pezsc-offchain/runtime-benchmarks",
"pezsc-service/runtime-benchmarks",
"pezsc-transaction-pool-api/runtime-benchmarks",
"pezsc-transaction-pool/runtime-benchmarks",
"solochain-template-runtime/runtime-benchmarks",
"sp-api/runtime-benchmarks",
"sp-block-builder/runtime-benchmarks",
"sp-blockchain/runtime-benchmarks",
"sp-consensus-aura/runtime-benchmarks",
"sp-genesis-builder/runtime-benchmarks",
"sp-inherents/runtime-benchmarks",
"sp-io/runtime-benchmarks",
"sp-keyring/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-timestamp/runtime-benchmarks",
"substrate-frame-rpc-system/runtime-benchmarks",
"pezsp-api/runtime-benchmarks",
"pezsp-block-builder/runtime-benchmarks",
"pezsp-blockchain/runtime-benchmarks",
"pezsp-consensus-aura/runtime-benchmarks",
"pezsp-genesis-builder/runtime-benchmarks",
"pezsp-inherents/runtime-benchmarks",
"pezsp-io/runtime-benchmarks",
"pezsp-keyring/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
"pezsp-timestamp/runtime-benchmarks",
"bizinikiwi-frame-rpc-system/runtime-benchmarks",
]
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
# in the near future.
try-runtime = [
"frame-system/try-runtime",
"pallet-transaction-payment/try-runtime",
"pezframe-system/try-runtime",
"pezpallet-transaction-payment/try-runtime",
"solochain-template-runtime/try-runtime",
"sp-runtime/try-runtime",
"pezsp-runtime/try-runtime",
]
+1 -1
View File
@@ -1,4 +1,4 @@
use substrate_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
use bizinikiwi_build_script_utils::{generate_cargo_keys, rerun_if_git_head_changed};
fn main() {
generate_cargo_keys();
+22 -22
View File
@@ -5,13 +5,13 @@
use crate::service::FullClient;
use runtime::{AccountId, Balance, BalancesCall, SystemCall};
use sc_cli::Result;
use sc_client_api::BlockBackend;
use pezsc_cli::Result;
use pezsc_client_api::BlockBackend;
use solochain_template_runtime as runtime;
use sp_core::{Encode, Pair};
use sp_inherents::{InherentData, InherentDataProvider};
use sp_keyring::Sr25519Keyring;
use sp_runtime::{OpaqueExtrinsic, SaturatedConversion};
use pezsp_core::{Encode, Pair};
use pezsp_inherents::{InherentData, InherentDataProvider};
use pezsp_keyring::Sr25519Keyring;
use pezsp_runtime::{OpaqueExtrinsic, SaturatedConversion};
use std::{sync::Arc, time::Duration};
@@ -29,7 +29,7 @@ impl RemarkBuilder {
}
}
impl frame_benchmarking_cli::ExtrinsicBuilder for RemarkBuilder {
impl pezframe_benchmarking_cli::ExtrinsicBuilder for RemarkBuilder {
fn pallet(&self) -> &str {
"system"
}
@@ -68,7 +68,7 @@ impl TransferKeepAliveBuilder {
}
}
impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder {
impl pezframe_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder {
fn pallet(&self) -> &str {
"balances"
}
@@ -97,7 +97,7 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder {
/// Note: Should only be used for benchmarking.
pub fn create_benchmark_extrinsic(
client: &FullClient,
sender: sp_core::sr25519::Pair,
sender: pezsp_core::sr25519::Pair,
call: runtime::RuntimeCall,
nonce: u32,
) -> runtime::UncheckedExtrinsic {
@@ -110,20 +110,20 @@ pub fn create_benchmark_extrinsic(
.map(|c| c / 2)
.unwrap_or(2) as u64;
let tx_ext: runtime::TxExtension = (
frame_system::AuthorizeCall::<runtime::Runtime>::new(),
frame_system::CheckNonZeroSender::<runtime::Runtime>::new(),
frame_system::CheckSpecVersion::<runtime::Runtime>::new(),
frame_system::CheckTxVersion::<runtime::Runtime>::new(),
frame_system::CheckGenesis::<runtime::Runtime>::new(),
frame_system::CheckEra::<runtime::Runtime>::from(sp_runtime::generic::Era::mortal(
pezframe_system::AuthorizeCall::<runtime::Runtime>::new(),
pezframe_system::CheckNonZeroSender::<runtime::Runtime>::new(),
pezframe_system::CheckSpecVersion::<runtime::Runtime>::new(),
pezframe_system::CheckTxVersion::<runtime::Runtime>::new(),
pezframe_system::CheckGenesis::<runtime::Runtime>::new(),
pezframe_system::CheckEra::<runtime::Runtime>::from(pezsp_runtime::generic::Era::mortal(
period,
best_block.saturated_into(),
)),
frame_system::CheckNonce::<runtime::Runtime>::from(nonce),
frame_system::CheckWeight::<runtime::Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
frame_metadata_hash_extension::CheckMetadataHash::<runtime::Runtime>::new(false),
frame_system::WeightReclaim::<runtime::Runtime>::new(),
pezframe_system::CheckNonce::<runtime::Runtime>::from(nonce),
pezframe_system::CheckWeight::<runtime::Runtime>::new(),
pezpallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
pezframe_metadata_hash_extension::CheckMetadataHash::<runtime::Runtime>::new(false),
pezframe_system::WeightReclaim::<runtime::Runtime>::new(),
);
let raw_payload = runtime::SignedPayload::from_raw(
@@ -147,7 +147,7 @@ pub fn create_benchmark_extrinsic(
runtime::UncheckedExtrinsic::new_signed(
call,
sp_runtime::AccountId32::from(sender.public()).into(),
pezsp_runtime::AccountId32::from(sender.public()).into(),
runtime::Signature::Sr25519(signature),
tx_ext,
)
@@ -159,7 +159,7 @@ pub fn create_benchmark_extrinsic(
pub fn inherent_benchmark_data() -> Result<InherentData> {
let mut inherent_data = InherentData::new();
let d = Duration::from_millis(0);
let timestamp = sp_timestamp::InherentDataProvider::new(d.into());
let timestamp = pezsp_timestamp::InherentDataProvider::new(d.into());
futures::executor::block_on(timestamp.provide_inherent_data(&mut inherent_data))
.map_err(|e| format!("creating inherent data: {e:?}"))?;
+5 -5
View File
@@ -1,8 +1,8 @@
use sc_service::ChainType;
use pezsc_service::ChainType;
use solochain_template_runtime::WASM_BINARY;
/// Specialized `ChainSpec`. This is a specialization of the general Substrate ChainSpec type.
pub type ChainSpec = sc_service::GenericChainSpec;
/// Specialized `ChainSpec`. This is a specialization of the general Bizinikiwi ChainSpec type.
pub type ChainSpec = pezsc_service::GenericChainSpec;
pub fn development_chain_spec() -> Result<ChainSpec, String> {
Ok(ChainSpec::builder(
@@ -12,7 +12,7 @@ pub fn development_chain_spec() -> Result<ChainSpec, String> {
.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)
.build())
}
@@ -24,6 +24,6 @@ pub fn local_chain_spec() -> Result<ChainSpec, String> {
.with_name("Local Testnet")
.with_id("local_testnet")
.with_chain_type(ChainType::Local)
.with_genesis_config_preset_name(sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET)
.with_genesis_config_preset_name(pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET)
.build())
}
+12 -12
View File
@@ -4,7 +4,7 @@ pub struct Cli {
pub subcommand: Option<Subcommand>,
#[clap(flatten)]
pub run: sc_cli::RunCmd,
pub run: pezsc_cli::RunCmd,
}
#[derive(Debug, clap::Subcommand)]
@@ -12,7 +12,7 @@ pub struct Cli {
pub enum Subcommand {
/// Key management cli utilities
#[command(subcommand)]
Key(sc_cli::KeySubcommand),
Key(pezsc_cli::KeySubcommand),
/// Build a chain specification.
/// DEPRECATED: `build-spec` command will be removed after 1/04/2026. Use `export-chain-spec`
@@ -20,33 +20,33 @@ 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),
/// Remove the whole chain.
PurgeChain(sc_cli::PurgeChainCmd),
PurgeChain(pezsc_cli::PurgeChainCmd),
/// Revert the chain to a previous state.
Revert(sc_cli::RevertCmd),
Revert(pezsc_cli::RevertCmd),
/// Sub-commands concerned with benchmarking.
#[command(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),
Benchmark(pezframe_benchmarking_cli::BenchmarkCmd),
/// Db meta columns information.
ChainInfo(sc_cli::ChainInfoCmd),
ChainInfo(pezsc_cli::ChainInfoCmd),
}
+19 -19
View File
@@ -4,19 +4,19 @@ use crate::{
cli::{Cli, Subcommand},
service,
};
use frame_benchmarking_cli::{BenchmarkCmd, ExtrinsicFactory, SUBSTRATE_REFERENCE_HARDWARE};
use sc_cli::SubstrateCli;
use sc_service::PartialComponents;
use pezframe_benchmarking_cli::{BenchmarkCmd, ExtrinsicFactory, BIZINIKIWI_REFERENCE_HARDWARE};
use pezsc_cli::BizinikiwiCli;
use pezsc_service::PartialComponents;
use solochain_template_runtime::{Block, EXISTENTIAL_DEPOSIT};
use sp_keyring::Sr25519Keyring;
use pezsp_keyring::Sr25519Keyring;
impl SubstrateCli for Cli {
impl BizinikiwiCli for Cli {
fn impl_name() -> String {
"Substrate Node".into()
"Bizinikiwi Node".into()
}
fn impl_version() -> String {
env!("SUBSTRATE_CLI_IMPL_VERSION").into()
env!("BIZINIKIWI_CLI_IMPL_VERSION").into()
}
fn description() -> String {
@@ -35,7 +35,7 @@ impl SubstrateCli for Cli {
2017
}
fn load_spec(&self, id: &str) -> Result<Box<dyn sc_service::ChainSpec>, String> {
fn load_spec(&self, id: &str) -> Result<Box<dyn pezsc_service::ChainSpec>, String> {
Ok(match id {
"dev" => Box::new(chain_spec::development_chain_spec()?),
"" | "local" => Box::new(chain_spec::local_chain_spec()?),
@@ -46,7 +46,7 @@ impl SubstrateCli for Cli {
}
/// Parse and run command line arguments
pub fn run() -> sc_cli::Result<()> {
pub fn run() -> pezsc_cli::Result<()> {
let cli = Cli::from_args();
match &cli.subcommand {
@@ -100,7 +100,7 @@ pub fn run() -> sc_cli::Result<()> {
let PartialComponents { client, task_manager, backend, .. } =
service::new_partial(&config)?;
let aux_revert = Box::new(|client, _, blocks| {
sc_consensus_grandpa::revert(client, blocks)?;
pezsc_consensus_grandpa::revert(client, blocks)?;
Ok(())
});
Ok((cmd.run(client, backend, Some(aux_revert)), task_manager))
@@ -122,7 +122,7 @@ pub fn run() -> sc_cli::Result<()> {
);
}
cmd.run_with_spec::<sp_runtime::traits::HashingFor<Block>, ()>(Some(
cmd.run_with_spec::<pezsp_runtime::traits::HashingFor<Block>, ()>(Some(
config.chain_spec,
))
},
@@ -173,7 +173,7 @@ pub fn run() -> sc_cli::Result<()> {
cmd.run(client, inherent_benchmark_data()?, Vec::new(), &ext_factory)
},
BenchmarkCmd::Machine(cmd) =>
cmd.run(&config, SUBSTRATE_REFERENCE_HARDWARE.clone()),
cmd.run(&config, BIZINIKIWI_REFERENCE_HARDWARE.clone()),
}
})
},
@@ -185,16 +185,16 @@ pub fn run() -> sc_cli::Result<()> {
let runner = cli.create_runner(&cli.run)?;
runner.run_node_until_exit(|config| async move {
match config.network.network_backend {
sc_network::config::NetworkBackendType::Libp2p => service::new_full::<
sc_network::NetworkWorker<
pezsc_network::config::NetworkBackendType::Libp2p => service::new_full::<
pezsc_network::NetworkWorker<
solochain_template_runtime::opaque::Block,
<solochain_template_runtime::opaque::Block as sp_runtime::traits::Block>::Hash,
<solochain_template_runtime::opaque::Block as pezsp_runtime::traits::Block>::Hash,
>,
>(config)
.map_err(sc_cli::Error::Service),
sc_network::config::NetworkBackendType::Litep2p =>
service::new_full::<sc_network::Litep2pNetworkBackend>(config)
.map_err(sc_cli::Error::Service),
.map_err(pezsc_cli::Error::Service),
pezsc_network::config::NetworkBackendType::Litep2p =>
service::new_full::<pezsc_network::Litep2pNetworkBackend>(config)
.map_err(pezsc_cli::Error::Service),
}
})
},
+2 -2
View File
@@ -1,4 +1,4 @@
//! Substrate Node Template CLI library.
//! Bizinikiwi Node Template CLI library.
#![warn(missing_docs)]
mod benchmarking;
@@ -8,6 +8,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)]
@@ -8,11 +8,11 @@
use std::sync::Arc;
use jsonrpsee::RpcModule;
use sc_transaction_pool_api::TransactionPool;
use pezsc_transaction_pool_api::TransactionPool;
use solochain_template_runtime::{opaque::Block, AccountId, Balance, Nonce};
use sp_api::ProvideRuntimeApi;
use sp_block_builder::BlockBuilder;
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
use pezsp_api::ProvideRuntimeApi;
use pezsp_block_builder::BlockBuilder;
use pezsp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
/// Full client dependencies.
pub struct FullDeps<C, P> {
@@ -30,13 +30,13 @@ where
C: ProvideRuntimeApi<Block>,
C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,
C: Send + Sync + 'static,
C::Api: substrate_frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
C::Api: pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
C::Api: bizinikiwi_frame_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
C::Api: pezpallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
C::Api: BlockBuilder<Block>,
P: TransactionPool + '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 = RpcModule::new(());
let FullDeps { client, pool } = deps;
+47 -47
View File
@@ -1,37 +1,37 @@
//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.
//! Service and ServiceFactory implementation. Specialized wrapper over bizinikiwi service.
use futures::FutureExt;
use sc_client_api::{Backend, BlockBackend};
use sc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams};
use sc_consensus_grandpa::SharedVoterState;
use sc_service::{error::Error as ServiceError, Configuration, TaskManager, WarpSyncConfig};
use sc_telemetry::{Telemetry, TelemetryWorker};
use sc_transaction_pool_api::OffchainTransactionPoolFactory;
use pezsc_client_api::{Backend, BlockBackend};
use pezsc_consensus_aura::{ImportQueueParams, SlotProportion, StartAuraParams};
use pezsc_consensus_grandpa::SharedVoterState;
use pezsc_service::{error::Error as ServiceError, Configuration, TaskManager, WarpSyncConfig};
use pezsc_telemetry::{Telemetry, TelemetryWorker};
use pezsc_transaction_pool_api::OffchainTransactionPoolFactory;
use solochain_template_runtime::{self, apis::RuntimeApi, opaque::Block};
use sp_consensus_aura::sr25519::AuthorityPair as AuraPair;
use pezsp_consensus_aura::sr25519::AuthorityPair as AuraPair;
use std::{sync::Arc, time::Duration};
pub(crate) type FullClient = sc_service::TFullClient<
pub(crate) type FullClient = pezsc_service::TFullClient<
Block,
RuntimeApi,
sc_executor::WasmExecutor<sp_io::SubstrateHostFunctions>,
pezsc_executor::WasmExecutor<pezsp_io::BizinikiwiHostFunctions>,
>;
type FullBackend = sc_service::TFullBackend<Block>;
type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;
type FullBackend = pezsc_service::TFullBackend<Block>;
type FullSelectChain = pezsc_consensus::LongestChain<FullBackend, Block>;
/// The minimum period of blocks on which justifications will be
/// imported and generated.
const GRANDPA_JUSTIFICATION_PERIOD: u32 = 512;
pub type Service = sc_service::PartialComponents<
pub type Service = pezsc_service::PartialComponents<
FullClient,
FullBackend,
FullSelectChain,
sc_consensus::DefaultImportQueue<Block>,
sc_transaction_pool::TransactionPoolHandle<Block, FullClient>,
pezsc_consensus::DefaultImportQueue<Block>,
pezsc_transaction_pool::TransactionPoolHandle<Block, FullClient>,
(
sc_consensus_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>,
sc_consensus_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
pezsc_consensus_grandpa::GrandpaBlockImport<FullBackend, Block, FullClient, FullSelectChain>,
pezsc_consensus_grandpa::LinkHalf<Block, FullClient, FullSelectChain>,
Option<Telemetry>,
),
>;
@@ -41,16 +41,16 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
.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))
})
.transpose()?;
let executor = sc_service::new_wasm_executor::<sp_io::SubstrateHostFunctions>(&config.executor);
let executor = pezsc_service::new_wasm_executor::<pezsp_io::BizinikiwiHostFunctions>(&config.executor);
let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, _>(
pezsc_service::new_full_parts::<Block, RuntimeApi, _>(
config,
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
executor,
@@ -62,10 +62,10 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
telemetry
});
let select_chain = sc_consensus::LongestChain::new(backend.clone());
let select_chain = pezsc_consensus::LongestChain::new(backend.clone());
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(),
@@ -75,7 +75,7 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
.build(),
);
let (grandpa_block_import, grandpa_link) = sc_consensus_grandpa::block_import(
let (grandpa_block_import, grandpa_link) = pezsc_consensus_grandpa::block_import(
client.clone(),
GRANDPA_JUSTIFICATION_PERIOD,
&client,
@@ -85,21 +85,21 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
let cidp_client = client.clone();
let import_queue =
sc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _>(ImportQueueParams {
pezsc_consensus_aura::import_queue::<AuraPair, _, _, _, _, _>(ImportQueueParams {
block_import: grandpa_block_import.clone(),
justification_import: Some(Box::new(grandpa_block_import.clone())),
client: client.clone(),
create_inherent_data_providers: move |parent_hash, _| {
let cidp_client = cidp_client.clone();
async move {
let slot_duration = sc_consensus_aura::standalone::slot_duration_at(
let slot_duration = pezsc_consensus_aura::standalone::slot_duration_at(
&*cidp_client,
parent_hash,
)?;
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
let timestamp = pezsp_timestamp::InherentDataProvider::from_system_time();
let slot =
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
pezsp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
*timestamp,
slot_duration,
);
@@ -114,7 +114,7 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
compatibility_mode: Default::default(),
})?;
Ok(sc_service::PartialComponents {
Ok(pezsc_service::PartialComponents {
client,
backend,
task_manager,
@@ -128,11 +128,11 @@ pub fn new_partial(config: &Configuration) -> Result<Service, ServiceError> {
/// Builds a new service for a full client.
pub fn new_full<
N: sc_network::NetworkBackend<Block, <Block as sp_runtime::traits::Block>::Hash>,
N: pezsc_network::NetworkBackend<Block, <Block as pezsp_runtime::traits::Block>::Hash>,
>(
config: Configuration,
) -> Result<TaskManager, ServiceError> {
let sc_service::PartialComponents {
let pezsc_service::PartialComponents {
client,
backend,
mut task_manager,
@@ -143,34 +143,34 @@ pub fn new_full<
other: (block_import, grandpa_link, mut telemetry),
} = new_partial(&config)?;
let mut net_config = sc_network::config::FullNetworkConfiguration::<
let mut net_config = pezsc_network::config::FullNetworkConfiguration::<
Block,
<Block as sp_runtime::traits::Block>::Hash,
<Block as pezsp_runtime::traits::Block>::Hash,
N,
>::new(&config.network, config.prometheus_registry().cloned());
let metrics = N::register_notification_metrics(config.prometheus_registry());
let peer_store_handle = net_config.peer_store_handle();
let grandpa_protocol_name = sc_consensus_grandpa::protocol_standard_name(
let grandpa_protocol_name = pezsc_consensus_grandpa::protocol_standard_name(
&client.block_hash(0).ok().flatten().expect("Genesis block exists; qed"),
&config.chain_spec,
);
let (grandpa_protocol_config, grandpa_notification_service) =
sc_consensus_grandpa::grandpa_peers_set_config::<_, N>(
pezsc_consensus_grandpa::grandpa_peers_set_config::<_, N>(
grandpa_protocol_name.clone(),
metrics.clone(),
peer_store_handle,
);
net_config.add_notification_protocol(grandpa_protocol_config);
let warp_sync = Arc::new(sc_consensus_grandpa::warp_proof::NetworkProvider::new(
let warp_sync = Arc::new(pezsc_consensus_grandpa::warp_proof::NetworkProvider::new(
backend.clone(),
grandpa_link.shared_authority_set().clone(),
Vec::default(),
));
let (network, system_rpc_tx, tx_handler_controller, sync_service) =
sc_service::build_network(sc_service::BuildNetworkParams {
pezsc_service::build_network(pezsc_service::BuildNetworkParams {
config: &config,
net_config,
client: client.clone(),
@@ -185,7 +185,7 @@ pub fn new_full<
if config.offchain_worker.enabled {
let offchain_workers =
sc_offchain::OffchainWorkers::new(sc_offchain::OffchainWorkerOptions {
pezsc_offchain::OffchainWorkers::new(pezsc_offchain::OffchainWorkerOptions {
runtime_api_provider: client.clone(),
is_validator: config.role.is_authority(),
keystore: Some(keystore_container.keystore()),
@@ -221,7 +221,7 @@ pub fn new_full<
})
};
let _rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams {
let _rpc_handlers = pezsc_service::spawn_tasks(pezsc_service::SpawnTasksParams {
network: Arc::new(network.clone()),
client: client.clone(),
keystore: keystore_container.keystore(),
@@ -238,7 +238,7 @@ pub fn new_full<
})?;
if role.is_authority() {
let proposer_factory = sc_basic_authorship::ProposerFactory::new(
let proposer_factory = pezsc_basic_authorship::ProposerFactory::new(
task_manager.spawn_handle(),
client.clone(),
transaction_pool.clone(),
@@ -246,9 +246,9 @@ pub fn new_full<
telemetry.as_ref().map(|x| x.handle()),
);
let slot_duration = sc_consensus_aura::slot_duration(&*client)?;
let slot_duration = pezsc_consensus_aura::slot_duration(&*client)?;
let aura = sc_consensus_aura::start_aura::<AuraPair, _, _, _, _, _, _, _, _, _, _>(
let aura = pezsc_consensus_aura::start_aura::<AuraPair, _, _, _, _, _, _, _, _, _, _>(
StartAuraParams {
slot_duration,
client,
@@ -256,10 +256,10 @@ pub fn new_full<
block_import,
proposer_factory,
create_inherent_data_providers: move |_, ()| async move {
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
let timestamp = pezsp_timestamp::InherentDataProvider::from_system_time();
let slot =
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
pezsp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
*timestamp,
slot_duration,
);
@@ -290,7 +290,7 @@ pub fn new_full<
// need a keystore, regardless of which protocol we use below.
let keystore = if role.is_authority() { Some(keystore_container.keystore()) } else { None };
let grandpa_config = sc_consensus_grandpa::Config {
let grandpa_config = pezsc_consensus_grandpa::Config {
// FIXME #1578 make this available through chainspec
gossip_duration: Duration::from_millis(333),
justification_generation_period: GRANDPA_JUSTIFICATION_PERIOD,
@@ -308,13 +308,13 @@ pub fn new_full<
// and vote data availability than the observer. The observer has not
// been tested extensively yet and having most nodes in a network run it
// could lead to finality stalls.
let grandpa_config = sc_consensus_grandpa::GrandpaParams {
let grandpa_config = pezsc_consensus_grandpa::GrandpaParams {
config: grandpa_config,
link: grandpa_link,
network,
sync: Arc::new(sync_service),
notification_service: grandpa_notification_service,
voting_rule: sc_consensus_grandpa::VotingRulesBuilder::default().build(),
voting_rule: pezsc_consensus_grandpa::VotingRulesBuilder::default().build(),
prometheus_registry,
shared_voter_state: SharedVoterState::empty(),
telemetry: telemetry.as_ref().map(|x| x.handle()),
@@ -326,7 +326,7 @@ pub fn new_full<
task_manager.spawn_essential_handle().spawn_blocking(
"grandpa-voter",
None,
sc_consensus_grandpa::run_grandpa_voter(grandpa_config)?,
pezsc_consensus_grandpa::run_grandpa_voter(grandpa_config)?,
);
}
+21 -21
View File
@@ -1,5 +1,5 @@
[package]
name = "pallet-template"
name = "pezpallet-template"
description = "FRAME pallet template for defining custom runtime logic."
version = "0.0.0"
license = "Unlicense"
@@ -20,36 +20,36 @@ codec = { features = ["derive"], workspace = true }
scale-info = { features = ["derive"], workspace = true }
# frame deps
frame-benchmarking = { optional = true, workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pezframe-benchmarking = { optional = true, workspace = true }
pezframe-support = { workspace = true }
pezframe-system = { workspace = true }
[dev-dependencies]
sp-core = { workspace = true, default-features = true }
sp-io = { workspace = true, default-features = true }
sp-runtime = { workspace = true, default-features = true }
pezsp-core = { workspace = true, default-features = true }
pezsp-io = { workspace = true, default-features = true }
pezsp-runtime = { workspace = true, default-features = true }
[features]
default = ["std"]
std = [
"codec/std",
"frame-benchmarking?/std",
"frame-support/std",
"frame-system/std",
"pezframe-benchmarking?/std",
"pezframe-support/std",
"pezframe-system/std",
"scale-info/std",
"sp-core/std",
"sp-io/std",
"sp-runtime/std",
"pezsp-core/std",
"pezsp-io/std",
"pezsp-runtime/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-io/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"pezframe-benchmarking/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
"pezsp-io/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"sp-runtime/try-runtime",
"pezframe-support/try-runtime",
"pezframe-system/try-runtime",
"pezsp-runtime/try-runtime",
]
@@ -1,11 +1,11 @@
//! Benchmarking setup for pallet-template
//! Benchmarking setup for pezpallet-template
use super::*;
#[allow(unused)]
use crate::Pallet as Template;
use frame_benchmarking::v2::*;
use frame_system::RawOrigin;
use pezframe_benchmarking::v2::*;
use pezframe_system::RawOrigin;
#[benchmarks]
mod benchmarks {
@@ -1,7 +1,7 @@
//! # Template Pallet
//!
//! A pallet with minimal functionality to help developers understand the essential components of
//! writing a FRAME pallet. It is typically used in beginner tutorials or in Substrate template
//! writing a FRAME pallet. It is typically used in beginner tutorials or in Bizinikiwi template
//! nodes as a starting point for creating a new pallet and **not meant to be used in production**.
//!
//! ## Overview
@@ -25,7 +25,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`].
@@ -34,7 +34,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.
// We make sure this pallet uses `no_std` for compiling to Wasm.
#![cfg_attr(not(feature = "std"), no_std)]
@@ -61,12 +61,12 @@ pub mod weights;
pub use weights::*;
// All pallet logic is defined in its own module and must be annotated by the `pallet` attribute.
#[frame_support::pallet]
#[pezframe_support::pallet]
pub mod pallet {
// Import various useful types required by all FRAME pallets.
use super::*;
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
use pezframe_support::pezpallet_prelude::*;
use pezframe_system::pezpallet_prelude::*;
// The `Pallet` struct serves as a placeholder to implement traits, methods and dispatchables
// (`Call`s) in this pallet.
@@ -79,10 +79,10 @@ pub mod pallet {
/// These types are defined generically and made concrete when the pallet is declared in the
/// `runtime/src/lib.rs` file of your chain.
#[pallet::config]
pub trait Config: frame_system::Config {
pub trait Config: pezframe_system::Config {
/// The overarching runtime event type.
#[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: WeightInfo;
}
@@ -103,7 +103,7 @@ pub mod pallet {
///
/// The `generate_deposit` macro generates a function on `Pallet` called `deposit_event` which
/// will convert the event type of your pallet into `RuntimeEvent` (declared in the pallet's
/// [`Config`] trait) and deposit it using [`frame_system::Pallet::deposit_event`].
/// [`Config`] trait) and deposit it using [`pezframe_system::Pallet::deposit_event`].
#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
@@ -1,10 +1,10 @@
use crate as pallet_template;
use frame_support::derive_impl;
use sp_runtime::BuildStorage;
use crate as pezpallet_template;
use pezframe_support::derive_impl;
use pezsp_runtime::BuildStorage;
type Block = frame_system::mocking::MockBlock<Test>;
type Block = pezframe_system::mocking::MockBlock<Test>;
#[frame_support::runtime]
#[pezframe_support::runtime]
mod runtime {
// The main runtime
#[runtime::runtime]
@@ -23,24 +23,24 @@ mod runtime {
)]
pub struct Test;
#[runtime::pallet_index(0)]
pub type System = frame_system::Pallet<Test>;
#[runtime::pezpallet_index(0)]
pub type System = pezframe_system::Pallet<Test>;
#[runtime::pallet_index(1)]
pub type Template = pallet_template::Pallet<Test>;
#[runtime::pezpallet_index(1)]
pub type Template = pezpallet_template::Pallet<Test>;
}
#[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 Block = Block;
}
impl pallet_template::Config for Test {
impl pezpallet_template::Config for Test {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
}
// Build genesis storage according to the mock runtime.
pub fn new_test_ext() -> sp_io::TestExternalities {
frame_system::GenesisConfig::<Test>::default().build_storage().unwrap().into()
pub fn new_test_ext() -> pezsp_io::TestExternalities {
pezframe_system::GenesisConfig::<Test>::default().build_storage().unwrap().into()
}
@@ -1,5 +1,5 @@
use crate::{mock::*, Error, Event, Something};
use frame_support::{assert_noop, assert_ok};
use pezframe_support::{assert_noop, assert_ok};
#[test]
fn it_works_for_default_value() {
@@ -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: `Alexs-MacBook-Pro-2.local`, CPU: `<UNKNOWN>`
@@ -14,7 +14,7 @@
// --chain
// dev
// --pallet
// pallet_template
// pezpallet_template
// --extrinsic
// *
// --steps=50
@@ -29,18 +29,18 @@
#![allow(unused_parens)]
#![allow(unused_imports)]
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
use pezframe_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
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.
pub struct SubstrateWeight<T>(PhantomData<T>);
impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
/// Weights for pezpallet_template using the Bizinikiwi node and recommended hardware.
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 {
+106 -106
View File
@@ -1,6 +1,6 @@
[package]
name = "solochain-template-runtime"
description = "A solochain runtime template built with Substrate, part of Pezkuwi Sdk."
description = "A solochain runtime template built with Bizinikiwi, part of Pezkuwi Sdk."
version = "0.0.0"
license = "Unlicense"
authors.workspace = true
@@ -23,132 +23,132 @@ serde_json = { workspace = true, default-features = false, features = [
] }
# frame
frame-executive = { workspace = true }
frame-metadata-hash-extension = { workspace = true }
frame-support = { features = ["experimental"], workspace = true }
frame-system = { workspace = true }
frame-try-runtime = { optional = true, workspace = true }
pezframe-executive = { workspace = true }
pezframe-metadata-hash-extension = { workspace = true }
pezframe-support = { features = ["experimental"], workspace = true }
pezframe-system = { workspace = true }
pezframe-try-runtime = { optional = true, workspace = true }
# frame pallets
pallet-aura = { workspace = true }
pallet-balances = { workspace = true }
pallet-grandpa = { workspace = true }
pallet-sudo = { workspace = true }
pallet-timestamp = { workspace = true }
pallet-transaction-payment = { workspace = true }
pezpallet-aura = { workspace = true }
pezpallet-balances = { workspace = true }
pezpallet-grandpa = { workspace = true }
pezpallet-sudo = { workspace = true }
pezpallet-timestamp = { workspace = true }
pezpallet-transaction-payment = { workspace = true }
# primitives
sp-api = { workspace = true }
sp-block-builder = { workspace = true }
sp-consensus-aura = { features = ["serde"], workspace = true }
sp-consensus-grandpa = { features = ["serde"], workspace = true }
sp-core = { features = ["serde"], workspace = true }
sp-genesis-builder = { workspace = true }
sp-inherents = { workspace = true }
sp-keyring = { workspace = true }
sp-offchain = { workspace = true }
sp-runtime = { features = ["serde"], workspace = true }
sp-session = { workspace = true }
sp-storage = { workspace = true }
sp-transaction-pool = { workspace = true }
sp-version = { features = ["serde"], workspace = true }
pezsp-api = { workspace = true }
pezsp-block-builder = { workspace = true }
pezsp-consensus-aura = { features = ["serde"], workspace = true }
pezsp-consensus-grandpa = { features = ["serde"], workspace = true }
pezsp-core = { features = ["serde"], workspace = true }
pezsp-genesis-builder = { workspace = true }
pezsp-inherents = { workspace = true }
pezsp-keyring = { workspace = true }
pezsp-offchain = { workspace = true }
pezsp-runtime = { features = ["serde"], workspace = true }
pezsp-session = { workspace = true }
pezsp-storage = { workspace = true }
pezsp-transaction-pool = { workspace = true }
pezsp-version = { features = ["serde"], workspace = true }
# RPC related
frame-system-rpc-runtime-api = { workspace = true }
pallet-transaction-payment-rpc-runtime-api = { workspace = true }
pezframe-system-rpc-runtime-api = { workspace = true }
pezpallet-transaction-payment-rpc-runtime-api = { workspace = true }
# Used for runtime benchmarking
frame-benchmarking = { optional = true, workspace = true }
frame-system-benchmarking = { optional = true, workspace = true }
pezframe-benchmarking = { optional = true, workspace = true }
pezframe-system-benchmarking = { optional = true, workspace = true }
# The pallet in this template.
pallet-template = { workspace = true }
pezpallet-template = { workspace = true }
[build-dependencies]
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",
"frame-benchmarking?/std",
"frame-executive/std",
"frame-metadata-hash-extension/std",
"frame-support/std",
"frame-system-benchmarking?/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
"frame-try-runtime?/std",
"pallet-aura/std",
"pallet-balances/std",
"pallet-grandpa/std",
"pallet-sudo/std",
"pallet-template/std",
"pallet-timestamp/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-transaction-payment/std",
"pezframe-benchmarking?/std",
"pezframe-executive/std",
"pezframe-metadata-hash-extension/std",
"pezframe-support/std",
"pezframe-system-benchmarking?/std",
"pezframe-system-rpc-runtime-api/std",
"pezframe-system/std",
"pezframe-try-runtime?/std",
"pezpallet-aura/std",
"pezpallet-balances/std",
"pezpallet-grandpa/std",
"pezpallet-sudo/std",
"pezpallet-template/std",
"pezpallet-timestamp/std",
"pezpallet-transaction-payment-rpc-runtime-api/std",
"pezpallet-transaction-payment/std",
"scale-info/std",
"serde_json/std",
"sp-api/std",
"sp-block-builder/std",
"sp-consensus-aura/std",
"sp-consensus-grandpa/std",
"sp-core/std",
"sp-genesis-builder/std",
"sp-inherents/std",
"sp-keyring/std",
"sp-offchain/std",
"sp-runtime/std",
"sp-session/std",
"sp-storage/std",
"sp-transaction-pool/std",
"sp-version/std",
"substrate-wasm-builder",
"pezsp-api/std",
"pezsp-block-builder/std",
"pezsp-consensus-aura/std",
"pezsp-consensus-grandpa/std",
"pezsp-core/std",
"pezsp-genesis-builder/std",
"pezsp-inherents/std",
"pezsp-keyring/std",
"pezsp-offchain/std",
"pezsp-runtime/std",
"pezsp-session/std",
"pezsp-storage/std",
"pezsp-transaction-pool/std",
"pezsp-version/std",
"bizinikiwi-wasm-builder",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-executive/runtime-benchmarks",
"frame-metadata-hash-extension/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system-benchmarking/runtime-benchmarks",
"frame-system-rpc-runtime-api/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"frame-try-runtime?/runtime-benchmarks",
"pallet-aura/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-grandpa/runtime-benchmarks",
"pallet-sudo/runtime-benchmarks",
"pallet-template/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-transaction-payment-rpc-runtime-api/runtime-benchmarks",
"pallet-transaction-payment/runtime-benchmarks",
"sp-api/runtime-benchmarks",
"sp-block-builder/runtime-benchmarks",
"sp-consensus-aura/runtime-benchmarks",
"sp-consensus-grandpa/runtime-benchmarks",
"sp-genesis-builder/runtime-benchmarks",
"sp-inherents/runtime-benchmarks",
"sp-keyring/runtime-benchmarks",
"sp-offchain/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"sp-session/runtime-benchmarks",
"sp-transaction-pool/runtime-benchmarks",
"sp-version/runtime-benchmarks",
"substrate-wasm-builder?/runtime-benchmarks",
"pezframe-benchmarking/runtime-benchmarks",
"pezframe-executive/runtime-benchmarks",
"pezframe-metadata-hash-extension/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezframe-system-benchmarking/runtime-benchmarks",
"pezframe-system-rpc-runtime-api/runtime-benchmarks",
"pezframe-system/runtime-benchmarks",
"pezframe-try-runtime?/runtime-benchmarks",
"pezpallet-aura/runtime-benchmarks",
"pezpallet-balances/runtime-benchmarks",
"pezpallet-grandpa/runtime-benchmarks",
"pezpallet-sudo/runtime-benchmarks",
"pezpallet-template/runtime-benchmarks",
"pezpallet-timestamp/runtime-benchmarks",
"pezpallet-transaction-payment-rpc-runtime-api/runtime-benchmarks",
"pezpallet-transaction-payment/runtime-benchmarks",
"pezsp-api/runtime-benchmarks",
"pezsp-block-builder/runtime-benchmarks",
"pezsp-consensus-aura/runtime-benchmarks",
"pezsp-consensus-grandpa/runtime-benchmarks",
"pezsp-genesis-builder/runtime-benchmarks",
"pezsp-inherents/runtime-benchmarks",
"pezsp-keyring/runtime-benchmarks",
"pezsp-offchain/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
"pezsp-session/runtime-benchmarks",
"pezsp-transaction-pool/runtime-benchmarks",
"pezsp-version/runtime-benchmarks",
"bizinikiwi-wasm-builder?/runtime-benchmarks",
]
try-runtime = [
"frame-executive/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"frame-try-runtime/try-runtime",
"pallet-aura/try-runtime",
"pallet-balances/try-runtime",
"pallet-grandpa/try-runtime",
"pallet-sudo/try-runtime",
"pallet-template/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
"sp-runtime/try-runtime",
"pezframe-executive/try-runtime",
"pezframe-support/try-runtime",
"pezframe-system/try-runtime",
"pezframe-try-runtime/try-runtime",
"pezpallet-aura/try-runtime",
"pezpallet-balances/try-runtime",
"pezpallet-grandpa/try-runtime",
"pezpallet-sudo/try-runtime",
"pezpallet-template/try-runtime",
"pezpallet-timestamp/try-runtime",
"pezpallet-transaction-payment/try-runtime",
"pezsp-runtime/try-runtime",
]
# Enable the metadata hash generation.
@@ -158,8 +158,8 @@ 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.
on-chain-release-build = ["metadata-hash", "sp-api/disable-logging"]
on-chain-release-build = ["metadata-hash", "pezsp-api/disable-logging"]
+2 -2
View File
@@ -1,13 +1,13 @@
#[cfg(all(feature = "std", feature = "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
+59 -59
View File
@@ -25,20 +25,20 @@
// External crates imports
use alloc::vec::Vec;
use frame_support::{
use pezframe_support::{
genesis_builder_helper::{build_state, get_preset},
weights::Weight,
};
use pallet_grandpa::AuthorityId as GrandpaId;
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_grandpa::AuthorityId as GrandpaId;
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, NumberFor},
transaction_validity::{TransactionSource, TransactionValidity},
ApplyExtrinsicResult,
};
use sp_version::RuntimeVersion;
use pezsp_version::RuntimeVersion;
// Local module imports
use super::{
@@ -47,7 +47,7 @@ use super::{
};
impl_runtime_apis! {
impl sp_api::Core<Block> for Runtime {
impl pezsp_api::Core<Block> for Runtime {
fn version() -> RuntimeVersion {
VERSION
}
@@ -56,12 +56,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())
}
@@ -75,13 +75,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)
}
@@ -90,19 +90,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,
@@ -112,23 +112,23 @@ 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_consensus_aura::AuraApi<Block, AuraId> for Runtime {
fn slot_duration() -> sp_consensus_aura::SlotDuration {
sp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration())
impl pezsp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
fn slot_duration() -> pezsp_consensus_aura::SlotDuration {
pezsp_consensus_aura::SlotDuration::from_millis(Aura::slot_duration())
}
fn authorities() -> Vec<AuraId> {
pallet_aura::Authorities::<Runtime>::get().into_inner()
pezpallet_aura::Authorities::<Runtime>::get().into_inner()
}
}
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)
}
@@ -140,29 +140,29 @@ impl_runtime_apis! {
}
}
impl sp_consensus_grandpa::GrandpaApi<Block> for Runtime {
fn grandpa_authorities() -> sp_consensus_grandpa::AuthorityList {
impl pezsp_consensus_grandpa::GrandpaApi<Block> for Runtime {
fn grandpa_authorities() -> pezsp_consensus_grandpa::AuthorityList {
Grandpa::grandpa_authorities()
}
fn current_set_id() -> sp_consensus_grandpa::SetId {
fn current_set_id() -> pezsp_consensus_grandpa::SetId {
Grandpa::current_set_id()
}
fn submit_report_equivocation_unsigned_extrinsic(
_equivocation_proof: sp_consensus_grandpa::EquivocationProof<
_equivocation_proof: pezsp_consensus_grandpa::EquivocationProof<
<Block as BlockT>::Hash,
NumberFor<Block>,
>,
_key_owner_proof: sp_consensus_grandpa::OpaqueKeyOwnershipProof,
_key_owner_proof: pezsp_consensus_grandpa::OpaqueKeyOwnershipProof,
) -> Option<()> {
None
}
fn generate_key_ownership_proof(
_set_id: sp_consensus_grandpa::SetId,
_set_id: pezsp_consensus_grandpa::SetId,
_authority_id: GrandpaId,
) -> Option<sp_consensus_grandpa::OpaqueKeyOwnershipProof> {
) -> Option<pezsp_consensus_grandpa::OpaqueKeyOwnershipProof> {
// NOTE: this is the only implementation possible since we've
// defined our key owner proof type as a bottom type (i.e. a type
// with no values).
@@ -170,23 +170,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 {
@@ -197,19 +197,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 {
@@ -221,15 +221,15 @@ 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<frame_support::traits::StorageInfo>,
Vec<pezframe_benchmarking::BenchmarkList>,
Vec<pezframe_support::traits::StorageInfo>,
) {
use frame_benchmarking::{baseline, BenchmarkList};
use frame_support::traits::StorageInfoTrait;
use frame_system_benchmarking::Pallet as SystemBench;
use frame_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
use pezframe_benchmarking::{baseline, BenchmarkList};
use pezframe_support::traits::StorageInfoTrait;
use pezframe_system_benchmarking::Pallet as SystemBench;
use pezframe_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
use baseline::Pallet as BaselineBench;
use super::*;
@@ -243,19 +243,19 @@ 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::{baseline, BenchmarkBatch};
use sp_storage::TrackedStorageKey;
use frame_system_benchmarking::Pallet as SystemBench;
use frame_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
config: pezframe_benchmarking::BenchmarkConfig
) -> Result<Vec<pezframe_benchmarking::BenchmarkBatch>, alloc::string::String> {
use pezframe_benchmarking::{baseline, BenchmarkBatch};
use pezsp_storage::TrackedStorageKey;
use pezframe_system_benchmarking::Pallet as SystemBench;
use pezframe_system_benchmarking::extensions::Pallet as SystemExtensionsBench;
use baseline::Pallet as BaselineBench;
use super::*;
impl frame_system_benchmarking::Config for Runtime {}
impl pezframe_system_benchmarking::Config for Runtime {}
impl baseline::Config for Runtime {}
use frame_support::traits::WhitelistedStorageKeys;
use pezframe_support::traits::WhitelistedStorageKeys;
let whitelist: Vec<TrackedStorageKey> = AllPalletsWithSystem::whitelisted_storage_keys();
let mut batches = Vec::<BenchmarkBatch>::new();
@@ -267,8 +267,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) {
// NOTE: intentional unwrap: we don't want to propagate the error backwards, and want to
// have a backtrace here. If any of the pre/post migration checks fail, we shall stop
// right here and right now.
@@ -280,7 +280,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.
@@ -288,16 +288,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,12 +23,12 @@
//
// For more information, please refer to <http://unlicense.org>
frame_benchmarking::define_benchmarks!(
[frame_benchmarking, BaselineBench::<Runtime>]
[frame_system, SystemBench::<Runtime>]
[frame_system_extensions, SystemExtensionsBench::<Runtime>]
[pallet_balances, Balances]
[pallet_timestamp, Timestamp]
[pallet_sudo, Sudo]
[pallet_template, Template]
pezframe_benchmarking::define_benchmarks!(
[pezframe_benchmarking, BaselineBench::<Runtime>]
[pezframe_system, SystemBench::<Runtime>]
[pezframe_system_extensions, SystemExtensionsBench::<Runtime>]
[pezpallet_balances, Balances]
[pezpallet_timestamp, Timestamp]
[pezpallet_sudo, Sudo]
[pezpallet_template, Template]
);
+28 -28
View File
@@ -23,8 +23,8 @@
//
// For more information, please refer to <http://unlicense.org>
// Substrate and Pezkuwi dependencies
use frame_support::{
// Bizinikiwi and Pezkuwi dependencies
use pezframe_support::{
derive_impl, parameter_types,
traits::{ConstBool, ConstU128, ConstU32, ConstU64, ConstU8, VariantCountOf},
weights::{
@@ -32,11 +32,11 @@ use frame_support::{
IdentityFee, Weight,
},
};
use frame_system::limits::{BlockLength, BlockWeights};
use pallet_transaction_payment::{ConstFeeMultiplier, FungibleAdapter, Multiplier};
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_runtime::{traits::One, Perbill};
use sp_version::RuntimeVersion;
use pezframe_system::limits::{BlockLength, BlockWeights};
use pezpallet_transaction_payment::{ConstFeeMultiplier, FungibleAdapter, Multiplier};
use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
use pezsp_runtime::{traits::One, Perbill};
use pezsp_version::RuntimeVersion;
// Local module imports
use super::{
@@ -66,11 +66,11 @@ parameter_types! {
#[allow(unused_parens)]
type SingleBlockMigrations = ();
/// The default types are being injected by [`derive_impl`](`frame_support::derive_impl`) from
/// [`SoloChainDefaultConfig`](`struct@frame_system::config_preludes::SolochainDefaultConfig`),
/// The default types are being injected by [`derive_impl`](`pezframe_support::derive_impl`) from
/// [`SoloChainDefaultConfig`](`struct@pezframe_system::config_preludes::SolochainDefaultConfig`),
/// but overridden as needed.
#[derive_impl(frame_system::config_preludes::SolochainDefaultConfig)]
impl frame_system::Config for Runtime {
#[derive_impl(pezframe_system::config_preludes::SolochainDefaultConfig)]
impl pezframe_system::Config for Runtime {
/// The block type for the runtime.
type Block = Block;
/// Block & extrinsics weights: base values and limits.
@@ -90,22 +90,22 @@ impl frame_system::Config for Runtime {
/// Version of the runtime.
type Version = Version;
/// The data to be stored in an account.
type AccountData = pallet_balances::AccountData<Balance>;
/// This is used as an identifier of the chain. 42 is the generic substrate prefix.
type AccountData = pezpallet_balances::AccountData<Balance>;
/// This is used as an identifier of the chain. 42 is the generic bizinikiwi prefix.
type SS58Prefix = SS58Prefix;
type MaxConsumers = frame_support::traits::ConstU32<16>;
type MaxConsumers = pezframe_support::traits::ConstU32<16>;
type SingleBlockMigrations = SingleBlockMigrations;
}
impl pallet_aura::Config for Runtime {
impl pezpallet_aura::Config for Runtime {
type AuthorityId = AuraId;
type DisabledValidators = ();
type MaxAuthorities = ConstU32<32>;
type AllowMultipleBlocksPerSlot = ConstBool<false>;
type SlotDuration = pallet_aura::MinimumPeriodTimesTwo<Runtime>;
type SlotDuration = pezpallet_aura::MinimumPeriodTimesTwo<Runtime>;
}
impl pallet_grandpa::Config for Runtime {
impl pezpallet_grandpa::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
@@ -113,11 +113,11 @@ impl pallet_grandpa::Config for Runtime {
type MaxNominators = ConstU32<0>;
type MaxSetIdSessionEntries = ConstU64<0>;
type KeyOwnerProof = sp_core::Void;
type KeyOwnerProof = pezsp_core::Void;
type EquivocationReportSystem = ();
}
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;
@@ -125,7 +125,7 @@ impl pallet_timestamp::Config for Runtime {
type WeightInfo = ();
}
impl pallet_balances::Config for Runtime {
impl pezpallet_balances::Config for Runtime {
type MaxLocks = ConstU32<50>;
type MaxReserves = ();
type ReserveIdentifier = [u8; 8];
@@ -136,7 +136,7 @@ impl pallet_balances::Config for Runtime {
type DustRemoval = ();
type ExistentialDeposit = ConstU128<EXISTENTIAL_DEPOSIT>;
type AccountStore = System;
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
type WeightInfo = pezpallet_balances::weights::BizinikiwiWeight<Runtime>;
type FreezeIdentifier = RuntimeFreezeReason;
type MaxFreezes = VariantCountOf<RuntimeFreezeReason>;
type RuntimeHoldReason = RuntimeHoldReason;
@@ -148,24 +148,24 @@ parameter_types! {
pub FeeMultiplier: Multiplier = Multiplier::one();
}
impl pallet_transaction_payment::Config for Runtime {
impl pezpallet_transaction_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type OnChargeTransaction = FungibleAdapter<Balances, ()>;
type OperationalFeeMultiplier = ConstU8<5>;
type WeightToFee = IdentityFee<Balance>;
type LengthToFee = IdentityFee<Balance>;
type FeeMultiplierUpdate = ConstFeeMultiplier<FeeMultiplier>;
type WeightInfo = pallet_transaction_payment::weights::SubstrateWeight<Runtime>;
type WeightInfo = pezpallet_transaction_payment::weights::BizinikiwiWeight<Runtime>;
}
impl pallet_sudo::Config for Runtime {
impl pezpallet_sudo::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type RuntimeCall = RuntimeCall;
type WeightInfo = pallet_sudo::weights::SubstrateWeight<Runtime>;
type WeightInfo = pezpallet_sudo::weights::BizinikiwiWeight<Runtime>;
}
/// Configure the pallet-template in pallets/template.
impl pallet_template::Config for Runtime {
/// Configure the pezpallet-template in pallets/template.
impl pezpallet_template::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = pallet_template::weights::SubstrateWeight<Runtime>;
type WeightInfo = pezpallet_template::weights::BizinikiwiWeight<Runtime>;
}
@@ -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
@@ -17,12 +17,12 @@
use crate::{AccountId, BalancesConfig, RuntimeGenesisConfig, SudoConfig};
use alloc::{vec, vec::Vec};
use frame_support::build_struct_json_patch;
use pezframe_support::build_struct_json_patch;
use serde_json::Value;
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
use sp_consensus_grandpa::AuthorityId as GrandpaId;
use sp_genesis_builder::{self, PresetId};
use sp_keyring::Sr25519Keyring;
use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
use pezsp_consensus_grandpa::AuthorityId as GrandpaId;
use pezsp_genesis_builder::{self, PresetId};
use pezsp_keyring::Sr25519Keyring;
// Returns the genesis config presets populated with given parameters.
fn testnet_genesis(
@@ -38,10 +38,10 @@ fn testnet_genesis(
.map(|k| (k, 1u128 << 60))
.collect::<Vec<_>>(),
},
aura: pallet_aura::GenesisConfig {
aura: pezpallet_aura::GenesisConfig {
authorities: initial_authorities.iter().map(|x| (x.0.clone())).collect::<Vec<_>>(),
},
grandpa: pallet_grandpa::GenesisConfig {
grandpa: pezpallet_grandpa::GenesisConfig {
authorities: initial_authorities.iter().map(|x| (x.1.clone(), 1)).collect::<Vec<_>>(),
},
sudo: SudoConfig { key: Some(root) },
@@ -52,8 +52,8 @@ fn testnet_genesis(
pub fn development_config_genesis() -> Value {
testnet_genesis(
vec![(
sp_keyring::Sr25519Keyring::Alice.public().into(),
sp_keyring::Ed25519Keyring::Alice.public().into(),
pezsp_keyring::Sr25519Keyring::Alice.public().into(),
pezsp_keyring::Ed25519Keyring::Alice.public().into(),
)],
vec![
Sr25519Keyring::Alice.to_account_id(),
@@ -61,7 +61,7 @@ pub fn development_config_genesis() -> Value {
Sr25519Keyring::AliceStash.to_account_id(),
Sr25519Keyring::BobStash.to_account_id(),
],
sp_keyring::Sr25519Keyring::Alice.to_account_id(),
pezsp_keyring::Sr25519Keyring::Alice.to_account_id(),
)
}
@@ -70,12 +70,12 @@ pub fn local_config_genesis() -> Value {
testnet_genesis(
vec![
(
sp_keyring::Sr25519Keyring::Alice.public().into(),
sp_keyring::Ed25519Keyring::Alice.public().into(),
pezsp_keyring::Sr25519Keyring::Alice.public().into(),
pezsp_keyring::Ed25519Keyring::Alice.public().into(),
),
(
sp_keyring::Sr25519Keyring::Bob.public().into(),
sp_keyring::Ed25519Keyring::Bob.public().into(),
pezsp_keyring::Sr25519Keyring::Bob.public().into(),
pezsp_keyring::Ed25519Keyring::Bob.public().into(),
),
],
Sr25519Keyring::iter()
@@ -89,8 +89,8 @@ pub fn local_config_genesis() -> Value {
/// Provides the JSON representation of predefined genesis config for given `id`.
pub fn get_preset(id: &PresetId) -> Option<Vec<u8>> {
let patch = match id.as_ref() {
sp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
sp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => local_config_genesis(),
pezsp_genesis_builder::DEV_RUNTIME_PRESET => development_config_genesis(),
pezsp_genesis_builder::LOCAL_TESTNET_RUNTIME_PRESET => local_config_genesis(),
_ => return None,
};
Some(
@@ -103,7 +103,7 @@ pub fn get_preset(id: &PresetId) -> Option<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),
]
}
+43 -43
View File
@@ -10,20 +10,20 @@ pub mod configs;
extern crate alloc;
use alloc::vec::Vec;
use sp_runtime::{
use pezsp_runtime::{
generic, impl_opaque_keys,
traits::{BlakeTwo256, IdentifyAccount, Verify},
MultiAddress, MultiSignature,
};
#[cfg(feature = "std")]
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;
use pezsp_version::NativeVersion;
use pezsp_version::RuntimeVersion;
pub use frame_system::Call as SystemCall;
pub use pallet_balances::Call as BalancesCall;
pub use pallet_timestamp::Call as TimestampCall;
pub use pezframe_system::Call as SystemCall;
pub use pezpallet_balances::Call as BalancesCall;
pub use pezpallet_timestamp::Call as TimestampCall;
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
pub use pezsp_runtime::BuildStorage;
pub mod genesis_config_presets;
@@ -33,12 +33,12 @@ pub mod genesis_config_presets;
/// to even the core data structures.
pub mod opaque {
use super::*;
use sp_runtime::{
use pezsp_runtime::{
generic,
traits::{BlakeTwo256, Hash as HashT},
};
pub use sp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
pub use pezsp_runtime::OpaqueExtrinsic as UncheckedExtrinsic;
/// Opaque block header type.
pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
@@ -59,7 +59,7 @@ impl_opaque_keys! {
// To learn more about runtime versioning, see:
// https://docs.pezkuwichain.io/main-docs/build/upgrade#runtime-versioning
#[sp_version::runtime_version]
#[pezsp_version::runtime_version]
pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: alloc::borrow::Cow::Borrowed("solochain-template-runtime"),
impl_name: alloc::borrow::Cow::Borrowed("solochain-template-runtime"),
@@ -79,7 +79,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.
@@ -126,7 +126,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;
@@ -148,17 +148,17 @@ pub type BlockId = generic::BlockId<Block>;
/// The `TransactionExtension` to the basic transaction logic.
pub type TxExtension = (
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>,
frame_system::WeightReclaim<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>,
pezframe_system::WeightReclaim<Runtime>,
);
/// Unchecked extrinsic type as expected by this runtime.
@@ -169,16 +169,16 @@ pub type UncheckedExtrinsic =
pub type SignedPayload = generic::SignedPayload<RuntimeCall, 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,
>;
// Create the runtime by composing the FRAME pallets that were previously configured.
#[frame_support::runtime]
#[pezframe_support::runtime]
mod runtime {
#[runtime::runtime]
#[runtime::derive(
@@ -195,28 +195,28 @@ mod runtime {
)]
pub struct Runtime;
#[runtime::pallet_index(0)]
pub type System = frame_system;
#[runtime::pezpallet_index(0)]
pub type System = pezframe_system;
#[runtime::pallet_index(1)]
pub type Timestamp = pallet_timestamp;
#[runtime::pezpallet_index(1)]
pub type Timestamp = pezpallet_timestamp;
#[runtime::pallet_index(2)]
pub type Aura = pallet_aura;
#[runtime::pezpallet_index(2)]
pub type Aura = pezpallet_aura;
#[runtime::pallet_index(3)]
pub type Grandpa = pallet_grandpa;
#[runtime::pezpallet_index(3)]
pub type Grandpa = pezpallet_grandpa;
#[runtime::pallet_index(4)]
pub type Balances = pallet_balances;
#[runtime::pezpallet_index(4)]
pub type Balances = pezpallet_balances;
#[runtime::pallet_index(5)]
pub type TransactionPayment = pallet_transaction_payment;
#[runtime::pezpallet_index(5)]
pub type TransactionPayment = pezpallet_transaction_payment;
#[runtime::pallet_index(6)]
pub type Sudo = pallet_sudo;
#[runtime::pezpallet_index(6)]
pub type Sudo = pezpallet_sudo;
// Include the custom logic from the pallet-template in the runtime.
#[runtime::pallet_index(7)]
pub type Template = pallet_template;
// Include the custom logic from the pezpallet-template in the runtime.
#[runtime::pezpallet_index(7)]
pub type Template = pezpallet_template;
}
+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,