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
+14 -14
View File
@@ -19,12 +19,12 @@ serde = { features = ["alloc", "derive"], workspace = true }
# Bridge dependencies
bp-runtime = { workspace = true }
# Substrate Dependencies
frame-support = { workspace = true }
sp-consensus-grandpa = { features = ["serde"], workspace = true }
sp-core = { features = ["serde"], workspace = true }
sp-runtime = { features = ["serde"], workspace = true }
sp-std = { workspace = true }
# Bizinikiwi Dependencies
pezframe-support = { workspace = true }
pezsp-consensus-grandpa = { features = ["serde"], workspace = true }
pezsp-core = { features = ["serde"], workspace = true }
pezsp-runtime = { features = ["serde"], workspace = true }
pezsp-std = { workspace = true }
[dev-dependencies]
bp-test-utils = { workspace = true, default-features = true }
@@ -37,18 +37,18 @@ std = [
"bp-runtime/std",
"codec/std",
"finality-grandpa/std",
"frame-support/std",
"pezframe-support/std",
"scale-info/std",
"serde/std",
"sp-consensus-grandpa/std",
"sp-core/std",
"sp-runtime/std",
"sp-std/std",
"pezsp-consensus-grandpa/std",
"pezsp-core/std",
"pezsp-runtime/std",
"pezsp-std/std",
]
runtime-benchmarks = [
"bp-runtime/runtime-benchmarks",
"bp-test-utils/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"sp-consensus-grandpa/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"pezframe-support/runtime-benchmarks",
"pezsp-consensus-grandpa/runtime-benchmarks",
"pezsp-runtime/runtime-benchmarks",
]
@@ -14,23 +14,23 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
//! Defines structures related to calls of the `pallet-bridge-grandpa` pallet.
//! Defines structures related to calls of the `pezpallet-bridge-grandpa` pallet.
use crate::{justification, InitializationData};
use bp_runtime::HeaderOf;
use codec::{Decode, Encode};
use frame_support::{weights::Weight, RuntimeDebugNoBound};
use pezframe_support::{weights::Weight, RuntimeDebugNoBound};
use scale_info::TypeInfo;
use sp_consensus_grandpa::SetId;
use sp_runtime::traits::{Header as HeaderT, Zero};
use sp_std::{boxed::Box, fmt::Debug};
use pezsp_consensus_grandpa::SetId;
use pezsp_runtime::traits::{Header as HeaderT, Zero};
use pezsp_std::{boxed::Box, fmt::Debug};
/// A minimized version of `pallet-bridge-grandpa::Call` that can be used without a runtime.
/// A minimized version of `pezpallet-bridge-grandpa::Call` that can be used without a runtime.
#[derive(Encode, Decode, Debug, PartialEq, Eq, Clone, TypeInfo)]
#[allow(non_camel_case_types)]
pub enum BridgeGrandpaCall<Header: HeaderT> {
/// `pallet-bridge-grandpa::Call::submit_finality_proof`
/// `pezpallet-bridge-grandpa::Call::submit_finality_proof`
#[codec(index = 0)]
submit_finality_proof {
/// The header that we are going to finalize.
@@ -38,13 +38,13 @@ pub enum BridgeGrandpaCall<Header: HeaderT> {
/// Finality justification for the `finality_target`.
justification: justification::GrandpaJustification<Header>,
},
/// `pallet-bridge-grandpa::Call::initialize`
/// `pezpallet-bridge-grandpa::Call::initialize`
#[codec(index = 1)]
initialize {
/// All data, required to initialize the pallet.
init_data: InitializationData<Header>,
},
/// `pallet-bridge-grandpa::Call::submit_finality_proof_ex`
/// `pezpallet-bridge-grandpa::Call::submit_finality_proof_ex`
#[codec(index = 4)]
submit_finality_proof_ex {
/// The header that we are going to finalize.
@@ -16,8 +16,8 @@
//! Logic for checking GRANDPA Finality Proofs.
//!
//! Adapted copy of substrate/client/finality-grandpa/src/justification.rs. If origin
//! will ever be moved to the sp_consensus_grandpa, we should reuse that implementation.
//! Adapted copy of bizinikiwi/client/finality-grandpa/src/justification.rs. If origin
//! will ever be moved to the pezsp_consensus_grandpa, we should reuse that implementation.
mod verification;
@@ -33,9 +33,9 @@ pub use verification::{
use bp_runtime::{BlockNumberOf, Chain, HashOf, HeaderId};
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
use sp_consensus_grandpa::{AuthorityId, AuthoritySignature};
use sp_runtime::{traits::Header as HeaderT, RuntimeDebug, SaturatedConversion};
use sp_std::prelude::*;
use pezsp_consensus_grandpa::{AuthorityId, AuthoritySignature};
use pezsp_runtime::{traits::Header as HeaderT, RuntimeDebug, SaturatedConversion};
use pezsp_std::prelude::*;
/// A GRANDPA Justification is a proof that a given header was finalized
/// at a certain height and with a certain set of authorities.
@@ -29,9 +29,9 @@ use crate::{
};
use bp_runtime::{BlockNumberOf, HashOf, HeaderOf};
use sp_consensus_grandpa::{AuthorityId, AuthoritySignature, EquivocationProof, Precommit};
use sp_runtime::traits::Header as HeaderT;
use sp_std::{
use pezsp_consensus_grandpa::{AuthorityId, AuthoritySignature, EquivocationProof, Precommit};
use pezsp_runtime::traits::Header as HeaderT;
use pezsp_std::{
collections::{btree_map::BTreeMap, btree_set::BTreeSet},
prelude::*,
vec,
@@ -93,7 +93,7 @@ impl<'a, Header: HeaderT> EquivocationsCollector<'a, Header> {
if let AuthorityVotes::Equivocation(equivocation) = vote {
equivocations.push(EquivocationProof::new(
self.context.authority_set_id,
sp_consensus_grandpa::Equivocation::Precommit(equivocation),
pezsp_consensus_grandpa::Equivocation::Precommit(equivocation),
));
}
}
@@ -176,7 +176,7 @@ impl<'a, Header: HeaderT> JustificationVerifier<Header> for EquivocationsCollect
}
/// Helper struct for finding equivocations in GRANDPA proofs.
pub struct GrandpaEquivocationsFinder<C>(sp_std::marker::PhantomData<C>);
pub struct GrandpaEquivocationsFinder<C>(pezsp_std::marker::PhantomData<C>);
impl<C: ChainWithGrandpa>
FindEquivocations<
@@ -24,9 +24,9 @@ use crate::{justification::GrandpaJustification, AuthoritySet};
use bp_runtime::HeaderId;
use finality_grandpa::voter_set::VoterSet;
use sp_consensus_grandpa::{AuthorityId, AuthoritySignature, SetId};
use sp_runtime::{traits::Header as HeaderT, RuntimeDebug};
use sp_std::{
use pezsp_consensus_grandpa::{AuthorityId, AuthoritySignature, SetId};
use pezsp_runtime::{traits::Header as HeaderT, RuntimeDebug};
use pezsp_std::{
collections::{
btree_map::{
BTreeMap,
@@ -299,7 +299,7 @@ trait JustificationVerifier<Header: HeaderT> {
}
// verify authority signature
if !sp_consensus_grandpa::check_message_signature_with_buffer(
if !pezsp_consensus_grandpa::check_message_signature_with_buffer(
&finality_grandpa::Message::Precommit(signed.precommit.clone()),
&signed.id,
&signed.signature,
@@ -24,9 +24,9 @@ use crate::justification::{
use crate::justification::verification::{
IterationFlow, JustificationVerificationContext, SignedPrecommit,
};
use sp_consensus_grandpa::AuthorityId;
use sp_runtime::traits::Header as HeaderT;
use sp_std::{collections::btree_set::BTreeSet, prelude::*, vec, vec::Vec};
use pezsp_consensus_grandpa::AuthorityId;
use pezsp_runtime::traits::Header as HeaderT;
use pezsp_std::{collections::btree_set::BTreeSet, prelude::*, vec, vec::Vec};
// Verification callbacks for justification optimization.
struct JustificationOptimizer<Header: HeaderT> {
@@ -24,9 +24,9 @@ use crate::justification::{
use crate::justification::verification::{
IterationFlow, JustificationVerificationContext, SignedPrecommit,
};
use sp_consensus_grandpa::AuthorityId;
use sp_runtime::traits::Header as HeaderT;
use sp_std::{collections::btree_set::BTreeSet, vec::Vec};
use pezsp_consensus_grandpa::AuthorityId;
use pezsp_runtime::traits::Header as HeaderT;
use pezsp_std::{collections::btree_set::BTreeSet, vec::Vec};
/// Verification callbacks that reject all unknown, duplicate or redundant votes.
struct StrictJustificationVerifier {
+12 -12
View File
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity Bridges Common. If not, see <http://www.gnu.org/licenses/>.
//! Defines traits which represent a common interface for Substrate pallets which want to
//! Defines traits which represent a common interface for Bizinikiwi pallets which want to
//! incorporate bridge functionality.
#![warn(missing_docs)]
@@ -29,14 +29,14 @@ use bp_runtime::{
};
use codec::{Codec, Decode, DecodeWithMemTracking, Encode, EncodeLike, MaxEncodedLen};
use core::{clone::Clone, cmp::Eq, default::Default, fmt::Debug};
use frame_support::PalletError;
use pezframe_support::PalletError;
use scale_info::TypeInfo;
use serde::{Deserialize, Serialize};
use sp_consensus_grandpa::{
use pezsp_consensus_grandpa::{
AuthorityList, ConsensusLog, ScheduledChange, SetId, GRANDPA_ENGINE_ID,
};
use sp_runtime::{traits::Header as HeaderT, Digest, RuntimeDebug, SaturatedConversion};
use sp_std::{boxed::Box, vec::Vec};
use pezsp_runtime::{traits::Header as HeaderT, Digest, RuntimeDebug, SaturatedConversion};
use pezsp_std::{boxed::Box, vec::Vec};
pub use call_info::{BridgeGrandpaCall, BridgeGrandpaCallOf, SubmitFinalityProofInfo};
@@ -80,7 +80,7 @@ impl<H: HeaderT> StoredHeaderDataBuilder<H::Number, H::Hash> for H {
}
}
/// Substrate header chain, abstracted from the way it is stored.
/// Bizinikiwi header chain, abstracted from the way it is stored.
pub trait HeaderChain<C: Chain> {
/// Returns state (storage) root of given finalized header.
fn finalized_header_state_root(header_hash: HashOf<C>) -> Option<HashOf<C>>;
@@ -164,12 +164,12 @@ pub trait ConsensusLogReader {
}
/// A struct that provides helper methods for querying the GRANDPA consensus log.
pub struct GrandpaConsensusLogReader<Number>(sp_std::marker::PhantomData<Number>);
pub struct GrandpaConsensusLogReader<Number>(pezsp_std::marker::PhantomData<Number>);
impl<Number: Codec> GrandpaConsensusLogReader<Number> {
/// Find and return scheduled (regular) change digest item.
pub fn find_scheduled_change(digest: &Digest) -> Option<ScheduledChange<Number>> {
use sp_runtime::generic::OpaqueDigestItemId;
use pezsp_runtime::generic::OpaqueDigestItemId;
let id = OpaqueDigestItemId::Consensus(&GRANDPA_ENGINE_ID);
let filter_log = |log: ConsensusLog<Number>| match log {
@@ -246,7 +246,7 @@ pub trait FindEquivocations<FinalityProof, FinalityVerificationContext, Equivoca
) -> Result<Vec<EquivocationProof>, Self::Error>;
}
/// Substrate-based chain that is using direct GRANDPA finality.
/// Bizinikiwi-based chain that is using direct GRANDPA finality.
///
/// Keep in mind that teyrchains are relying on relay chain GRANDPA, so they should not implement
/// this trait.
@@ -394,8 +394,8 @@ pub fn max_expected_submit_finality_proof_arguments_size<C: ChainWithGrandpa>(
mod tests {
use super::*;
use bp_runtime::ChainId;
use frame_support::weights::Weight;
use sp_runtime::{
use pezframe_support::weights::Weight;
use pezsp_runtime::{
testing::H256, traits::BlakeTwo256, DigestItem, MultiSignature, StateVersion,
};
@@ -407,7 +407,7 @@ mod tests {
type BlockNumber = u32;
type Hash = H256;
type Hasher = BlakeTwo256;
type Header = sp_runtime::generic::Header<u32, BlakeTwo256>;
type Header = pezsp_runtime::generic::Header<u32, BlakeTwo256>;
type AccountId = u64;
type Balance = u64;
type Nonce = u64;
@@ -23,13 +23,13 @@ pub const BEST_FINALIZED_VALUE_NAME: &str = "BestFinalized";
/// Name of the `CurrentAuthoritySet` storage value.
pub const CURRENT_AUTHORITY_SET_VALUE_NAME: &str = "CurrentAuthoritySet";
use sp_core::storage::StorageKey;
use pezsp_core::storage::StorageKey;
/// Storage key of the `PalletOperatingMode` variable in the runtime storage.
pub fn pallet_operating_mode_key(pallet_prefix: &str) -> StorageKey {
pub fn pezpallet_operating_mode_key(pezpallet_prefix: &str) -> StorageKey {
StorageKey(
bp_runtime::storage_value_final_key(
pallet_prefix.as_bytes(),
pezpallet_prefix.as_bytes(),
PALLET_OPERATING_MODE_VALUE_NAME.as_bytes(),
)
.to_vec(),
@@ -37,10 +37,10 @@ pub fn pallet_operating_mode_key(pallet_prefix: &str) -> StorageKey {
}
/// Storage key of the `CurrentAuthoritySet` variable in the runtime storage.
pub fn current_authority_set_key(pallet_prefix: &str) -> StorageKey {
pub fn current_authority_set_key(pezpallet_prefix: &str) -> StorageKey {
StorageKey(
bp_runtime::storage_value_final_key(
pallet_prefix.as_bytes(),
pezpallet_prefix.as_bytes(),
CURRENT_AUTHORITY_SET_VALUE_NAME.as_bytes(),
)
.to_vec(),
@@ -48,10 +48,10 @@ pub fn current_authority_set_key(pallet_prefix: &str) -> StorageKey {
}
/// Storage key of the best finalized header number and hash value in the runtime storage.
pub fn best_finalized_key(pallet_prefix: &str) -> StorageKey {
pub fn best_finalized_key(pezpallet_prefix: &str) -> StorageKey {
StorageKey(
bp_runtime::storage_value_final_key(
pallet_prefix.as_bytes(),
pezpallet_prefix.as_bytes(),
BEST_FINALIZED_VALUE_NAME.as_bytes(),
)
.to_vec(),
@@ -64,10 +64,10 @@ mod tests {
use hex_literal::hex;
#[test]
fn pallet_operating_mode_key_computed_properly() {
fn pezpallet_operating_mode_key_computed_properly() {
// If this test fails, then something has been changed in module storage that is breaking
// compatibility with previous pallet.
let storage_key = pallet_operating_mode_key("BridgeGrandpa").0;
let storage_key = pezpallet_operating_mode_key("BridgeGrandpa").0;
assert_eq!(
storage_key,
hex!("0b06f475eddb98cf933a12262e0388de0f4cf0917788d791142ff6c1f216e7b3").to_vec(),
@@ -30,10 +30,10 @@ use bp_test_utils::{
JustificationGeneratorParams, ALICE, BOB, CHARLIE, DAVE, EVE, FERDIE, TEST_GRANDPA_SET_ID,
};
use finality_grandpa::voter_set::VoterSet;
use sp_consensus_grandpa::{AuthorityId, AuthorityWeight, SetId};
use sp_runtime::traits::Header as HeaderT;
use pezsp_consensus_grandpa::{AuthorityId, AuthorityWeight, SetId};
use pezsp_runtime::traits::Header as HeaderT;
type TestHeader = sp_runtime::testing::Header;
type TestHeader = pezsp_runtime::testing::Header;
type TestHash = <TestHeader as HeaderT>::Hash;
type TestNumber = <TestHeader as HeaderT>::Number;
@@ -19,9 +19,9 @@
use bp_header_chain::justification::EquivocationsCollector;
use bp_test_utils::*;
use finality_grandpa::Precommit;
use sp_consensus_grandpa::EquivocationProof;
use pezsp_consensus_grandpa::EquivocationProof;
type TestHeader = sp_runtime::testing::Header;
type TestHeader = pezsp_runtime::testing::Header;
#[test]
fn duplicate_votes_are_not_considered_equivocations() {
@@ -56,7 +56,7 @@ fn equivocations_are_detected_in_base_justification_redundant_votes() {
collector.into_equivocation_proofs(),
vec![EquivocationProof::new(
1,
sp_consensus_grandpa::Equivocation::Precommit(finality_grandpa::Equivocation {
pezsp_consensus_grandpa::Equivocation::Precommit(finality_grandpa::Equivocation {
round_number: 1,
identity: ALICE.into(),
first: (
@@ -101,7 +101,7 @@ fn equivocations_are_detected_in_extra_justification_redundant_votes() {
collector.into_equivocation_proofs(),
vec![EquivocationProof::new(
1,
sp_consensus_grandpa::Equivocation::Precommit(finality_grandpa::Equivocation {
pezsp_consensus_grandpa::Equivocation::Precommit(finality_grandpa::Equivocation {
round_number: 1,
identity: ALICE.into(),
first: (
@@ -19,9 +19,9 @@
use bp_header_chain::justification::verify_and_optimize_justification;
use bp_test_utils::*;
use finality_grandpa::SignedPrecommit;
use sp_consensus_grandpa::AuthoritySignature;
use pezsp_consensus_grandpa::AuthoritySignature;
type TestHeader = sp_runtime::testing::Header;
type TestHeader = pezsp_runtime::testing::Header;
#[test]
fn optimizer_does_noting_with_minimal_justification() {
@@ -22,7 +22,7 @@ use bp_header_chain::justification::{
};
use bp_test_utils::*;
type TestHeader = sp_runtime::testing::Header;
type TestHeader = pezsp_runtime::testing::Header;
#[test]
fn valid_justification_accepted() {
@@ -74,7 +74,7 @@ fn valid_justification_accepted_with_single_fork() {
#[test]
fn valid_justification_accepted_with_arbitrary_number_of_authorities() {
use finality_grandpa::voter_set::VoterSet;
use sp_consensus_grandpa::AuthorityId;
use pezsp_consensus_grandpa::AuthorityId;
let n = 15;
let required_signatures = required_justification_precommits(n as _);
@@ -136,7 +136,7 @@ fn justification_with_invalid_commit_rejected() {
fn justification_with_invalid_authority_signature_rejected() {
let mut justification = make_default_justification::<TestHeader>(&test_header(1));
justification.commit.precommits[0].signature =
sp_core::crypto::UncheckedFrom::unchecked_from([1u8; 64]);
pezsp_core::crypto::UncheckedFrom::unchecked_from([1u8; 64]);
assert_eq!(
verify_justification::<TestHeader>(