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:
@@ -0,0 +1,48 @@
|
||||
[package]
|
||||
name = "pezcumulus-client-consensus-relay-chain"
|
||||
description = "The relay-chain provided consensus algorithm"
|
||||
version = "0.7.0"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license = "GPL-3.0-or-later WITH Classpath-exception-2.0"
|
||||
homepage.workspace = true
|
||||
repository.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
[dependencies]
|
||||
async-trait = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
parking_lot = { workspace = true, default-features = true }
|
||||
tracing = { workspace = true, default-features = true }
|
||||
|
||||
# Bizinikiwi
|
||||
prometheus-endpoint = { workspace = true, default-features = true }
|
||||
pezsc-consensus = { workspace = true, default-features = true }
|
||||
pezsp-api = { workspace = true, default-features = true }
|
||||
pezsp-block-builder = { workspace = true, default-features = true }
|
||||
pezsp-blockchain = { workspace = true, default-features = true }
|
||||
pezsp-consensus = { workspace = true, default-features = true }
|
||||
pezsp-core = { workspace = true, default-features = true }
|
||||
pezsp-inherents = { workspace = true, default-features = true }
|
||||
pezsp-runtime = { workspace = true, default-features = true }
|
||||
|
||||
# Pezcumulus
|
||||
pezcumulus-client-consensus-common = { workspace = true, default-features = true }
|
||||
pezcumulus-primitives-core = { workspace = true, default-features = true }
|
||||
pezcumulus-relay-chain-interface = { workspace = true, default-features = true }
|
||||
|
||||
[features]
|
||||
runtime-benchmarks = [
|
||||
"pezcumulus-client-consensus-common/runtime-benchmarks",
|
||||
"pezcumulus-primitives-core/runtime-benchmarks",
|
||||
"pezcumulus-relay-chain-interface/runtime-benchmarks",
|
||||
"pezsc-consensus/runtime-benchmarks",
|
||||
"pezsp-api/runtime-benchmarks",
|
||||
"pezsp-block-builder/runtime-benchmarks",
|
||||
"pezsp-blockchain/runtime-benchmarks",
|
||||
"pezsp-consensus/runtime-benchmarks",
|
||||
"pezsp-inherents/runtime-benchmarks",
|
||||
"pezsp-runtime/runtime-benchmarks",
|
||||
]
|
||||
@@ -0,0 +1,88 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Pezcumulus.
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
// 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 Pezcumulus. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use std::{marker::PhantomData, sync::Arc};
|
||||
|
||||
use pezsc_consensus::{import_queue::Verifier as VerifierT, BlockImportParams};
|
||||
use pezsp_api::ProvideRuntimeApi;
|
||||
use pezsp_block_builder::BlockBuilder as BlockBuilderApi;
|
||||
use pezsp_inherents::CreateInherentDataProviders;
|
||||
use pezsp_runtime::traits::{Block as BlockT, Header as HeaderT};
|
||||
|
||||
/// A verifier that just checks the inherents.
|
||||
pub struct Verifier<Client, Block, CIDP> {
|
||||
client: Arc<Client>,
|
||||
create_inherent_data_providers: CIDP,
|
||||
_marker: PhantomData<Block>,
|
||||
}
|
||||
|
||||
impl<Client, Block, CIDP> Verifier<Client, Block, CIDP> {
|
||||
/// Create a new instance.
|
||||
pub fn new(client: Arc<Client>, create_inherent_data_providers: CIDP) -> Self {
|
||||
Self { client, create_inherent_data_providers, _marker: PhantomData }
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl<Client, Block, CIDP> VerifierT<Block> for Verifier<Client, Block, CIDP>
|
||||
where
|
||||
Block: BlockT,
|
||||
Client: ProvideRuntimeApi<Block> + Send + Sync,
|
||||
<Client as ProvideRuntimeApi<Block>>::Api: BlockBuilderApi<Block>,
|
||||
CIDP: CreateInherentDataProviders<Block, ()>,
|
||||
{
|
||||
async fn verify(
|
||||
&self,
|
||||
mut block_params: BlockImportParams<Block>,
|
||||
) -> Result<BlockImportParams<Block>, String> {
|
||||
block_params.fork_choice = Some(pezsc_consensus::ForkChoiceStrategy::Custom(
|
||||
block_params.origin == pezsp_consensus::BlockOrigin::NetworkInitialSync,
|
||||
));
|
||||
|
||||
// Skip checks that include execution, if being told so, or when importing only state.
|
||||
//
|
||||
// This is done for example when gap syncing and it is expected that the block after the gap
|
||||
// was checked/chosen properly, e.g. by warp syncing to this block using a finality proof.
|
||||
if block_params.state_action.skip_execution_checks() || block_params.with_state() {
|
||||
return Ok(block_params);
|
||||
}
|
||||
|
||||
if let Some(inner_body) = block_params.body.take() {
|
||||
let inherent_data_providers = self
|
||||
.create_inherent_data_providers
|
||||
.create_inherent_data_providers(*block_params.header.parent_hash(), ())
|
||||
.await
|
||||
.map_err(|e| e.to_string())?;
|
||||
|
||||
let block = Block::new(block_params.header.clone(), inner_body);
|
||||
pezsp_block_builder::check_inherents(
|
||||
self.client.clone(),
|
||||
*block.header().parent_hash(),
|
||||
block.clone(),
|
||||
&inherent_data_providers,
|
||||
)
|
||||
.await
|
||||
.map_err(|e| format!("Error checking block inherents {:?}", e))?;
|
||||
|
||||
let (_, inner_body) = block.deconstruct();
|
||||
block_params.body = Some(inner_body);
|
||||
}
|
||||
|
||||
block_params.post_hash = Some(block_params.header.hash());
|
||||
Ok(block_params)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
// Copyright (C) Parity Technologies (UK) Ltd.
|
||||
// This file is part of Pezcumulus.
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
|
||||
|
||||
// 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.
|
||||
|
||||
// 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 Pezcumulus. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
//! The relay-chain provided consensus algorithm for teyrchains.
|
||||
//!
|
||||
//! This is the simplest consensus algorithm you can use when developing a teyrchain. It is a
|
||||
//! permission-less consensus algorithm that doesn't require any staking or similar to join as a
|
||||
//! collator. In this algorithm the consensus is provided by the relay-chain. This works in the
|
||||
//! following way.
|
||||
//!
|
||||
//! 1. Each node that sees itself as a collator is free to build a teyrchain candidate.
|
||||
//!
|
||||
//! 2. This teyrchain candidate is send to the teyrchain validators that are part of the relay
|
||||
//! chain.
|
||||
//!
|
||||
//! 3. The teyrchain validators validate at most X different teyrchain candidates, where X is the
|
||||
//! total number of teyrchain validators.
|
||||
//!
|
||||
//! 4. The teyrchain candidate that is backed by the most validators is chosen by the relay-chain
|
||||
//! block producer to be added as backed candidate on chain.
|
||||
//!
|
||||
//! 5. After the teyrchain candidate got backed and included, all collators start at 1.
|
||||
|
||||
mod import_queue;
|
||||
pub use import_queue::Verifier;
|
||||
Reference in New Issue
Block a user