mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-06-16 23:11:00 +00:00
Update documentation and templates for Pezkuwi branding
This commit is contained in:
@@ -28,34 +28,34 @@ evm-runtime-template = { path = "../runtime" }
|
||||
pezframe-benchmarking = { workspace = true }
|
||||
pezframe-benchmarking-cli = { workspace = true }
|
||||
pezpallet-transaction-payment-rpc = { workspace = true }
|
||||
sc-basic-authorship = { workspace = true }
|
||||
sc-chain-spec = { workspace = true }
|
||||
sc-cli = { workspace = true }
|
||||
sc-client-api = { workspace = true }
|
||||
sc-consensus = { workspace = true }
|
||||
sc-consensus-aura = { workspace = true }
|
||||
sc-consensus-slots = { workspace = true }
|
||||
sc-executor = { workspace = true }
|
||||
sc-network = { workspace = true }
|
||||
sc-network-sync = { workspace = true }
|
||||
sc-offchain = { workspace = true }
|
||||
sc-rpc = { workspace = true }
|
||||
sc-service = { workspace = true }
|
||||
sc-sysinfo = { workspace = true }
|
||||
sc-telemetry = { workspace = true }
|
||||
sc-tracing = { workspace = true }
|
||||
sc-transaction-pool = { workspace = true }
|
||||
sc-transaction-pool-api = { workspace = true }
|
||||
sp-api = { workspace = true }
|
||||
sp-block-builder = { workspace = true }
|
||||
sp-blockchain = { workspace = true }
|
||||
sp-consensus-aura = { workspace = true }
|
||||
sp-core = { workspace = true }
|
||||
sp-inherents = { workspace = true }
|
||||
sp-io = { workspace = true }
|
||||
sp-keystore = { workspace = true }
|
||||
sp-runtime = { workspace = true }
|
||||
sp-timestamp = { workspace = true }
|
||||
pezsc-basic-authorship = { workspace = true }
|
||||
pezsc-chain-spec = { workspace = true }
|
||||
pezsc-cli = { workspace = true }
|
||||
pezsc-client-api = { workspace = true }
|
||||
pezsc-consensus = { workspace = true }
|
||||
pezsc-consensus-aura = { workspace = true }
|
||||
pezsc-consensus-slots = { workspace = true }
|
||||
pezsc-executor = { workspace = true }
|
||||
pezsc-network = { workspace = true }
|
||||
pezsc-network-sync = { workspace = true }
|
||||
pezsc-offchain = { workspace = true }
|
||||
pezsc-rpc = { workspace = true }
|
||||
pezsc-service = { workspace = true }
|
||||
pezsc-sysinfo = { workspace = true }
|
||||
pezsc-telemetry = { workspace = true }
|
||||
pezsc-tracing = { workspace = true }
|
||||
pezsc-transaction-pool = { workspace = true }
|
||||
pezsc-transaction-pool-api = { workspace = true }
|
||||
pezsp-api = { workspace = true }
|
||||
pezsp-block-builder = { workspace = true }
|
||||
pezsp-blockchain = { workspace = true }
|
||||
pezsp-consensus-aura = { workspace = true }
|
||||
pezsp-core = { workspace = true }
|
||||
pezsp-inherents = { workspace = true }
|
||||
pezsp-io = { workspace = true }
|
||||
pezsp-keystore = { workspace = true }
|
||||
pezsp-runtime = { workspace = true }
|
||||
pezsp-timestamp = { workspace = true }
|
||||
bizinikiwi-pezframe-rpc-system = { workspace = true }
|
||||
bizinikiwi-prometheus-endpoint = { workspace = true }
|
||||
|
||||
@@ -64,19 +64,19 @@ pezkuwi-cli = { workspace = true }
|
||||
pezkuwi-primitives = { workspace = true }
|
||||
staging-xcm = { workspace = true }
|
||||
|
||||
# Cumulus
|
||||
# Pezpezcumulus
|
||||
color-print = { workspace = true }
|
||||
cumulus-client-cli = { workspace = true }
|
||||
cumulus-client-collator = { workspace = true }
|
||||
cumulus-client-consensus-aura = { workspace = true }
|
||||
cumulus-client-consensus-common = { workspace = true }
|
||||
cumulus-client-consensus-proposer = { workspace = true }
|
||||
cumulus-client-teyrchain-inherent = { workspace = true }
|
||||
cumulus-client-service = { workspace = true }
|
||||
cumulus-primitives-core = { workspace = true }
|
||||
cumulus-primitives-teyrchain-inherent = { workspace = true }
|
||||
cumulus-relay-chain-interface = { workspace = true }
|
||||
cumulus-test-relay-sproof-builder = { workspace = true }
|
||||
pezcumulus-client-cli = { workspace = true }
|
||||
pezcumulus-client-collator = { workspace = true }
|
||||
pezcumulus-client-consensus-aura = { workspace = true }
|
||||
pezcumulus-client-consensus-common = { workspace = true }
|
||||
pezcumulus-client-consensus-proposer = { workspace = true }
|
||||
pezcumulus-client-teyrchain-inherent = { workspace = true }
|
||||
pezcumulus-client-service = { workspace = true }
|
||||
pezcumulus-primitives-core = { workspace = true }
|
||||
pezcumulus-primitives-teyrchain-inherent = { workspace = true }
|
||||
pezcumulus-relay-chain-interface = { workspace = true }
|
||||
pezcumulus-test-relay-sproof-builder = { workspace = true }
|
||||
|
||||
# Frontier
|
||||
fc-api = { workspace = true }
|
||||
@@ -101,12 +101,12 @@ bizinikiwi-build-script-utils = { workspace = true }
|
||||
[features]
|
||||
default = []
|
||||
async-backing = []
|
||||
runtime-benchmarks = [ "evm-runtime-template/runtime-benchmarks", "pezframe-benchmarking-cli/runtime-benchmarks", "pezframe-benchmarking/runtime-benchmarks", "pezkuwi-cli/runtime-benchmarks", "pezkuwi-primitives/runtime-benchmarks", "sc-service/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "tc-consensus/runtime-benchmarks" ]
|
||||
runtime-benchmarks = [ "evm-runtime-template/runtime-benchmarks", "pezframe-benchmarking-cli/runtime-benchmarks", "pezframe-benchmarking/runtime-benchmarks", "pezkuwi-cli/runtime-benchmarks", "pezkuwi-primitives/runtime-benchmarks", "pezsc-service/runtime-benchmarks", "pezsp-runtime/runtime-benchmarks", "tc-consensus/runtime-benchmarks" ]
|
||||
tanssi = []
|
||||
try-runtime = [
|
||||
"evm-runtime-template/try-runtime",
|
||||
"pezkuwi-cli/try-runtime",
|
||||
"sp-runtime/try-runtime",
|
||||
"pezsp-runtime/try-runtime",
|
||||
]
|
||||
txpool = [ "fc-rpc/txpool" ]
|
||||
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use cumulus_primitives_core::ParaId;
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use evm_runtime_template::{AccountId, OpenZeppelinPrecompiles as Precompiles, Runtime};
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use evm_runtime_template::{AuraId, Signature};
|
||||
use fp_evm::GenesisAccount;
|
||||
use hex_literal::hex;
|
||||
use log::error;
|
||||
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 sp_core::H160;
|
||||
use pezsp_core::H160;
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use sp_core::{ecdsa, Pair, Public};
|
||||
use pezsp_core::{ecdsa, Pair, Public};
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use sp_runtime::traits::{IdentifyAccount, Verify};
|
||||
use pezsp_runtime::traits::{IdentifyAccount, Verify};
|
||||
|
||||
use crate::contracts::{parse_contracts, ContractsPath};
|
||||
|
||||
/// Specialized `ChainSpec` for the normal teyrchain runtime.
|
||||
pub type ChainSpec = sc_service::GenericChainSpec<Extensions>;
|
||||
pub type ChainSpec = pezsc_service::GenericChainSpec<Extensions>;
|
||||
|
||||
/// The default XCM version to set in genesis config.
|
||||
const SAFE_XCM_VERSION: u32 = xcm::prelude::XCM_VERSION;
|
||||
@@ -44,8 +44,8 @@ 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())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ pub fn template_session_keys(keys: AuraId) -> evm_runtime_template::SessionKeys
|
||||
|
||||
pub fn development_config(contracts_path: ContractsPath) -> 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());
|
||||
@@ -129,7 +129,7 @@ pub fn development_config(contracts_path: ContractsPath) -> ChainSpec {
|
||||
|
||||
pub fn local_testnet_config(contracts_path: ContractsPath) -> 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());
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use sc_cli::{ChainSpec, Result};
|
||||
use sc_network::config::NetworkConfiguration;
|
||||
use pezsc_cli::{ChainSpec, Result};
|
||||
use pezsc_network::config::NetworkConfiguration;
|
||||
|
||||
use crate::{contracts::ContractsPath, eth::EthConfiguration};
|
||||
|
||||
@@ -12,31 +12,31 @@ pub enum Subcommand {
|
||||
BuildSpec(ExtendedBuildSpecCmd),
|
||||
|
||||
/// 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),
|
||||
PurgeChain(pezcumulus_client_cli::PurgeChainCmd),
|
||||
|
||||
/// Export the genesis head data of the teyrchain.
|
||||
///
|
||||
/// Head data is the encoded block header.
|
||||
#[command(alias = "export-genesis-state")]
|
||||
ExportGenesisHead(cumulus_client_cli::ExportGenesisHeadCommand),
|
||||
ExportGenesisHead(pezcumulus_client_cli::ExportGenesisHeadCommand),
|
||||
|
||||
/// Export the genesis wasm of the teyrchain.
|
||||
ExportGenesisWasm(cumulus_client_cli::ExportGenesisWasmCommand),
|
||||
ExportGenesisWasm(pezcumulus_client_cli::ExportGenesisWasmCommand),
|
||||
|
||||
/// Sub-commands concerned with benchmarking.
|
||||
/// The pezpallet benchmarking moved to the `pezpallet` sub-command.
|
||||
@@ -44,7 +44,7 @@ pub enum Subcommand {
|
||||
Benchmark(pezframe_benchmarking_cli::BenchmarkCmd),
|
||||
|
||||
/// Try-runtime has migrated to a standalone
|
||||
/// [CLI](<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
|
||||
/// [CLI](<https://github.com/pezkuwichain/try-runtime-cli>). The subcommand exists as a stub and
|
||||
/// deprecation notice. It will be removed entirely some time after January
|
||||
/// 2024.
|
||||
TryRuntime,
|
||||
@@ -67,7 +67,7 @@ impl Subcommand {
|
||||
#[derive(Debug, Clone, clap::Parser)]
|
||||
pub struct ExtendedBuildSpecCmd {
|
||||
#[clap(flatten)]
|
||||
pub cmd: sc_cli::BuildSpecCmd,
|
||||
pub cmd: pezsc_cli::BuildSpecCmd,
|
||||
|
||||
/// Path to a directory that contains precompiled contracts.
|
||||
/// A directory should contain file `contracts.json`.
|
||||
@@ -116,7 +116,7 @@ pub struct Cli {
|
||||
pub subcommand: Option<Subcommand>,
|
||||
|
||||
#[command(flatten)]
|
||||
pub run: cumulus_client_cli::RunCmd,
|
||||
pub run: pezcumulus_client_cli::RunCmd,
|
||||
|
||||
/// Disable automatic hardware benchmarks.
|
||||
///
|
||||
@@ -152,7 +152,7 @@ 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);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
use cumulus_client_service::storage_proof_size::HostFunctions as ReclaimHostFunctions;
|
||||
use cumulus_primitives_core::ParaId;
|
||||
use pezcumulus_client_service::storage_proof_size::HostFunctions as ReclaimHostFunctions;
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
use evm_runtime_template::Block;
|
||||
use pezframe_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE};
|
||||
use log::info;
|
||||
use sc_cli::{
|
||||
use pezsc_cli::{
|
||||
ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,
|
||||
NetworkParams, Result, RpcEndpoint, SharedParams, BizinikiwiCli,
|
||||
};
|
||||
use sc_service::config::{BasePath, PrometheusConfig};
|
||||
use sp_runtime::traits::AccountIdConversion;
|
||||
use pezsc_service::config::{BasePath, PrometheusConfig};
|
||||
use pezsp_runtime::traits::AccountIdConversion;
|
||||
|
||||
use crate::{
|
||||
chain_spec,
|
||||
@@ -52,14 +52,14 @@ impl BizinikiwiCli for Cli {
|
||||
}
|
||||
|
||||
fn support_url() -> String {
|
||||
"https://github.com/paritytech/pezkuwi-sdk/issues/new".into()
|
||||
"https://github.com/pezkuwichain/pezkuwi-sdk/issues/new".into()
|
||||
}
|
||||
|
||||
fn copyright_start_year() -> i32 {
|
||||
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,
|
||||
self.subcommand.as_ref().map(Subcommand::contract_directory).unwrap_or_default(),
|
||||
@@ -90,14 +90,14 @@ impl BizinikiwiCli for RelayChainCli {
|
||||
}
|
||||
|
||||
fn support_url() -> String {
|
||||
"https://github.com/paritytech/pezkuwi-sdk/issues/new".into()
|
||||
"https://github.com/pezkuwichain/pezkuwi-sdk/issues/new".into()
|
||||
}
|
||||
|
||||
fn copyright_start_year() -> i32 {
|
||||
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)
|
||||
}
|
||||
}
|
||||
@@ -186,9 +186,9 @@ pub fn run() -> Result<()> {
|
||||
let runner = cli.create_runner(cmd)?;
|
||||
// Switch on the concrete benchmark sub-command-
|
||||
match cmd {
|
||||
BenchmarkCmd::Pallet(cmd) =>
|
||||
BenchmarkCmd::Pezpallet(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`."
|
||||
@@ -200,7 +200,7 @@ pub fn run() -> Result<()> {
|
||||
}),
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
BenchmarkCmd::Storage(_) =>
|
||||
Err(sc_cli::Error::Input(
|
||||
Err(pezsc_cli::Error::Input(
|
||||
"Compile with --features=runtime-benchmarks \
|
||||
to enable storage benchmarks."
|
||||
.into(),
|
||||
@@ -220,7 +220,7 @@ pub fn run() -> Result<()> {
|
||||
_ => Err("Benchmarking sub-command unsupported".into()),
|
||||
}
|
||||
},
|
||||
Some(Subcommand::TryRuntime) => Err("The `try-runtime` subcommand has been migrated to a standalone CLI (https://github.com/paritytech/try-runtime-cli). It is no longer being maintained here and will be removed entirely some time after January 2024. Please remove this subcommand from your runtime and use the standalone CLI.".into()),
|
||||
Some(Subcommand::TryRuntime) => Err("The `try-runtime` subcommand has been migrated to a standalone CLI (https://github.com/pezkuwichain/try-runtime-cli). It is no longer being maintained here and will be removed entirely some time after January 2024. Please remove this subcommand from your runtime and use the standalone CLI.".into()),
|
||||
None => {
|
||||
let runner = cli.create_runner(&cli.run.normalize())?;
|
||||
let collator_options = cli.run.collator_options();
|
||||
@@ -229,7 +229,7 @@ pub fn run() -> Result<()> {
|
||||
let hwbench = (!cli.no_hardware_benchmarks)
|
||||
.then_some(config.database.path().map(|database_path| {
|
||||
let _ = std::fs::create_dir_all(database_path);
|
||||
sc_sysinfo::gather_hwbench(Some(database_path), &SUBSTRATE_REFERENCE_HARDWARE)
|
||||
pezsc_sysinfo::gather_hwbench(Some(database_path), &SUBSTRATE_REFERENCE_HARDWARE)
|
||||
}))
|
||||
.flatten();
|
||||
|
||||
@@ -308,7 +308,7 @@ impl CliConfiguration<Self> for RelayChainCli {
|
||||
Ok(self.shared_params().base_path()?.or_else(|| self.base_path.clone().map(Into::into)))
|
||||
}
|
||||
|
||||
fn rpc_addr(&self, default_listen_port: u16) -> sc_cli::Result<Option<Vec<RpcEndpoint>>> {
|
||||
fn rpc_addr(&self, default_listen_port: u16) -> pezsc_cli::Result<Option<Vec<RpcEndpoint>>> {
|
||||
self.base.base.rpc_addr(default_listen_port)
|
||||
}
|
||||
|
||||
@@ -322,7 +322,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");
|
||||
}
|
||||
@@ -333,11 +333,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)
|
||||
}
|
||||
|
||||
@@ -345,7 +345,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()
|
||||
}
|
||||
|
||||
@@ -380,7 +380,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)
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ impl CliConfiguration for ExtendedBuildSpecCmd {
|
||||
self.cmd.shared_params()
|
||||
}
|
||||
|
||||
fn node_key_params(&self) -> Option<&sc_cli::NodeKeyParams> {
|
||||
fn node_key_params(&self) -> Option<&pezsc_cli::NodeKeyParams> {
|
||||
self.cmd.node_key_params()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use std::str::FromStr;
|
||||
|
||||
use hex_literal::hex;
|
||||
use sp_core::H160;
|
||||
use pezsp_core::H160;
|
||||
|
||||
use super::{hardhat::HardhatContract, Contract};
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ use std::{
|
||||
};
|
||||
|
||||
use serde::{de, Deserialize};
|
||||
use sp_core::H160;
|
||||
use pezsp_core::H160;
|
||||
|
||||
use self::{
|
||||
defaults::{entrypoint_address, entrypoint_contract},
|
||||
|
||||
@@ -12,17 +12,17 @@ pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool};
|
||||
pub use fc_storage::{StorageOverride, StorageOverrideHandler};
|
||||
use futures::{future, prelude::*};
|
||||
// Bizinikiwi
|
||||
use sc_client_api::BlockchainEvents;
|
||||
use sc_executor::{HostFunctions, WasmExecutor};
|
||||
use sc_network_sync::SyncingService;
|
||||
use sc_service::{error::Error as ServiceError, Configuration, TaskManager};
|
||||
use sp_api::ConstructRuntimeApi;
|
||||
use pezsc_client_api::BlockchainEvents;
|
||||
use pezsc_executor::{HostFunctions, WasmExecutor};
|
||||
use pezsc_network_sync::SyncingService;
|
||||
use pezsc_service::{error::Error as ServiceError, Configuration, TaskManager};
|
||||
use pezsp_api::ConstructRuntimeApi;
|
||||
|
||||
/// Full backend.
|
||||
pub type FullBackend = sc_service::TFullBackend<Block>;
|
||||
pub type FullBackend = pezsc_service::TFullBackend<Block>;
|
||||
/// Full client.
|
||||
pub type FullClient<RuntimeApi, Executor> =
|
||||
sc_service::TFullClient<Block, RuntimeApi, WasmExecutor<Executor>>;
|
||||
pezsc_service::TFullClient<Block, RuntimeApi, WasmExecutor<Executor>>;
|
||||
|
||||
/// Frontier DB backend type.
|
||||
pub type FrontierBackend<C> = fc_db::Backend<Block, C>;
|
||||
@@ -112,14 +112,14 @@ pub fn new_frontier_partial(
|
||||
|
||||
/// A set of APIs that ethereum-compatible runtimes must implement.
|
||||
pub trait EthCompatRuntimeApiCollection:
|
||||
sp_api::ApiExt<Block>
|
||||
pezsp_api::ApiExt<Block>
|
||||
+ fp_rpc::ConvertTransactionRuntimeApi<Block>
|
||||
+ fp_rpc::EthereumRuntimeRPCApi<Block>
|
||||
{
|
||||
}
|
||||
|
||||
impl<Api> EthCompatRuntimeApiCollection for Api where
|
||||
Api: sp_api::ApiExt<Block>
|
||||
Api: pezsp_api::ApiExt<Block>
|
||||
+ fp_rpc::ConvertTransactionRuntimeApi<Block>
|
||||
+ fp_rpc::EthereumRuntimeRPCApi<Block>
|
||||
{
|
||||
|
||||
@@ -13,6 +13,6 @@ mod eth;
|
||||
#[cfg_attr(feature = "tanssi", path = "tanssi_rpc/mod.rs")]
|
||||
mod rpc;
|
||||
|
||||
fn main() -> sc_cli::Result<()> {
|
||||
fn main() -> pezsc_cli::Result<()> {
|
||||
command::run()
|
||||
}
|
||||
|
||||
@@ -7,22 +7,22 @@ pub use fc_storage::StorageOverride;
|
||||
use fp_rpc::{ConvertTransaction, ConvertTransactionRuntimeApi, EthereumRuntimeRPCApi};
|
||||
use jsonrpsee::RpcModule;
|
||||
// Bizinikiwi
|
||||
use sc_client_api::{
|
||||
use pezsc_client_api::{
|
||||
backend::{Backend, StorageProvider},
|
||||
client::BlockchainEvents,
|
||||
AuxStore, UsageProvider,
|
||||
};
|
||||
use sc_network::service::traits::NetworkService;
|
||||
use sc_network_sync::SyncingService;
|
||||
use sc_rpc::SubscriptionTaskExecutor;
|
||||
use sc_transaction_pool_api::TransactionPool;
|
||||
use sp_api::{CallApiAt, ProvideRuntimeApi};
|
||||
use sp_block_builder::BlockBuilder as BlockBuilderApi;
|
||||
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
|
||||
use sp_consensus_aura::{sr25519::AuthorityId as AuraId, AuraApi};
|
||||
use sp_core::H256;
|
||||
use sp_inherents::CreateInherentDataProviders;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use pezsc_network::service::traits::NetworkService;
|
||||
use pezsc_network_sync::SyncingService;
|
||||
use pezsc_rpc::SubscriptionTaskExecutor;
|
||||
use pezsc_transaction_pool_api::TransactionPool;
|
||||
use pezsp_api::{CallApiAt, ProvideRuntimeApi};
|
||||
use pezsp_block_builder::BlockBuilder as BlockBuilderApi;
|
||||
use pezsp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
|
||||
use pezsp_consensus_aura::{sr25519::AuthorityId as AuraId, AuraApi};
|
||||
use pezsp_core::H256;
|
||||
use pezsp_inherents::CreateInherentDataProviders;
|
||||
use pezsp_runtime::traits::Block as BlockT;
|
||||
|
||||
/// Extra dependencies for Ethereum compatibility.
|
||||
pub struct EthDeps<B: BlockT, C, P, CT, CIDP> {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//! A collection of node-specific RPC methods.
|
||||
//! Bizinikiwi provides the `sc-rpc` crate, which defines the core RPC layer
|
||||
//! Bizinikiwi provides the `pezsc-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.
|
||||
|
||||
@@ -8,15 +8,15 @@ mod eth;
|
||||
use std::sync::Arc;
|
||||
|
||||
use evm_runtime_template::{opaque::Block, AccountId, Balance, Nonce};
|
||||
use sc_client_api::{backend::Backend, AuxStore, BlockchainEvents, StorageProvider, UsageProvider};
|
||||
use sc_rpc::SubscriptionTaskExecutor;
|
||||
use sc_transaction_pool_api::TransactionPool;
|
||||
use sp_api::{CallApiAt, ProvideRuntimeApi};
|
||||
use sp_block_builder::BlockBuilder;
|
||||
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
|
||||
use sp_consensus_aura::sr25519::AuthorityId as AuraId;
|
||||
use sp_inherents::CreateInherentDataProviders;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use pezsc_client_api::{backend::Backend, AuxStore, BlockchainEvents, StorageProvider, UsageProvider};
|
||||
use pezsc_rpc::SubscriptionTaskExecutor;
|
||||
use pezsc_transaction_pool_api::TransactionPool;
|
||||
use pezsp_api::{CallApiAt, ProvideRuntimeApi};
|
||||
use pezsp_block_builder::BlockBuilder;
|
||||
use pezsp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
|
||||
use pezsp_consensus_aura::sr25519::AuthorityId as AuraId;
|
||||
use pezsp_inherents::CreateInherentDataProviders;
|
||||
use pezsp_runtime::traits::Block as BlockT;
|
||||
|
||||
pub use self::eth::EthDeps;
|
||||
use crate::rpc::eth::create_eth;
|
||||
@@ -70,11 +70,11 @@ where
|
||||
+ 'static,
|
||||
C::Api: pezpallet_transaction_payment_rpc::TransactionPaymentRuntimeApi<Block, Balance>,
|
||||
C::Api: bizinikiwi_pezframe_rpc_system::AccountNonceApi<Block, AccountId, Nonce>,
|
||||
C::Api: sp_consensus_aura::AuraApi<Block, AuraId>,
|
||||
C::Api: pezsp_consensus_aura::AuraApi<Block, AuraId>,
|
||||
C::Api: BlockBuilder<Block>,
|
||||
C::Api: fp_rpc::ConvertTransactionRuntimeApi<Block>,
|
||||
C::Api: fp_rpc::EthereumRuntimeRPCApi<Block>,
|
||||
P: TransactionPool<Block = Block, Hash = sp_core::H256> + Sync + Send + 'static,
|
||||
P: TransactionPool<Block = Block, Hash = pezsp_core::H256> + Sync + Send + 'static,
|
||||
CIDP: CreateInherentDataProviders<Block, ()> + Send + 'static,
|
||||
CT: fp_rpc::ConvertTransaction<<Block as BlockT>::Extrinsic> + Send + Sync + 'static,
|
||||
BE: Backend<Block> + 'static,
|
||||
|
||||
@@ -4,44 +4,44 @@
|
||||
// std
|
||||
use std::{path::Path, sync::Arc, time::Duration};
|
||||
|
||||
use cumulus_client_cli::CollatorOptions;
|
||||
// Cumulus Imports
|
||||
use pezcumulus_client_cli::CollatorOptions;
|
||||
// Pezcumulus Imports
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use cumulus_client_collator::service::CollatorService;
|
||||
use cumulus_client_consensus_common::TeyrChainBlockImport as TTeyrChainBlockImport;
|
||||
use pezcumulus_client_collator::service::CollatorService;
|
||||
use pezcumulus_client_consensus_common::TeyrChainBlockImport as TTeyrChainBlockImport;
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use cumulus_client_consensus_proposer::Proposer;
|
||||
use cumulus_client_service::{
|
||||
use pezcumulus_client_consensus_proposer::Proposer;
|
||||
use pezcumulus_client_service::{
|
||||
build_network, build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks,
|
||||
BuildNetworkParams, CollatorSybilResistance, DARecoveryProfile, StartRelayChainTasksParams,
|
||||
};
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use cumulus_primitives_core::relay_chain::CollatorPair;
|
||||
use pezcumulus_primitives_core::relay_chain::CollatorPair;
|
||||
#[cfg(feature = "async-backing")]
|
||||
use cumulus_primitives_core::relay_chain::ValidationCode;
|
||||
use cumulus_primitives_core::ParaId;
|
||||
use pezcumulus_primitives_core::relay_chain::ValidationCode;
|
||||
use pezcumulus_primitives_core::ParaId;
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use cumulus_relay_chain_interface::OverseerHandle;
|
||||
use cumulus_relay_chain_interface::RelayChainInterface;
|
||||
use pezcumulus_relay_chain_interface::OverseerHandle;
|
||||
use pezcumulus_relay_chain_interface::RelayChainInterface;
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use evm_runtime_template::opaque::Hash;
|
||||
// Local Runtime Types
|
||||
use evm_runtime_template::{configs::TransactionConverter, opaque::Block, RuntimeApi};
|
||||
// Bizinikiwi Imports
|
||||
use pezframe_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE;
|
||||
use sc_client_api::Backend;
|
||||
use sc_consensus::ImportQueue;
|
||||
use sc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};
|
||||
use sc_network::{config::FullNetworkConfiguration, NetworkBlock};
|
||||
use sc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager};
|
||||
use pezsc_client_api::Backend;
|
||||
use pezsc_consensus::ImportQueue;
|
||||
use pezsc_executor::{HeapAllocStrategy, WasmExecutor, DEFAULT_HEAP_ALLOC_STRATEGY};
|
||||
use pezsc_network::{config::FullNetworkConfiguration, NetworkBlock};
|
||||
use pezsc_service::{Configuration, PartialComponents, TFullBackend, TFullClient, TaskManager};
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use sc_telemetry::TelemetryHandle;
|
||||
use sc_telemetry::{Telemetry, TelemetryWorker, TelemetryWorkerHandle};
|
||||
use sc_transaction_pool_api::OffchainTransactionPoolFactory;
|
||||
use pezsc_telemetry::TelemetryHandle;
|
||||
use pezsc_telemetry::{Telemetry, TelemetryWorker, TelemetryWorkerHandle};
|
||||
use pezsc_transaction_pool_api::OffchainTransactionPoolFactory;
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use sp_core::U256;
|
||||
use pezsp_core::U256;
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use sp_keystore::KeystorePtr;
|
||||
use pezsp_keystore::KeystorePtr;
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
use bizinikiwi_prometheus_endpoint::Registry;
|
||||
|
||||
@@ -52,12 +52,12 @@ use crate::eth::{
|
||||
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
pub type HostFunctions =
|
||||
(sp_io::BizinikiwiHostFunctions, cumulus_client_service::storage_proof_size::HostFunctions);
|
||||
(pezsp_io::BizinikiwiHostFunctions, pezcumulus_client_service::storage_proof_size::HostFunctions);
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
pub type HostFunctions = (
|
||||
sp_io::BizinikiwiHostFunctions,
|
||||
cumulus_client_service::storage_proof_size::HostFunctions,
|
||||
pezsp_io::BizinikiwiHostFunctions,
|
||||
pezcumulus_client_service::storage_proof_size::HostFunctions,
|
||||
pezframe_benchmarking::benchmarking::HostFunctions,
|
||||
);
|
||||
|
||||
@@ -74,8 +74,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>,
|
||||
@@ -92,12 +92,12 @@ pub type Service = PartialComponents<
|
||||
pub fn new_partial(
|
||||
config: &Configuration,
|
||||
eth_config: &EthConfiguration,
|
||||
) -> Result<Service, sc_service::Error> {
|
||||
) -> 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))
|
||||
@@ -118,7 +118,7 @@ pub fn new_partial(
|
||||
.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,
|
||||
@@ -134,7 +134,7 @@ pub fn new_partial(
|
||||
});
|
||||
|
||||
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(),
|
||||
@@ -214,7 +214,7 @@ pub fn import_queue(
|
||||
client: Arc<TeyrChainClient>,
|
||||
backend: Arc<TeyrChainBackend>,
|
||||
task_manager: &TaskManager,
|
||||
) -> (TeyrChainBlockImport, sc_consensus::BasicQueue<Block>) {
|
||||
) -> (TeyrChainBlockImport, pezsc_consensus::BasicQueue<Block>) {
|
||||
// The nimbus import queue ONLY checks the signature correctness
|
||||
// Any other checks corresponding to the author-correctness should be done
|
||||
// in the runtime
|
||||
@@ -224,7 +224,7 @@ pub fn import_queue(
|
||||
client,
|
||||
block_import.clone(),
|
||||
move |_, _| async move {
|
||||
let time = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
let time = pezsp_timestamp::InherentDataProvider::from_system_time();
|
||||
|
||||
Ok((time,))
|
||||
},
|
||||
@@ -242,15 +242,15 @@ pub fn import_queue(
|
||||
///
|
||||
/// This is the actual implementation that is abstract over the executor and the
|
||||
/// runtime api.
|
||||
#[sc_tracing::logging::prefix_logs_with("TeyrChain")]
|
||||
#[pezsc_tracing::logging::prefix_logs_with("TeyrChain")]
|
||||
async fn start_node_impl(
|
||||
teyrchain_config: Configuration,
|
||||
pezkuwi_config: Configuration,
|
||||
collator_options: CollatorOptions,
|
||||
eth_config: &EthConfiguration,
|
||||
para_id: ParaId,
|
||||
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, eth_config)?;
|
||||
@@ -265,7 +265,7 @@ async fn start_node_impl(
|
||||
let (_, mut telemetry, telemetry_worker_handle, frontier_backend, overrides) = params.other;
|
||||
|
||||
let frontier_backend = Arc::new(frontier_backend);
|
||||
let net_config = FullNetworkConfiguration::<_, _, sc_network::NetworkWorker<Block, Hash>>::new(
|
||||
let net_config = FullNetworkConfiguration::<_, _, pezsc_network::NetworkWorker<Block, Hash>>::new(
|
||||
&teyrchain_config.network,
|
||||
teyrchain_config.prometheus_config.as_ref().map(|cfg| cfg.registry.clone()),
|
||||
);
|
||||
@@ -283,7 +283,7 @@ async fn start_node_impl(
|
||||
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<_>))?;
|
||||
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
let (relay_chain_interface, collator_key) = relay_chain_interface;
|
||||
@@ -295,7 +295,7 @@ async fn start_node_impl(
|
||||
let transaction_pool = params.transaction_pool.clone();
|
||||
let import_queue_service = params.import_queue.service();
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
let slot_duration = sc_consensus_aura::slot_duration(&*client)?;
|
||||
let slot_duration = pezsc_consensus_aura::slot_duration(&*client)?;
|
||||
|
||||
let (network, system_rpc_tx, tx_handler_controller, sync_service) =
|
||||
build_network(BuildNetworkParams {
|
||||
@@ -317,7 +317,7 @@ async fn start_node_impl(
|
||||
task_manager.spawn_handle().spawn(
|
||||
"offchain-workers-runner",
|
||||
"offchain-work",
|
||||
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(),
|
||||
@@ -347,10 +347,10 @@ async fn start_node_impl(
|
||||
let enable_dev_signer = eth_config.enable_dev_signer;
|
||||
#[cfg(not(feature = "tanssi"))]
|
||||
let pending_create_inherent_data_providers = move |_, ()| async move {
|
||||
let current = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
let current = pezsp_timestamp::InherentDataProvider::from_system_time();
|
||||
let next_slot = current.timestamp().as_millis() + slot_duration.as_millis();
|
||||
let timestamp = sp_timestamp::InherentDataProvider::new(next_slot.into());
|
||||
let slot = sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||
let timestamp = pezsp_timestamp::InherentDataProvider::new(next_slot.into());
|
||||
let slot = pezsp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||
*timestamp,
|
||||
slot_duration,
|
||||
);
|
||||
@@ -409,7 +409,7 @@ async fn start_node_impl(
|
||||
})
|
||||
};
|
||||
|
||||
sc_service::spawn_tasks(sc_service::SpawnTasksParams {
|
||||
pezsc_service::spawn_tasks(pezsc_service::SpawnTasksParams {
|
||||
rpc_builder,
|
||||
client: client.clone(),
|
||||
transaction_pool: transaction_pool.clone(),
|
||||
@@ -425,7 +425,7 @@ async fn start_node_impl(
|
||||
})?;
|
||||
|
||||
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
|
||||
@@ -446,7 +446,7 @@ async fn start_node_impl(
|
||||
task_manager.spawn_handle().spawn(
|
||||
"telemetry_hwbench",
|
||||
None,
|
||||
sc_sysinfo::initialize_hwbench_telemetry(telemetry_handle, hwbench),
|
||||
pezsc_sysinfo::initialize_hwbench_telemetry(telemetry_handle, hwbench),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -460,7 +460,7 @@ async fn start_node_impl(
|
||||
|
||||
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(),
|
||||
@@ -525,9 +525,9 @@ fn build_import_queue(
|
||||
config: &Configuration,
|
||||
telemetry: Option<TelemetryHandle>,
|
||||
task_manager: &TaskManager,
|
||||
) -> Result<sc_consensus::DefaultImportQueue<Block>, sc_service::Error> {
|
||||
Ok(cumulus_client_consensus_aura::equivocation_import_queue::fully_verifying_import_queue::<
|
||||
sp_consensus_aura::sr25519::AuthorityPair,
|
||||
) -> Result<pezsc_consensus::DefaultImportQueue<Block>, pezsc_service::Error> {
|
||||
Ok(pezcumulus_client_consensus_aura::equivocation_import_queue::fully_verifying_import_queue::<
|
||||
pezsp_consensus_aura::sr25519::AuthorityPair,
|
||||
_,
|
||||
_,
|
||||
_,
|
||||
@@ -536,7 +536,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(),
|
||||
@@ -554,20 +554,20 @@ 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,
|
||||
collator_key: CollatorPair,
|
||||
overseer_handle: OverseerHandle,
|
||||
announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
|
||||
) -> Result<(), sc_service::Error> {
|
||||
) -> Result<(), pezsc_service::Error> {
|
||||
#[cfg(not(feature = "async-backing"))]
|
||||
use cumulus_client_consensus_aura::collators::basic::{self as basic_aura, Params};
|
||||
use pezcumulus_client_consensus_aura::collators::basic::{self as basic_aura, Params};
|
||||
#[cfg(feature = "async-backing")]
|
||||
use cumulus_client_consensus_aura::collators::lookahead::{self as aura, Params};
|
||||
use pezcumulus_client_consensus_aura::collators::lookahead::{self as aura, Params};
|
||||
|
||||
let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(
|
||||
let proposer_factory = pezsc_basic_authorship::ProposerFactory::with_proof_recording(
|
||||
task_manager.spawn_handle(),
|
||||
client.clone(),
|
||||
transaction_pool,
|
||||
@@ -619,11 +619,11 @@ fn start_consensus(
|
||||
};
|
||||
|
||||
#[cfg(not(feature = "async-backing"))]
|
||||
let fut = basic_aura::run::<Block, sp_consensus_aura::sr25519::AuthorityPair, _, _, _, _, _, _>(
|
||||
let fut = basic_aura::run::<Block, pezsp_consensus_aura::sr25519::AuthorityPair, _, _, _, _, _, _>(
|
||||
params,
|
||||
);
|
||||
#[cfg(feature = "async-backing")]
|
||||
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);
|
||||
@@ -638,8 +638,8 @@ pub async fn start_teyrchain_node(
|
||||
collator_options: CollatorOptions,
|
||||
eth_config: &EthConfiguration,
|
||||
para_id: ParaId,
|
||||
hwbench: Option<sc_sysinfo::HwBench>,
|
||||
) -> sc_service::error::Result<(TaskManager, Arc<TeyrChainClient>)> {
|
||||
hwbench: Option<pezsc_sysinfo::HwBench>,
|
||||
) -> pezsc_service::error::Result<(TaskManager, Arc<TeyrChainClient>)> {
|
||||
start_node_impl(
|
||||
teyrchain_config,
|
||||
pezkuwi_config,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use std::{collections::BTreeMap, sync::Arc};
|
||||
|
||||
use cumulus_client_teyrchain_inherent::TeyrChainInherentData;
|
||||
use cumulus_primitives_core::PersistedValidationData;
|
||||
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
|
||||
use pezcumulus_client_teyrchain_inherent::TeyrChainInherentData;
|
||||
use pezcumulus_primitives_core::PersistedValidationData;
|
||||
use pezcumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
|
||||
// Frontier
|
||||
pub use fc_rpc::{EthBlockDataCacheTask, EthConfig};
|
||||
pub use fc_rpc_core::types::{FeeHistoryCache, FeeHistoryCacheLimit, FilterPool};
|
||||
@@ -10,21 +10,21 @@ pub use fc_storage::StorageOverride;
|
||||
use fp_rpc::{ConvertTransaction, ConvertTransactionRuntimeApi, EthereumRuntimeRPCApi};
|
||||
use jsonrpsee::RpcModule;
|
||||
// Bizinikiwi
|
||||
use sc_client_api::{
|
||||
use pezsc_client_api::{
|
||||
backend::{Backend, StorageProvider},
|
||||
client::BlockchainEvents,
|
||||
AuxStore, UsageProvider,
|
||||
};
|
||||
use sc_network::service::traits::NetworkService;
|
||||
use sc_network_sync::SyncingService;
|
||||
use sc_rpc::SubscriptionTaskExecutor;
|
||||
use sc_transaction_pool::{ChainApi, Pool};
|
||||
use sc_transaction_pool_api::TransactionPool;
|
||||
use sp_api::{CallApiAt, ProvideRuntimeApi};
|
||||
use sp_block_builder::BlockBuilder as BlockBuilderApi;
|
||||
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
|
||||
use sp_core::H256;
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use pezsc_network::service::traits::NetworkService;
|
||||
use pezsc_network_sync::SyncingService;
|
||||
use pezsc_rpc::SubscriptionTaskExecutor;
|
||||
use pezsc_transaction_pool::{ChainApi, Pool};
|
||||
use pezsc_transaction_pool_api::TransactionPool;
|
||||
use pezsp_api::{CallApiAt, ProvideRuntimeApi};
|
||||
use pezsp_block_builder::BlockBuilder as BlockBuilderApi;
|
||||
use pezsp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
|
||||
use pezsp_core::H256;
|
||||
use pezsp_runtime::traits::Block as BlockT;
|
||||
|
||||
/// Extra dependencies for Ethereum compatibility.
|
||||
pub struct EthDeps<B: BlockT, C, P, A: ChainApi, CT> {
|
||||
@@ -133,7 +133,7 @@ where
|
||||
authorities: authorities_for_cidp,
|
||||
};
|
||||
|
||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||
let timestamp = pezsp_timestamp::InherentDataProvider::from_system_time();
|
||||
// Create a dummy teyrchain inherent data provider which is required to pass
|
||||
// the checks by the para chain system. We use dummy values because in the 'pending context'
|
||||
// neither do we have access to the real values nor do we need them.
|
||||
@@ -143,7 +143,7 @@ where
|
||||
}
|
||||
.into_state_root_and_proof();
|
||||
let vfp = PersistedValidationData {
|
||||
// This is a hack to make `cumulus_pezpallet_teyrchain_system::RelayNumberStrictlyIncreases`
|
||||
// This is a hack to make `pezcumulus_pezpallet_teyrchain_system::RelayNumberStrictlyIncreases`
|
||||
// happy. Relay parent number can't be bigger than u32::MAX.
|
||||
relay_parent_number: u32::MAX,
|
||||
relay_parent_storage_root,
|
||||
@@ -182,7 +182,7 @@ where
|
||||
forced_parent_hashes,
|
||||
pending_create_inherent_data_providers,
|
||||
Some(Box::new(tc_consensus::ContainerManualSealAuraConsensusDataProvider::new(
|
||||
sp_consensus_aura::SlotDuration::from_millis(
|
||||
pezsp_consensus_aura::SlotDuration::from_millis(
|
||||
evm_runtime_template::constants::SLOT_DURATION,
|
||||
),
|
||||
authorities_for_cdp.clone(),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//! A collection of node-specific RPC methods.
|
||||
//! Bizinikiwi provides the `sc-rpc` crate, which defines the core RPC layer
|
||||
//! Bizinikiwi provides the `pezsc-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.
|
||||
|
||||
@@ -8,15 +8,15 @@ mod eth;
|
||||
use std::sync::Arc;
|
||||
|
||||
use evm_runtime_template::{opaque::Block, AccountId, Balance, Nonce};
|
||||
use sc_client_api::{backend::Backend, AuxStore, BlockchainEvents, StorageProvider, UsageProvider};
|
||||
pub use sc_rpc::DenyUnsafe;
|
||||
use sc_rpc::SubscriptionTaskExecutor;
|
||||
use sc_transaction_pool::ChainApi;
|
||||
use sc_transaction_pool_api::TransactionPool;
|
||||
use sp_api::{CallApiAt, ProvideRuntimeApi};
|
||||
use sp_block_builder::BlockBuilder;
|
||||
use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use pezsc_client_api::{backend::Backend, AuxStore, BlockchainEvents, StorageProvider, UsageProvider};
|
||||
pub use pezsc_rpc::DenyUnsafe;
|
||||
use pezsc_rpc::SubscriptionTaskExecutor;
|
||||
use pezsc_transaction_pool::ChainApi;
|
||||
use pezsc_transaction_pool_api::TransactionPool;
|
||||
use pezsp_api::{CallApiAt, ProvideRuntimeApi};
|
||||
use pezsp_block_builder::BlockBuilder;
|
||||
use pezsp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};
|
||||
use pezsp_runtime::traits::Block as BlockT;
|
||||
|
||||
pub use self::eth::EthDeps;
|
||||
use crate::rpc::eth::create_eth;
|
||||
|
||||
Reference in New Issue
Block a user